Showing posts with label consists. Show all posts
Showing posts with label consists. Show all posts

Wednesday, March 21, 2012

Error in sql profiler for analysis srevices 2005

Hi,

I am new to MS Analysis server technologies.
I environment consists of:
Server: windows 2003 server, Sql server 2005, analysis server 2005
client: windows xp

As given by Microsoft, I configured the server for HTTP access. When I try to browse to msmdpump.dll by giving the path "http://ServerName/olap/msmdpump.dll" both in server and client systems I get the HTTP 500 Internal server error.
I also did a right-click->browse from the inetmgr in the server. still I am getting the same error.

Should I not be getting some response when i browse to the msmdpump.dll?

Please do help me.
Is there something else that I have to do.

Regards
Vijay R

You cannot use IE. You should try and use client side application: One like MDXSample app shipped with AS2000 to browse AS2005 cubes.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks for the reply. I did that and with a bith of tweaking and minor re-coding I am able to run the sample.net windows application.

Next I tried to create a simple asp.net application similar to the code in the sample.net .The sample was in vb.net and I have coded in c#.

I now get the following error when I run and try to send a simple "Discover" request. The error i get is:

<code>

SoapException: The Session element at line 1, column 547 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
OlapApp.XMLA.MsXmlAnalysis.Discover(Discover Discover1, Session& Session, BeginSession BeginSession, EndSession EndSession) in z:\olapapp\web references\xmla\reference.cs:47
OlapApp.TestForm1.btnRequest_Click(Object sender, EventArgs e) in z:\olapapp\testform1.aspx.cs:130
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292

</code>

In my code I am doing the following:

I created a web reference to the msmdpump.dll (discover, execute - webservice) using the vs.wsdl in visual studio.

My page has a button and a drop down list, the drop down list enables the user to select the "RequestType" for the discover request. like catalog, cube, dimension....etc

on click, I set the properties of the discovery object and pass it to the webservice with the other parameters.

Here is my code:

<code>

