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

Sunday, March 25, 2012

Can you save XML to a Database?

The XML generated by notifications object needs to be saved. Where do I save it - in the database. That will still be stored in a table - with drawbacks!Not sure what the question is. You can save XML to a database or to a file.|||Sorry, I meant to say what does Integration services do when I deploy the project? Does it use XML to write to the database or the file system?|||You can store the packages in either the file system or the SQL Server MSDB database, your choice.|||How do I define the choice for later only database format? Is that something I have to specify as properties from Analysis services?|||I'm sorry, but I'm not sure what this has to do with Analysis Services. I'm talking about SSIS packages (files with a .dtsx extension). These can be deployed to either the database or the file system - you can't enforce that they are only deployed to one or the other when you are building the package. That's really an issue for your organization's policies and procedures.sql

Can you save XML to a Database?

The XML generated by notifications object needs to be saved. Where do I save it - in the database. That will still be stored in a table - with drawbacks!Not sure what the question is. You can save XML to a database or to a file.|||Sorry, I meant to say what does Integration services do when I deploy the project? Does it use XML to write to the database or the file system?|||You can store the packages in either the file system or the SQL Server MSDB database, your choice.|||How do I define the choice for later only database format? Is that something I have to specify as properties from Analysis services?|||I'm sorry, but I'm not sure what this has to do with Analysis Services. I'm talking about SSIS packages (files with a .dtsx extension). These can be deployed to either the database or the file system - you can't enforce that they are only deployed to one or the other when you are building the package. That's really an issue for your organization's policies and procedures.

Thursday, March 8, 2012

.NET Framework execution was aborted by escalation policy because of out of memory

Hi,

I have a SQL CLR used to read a XML file, it works fine when the file is smaller, but will give me this error if the file if bigger i.e. more than 10M.

Msg 6532, Level 16, State 49, Line 2

.NET Framework execution was aborted by escalation policy because of out of memory.

System.InvalidOperationException: Data access is not allowed in this context. Either the context is a function or method not marked with DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain data from FillRow method of a Table Valued Function, or is a UDT validation method.

System.InvalidOperationException:

at System.Data.SqlServer.Internal.ClrLevelContext.CheckSqlAccessReturnCode(SqlAccessApiReturnCode eRc)

at System.Data.SqlServer.Internal.ClrLevelContext.GetDatabase(SmiEventSink sink, Int32* pcbLen, IntPtr* ppwsName)

at Microsoft.SqlServer.Server.InProcConnection.GetCurrentDatabase(SmiEventSink eventSink)

at System.Data.SqlClient.SqlInternalConnectionSmi.Activate()

at System.Data.SqlClient.SqlConnectionFactory.GetContextConnection(SqlConnectionString options, Object providerInfo, DbConnection owningConnection)

at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at BuildDirect.SQLCLR.CLRErrorHandler.RaiseNewCLRError(Int32 errorid, String errormsg)

at BuildDirect.SQLCLR.CLRErrorHandler.ReportCLRError(String location, String errormsg)

at BuildDirect.SQLCLR.CLRErrorHandler.ReportCLRError(String location, Exception ex)

at BuildDirect.SQLCLR.HTTPRequest.uCLRGetHTTPResponse(String url)

How to prevent this error and solve this problem?

Thanks

This blog post should answer all your questions: http://blogs.msdn.com/sqlclr/archive/2006/03/24/560154.aspx. If it doesn't, please feel free to ask them back.

.NET Framework execution was aborted by escalation policy because of out of memory

Hi,

I have a SQL CLR used to read a XML file, it works fine when the file is smaller, but will give me this error if the file if bigger i.e. more than 10M.

Msg 6532, Level 16, State 49, Line 2

.NET Framework execution was aborted by escalation policy because of out of memory.

System.InvalidOperationException: Data access is not allowed in this context. Either the context is a function or method not marked with DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain data from FillRow method of a Table Valued Function, or is a UDT validation method.

System.InvalidOperationException:

at System.Data.SqlServer.Internal.ClrLevelContext.CheckSqlAccessReturnCode(SqlAccessApiReturnCode eRc)

at System.Data.SqlServer.Internal.ClrLevelContext.GetDatabase(SmiEventSink sink, Int32* pcbLen, IntPtr* ppwsName)

at Microsoft.SqlServer.Server.InProcConnection.GetCurrentDatabase(SmiEventSink eventSink)

at System.Data.SqlClient.SqlInternalConnectionSmi.Activate()

at System.Data.SqlClient.SqlConnectionFactory.GetContextConnection(SqlConnectionString options, Object providerInfo, DbConnection owningConnection)

at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)

at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)

at System.Data.SqlClient.SqlConnection.Open()

at BuildDirect.SQLCLR.CLRErrorHandler.RaiseNewCLRError(Int32 errorid, String errormsg)

at BuildDirect.SQLCLR.CLRErrorHandler.ReportCLRError(String location, String errormsg)

at BuildDirect.SQLCLR.CLRErrorHandler.ReportCLRError(String location, Exception ex)

at BuildDirect.SQLCLR.HTTPRequest.uCLRGetHTTPResponse(String url)

How to prevent this error and solve this problem?

Thanks

This blog post should answer all your questions: http://blogs.msdn.com/sqlclr/archive/2006/03/24/560154.aspx. If it doesn't, please feel free to ask them back.