Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Sunday, March 25, 2012

Cluster Model Viewer Timeout

Hi,

I am trying to browse a clustering model and encounter the following timeout error:

XML for Analysis parser: The XML for Analysis request timed out before it was completed.
Execution of the managed stored procedure GetNodeGraph failed with the following error: Exception has been thrown by the target of an invocation.Microsoft::AnalysisServices::AdomdServer::AdomdException.

Is there anything I can do to change settings to enable viewing of this model? Or, perhaps we have too many attributes in the model?

Thanks.

Please try the following:

In BI Dev Studio, go to the Tools menu and select Options\Business Intelligence Designers. Change the value of the Query Timeout to some larger value (600 would be a good start)

|||

Excellent, thanks Bogdan! That worked perfectly. For clarification, it's:

Tools --> Options

--> Browse left-side tree in the pop-up window to Designers --> Analysis Services Designers --> General

Thursday, March 8, 2012

CLR integration - Could not find Type '?' in assembly '?'.

Hi,

I'm new to Integration services and .Net programming but am trying to
create a dll that I can access from Sql server 2005.

The dll read's an xml file and carries out some processing. I've run
the code as an console app and it works fine.

I have created the assembly in sqlserver thus:

create assembly PinCodeLoader from
'C:\PinCodeLoader\PinCodeLoader\PinCodeLoader\bin\Debug\PinCodeLoader.dll'
with permission_set = external_access

But when I try to reference the assembly from a stored proc

create procedure dbo.interface_processPinCodefile(@.filename
nvarchar(1024))
as EXTERNAL name PinCodeLoader.PinCodeloader.Main

I get the following error:

Msg 6505, Level 16, State 1, Procedure interface_processPinCodefile,
Line 3
Could not find Type 'PinCodeloader' in assembly 'PinCodeLoader'.

I understand the context of the syntax should be
assembly_name.class_name.method_name. The first lines of the code in
the DLL are as follows