private void btnRequest_Click(object sender, System.EventArgs e){

if(RequestType.Equals("DISCOVER_DATASOURCES"))

{Restrictions = "";

Properties = "<Format>Tabular</Format>";}

if(Restrictions != "")

{ string strRestrictionXml = "<RestrictionList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Restrictions + "</RestrictionList>";

RestrictionsXml.LoadXml(strRestrictionXml);}

if(Properties != "")

{string strPropertiesXml = "<PropertyList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Properties + "</PropertyList>";

PropertiesXml.LoadXml(strPropertiesXml);}

//main code is here--

XMLA.Discover XMLAdiscRequest = new OlapApp.XMLA.Discover();

XMLAdiscRequest.RequestType = RequestType;

XMLAdiscRequest.Properties = (System.Xml.XmlElement)PropertiesXml.FirstChild;

XMLAdiscRequest.Restrictions = (System.Xml.XmlElement)RestrictionsXml.FirstChild;

XMLA.Session XMLARequestSession = new OlapApp.XMLA.Session();

XMLA.MsXmlAnalysis DiscoverWS = new OlapApp.XMLA.MsXmlAnalysis();

DiscoverWS.Url = ServerURL;

DiscoverWS.Credentials = CredentialCache.DefaultCredentials;

ResponseXml = DiscoverWS.Discover(XMLAdiscRequest,ref XMLARequestSession,null,null).@.return;

lblResultant.Visible = true;

lblResultant.Text = ResponseXml.OuterXml;

<\code>

sorry for the lengthy code. can anybody tell me where I am doing wrong? if not can anybody give some sample code?

thanks and regards

Vijay R

|||

The error indicates that your request is not constructed correctly.

Try and run SQL Profiler connect to Analysis Services and see how well-formed requests look like when connecting from MDXSample app or SQL Management studio.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks I found out the error. I was creating an object of the session.

Now it is returning a response for the "DISCOVER_DATASOURCES" discover request.

but when I am trying to discover the catalogs in the datasource, It is only returning the schema but no catalog rows.

It is the same code used for discover of datasources, except I changed the RequestType to "DBSCHEMA_CATALOGS" and the Properties to :

<DataSourceInfo>myDataSourceName</DataSourceInfo>
<Format>Tabular</Format>

Please tell me what is the reason for this?

Also, The above error is in an asp.net application. I then created a small windows application in C# .net. there it is returning me the correct response for the Dbschema_catalogs request.

What is the error? what should I be doing?

Thanks and Regards

Vijay R

|||

Hi,

wanetd to tell one more thing that I noticed. I had the sql profiler for ssas 2005 open.

All requests made by me (both win app and asp.net app) have a "0" (zero) in the error column for the event subclass "Server state Discover End".

what is this error? how do i solve it?

Thanks and Regards

Vijay R

|||

Try and see what is the user your asp application is running under. This could be just matter of access permission.

Error = 0 means the operation completed successfully.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi ,

Thanks,

That helped. I just added the Impersonate user in the web.config of the file.

I have another problem today.

Please do see my other post

thanks again

regards

Vijay R

Error in sql profiler for analysis srevices 2005

Hi,

I am new to MS Analysis server technologies.
I environment consists of:
Server: windows 2003 server, Sql server 2005, analysis server 2005
client: windows xp

As given by Microsoft, I configured the server for HTTP access. When I try to browse to msmdpump.dll by giving the path "http://ServerName/olap/msmdpump.dll" both in server and client systems I get the HTTP 500 Internal server error.
I also did a right-click->browse from the inetmgr in the server. still I am getting the same error.

Should I not be getting some response when i browse to the msmdpump.dll?

Please do help me.
Is there something else that I have to do.

Regards
Vijay R

You cannot use IE. You should try and use client side application: One like MDXSample app shipped with AS2000 to browse AS2005 cubes.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks for the reply. I did that and with a bith of tweaking and minor re-coding I am able to run the sample.net windows application.

Next I tried to create a simple asp.net application similar to the code in the sample.net .The sample was in vb.net and I have coded in c#.

I now get the following error when I run and try to send a simple "Discover" request. The error i get is:

<code>

SoapException: The Session element at line 1, column 547 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
OlapApp.XMLA.MsXmlAnalysis.Discover(Discover Discover1, Session& Session, BeginSession BeginSession, EndSession EndSession) in z:\olapapp\web references\xmla\reference.cs:47
OlapApp.TestForm1.btnRequest_Click(Object sender, EventArgs e) in z:\olapapp\testform1.aspx.cs:130
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292

</code>

In my code I am doing the following:

I created a web reference to the msmdpump.dll (discover, execute - webservice) using the vs.wsdl in visual studio.

My page has a button and a drop down list, the drop down list enables the user to select the "RequestType" for the discover request. like catalog, cube, dimension....etc

on click, I set the properties of the discovery object and pass it to the webservice with the other parameters.

Here is my code:

<code>

private void btnRequest_Click(object sender, System.EventArgs e){

if(RequestType.Equals("DISCOVER_DATASOURCES"))

{Restrictions = "";

Properties = "<Format>Tabular</Format>";}

if(Restrictions != "")

{ string strRestrictionXml = "<RestrictionList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Restrictions + "</RestrictionList>";

RestrictionsXml.LoadXml(strRestrictionXml);}

if(Properties != "")

{string strPropertiesXml = "<PropertyList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Properties + "</PropertyList>";

PropertiesXml.LoadXml(strPropertiesXml);}

//main code is here--

XMLA.Discover XMLAdiscRequest = new OlapApp.XMLA.Discover();

XMLAdiscRequest.RequestType = RequestType;

XMLAdiscRequest.Properties = (System.Xml.XmlElement)PropertiesXml.FirstChild;

XMLAdiscRequest.Restrictions = (System.Xml.XmlElement)RestrictionsXml.FirstChild;

XMLA.Session XMLARequestSession = new OlapApp.XMLA.Session();

XMLA.MsXmlAnalysis DiscoverWS = new OlapApp.XMLA.MsXmlAnalysis();

DiscoverWS.Url = ServerURL;

DiscoverWS.Credentials = CredentialCache.DefaultCredentials;

ResponseXml = DiscoverWS.Discover(XMLAdiscRequest,ref XMLARequestSession,null,null).@.return;

lblResultant.Visible = true;

lblResultant.Text = ResponseXml.OuterXml;

<\code>

sorry for the lengthy code. can anybody tell me where I am doing wrong? if not can anybody give some sample code?

thanks and regards

Vijay R

|||

The error indicates that your request is not constructed correctly.

Try and run SQL Profiler connect to Analysis Services and see how well-formed requests look like when connecting from MDXSample app or SQL Management studio.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks I found out the error. I was creating an object of the session.

Now it is returning a response for the "DISCOVER_DATASOURCES" discover request.

but when I am trying to discover the catalogs in the datasource, It is only returning the schema but no catalog rows.

It is the same code used for discover of datasources, except I changed the RequestType to "DBSCHEMA_CATALOGS" and the Properties to :

<DataSourceInfo>myDataSourceName</DataSourceInfo>
<Format>Tabular</Format>

Please tell me what is the reason for this?

Also, The above error is in an asp.net application. I then created a small windows application in C# .net. there it is returning me the correct response for the Dbschema_catalogs request.

What is the error? what should I be doing?

Thanks and Regards

Vijay R

|||

Hi,

wanetd to tell one more thing that I noticed. I had the sql profiler for ssas 2005 open.

All requests made by me (both win app and asp.net app) have a "0" (zero) in the error column for the event subclass "Server state Discover End".

what is this error? how do i solve it?

Thanks and Regards

Vijay R

|||

Try and see what is the user your asp application is running under. This could be just matter of access permission.

Error = 0 means the operation completed successfully.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi ,

Thanks,

That helped. I just added the Impersonate user in the web.config of the file.

I have another problem today.

Please do see my other post

thanks again

regards

Vijay R

Sunday, March 11, 2012

Error in Query

The database scheme consists of four relations:

Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, screen, price)
Printer(code, model, color, type, price)

The relation "Product" shows the maker, model number, and type (pc,
laptop, or printer). It is assumed that model numbers are unique for
all the makers and product types. For each model number specifying pc
in the relation "PC", its listed speed (of the processor in MGz), total
RAM (in MGb), hd capacity (in Gb), CD ROM speed (for example, '4x'),
and the price. The relation "Laptop" is similar to that one of PCs
except for the CD ROM speed which is replaced by screen size (in
inches). For each printer model in the relation "Printer" it is pointed
whether the printer is color or not (color attribute is 'y' for color
printers; otherwise it is 'n'), printer type (laser, jet, or matrix),
and the price.

I need to write a query for Find printer makers.
Result set: maker.

My Query is

select distinct product.maker from product inner join printer on
product.model = printer.model

I get the message
Your query produced correct result set on main database, but it failed
test on second, checking database.
* Wrong number of records (less by 1)

This question is an SQL exercise in URL http://www.sql-ex.ru/

Can anyobe explain me "correct result set on main database," why "but
it failed test on second, checking database."
* Wrong number of records (less by 1)

Thank you very much,

MiksHi Miks

> Can anyobe explain me "correct result set on main database," why "but
> it failed test on second, checking database."
> * Wrong number of records (less by 1)

My guess (emphasis on "guess") is that it has something to do with the fact
that you don't need a second table for this query. The writers of this
website, must be doing some sort of parsing of your query, this is not a
standard SQL Server error message.

This query is sufficient

select distinct maker from Product where type = 'printer'

--
-Dick Christoph
"Miks" <akmeera2k4@.gmail.com> wrote in message
news:1142418307.696828.171550@.j33g2000cwa.googlegr oups.com...
> The database scheme consists of four relations:
> Product(maker, model, type)
> PC(code, model, speed, ram, hd, cd, price)
> Laptop(code, model, speed, ram, hd, screen, price)
> Printer(code, model, color, type, price)
> The relation "Product" shows the maker, model number, and type (pc,
> laptop, or printer). It is assumed that model numbers are unique for
> all the makers and product types. For each model number specifying pc
> in the relation "PC", its listed speed (of the processor in MGz), total
> RAM (in MGb), hd capacity (in Gb), CD ROM speed (for example, '4x'),
> and the price. The relation "Laptop" is similar to that one of PCs
> except for the CD ROM speed which is replaced by screen size (in
> inches). For each printer model in the relation "Printer" it is pointed
> whether the printer is color or not (color attribute is 'y' for color
> printers; otherwise it is 'n'), printer type (laser, jet, or matrix),
> and the price.
> I need to write a query for Find printer makers.
> Result set: maker.
> My Query is
> select distinct product.maker from product inner join printer on
> product.model = printer.model
>
> I get the message
> Your query produced correct result set on main database, but it failed
> test on second, checking database.
> * Wrong number of records (less by 1)
> This question is an SQL exercise in URL http://www.sql-ex.ru/
> Can anyobe explain me "correct result set on main database," why "but
> it failed test on second, checking database."
> * Wrong number of records (less by 1)
> Thank you very much,
> Miks|||homework?|||any place where you can find the answer of these exercies?

im stuck at exercse 10:

Exercise: 10
Find the printers having the highest price.
Result set: model, price.

my query:

select model, max(price)price from printer

http://www.sql-ex.ru/exercises.php#answer_ref

any place for the answers?|||Hi Daniel

Here is one answer (One SQL Query that works)

select Model, Price
from Printer
where price = (select max(price) from Printer)

--
-Dick Christoph
"Daniel" <dtukkers@.gmail.com> wrote in message
news:1143709387.198548.201780@.z34g2000cwc.googlegr oups.com...
> any place where you can find the answer of these exercies?
> im stuck at exercse 10:
> Exercise: 10
> Find the printers having the highest price.
> Result set: model, price.
> my query:
> select model, max(price)price from printer
> http://www.sql-ex.ru/exercises.php#answer_ref
> any place for the answers?

Friday, February 24, 2012

Error in creating a simple asp.net app similar to sample.net (as2000 samples)

Hi,

I am new to MS Analysis server technologies.
I environment consists of:
Server: windows 2003 server, Sql server 2005, analysis server 2005
client: windows xp

As given by Microsoft, I configured the server for HTTP access. When I try to browse to msmdpump.dll by giving the path "http://ServerName/olap/msmdpump.dll" both in server and client systems I get the HTTP 500 Internal server error.
I also did a right-click->browse from the inetmgr in the server. still I am getting the same error.

Should I not be getting some response when i browse to the msmdpump.dll?

Please do help me.
Is there something else that I have to do.

Regards
Vijay R

You cannot use IE. You should try and use client side application: One like MDXSample app shipped with AS2000 to browse AS2005 cubes.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks for the reply. I did that and with a bith of tweaking and minor re-coding I am able to run the sample.net windows application.

Next I tried to create a simple asp.net application similar to the code in the sample.net .The sample was in vb.net and I have coded in c#.

I now get the following error when I run and try to send a simple "Discover" request. The error i get is:

<code>

SoapException: The Session element at line 1, column 547 (namespace urn:schemas-microsoft-com:xml-analysis) cannot appear under Envelope/Body.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +1503
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +218
OlapApp.XMLA.MsXmlAnalysis.Discover(Discover Discover1, Session& Session, BeginSession BeginSession, EndSession EndSession) in z:\olapapp\web references\xmla\reference.cs:47
OlapApp.TestForm1.btnRequest_Click(Object sender, EventArgs e) in z:\olapapp\testform1.aspx.cs:130
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292

</code>

In my code I am doing the following:

I created a web reference to the msmdpump.dll (discover, execute - webservice) using the vs.wsdl in visual studio.

My page has a button and a drop down list, the drop down list enables the user to select the "RequestType" for the discover request. like catalog, cube, dimension....etc

on click, I set the properties of the discovery object and pass it to the webservice with the other parameters.

Here is my code:

<code>

private void btnRequest_Click(object sender, System.EventArgs e){

if(RequestType.Equals("DISCOVER_DATASOURCES"))

{Restrictions = "";

Properties = "<Format>Tabular</Format>";}

if(Restrictions != "")

{ string strRestrictionXml = "<RestrictionList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Restrictions + "</RestrictionList>";

RestrictionsXml.LoadXml(strRestrictionXml);}

if(Properties != "")

{string strPropertiesXml = "<PropertyList xmlns=" + '"' + "urn:schemas-microsoft-com:xml-analysis" + '"' + ">" + Properties + "</PropertyList>";

PropertiesXml.LoadXml(strPropertiesXml);}

//main code is here--

XMLA.Discover XMLAdiscRequest = new OlapApp.XMLA.Discover();

XMLAdiscRequest.RequestType = RequestType;

XMLAdiscRequest.Properties = (System.Xml.XmlElement)PropertiesXml.FirstChild;

XMLAdiscRequest.Restrictions = (System.Xml.XmlElement)RestrictionsXml.FirstChild;

XMLA.Session XMLARequestSession = new OlapApp.XMLA.Session();

XMLA.MsXmlAnalysis DiscoverWS = new OlapApp.XMLA.MsXmlAnalysis();

DiscoverWS.Url = ServerURL;

DiscoverWS.Credentials = CredentialCache.DefaultCredentials;

ResponseXml = DiscoverWS.Discover(XMLAdiscRequest,ref XMLARequestSession,null,null).@.return;

lblResultant.Visible = true;

lblResultant.Text = ResponseXml.OuterXml;

<\code>

sorry for the lengthy code. can anybody tell me where I am doing wrong? if not can anybody give some sample code?

thanks and regards

Vijay R

|||

The error indicates that your request is not constructed correctly.

Try and run SQL Profiler connect to Analysis Services and see how well-formed requests look like when connecting from MDXSample app or SQL Management studio.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi,

Thanks I found out the error. I was creating an object of the session.

Now it is returning a response for the "DISCOVER_DATASOURCES" discover request.

but when I am trying to discover the catalogs in the datasource, It is only returning the schema but no catalog rows.

It is the same code used for discover of datasources, except I changed the RequestType to "DBSCHEMA_CATALOGS" and the Properties to :

<DataSourceInfo>myDataSourceName</DataSourceInfo>
<Format>Tabular</Format>

Please tell me what is the reason for this?

Also, The above error is in an asp.net application. I then created a small windows application in C# .net. there it is returning me the correct response for the Dbschema_catalogs request.

What is the error? what should I be doing?

Thanks and Regards

Vijay R

|||

Hi,

wanetd to tell one more thing that I noticed. I had the sql profiler for ssas 2005 open.

All requests made by me (both win app and asp.net app) have a "0" (zero) in the error column for the event subclass "Server state Discover End".

what is this error? how do i solve it?

Thanks and Regards

Vijay R

|||

Try and see what is the user your asp application is running under. This could be just matter of access permission.

Error = 0 means the operation completed successfully.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi ,

Thanks,

That helped. I just added the Impersonate user in the web.config of the file.

I have another problem today.

Please do see my other post

thanks again

regards

Vijay R