namespace PinCodeLoader
{
class PinCodeLoader
{
static void Main(string[] args)
{

Therefore assembly = PinCodeLoader, class_name = PinCodeLoader and
method_name = Main. Which should equal
EXTERNAL name PinCodeLoader.PinCodeloader.Main, I thought.

Has anybody come across this or can they offer any assistance?

Many thanks,

Paul

Hi, try to compile the .vb file with this command line:

csc.exe /t:library PinCodeLoader.bv (Put the correct name of the .vb file)

If this work look at the properties of the project and search for 'root namespace' (or something similar), and delete it, then try again compiling the entire solution from de IDE...

Good luck

Alejandro F.

|||

You need to include the namespace as well:

create procedure dbo.interface_processPinCodefile(@.filename
nvarchar(1024))
as EXTERNAL name PinCodeLoader.[PinCodeLoader.PinCodeloader].Main

However, you still won't be able to create your proc because SQL can't map nvarchar(1024) to the string array args.

|||

Thanks for your replies guys. I didn't actually try that method but found a way around it.

In my c# program I removed the reference to a namespace, as I was told it's not really necessary and changed the code as follows.

public class PinCodeLoad

{

public static void Main(string filename,string datasource,Int32 timeout, string companyname)

{

So instead of using the args parameter I'm implictly defining them. Plus I preceded my class and method with public

I kept the stored proc as before.

I hope that helps anybody else.

Paul

Saturday, February 25, 2012

Client-side xml updates and commits

Hi, I've been digging through online docs to see if SQLXML can do what I'm
hoping, and articles say it can, but not how...
My SQL database has regular relational tables, which I'd like to query
through xpath from a C# app, get the data returned to an XmlDocument (or
XPathDocument, but not a DataSet, which I found a sample for), use XPath to
make changes to the XmlDocument, and then commit the changes back to the SQL
tables.
The bottom of this page:
http://blogs.sqlxml.org/bryantlikes/...10/29/200.aspx regarding
Whidbey features, says "XmlAdapter - like SqlDataAdapter, fills an
XPathDocument from SQL Server, updates the changes back to SQL Server using
autogenerated update statements. Very nice!" which sounds like exactly what
I'm looking for, but searching for more information on "XmlAdapter" just
brings up a bunch of FoxPro stuff. Maybe this feature has been renamed in
the almost two years since that blog post - can anyone point me to current
documentation or samples on how to go about this? I can use SQL 2005 if
needed.
Thanks,
Roger
Hi,
This feature of XML adapter which you have been looking for is not available
in SQL server 2005 beta2.
refer to this link for more info.
http://www.aspnetdev.de/ClassReferen...mlAdapter.aspx
Thanks
"Roger W." wrote:

> Hi, I've been digging through online docs to see if SQLXML can do what I'm
> hoping, and articles say it can, but not how...
> My SQL database has regular relational tables, which I'd like to query
> through xpath from a C# app, get the data returned to an XmlDocument (or
> XPathDocument, but not a DataSet, which I found a sample for), use XPath to
> make changes to the XmlDocument, and then commit the changes back to the SQL
> tables.
> The bottom of this page:
> http://blogs.sqlxml.org/bryantlikes/...10/29/200.aspx regarding
> Whidbey features, says "XmlAdapter - like SqlDataAdapter, fills an
> XPathDocument from SQL Server, updates the changes back to SQL Server using
> autogenerated update statements. Very nice!" which sounds like exactly what
> I'm looking for, but searching for more information on "XmlAdapter" just
> brings up a bunch of FoxPro stuff. Maybe this feature has been renamed in
> the almost two years since that blog post - can anyone point me to current
> documentation or samples on how to go about this? I can use SQL 2005 if
> needed.
> Thanks,
> Roger
>
>

Friday, February 24, 2012

Client-side or server-side XML support?

What are the advantages/disadvantages of using either
client programming support in SQL server (referred to as
SQLXML) or server-side support - especially when
extracting formatted information from SQL server into a
C# web service? Which one is faster? What type of support
should be used in what circumtances, e.g. when IIS and
SQL server run on the same machine, when extracted
information is more/less voluminous?
Thanks in advance.
Jens
If you are talking about extracting information from the database only, then
using ADO/ADO.net with FOR XML is normally slightly better in performance,
since the XPath against annotated schema is using FOR XML under the covers
as well, but has the translation overhead (assuming that you have the same
query).
So it becomes more of a difference of the programming model and whether you
also load data (in which case for example the SQLXML XML Bulkload object
provides better performance than OpenXML).
Best regards
Michael
"Jens Doss" <jens.dosse@.oecd.org> wrote in message
news:1ef101c4f801$858247a0$a301280a@.phx.gbl...
> What are the advantages/disadvantages of using either
> client programming support in SQL server (referred to as
> SQLXML) or server-side support - especially when
> extracting formatted information from SQL server into a
> C# web service? Which one is faster? What type of support
> should be used in what circumtances, e.g. when IIS and
> SQL server run on the same machine, when extracted
> information is more/less voluminous?
> Thanks in advance.
> Jens

Client-side or server-side XML support?

What are the advantages/divantages of using either
client programming support in SQL server (referred to as
SQLXML) or server-side support - especially when
extracting formatted information from SQL server into a
C# web service? Which one is faster? What type of support
should be used in what circumtances, e.g. when IIS and
SQL server run on the same machine, when extracted
information is more/less voluminous?
Thanks in advance.
JensIf you are talking about extracting information from the database only, then
using ADO/ADO.net with FOR XML is normally slightly better in performance,
since the XPath against annotated schema is using FOR XML under the covers
as well, but has the translation overhead (assuming that you have the same
query).
So it becomes more of a difference of the programming model and whether you
also load data (in which case for example the SQLXML XML Bulkload object
provides better performance than OpenXML).
Best regards
Michael
"Jens Doss" <jens.dosse@.oecd.org> wrote in message
news:1ef101c4f801$858247a0$a301280a@.phx.gbl...
> What are the advantages/divantages of using either
> client programming support in SQL server (referred to as
> SQLXML) or server-side support - especially when
> extracting formatted information from SQL server into a
> C# web service? Which one is faster? What type of support
> should be used in what circumtances, e.g. when IIS and
> SQL server run on the same machine, when extracted
> information is more/less voluminous?
> Thanks in advance.
> Jens

Tuesday, February 14, 2012

Client found response content type of , but expected text/xml.

Hello, I have this code, and it just doesnt work,I am using rs 2005.

privatevoid cargarReporteFromWS()

{

cargarFormatos();

//Format format = (Format)ddlFormats.SelectedValue;

string encoding;string mimeType;ParameterValue[] parametersUsed;Warning[] warnings;string[] streamIds;

rs =

newReportingService();

rs.Credentials = System.Net.

CredentialCache.DefaultCredentials;

rs.Url =

"http://agamenon:90/reportserver/ReportingServices.asmx";byte[] data;string path ="/GescomRpts/RPT_MediosDesarrollo";

data = rs.Render(path, ddlFormats.SelectedValue,

null,null,null,null,null,out encoding,out mimeType,out parametersUsed,out warnings,out streamIds);FuncionesRS fs =newFuncionesRS() ;string extension = fs.GetExtension(mimeType);string filename = path +"." + extension;

Response.Clear();

Response.ContentType=mimeType;

if(mimeType!="text/html")

Response.AddHeader(

"Content-disposition","attachment; filename="+filename);

Response.BinaryWrite(data);

}

Server Error in '/GescomDllo' Application.

Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.InvalidOperationException: Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.

Source Error:

Line 1704: [return: System.Xml.Serialization.XmlElementAttribute("Result", DataType="base64Binary")]Line 1705: public byte[] Render(string Report, string Format, string HistoryID, string DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, string ShowHideToggle, out string Encoding, out string MimeType, out ParameterValue[] ParametersUsed, out Warning[] Warnings, out string[] StreamIds) {Line 1706: object[] results = this.Invoke("Render", new object[] {Line 1707: Report,Line 1708: Format,


Source File:c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\gescomdllo\27bee1ac\cdebe31b\App_WebReferences.4i0hyhkt.0.cs Line:1706

Stack Trace:

[InvalidOperationException: Client found response content type of '', but expected 'text/xml'.The request failed with an empty response.] System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +533395 System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204 RSWebService.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) in c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\gescomdllo\27bee1ac\cdebe31b\App_WebReferences.4i0hyhkt.0.cs:1706 Protected_01_Administradores_rptmediosdesarrollo.cargarReporteFromWS() in c:\Inetpub\wwwroot\GescomDllo\Protected\01_Administradores\rptmediosdesarrollo.aspx.cs:44 Protected_01_Administradores_rptmediosdesarrollo.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\GescomDllo\Protected\01_Administradores\rptmediosdesarrollo.aspx.cs:23 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061



Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42


http://spaces.msn.com/levalenciam

What exactly are you trying to do with this code?