Friday, March 30, 2012

Internal Error during Cube Processing

Hi,

for almost 3 Months my cubes got processed without errors.

Since last night, I get an error saying that (freely translated from german):

"Internal error: Unexpected error (File 'pffilestore.cpp', Row 3311, PFFileStore::HandleDataPageFault-Function)"

Nothing else.

Google has nothing to say to that.

Anybody gaining the same error or even a hint?

Thanks.

Are you running out of disk space by any chance?|||

Hi,

monitored this already. No Problem, more than 0.5TB left on HD space.

Thanks.

|||

I am also receiving the 3311 Internal Error message when trying to process my cube.

Cube processing was working fine for months, then at the end of April / beginning of May I started getting the following Internal Error: file 'pffilestore.cpp', line 3267, function 'PFFileStore::HandleDataPageFault'

I installed SQL Server 2005 SP2 this week, and now I am getting the file 'pffilestore.cpp', line 3311, function 'PFFileStore::HandleDataPageFault' error.

In the processing options, I am specifying to "ConvertToUnknown" and "Ignore Errors".

Any help or suggestions are appreciated. Thanks.

|||

You will need to contact Microsoft support (tech support # 1-888-677-9444) to get the hotfix to either bring you to build 2223 if you are using SQL 2005 SP1 or build 3166 if you are using SQL 2005 SP2. If this hotfix does not resolve your issue, because it did not fix the issue for my MDX query that I was running, there is still an open bug SQL BU Defect Tracking #524029.

Here is a link to the knowledge base article for your issue (possibly): http://support.microsoft.com/default.aspx/kb/932610?sd=dell

You might be encountering the open bug though.

|||

I got the same thing today and searched msdn.

MS released 3157 build and it is fixed in that build.

http://support.microsoft.com/kb/936305/en-us .

You can find 932610.

James B. Lim

sql

internal error after applying post Sp2 fix KB901383-v8.00.1042

This is the error from the logfile. Any idea anyone?
w3wp!webserver!1228!08/16/2005-15:27:04:: e ERROR: Internal error:
System.MissingMethodException: Method not found: Int32
Microsoft.ReportingServices.Library.Global.get_ResponseBufferSizeBytes().
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport()
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
w3wp!library!1228!08/16/2005-15:27:04:: e ERROR: Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details., ;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
An internal error occurred on the report server. See the error log for more
details. --> System.MissingMethodException: Method not found: Int32
Microsoft.ReportingServices.Library.Global.get_ResponseBufferSizeBytes().
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport()
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
at
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
-- End of inner exception stack trace --I had previously installed Sp2 and the server worked fine. The installer
package for KB901383 would not install (reported some error about components
not included in package), so I extracted that file and found a xxx.msp file
which semed to install fine. I restarted the server and now when I try to
show a report then the result is:
* An internal error occurred on the report server. See the error log
for more details. (rsInternalError) Get Online Help
o Method not found: Int32
Microsoft.ReportingServices.Library.Global.get_ResponseBufferSizeBytes().
"Fredrik" wrote:
> This is the error from the logfile. Any idea anyone?
> w3wp!webserver!1228!08/16/2005-15:27:04:: e ERROR: Internal error:
> System.MissingMethodException: Method not found: Int32
> Microsoft.ReportingServices.Library.Global.get_ResponseBufferSizeBytes().
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport()
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
> w3wp!library!1228!08/16/2005-15:27:04:: e ERROR: Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for more
> details., ;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
> An internal error occurred on the report server. See the error log for more
> details. --> System.MissingMethodException: Method not found: Int32
> Microsoft.ReportingServices.Library.Global.get_ResponseBufferSizeBytes().
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport()
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType)
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
> at
> Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
> -- End of inner exception stack trace --

Internal Error / internal catalog exception

Hi,

I've read already every thread in this forum regarding this topic with no results.

SQLServer and the corresponding services are at actual update level. The reporting services worked for 4 months without this problem. Suddenly, most of the time all reports return an internal error (it is like 70-30 for internal error) not depending which render format is used.

The system logs (eventlog, iis) show no errors. The ExecutionLog of RS show rsInternalError.

Looking in the log files in RS log directory, there is following stacktrace:

w3wp!processing!1!05/11/2007-10:40:06:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Boolean isLinkedReport, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport(HttpResponseStreamFactory streamFactory)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.DoStreamedOperation(StreamedOperation operation)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.ProcessRequest(HttpContext context)
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.Web.HttpApplication.ResumeSteps(Exception error)
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

I don't see any hint in stack trace, Maybe one of yours.

As it seems, after an iisreset the first rendering always works perfect. HD space is enough.

Any ideas?

Got it.

As the error occured not every time and not depending any actions or rules, we decided to check the hardware and their corresponding drivers.

For the AMD Opteron single core processors in a multi processor environment, we used the generic microsoft drivers. After changing these to the original AMD ones, it works perfectly again.

Why it occured suddenly without any update or reboot is still not solved, but it works now.

Greez

T.

Internal Error / internal catalog exception

Hi,

I've read already every thread in this forum regarding this topic with no results.

SQLServer and the corresponding services are at actual update level. The reporting services worked for 4 months without this problem. Suddenly, most of the time all reports return an internal error (it is like 70-30 for internal error) not depending which render format is used.

The system logs (eventlog, iis) show no errors. The ExecutionLog of RS show rsInternalError.

Looking in the log files in RS log directory, there is following stacktrace:

w3wp!processing!1!05/11/2007-10:40:06:: a ASSERT: Assertion failed! Call stack:
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(IRenderingExtension renderer, DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc, CreateReportChunk cacheDataCallback, Boolean& dataCached)
Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RenderReport(DateTime executionTimeStamp, GetReportChunk getCompiledDefinitionCallback, ProcessingContext pc, RenderingContext rc)
Microsoft.ReportingServices.Library.RSService.RenderAsLive(CatalogItemContext reportContext, ItemProperties properties, ParameterInfoCollection effectiveParameters, Guid reportId, ClientRequest session, String description, ReportSnapshot intermediateSnapshot, DataSourceInfoCollection thisReportDataSources, Boolean cachingRequested, Boolean isLinkedReport, Warning[]& warnings, ReportSnapshot& resultSnapshotData, DateTime& executionDateTime, RuntimeDataSourceInfoCollection& alldataSources, UserProfileState& usedUserProfile)
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters)
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext reportContext, ClientRequest session, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService rs, CatalogItemContext reportContext, ClientRequest session, JobType type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderReport(HttpResponseStreamFactory streamFactory)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.DoStreamedOperation(StreamedOperation operation)
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.ProcessRequest(HttpContext context)
System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.Web.HttpApplication.ResumeSteps(Exception error)
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)

I don't see any hint in stack trace, Maybe one of yours.

As it seems, after an iisreset the first rendering always works perfect. HD space is enough.

Any ideas?

Got it.

As the error occured not every time and not depending any actions or rules, we decided to check the hardware and their corresponding drivers.

For the AMD Opteron single core processors in a multi processor environment, we used the generic microsoft drivers. After changing these to the original AMD ones, it works perfectly again.

Why it occured suddenly without any update or reboot is still not solved, but it works now.

Greez

T.

Internal Email subscription fail

I'm having an issue with subscriptions. I created a subscription to
email a report both to an external address and internal address. The
subscription worked fine (Mail sent to ... ) in RS. The outside
entity received the email, but the internal entity does not receive
the email. Is there some configuration I'm missing on the exchange
side in order to accept a connection from RS? Thanks
DaveOn Aug 31, 3:29 pm, Dave <david.brueg...@.gmail.com> wrote:
> I'm having an issue with subscriptions. I created a subscription to
> email a report both to an external address and internal address. The
> subscription worked fine (Mail sent to ... ) in RS. The outside
> entity received the email, but the internal entity does not receive
> the email. Is there some configuration I'm missing on the exchange
> side in order to accept a connection from RS? Thanks
> Dave
It sounds more like your Exchange Server is filtering out the
extension type (i.e., PDF, MHTML, etc) of the report attached to the
email. Also, I'm not sure what the 'from' email is set to from SSRS;
however, if it is different than what is expected by the Exchange
Server, it may flag it as Spam. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Internal Consistency Error, Restoring Backup

Hello,
I was wondering if any body has come accross this before, and if so could
offer some advice. It's got me scratching my head.
I have a database that is backed up each night using a maintenance plan.
I have come to attempt to restore this database and it always fails with the
following error,
"An internal consistency error occured. Contact technical support for
assistance.
RESTORE DATABASE terminating abnormaly"
No matter which of the 30 odd backups from the last month I try and on any
machine, I always get the same error.
Many thanks in advance for any help offered
Yours hopefully
Chris
chris.roberts@.optima-ws.comYOu should do as the error suggests and call PSS... It is possible your
database has been corrupt for quite some time, and therefore all of your
backups are also corrupt...
"Chris Roberts" <chris.roberts@.optima-ws.com> wrote in message
news:bivr6s$39p$1@.newsg1.svr.pol.co.uk...
> Hello,
> I was wondering if any body has come accross this before, and if so could
> offer some advice. It's got me scratching my head.
> I have a database that is backed up each night using a maintenance plan.
> I have come to attempt to restore this database and it always fails with
the
> following error,
> "An internal consistency error occured. Contact technical support for
> assistance.
> RESTORE DATABASE terminating abnormaly"
> No matter which of the 30 odd backups from the last month I try and on any
> machine, I always get the same error.
> Many thanks in advance for any help offered
> Yours hopefully
> Chris
> chris.roberts@.optima-ws.com
>|||No sure if it is corrupt, one more bit off info I've found out is that if I
preform a manual backup, it restores OK, it's only when I do a backup from
the maintenance plan that I get this error. It's also the same with all the
databases, not just one
"Wayne Snyder" <wsnyder@.computeredservices.com> wrote in message
news:O3C0XfUcDHA.652@.tk2msftngp13.phx.gbl...
> YOu should do as the error suggests and call PSS... It is possible your
> database has been corrupt for quite some time, and therefore all of your
> backups are also corrupt...
> "Chris Roberts" <chris.roberts@.optima-ws.com> wrote in message
> news:bivr6s$39p$1@.newsg1.svr.pol.co.uk...
> > Hello,
> >
> > I was wondering if any body has come accross this before, and if so
could
> > offer some advice. It's got me scratching my head.
> >
> > I have a database that is backed up each night using a maintenance plan.
> >
> > I have come to attempt to restore this database and it always fails with
> the
> > following error,
> >
> > "An internal consistency error occured. Contact technical support for
> > assistance.
> > RESTORE DATABASE terminating abnormaly"
> >
> > No matter which of the 30 odd backups from the last month I try and on
any
> > machine, I always get the same error.
> >
> > Many thanks in advance for any help offered
> >
> > Yours hopefully
> >
> > Chris
> > chris.roberts@.optima-ws.com
> >
> >
>

internal consistency error occurred while restoring a database

this is what i get when restoring a database from a *.bak file, knowing that this is the only backup file i have for my DELETED databases !!!
please help ASAP
Microsoft SQL-DMO (ODBC SQLState: 42000)
An internal consistency error occurred. Contact Technical Support for assistance.
RESTORE DATABASE is terminating abnormally.
I would try what the message suggests: contact PSS.
David Portas
SQL Server MVP

internal consistency error occurred while restoring a database

this is what i get when restoring a database from a *.bak file, knowing that this is the only backup file i have for my DELETED databases !!
please help ASA
Microsoft SQL-DMO (ODBC SQLState: 42000
--
An internal consistency error occurred. Contact Technical Support for assistance
RESTORE DATABASE is terminating abnormallyi'm on SQL2K SP3,
and the file i'm restoring from is reported normally from the OS !|||I would try what the message suggests: contact PSS.
--
David Portas
SQL Server MVP
--

internal consistency error occurred while restoring a database

this is what i get when restoring a database from a *.bak file, knowing that
this is the only backup file i have for my DELETED databases !!!
please help ASAP
Microsoft SQL-DMO (ODBC SQLState: 42000)
--
An internal consistency error occurred. Contact Technical Support for assist
ance.
RESTORE DATABASE is terminating abnormally.I would try what the message suggests: contact PSS.
David Portas
SQL Server MVP
--

internal consistency error

I am getting the following error when I am trying to
restore a database/differential backup. Any ideas about
what is going on ? I can not do DBCC CHECKDB on the
production server. I will do it on the backup server if I
can restore it of course.
An internal consistency error occurred. Contact technical
support for assistance. RESTORE DATABASE is terminating
abnormally.
Thanks.
Hi,
Could you please confirm that the SQL Server is up and running and the database in question is online.
And you are unable to run DBCC CHECKDB(<db name>)
On doing so what error you get? On running DBCC CHECKDB does it shows some inconsistency and allocation error on the second last line of output...
Also look for errors in the SQL Server error log for this database.
Regards
Abid
|||Why can't you run checkdb on your production server?
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
> I am getting the following error when I am trying to
> restore a database/differential backup. Any ideas about
> what is going on ? I can not do DBCC CHECKDB on the
> production server. I will do it on the backup server if I
> can restore it of course.
> An internal consistency error occurred. Contact technical
> support for assistance. RESTORE DATABASE is terminating
> abnormally.
> Thanks.
|||Are you sure that you have a complete, valid .bak file?
|||Production database is heavyly transaction oriented and I
don't want to run into performance issues while all the
users are in. The size of the DB is ~45 GB.
Thanks.

>--Original Message--
>Why can't you run checkdb on your production server?
>--
>Paul Randal
>Dev Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Tony" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
I[vbcol=seagreen]
technical
>
>.
>
|||Yes I do. Actually, I am getting the error when I am
restoring the Differential backup. And NO, there is no
other backup after the differential backup.
I have the FULL backup from sunday and the differential
backup from last night. Both backups were completed
successfully.

>--Original Message--
>Are you sure that you have a complete, valid .bak file?
>.
>
sql

internal consistency error

I am getting the following error when I am trying to
restore a database/differential backup. Any ideas about
what is going on ' I can not do DBCC CHECKDB on the
production server. I will do it on the backup server if I
can restore it of course.
An internal consistency error occurred. Contact technical
support for assistance. RESTORE DATABASE is terminating
abnormally.
Thanks.Hi,
Could you please confirm that the SQL Server is up and running and the datab
ase in question is online.
And you are unable to run DBCC CHECKDB(<db name> )
On doing so what error you get? On running DBCC CHECKDB does it shows some i
nconsistency and allocation error on the second last line of output...
Also look for errors in the SQL Server error log for this database.
Regards
Abid|||Why can't you run checkdb on your production server?
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
> I am getting the following error when I am trying to
> restore a database/differential backup. Any ideas about
> what is going on ' I can not do DBCC CHECKDB on the
> production server. I will do it on the backup server if I
> can restore it of course.
> An internal consistency error occurred. Contact technical
> support for assistance. RESTORE DATABASE is terminating
> abnormally.
> Thanks.|||Are you sure that you have a complete, valid .bak file?|||Production database is heavyly transaction oriented and I
don't want to run into performance issues while all the
users are in. The size of the DB is ~45 GB.
Thanks.

>--Original Message--
>Why can't you run checkdb on your production server?
>--
>Paul Randal
>Dev Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Tony" <anonymous@.discussions.microsoft.com> wrote in
message
>news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
I[vbcol=seagreen]
technical[vbcol=seagreen]
>
>.
>|||Yes I do. Actually, I am getting the error when I am
restoring the Differential backup. And NO, there is no
other backup after the differential backup.
I have the FULL backup from sunday and the differential
backup from last night. Both backups were completed
successfully.

>--Original Message--
>Are you sure that you have a complete, valid .bak file?
>.
>

internal consistency error

I am getting the following error when I am trying to
restore a database/differential backup. Any ideas about
what is going on ' I can not do DBCC CHECKDB on the
production server. I will do it on the backup server if I
can restore it of course.
An internal consistency error occurred. Contact technical
support for assistance. RESTORE DATABASE is terminating
abnormally.
Thanks.Why can't you run checkdb on your production server?
--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tony" <anonymous@.discussions.microsoft.com> wrote in message
news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
> I am getting the following error when I am trying to
> restore a database/differential backup. Any ideas about
> what is going on ' I can not do DBCC CHECKDB on the
> production server. I will do it on the backup server if I
> can restore it of course.
> An internal consistency error occurred. Contact technical
> support for assistance. RESTORE DATABASE is terminating
> abnormally.
> Thanks.|||Are you sure that you have a complete, valid .bak file?|||Production database is heavyly transaction oriented and I
don't want to run into performance issues while all the
users are in. The size of the DB is ~45 GB.
Thanks.
>--Original Message--
>Why can't you run checkdb on your production server?
>--
>Paul Randal
>Dev Lead, Microsoft SQL Server Storage Engine
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>"Tony" <anonymous@.discussions.microsoft.com> wrote in
message
>news:f56601c43dca$1cce0b50$a501280a@.phx.gbl...
>> I am getting the following error when I am trying to
>> restore a database/differential backup. Any ideas about
>> what is going on ' I can not do DBCC CHECKDB on the
>> production server. I will do it on the backup server if
I
>> can restore it of course.
>> An internal consistency error occurred. Contact
technical
>> support for assistance. RESTORE DATABASE is terminating
>> abnormally.
>> Thanks.
>
>.
>|||Yes I do. Actually, I am getting the error when I am
restoring the Differential backup. And NO, there is no
other backup after the differential backup.
I have the FULL backup from sunday and the differential
backup from last night. Both backups were completed
successfully.
>--Original Message--
>Are you sure that you have a complete, valid .bak file?
>.
>

internal consistency error

I have a sql database
I run dbcc checkdb and get no errors
I go to backup the database in enterprise manager, and it won't
restore because it has internal consistency errors
I can go back to an older version of the database

I run a particular procedure in our accounting software package
Never do I get errors when running dbcc checkdb

Sometimes I get the backup and restore problem, sometimes I don't

I am doing this on a test server with about 220 megs of RAM

I am trying the dbcc checkdb ('dbname',REPAIR_REBUILD) command

Any other ideas?An update to the problem:

I ran the process on my test server on a one-gig or so database and it
runs fine but gets an internal consistency error when I backup and try
to restore (dbcc checkdb, with and without REPAIR_REBUILD, runs just
fine)

But I run the process on the real server and it backs up and restores
just fine

So .........

It points to a resource problem on the test server

But I am not sure of this

Any feedback on this from anyone?|||brucestromcpa@.aol.com (bruce strom) wrote in message news:<8a9196fd.0310300827.41041bda@.posting.google.com>...
> An update to the problem:
> I ran the process on my test server on a one-gig or so database and it
> runs fine but gets an internal consistency error when I backup and try
> to restore (dbcc checkdb, with and without REPAIR_REBUILD, runs just
> fine)
> But I run the process on the real server and it backs up and restores
> just fine
> So .........
> It points to a resource problem on the test server
> But I am not sure of this
> Any feedback on this from anyone?

A consistency error means that the backup set is corrupt, for some
reason. That could mean a hardware issue, or a bad tape, or perhaps
backing up across an unreliable network. There are also issues if the
two versions of MSSQL are not the same. Perhaps you can give some more
details - where are you backing up to (tape, local drive, network
drive)? What version of MSSQL do you have? What's the operating system
and filesystem? As a minimum test, is this reliable on your test
server:

backup database MyDB to disk = 'c:\MyDB.bak' -- or another local drive
restore database MyDB from disk = 'c:\MyDB.bak'

If that isn't reliable, do OS-level tools detect any integrity issues
with the filesystem?

Simon

Internal connection fatal error.

Hi all,

I don’t know what happened to this function which was working OK for a few month and today it doesn’t work.

In debug mode I kip getting “InvalidOperationaException was unhandled by user code”

On this line:

dtrResults = cmdSelect.ExecuteReader()

Same behaviour on developping PC

I cant find anithing that would create that problem.

 Function GetUserInfo(ByVal myUsr As String, ByVal strRequest As String) As String Dim strConString As String Dim conUsers As SqlConnection Dim cmdSelect As SqlCommand strConString = ConfigurationSettings.AppSettings("conString2") conUsers = New SqlConnection(strConString) Dim dtrResults As SqlDataReader Dim intField As Integer Dim usr As String usr = "select " & strRequest & " user_ID from userlist where ul_user='" usr &= myUsr & "'" conUsers.Open() cmdSelect = New SqlCommand(usr, conUsers) dtrResults = cmdSelect.ExecuteReader() While dtrResults.Read() For intField = 0 To dtrResults.FieldCount - 1 GetUserInfo = dtrResults(intField).ToString() Next End While conUsers.Close() dtrResults.Close() Return GetUserInfo End Function

Any Help will highly appriciated.

Alex.

(1) I recommend using parameterized queries. I doubt if your SQL is building properly. What does your strRequest typically have?

(2) Also some exception handling might help.

Internal Connection Fatal Error - SQL 2000 and ASP VS 2003

We have an ASP.NET 2003 app that accesses a MS SQL 2000 Std. database. Rand
omly it returns this error:
Internal connection fatal error.
Description: An unhandled exception occurred during the execution of the cur
rent web request. Please review the stack trace for more information about t
he error and where it originated in the code.
Exception Details: System.InvalidOperationException: Internal connection fat
al error.
Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Internal connection fatal error.]
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior,
RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
tradeTicket.MonetaGroup.Approval.approve(Int32 Trans_ID, String Security_Typ
e) in C:\Inetpub\wwwroot\tradeTicket\Data\empl
oyee.vb:1191
tradeTicket.ApproveBond.buttonApproveNew_Click(Object sender, EventArgs e) i
n C:\Inetpub\wwwroot\tradeTicket\ApproveBo
nd.aspx.vb:469
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +57
System.Web.UI.Page. RaisePostBackEvent(IPostBackEventHandler
sourceControl, S
tring eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
----
--
Version Information: Microsoft NET Framework Version:1.1.4322.573; ASP.NET V
ersion:1.1.4322.573
We have SQL Server 2000 and Win2000 Server.
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50 Cop
yright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5
.0 (Build 2195: Service Pack 3)
Is there a setting I can bump up to fix this problem? We do close our conne
ctions. Here is a snippet of code:
----
--
Private Sub buttonApproveNew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles buttonApproveNew.Click
Dim Approve As New MonetaGroup.Approval()
Dim curId = Request.QueryString("id")
Dim curSecurity = "B"
Dim nextID As String
Dim nextSecurity As String
Dim nextTransStatus As Integer
Approve.FindNextUnapprovedTransaction(curId, curSecurity, nextID, nextSecuri
ty, nextTransStatus)
Approve.approve(Request.QueryString("id"), "B") 'Line 469 error message
If nextID <> 0 Then
Dim returnValue = checkSecurity(nextID, nextTransStatus, nextSecurity)
Dim strBuilder As StringBuilder = New StringBuilder()
strBuilder.Append("<script language='javascript'>")
'strBuilder.Append("alert('The transaction was approved.');")
strBuilder.Append("window.open('" & returnValue & "','_self');")
strBuilder.Append("</script>")
RegisterStartupScript("focus", strBuilder.ToString)
Else
Dim strBuilder As StringBuilder = New StringBuilder()
strBuilder.Append("<script language='javascript'>")
'strBuilder.Append("alert('The transaction was approved.');")
strBuilder.Append("window.open('Approval.aspx','_self');")
strBuilder.Append("</script>")
RegisterStartupScript("focus", strBuilder.ToString)
End If
End Sub
Public Function checkSecurity(ByVal id As Integer, ByVal status As Integer,
ByVal security As String)
Dim returnValue As String
If status = 2 Then
If security = "MF" Then
returnValue = "../tradeTicket/ApproveMF.aspx?id=" & id & "&approve=0"
ElseIf security = "S" Then
returnValue = "../tradeTicket/ApproveStock.aspx?id=" & id & "&approve=0"
ElseIf security = "B" Then
returnValue = "../tradeTicket/ApproveBond.aspx?id=" & id & "&approve=0"
End If
Else
If security = "MF" Then
returnValue = "../tradeTicket/ApproveMF.aspx?id=" & id & "&approve=1"
ElseIf security = "S" Then
returnValue = "../tradeTicket/ApproveStock.aspx?id=" & id & "&approve=1"
ElseIf security = "B" Then
returnValue = "../tradeTicket/ApproveBond.aspx?id=" & id & "&approve=1"
End If
End If
Return returnValue
End Function
----
--
Thank you in advance.
RichWe're having the same issue. Our setup is Win 2003 Server IIS and Win 2000
SQL. I've found that the version of MDAC is different on the two machines.
Is your setup also 2 machines? If it is, let me know if your versions of M
DAC differ.
Thanks,
Bobsql

Internal Connection Fatal Error - SQL 2000 and ASP VS 2003

We have an ASP.NET 2003 app that accesses a MS SQL 2000 Std. database. Randomly it returns this error:
Internal connection fatal error.
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: Internal connection fatal error.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[InvalidOperationException: Internal connection fatal error.]
System.Data.SqlClient.SqlCommand.ExecuteReader(Com mandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +723
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +195
tradeTicket.MonetaGroup.Approval.approve(Int32 Trans_ID, String Security_Type) in C:\Inetpub\wwwroot\tradeTicket\Data\employee.vb:11 91
tradeTicket.ApproveBond.buttonApproveNew_Click(Obj ect sender, EventArgs e) in C:\Inetpub\wwwroot\tradeTicket\ApproveBond.aspx.vb :469
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
Version Information: Microsoft NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
We have SQL Server 2000 and Win2000 Server.
Microsoft SQL Server 2000 - 8.00.534 (Intel X86) Nov 19 2001 13:23:50 Copyright (c) 1988-2000 Microsoft Corporation Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 3)
Is there a setting I can bump up to fix this problem? We do close our connections. Here is a snippet of code:
Private Sub buttonApproveNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonApproveNew.Click
Dim Approve As New MonetaGroup.Approval()
Dim curId = Request.QueryString("id")
Dim curSecurity = "B"
Dim nextID As String
Dim nextSecurity As String
Dim nextTransStatus As Integer
Approve.FindNextUnapprovedTransaction(curId, curSecurity, nextID, nextSecurity, nextTransStatus)
Approve.approve(Request.QueryString("id"), "B") 'Line 469 error message
If nextID <> 0 Then
Dim returnValue = checkSecurity(nextID, nextTransStatus, nextSecurity)
Dim strBuilder As StringBuilder = New StringBuilder()
strBuilder.Append("<script language='javascript'>")
'strBuilder.Append("alert('The transaction was approved.');")
strBuilder.Append("window.open('" & returnValue & "','_self');")
strBuilder.Append("</script>")
RegisterStartupScript("focus", strBuilder.ToString)
Else
Dim strBuilder As StringBuilder = New StringBuilder()
strBuilder.Append("<script language='javascript'>")
'strBuilder.Append("alert('The transaction was approved.');")
strBuilder.Append("window.open('Approval.aspx','_s elf');")
strBuilder.Append("</script>")
RegisterStartupScript("focus", strBuilder.ToString)
End If
End Sub
Public Function checkSecurity(ByVal id As Integer, ByVal status As Integer, ByVal security As String)
Dim returnValue As String
If status = 2 Then
If security = "MF" Then
returnValue = "../tradeTicket/ApproveMF.aspx?id=" & id & "&approve=0"
ElseIf security = "S" Then
returnValue = "../tradeTicket/ApproveStock.aspx?id=" & id & "&approve=0"
ElseIf security = "B" Then
returnValue = "../tradeTicket/ApproveBond.aspx?id=" & id & "&approve=0"
End If
Else
If security = "MF" Then
returnValue = "../tradeTicket/ApproveMF.aspx?id=" & id & "&approve=1"
ElseIf security = "S" Then
returnValue = "../tradeTicket/ApproveStock.aspx?id=" & id & "&approve=1"
ElseIf security = "B" Then
returnValue = "../tradeTicket/ApproveBond.aspx?id=" & id & "&approve=1"
End If
End If
Return returnValue
End Function
Thank you in advance.
Rich
We're having the same issue. Our setup is Win 2003 Server IIS and Win 2000 SQL. I've found that the version of MDAC is different on the two machines. Is your setup also 2 machines? If it is, let me know if your versions of MDAC differ.
Thanks,
Bob

Internal buffer cache

Hi to all!
I'm started with a project concerning the Data Caching.
First of all I would like to have more information about the internal buffer
cache that SQL Server uses for its data caching.
I searched in SQL Server Books On Line and also in MSDN, but no particular
article seems helpful.
Anyone can suggest me a link to a website where I can find information?
Thank you in advance.
Michela
Michela,
have you seen this article: http://support.microsoft.com/kb/271624
(http://support.microsoft.com/kb/907877 for sql server 2005)?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Thank you for your quick answer!
The article you have suggest me I think can give me more explanation about
this problem.
If I have any other question I write one more time.
Thank very much.
Michela
"Paul Ibison" wrote:

> Michela,
> have you seen this article: http://support.microsoft.com/kb/271624
> (http://support.microsoft.com/kb/907877 for sql server 2005)?
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>

Internal buffer cache

Hi to all!
I'm started with a project concerning the Data Caching.
First of all I would like to have more information about the internal buffer
cache that SQL Server uses for its data caching.
I searched in SQL Server Books On Line and also in MSDN, but no particular
article seems helpful.
Anyone can suggest me a link to a website where I can find information?
Thank you in advance.
MichelaMichela,
have you seen this article: http://support.microsoft.com/kb/271624
(http://support.microsoft.com/kb/907877 for sql server 2005)?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||Thank you for your quick answer!
The article you have suggest me I think can give me more explanation about
this problem.
If I have any other question I write one more time.
Thank very much.
Michela
"Paul Ibison" wrote:

> Michela,
> have you seen this article: http://support.microsoft.com/kb/271624
> (http://support.microsoft.com/kb/907877 for sql server 2005)?
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
>

Internal Architecture of MDF file

--I just created a new datbase. Added one row to the table and an index.
--Looking at the mdf file using a hex editor surprised me.
create database mydb1
go
use mydb1
go
create table table1 (a char(10), b char(10))
go
insert into table1 values ('firstTest','23571113') --primes 2-13 if you care.
--Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
--Search for string 23571113. You will find one (1). Only one.
--Start sql
use mydb1
go
create index idx1 on table1(b)
--Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
--Search for string 23571113. You will find THREE (3). Why?
--Serious replies only please.
/Bob
Bob,
You don't need a hex editor; you use use DBCC PAGE to view the page
structures without going to all of this trouble. Syntax here:
http://www.sql-server-performance.co...ented_dbcc.asp
If you're really interested in this stuff, you should get a copy of Kalen
Delaney's _Inside SQL Server 2000_, which describes the structures in great
detail.
"Bob" <utefan001@.gmail.com> wrote in message
news:40692455.0409281803.4ce67381@.posting.google.c om...
> --I just created a new datbase. Added one row to the table and an index.
> --Looking at the mdf file using a hex editor surprised me.
> create database mydb1
> go
> use mydb1
> go
> create table table1 (a char(10), b char(10))
> go
> insert into table1 values ('firstTest','23571113') --primes 2-13 if you
care.
> --Stop here..Shut down sql and view the mdf file with a hex editor
(hackman)
> --Search for string 23571113. You will find one (1). Only one.
> --Start sql
> use mydb1
> go
> create index idx1 on table1(b)
> --Stop here..Shut down sql and view the mdf file with a hex editor
(hackman)
> --Search for string 23571113. You will find THREE (3). Why?
> --Serious replies only please.
> /Bob
|||See
http://www.nigelrivett.net/PageStructure.html
"Bob" wrote:

> --I just created a new datbase. Added one row to the table and an index.
> --Looking at the mdf file using a hex editor surprised me.
> create database mydb1
> go
> use mydb1
> go
> create table table1 (a char(10), b char(10))
> go
> insert into table1 values ('firstTest','23571113') --primes 2-13 if you care.
> --Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
> --Search for string 23571113. You will find one (1). Only one.
> --Start sql
> use mydb1
> go
> create index idx1 on table1(b)
> --Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
> --Search for string 23571113. You will find THREE (3). Why?
> --Serious replies only please.
> /Bob
>
|||Maybe its got to do with additional pointers in the index ?
Dylan
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:#kbGikcpEHA.1668@.TK2MSFTNGP14.phx.gbl...
> Bob,
> You don't need a hex editor; you use use DBCC PAGE to view the page
> structures without going to all of this trouble. Syntax here:
>
http://www.sql-server-performance.co...ented_dbcc.asp
> If you're really interested in this stuff, you should get a copy of Kalen
> Delaney's _Inside SQL Server 2000_, which describes the structures in
great
> detail.
>
> "Bob" <utefan001@.gmail.com> wrote in message
> news:40692455.0409281803.4ce67381@.posting.google.c om...
> care.
> (hackman)
> (hackman)
>

Internal Architecture of MDF file

--I just created a new datbase. Added one row to the table and an index.
--Looking at the mdf file using a hex editor surprised me.
create database mydb1
go
use mydb1
go
create table table1 (a char(10), b char(10))
go
insert into table1 values ('firstTest','23571113') --primes 2-13 if you care.
--Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
--Search for string 23571113. You will find one (1). Only one.
--Start sql
use mydb1
go
create index idx1 on table1(b)
--Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
--Search for string 23571113. You will find THREE (3). Why'
--Serious replies only please.
/BobBob,
You don't need a hex editor; you use use DBCC PAGE to view the page
structures without going to all of this trouble. Syntax here:
http://www.sql-server-performance.com/ac_sql_server_2000_undocumented_dbcc.asp
If you're really interested in this stuff, you should get a copy of Kalen
Delaney's _Inside SQL Server 2000_, which describes the structures in great
detail.
"Bob" <utefan001@.gmail.com> wrote in message
news:40692455.0409281803.4ce67381@.posting.google.com...
> --I just created a new datbase. Added one row to the table and an index.
> --Looking at the mdf file using a hex editor surprised me.
> create database mydb1
> go
> use mydb1
> go
> create table table1 (a char(10), b char(10))
> go
> insert into table1 values ('firstTest','23571113') --primes 2-13 if you
care.
> --Stop here..Shut down sql and view the mdf file with a hex editor
(hackman)
> --Search for string 23571113. You will find one (1). Only one.
> --Start sql
> use mydb1
> go
> create index idx1 on table1(b)
> --Stop here..Shut down sql and view the mdf file with a hex editor
(hackman)
> --Search for string 23571113. You will find THREE (3). Why'
> --Serious replies only please.
> /Bob|||See
http://www.nigelrivett.net/PageStructure.html
"Bob" wrote:
> --I just created a new datbase. Added one row to the table and an index.
> --Looking at the mdf file using a hex editor surprised me.
> create database mydb1
> go
> use mydb1
> go
> create table table1 (a char(10), b char(10))
> go
> insert into table1 values ('firstTest','23571113') --primes 2-13 if you care.
> --Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
> --Search for string 23571113. You will find one (1). Only one.
> --Start sql
> use mydb1
> go
> create index idx1 on table1(b)
> --Stop here..Shut down sql and view the mdf file with a hex editor (hackman)
> --Search for string 23571113. You will find THREE (3). Why'
> --Serious replies only please.
> /Bob
>|||Maybe its got to do with additional pointers in the index ?
Dylan
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:#kbGikcpEHA.1668@.TK2MSFTNGP14.phx.gbl...
> Bob,
> You don't need a hex editor; you use use DBCC PAGE to view the page
> structures without going to all of this trouble. Syntax here:
>
http://www.sql-server-performance.com/ac_sql_server_2000_undocumented_dbcc.asp
> If you're really interested in this stuff, you should get a copy of Kalen
> Delaney's _Inside SQL Server 2000_, which describes the structures in
great
> detail.
>
> "Bob" <utefan001@.gmail.com> wrote in message
> news:40692455.0409281803.4ce67381@.posting.google.com...
> > --I just created a new datbase. Added one row to the table and an index.
> > --Looking at the mdf file using a hex editor surprised me.
> > create database mydb1
> > go
> > use mydb1
> > go
> > create table table1 (a char(10), b char(10))
> > go
> > insert into table1 values ('firstTest','23571113') --primes 2-13 if you
> care.
> > --Stop here..Shut down sql and view the mdf file with a hex editor
> (hackman)
> > --Search for string 23571113. You will find one (1). Only one.
> > --Start sql
> >
> > use mydb1
> > go
> > create index idx1 on table1(b)
> > --Stop here..Shut down sql and view the mdf file with a hex editor
> (hackman)
> > --Search for string 23571113. You will find THREE (3). Why'
> > --Serious replies only please.
> > /Bob
>sql

internal activation of service broker

Hi, there,

I'm a Chinese fan of Microsoft SQL Server 2005. Through studying for MS SQL Server 2005, now I have a question about ‘internal activation of service broker’.

At the moment I have done a test. The description of test is as following:

Firstly I set the status of the activation to be off (ALTER QUEUE [dbo].[TargetQueue] WITH STATUS = ON , RETENTION = OFF , ACTIVATION ( STATUS = OFF , PROCEDURE_NAME = [dbo].[Usp_HelloWorld] , MAX_QUEUE_READERS = 5 , EXECUTE AS N'dbo' )). And filled the queue with100000 Messages. Then that running another application caused the usage of the CPU achieve 100%. Secondly reset the status of the activation to be on and monitored the ‘sys.dm_broker_activated_tasks’. The instance of the stored procedure got the maximum number 5 very quickly. The server was much slower at current.

The SQL Server 2005 Books Online says: ’an activated stored procedure typically processes one or more messages and returns a response to the service that originated the message or messages. When messages arrive faster than the stored procedure processes messages, Service Broker starts another instance of the stored procedure, up to the maximum number defined by the queue.” But it doesn’t mention the performance counter of the server, for example: If the usage of the CPU is very high, the queue readers should be as few as possible, even don't process the message of queue until the system is idle. Because a client choice service broker means he don’t care immediately process message, contrarily he care the throughput of the system and don’t bother the natural application.

So my question is whether the strategy of internal activation of service broker doesn’t care the performance counter of the server, just care the speed of process message. And the priority of queue monitor in SQL Server‘s internal processes. Unfortunately I can’t find any information about these from books online and Internet.

When messages are available, an activated procedure will run at normal prioirty, no different than running a T-SQL batch from an user connection. You should not set the max_queue_readers higher than 2 times the number CPUs available to SQL Server, better 1 x number of CPUs.

If you need to reserve more CPU room for user activity, it means you need a bigger machine (more CPUs)

HTH,
~ Remus

|||

I want to know: why SQL Server can't activate more procedures when the the system is idle and activate lower procedures or no procedures when the sysstem is busy. I think it's a good way to improve throughput and very easy for sql server to do it.

|||

You can use the product feedback to make a suggestion for this: https://connect.microsoft.com/SQLServer/Feedback

Ususaly this is achieved in practice by changing the number of maximum activated procedures based on a operation schedule (e.g. add more procedures off hours, reduce at peak hours). An Agent job or event a SSB timer message can be used to run the ALTER statement that changes this number.

Internal Activation Best Practices?

I am looking for an example of a SP that shows the best practices for internal activation? In BOL this topic describes the typical patter for reading messages from a queue. What is the typical pattern for reading messages from a queue using an internally activated SP? Do we still need to loop (considering the message arrival actually fired the sp)?

Any advice provided would be helpful.

Thanks!

Yes, you should still loop. If you don't loop, you risk getting at maximum only one activated procedure, instead of the value set for max_queue_readers. If a procedure is launched and it exits imedeatly (expecting to be launched again), the activation algorithm timers will be reset by this event, so the activation will never reach the point when it has to launch a new instance of the procedure.

The Activation algorithm is described here: http://msdn2.microsoft.com/en-us/library/ms171601.aspx

Another important reason why you should loop is the need to batch commit. If your procedure RECEIVEs one message, process it and commits, you won't be able to scale. Even the best tuned system will only be able to process only tens of messages per second, maybe a best a few hundred. You have to batch several tens, even hundreds, of messages in one transaction, to be able to process thousands of messages per second. The trick here is to avoid holding up a transaction in wait for a message. That is, if you have a batch pending, do a plain RECEIVE, not a WAITFOR(RECEIVE). If the RECEIVE returns empty, commit the pending batch and only then do the WAITFOR(RECEIVE).

Do linger few seconds in your loop before exiting. That is, have a WAITFOR (RECEIVE), TIMEOUT 1000 (or 2000) to drive the loop. This way, the activated procedure will be already started if a new message arrives quickly after you just drained the queue. Don't linger to much, as you're keeping a server thread occupied.

Don't fake an empty queue. That is, don't have a RECEIVE ... WHERE that will return empty rowset even when there are messages in the queue. This will fool the activation algorithm to think that you drained the queue, and will prevent new instances of the procedure to be launched.

Activated procedures have a different execution context than user connection launched procedures. They are under an EXECUTE AS USER context, thus under all the restrictions described here: http://msdn2.microsoft.com/en-us/library/ms188304.aspx. So try to design the procedure avoiding the need to access resources outside the database. If you must, then you'll have to either turn on the trustworthy bit on the database, or folllow these complex steps: http://blogs.msdn.com/remusrusanu/archive/2006/03/07/545508.aspx

Do make sure your procedure handles the system message types:
http://schemas.microsoft.com/SQL/ServiceBroker/Error
http://schemas.microsoft.com/SQL/ServiceBroker/EndDialog
http://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer

Don't rollback intentionally in your procedure. It will trigger the poison message detection and disable your queue.

Do experiment with various ways of writing the RECEIVE loop, e.g.:
- TOP (1) into T-SQL variables
- INTO @.tableVariable and open cursor over @.tableVariable
- CLR procedure and RECEIVE a whole resultset into a SqlDataReader
See which one gives the bets performance for your environment. Some are better when you're likely to have always one message returned, some are better when you're likely to have many messages returned by RECEIVE. Consider that RECEIVE returnes only messages on one conversation_group.

HTH,
~ Remus

|||

I has been brought to my attention that one of my comments is wrong:

If a procedure is launched and it exits imedeatly (expecting to be launched again), the activation algorithm timers will be reset by this event, so the activation will never reach the point when it has to launch a new instance of the procedure.

This is incorrect, the exiting the procedure does not reset the timer and the activation algorithm works as expected in these conditions: the max_queue_readers is reached.

HTH,
~Remus

|||Great info Remus!

Internal Activation Best Practices?

I am looking for an example of a SP that shows the best practices for internal activation? In BOL this topic describes the typical patter for reading messages from a queue. What is the typical pattern for reading messages from a queue using an internally activated SP? Do we still need to loop (considering the message arrival actually fired the sp)?

Any advice provided would be helpful.

Thanks!

Yes, you should still loop. If you don't loop, you risk getting at maximum only one activated procedure, instead of the value set for max_queue_readers. If a procedure is launched and it exits imedeatly (expecting to be launched again), the activation algorithm timers will be reset by this event, so the activation will never reach the point when it has to launch a new instance of the procedure.

The Activation algorithm is described here: http://msdn2.microsoft.com/en-us/library/ms171601.aspx

Another important reason why you should loop is the need to batch commit. If your procedure RECEIVEs one message, process it and commits, you won't be able to scale. Even the best tuned system will only be able to process only tens of messages per second, maybe a best a few hundred. You have to batch several tens, even hundreds, of messages in one transaction, to be able to process thousands of messages per second. The trick here is to avoid holding up a transaction in wait for a message. That is, if you have a batch pending, do a plain RECEIVE, not a WAITFOR(RECEIVE). If the RECEIVE returns empty, commit the pending batch and only then do the WAITFOR(RECEIVE).

Do linger few seconds in your loop before exiting. That is, have a WAITFOR (RECEIVE), TIMEOUT 1000 (or 2000) to drive the loop. This way, the activated procedure will be already started if a new message arrives quickly after you just drained the queue. Don't linger to much, as you're keeping a server thread occupied.

Don't fake an empty queue. That is, don't have a RECEIVE ... WHERE that will return empty rowset even when there are messages in the queue. This will fool the activation algorithm to think that you drained the queue, and will prevent new instances of the procedure to be launched.

Activated procedures have a different execution context than user connection launched procedures. They are under an EXECUTE AS USER context, thus under all the restrictions described here: http://msdn2.microsoft.com/en-us/library/ms188304.aspx. So try to design the procedure avoiding the need to access resources outside the database. If you must, then you'll have to either turn on the trustworthy bit on the database, or folllow these complex steps: http://blogs.msdn.com/remusrusanu/archive/2006/03/07/545508.aspx

Do make sure your procedure handles the system message types:
http://schemas.microsoft.com/SQL/ServiceBroker/Error
http://schemas.microsoft.com/SQL/ServiceBroker/EndDialog
http://schemas.microsoft.com/SQL/ServiceBroker/DialogTimer

Don't rollback intentionally in your procedure. It will trigger the poison message detection and disable your queue.

Do experiment with various ways of writing the RECEIVE loop, e.g.:
- TOP (1) into T-SQL variables
- INTO @.tableVariable and open cursor over @.tableVariable
- CLR procedure and RECEIVE a whole resultset into a SqlDataReader
See which one gives the bets performance for your environment. Some are better when you're likely to have always one message returned, some are better when you're likely to have many messages returned by RECEIVE. Consider that RECEIVE returnes only messages on one conversation_group.

HTH,
~ Remus

|||

I has been brought to my attention that one of my comments is wrong:

If a procedure is launched and it exits imedeatly (expecting to be launched again), the activation algorithm timers will be reset by this event, so the activation will never reach the point when it has to launch a new instance of the procedure.

This is incorrect, the exiting the procedure does not reset the timer and the activation algorithm works as expected in these conditions: the max_queue_readers is reached.

HTH,
~Remus

|||Great info Remus!

Internal Activation - calls stored procs in other DBs

Hi all

I am using internal activation on a queue to process the messages, should an error be encountered I call stored procedure A in the same database to log the error. Part of the processing in stored procedure A is a call to stored procedure B in another database (on the same server), however I have not been able to get this call to B to work. Currently I get the error "The server principal XXXXXX is not able to access the database YYYYYYY under the current security context".

I have tried various combinations (too many to remember) of database owners, roles and permissions as well as EXECUTE AS on both A and B and the Queue but none seem to work. Can anyone give me simple example of a setup which would allow this cross database call to work?

Thanks

Ian

You are hitting the 'Extending database impersonation under EXECUTE AS context' issue. I have a series of posts in my blog tackling this problem:

http://blogs.msdn.com/remusrusanu/archive/2006/03/07/545508.aspx
http://blogs.msdn.com/remusrusanu/archive/2006/03/01/541882.aspx
http://blogs.msdn.com/remusrusanu/archive/2006/01/12/512085.aspx

The first link is posted today and is an actual example on how to call a procedure in another database under activation.

|||

Thanks for the information - it's just what I was looking for.

Ian

|||

One more question....

Is it essential that the owner of the other DB is the same as the owner of the activated stored proc?

I don't seem to be able to get this to work if they are different.

Thanks

Ian

|||You can use any user with receive permission on the queue.|||I think you must grant AUTHENTICATE permission on the 'other' DB to the user from the EXECUTE AS clause of the CREATE/ALTER procedure. If the EXECUTE AS is OWNER, then to the owner of the activated procedure)

Intermittently Slow query - Left Join

Here's a little background on the query. I have a list of documents by an id number in one table and the description of the sheets in another table. It's a one to many relationship, so for each description, there may be multiple entries in the documents table that it applies to. For example:

Descriptions table:

ID | Title
Doc1 | Document 1
Doc2 | Document 2

Documents table:

ID | Parent
Doc1 | 10400
Doc2 | 10400
Doc1 | 20189
Doc3 | 20189

View:

ID | Parent | Description
Doc1 | 10400 | Document 1
Doc2 | 10400 | Document 2
Doc1 | 20189 | Document 1
Doc3 | 20189 | (null)

So the query I am using uses a left join to combine the data from the one table into the other. There might not be an entry for the description, so for some Document entries, the description field may be blank. For some reason, certain queries take about 2 minutes longer than others who retreive 5 times the information.

In SQL Manager, is says "Executing Query. Waiting for response from data source." After about 20 seconds it says "Retrieving Data..." then about a minute later, it finally comes up with the data. I can select another parent that has a lot more items and it comes up in about 3 seconds max.

It's running on SQL Server 2005 with 2GB of RAM.

Any suggestions on tracking down the reason for the slowness would be great.

Thanks in advance!!!

-DanPost the query you are executing.|||SELECT
dbo.Table1.ItemType,
dbo.Table1.ItemLabel,
dbo.Table1.ItemParent,
dbo.Table1.ItemID,
dbo.Table1.ProjectID,
dbo.Table1.ItemDate,
dbo.Table1.Active,
dbo.Table1.ItemBaseLabel,
dbo.Table2.ItemDescription
FROM dbo.Table1 LEFT OUTER JOIN dbo.Table2
ON dbo.Table1.ProjectID = dbo.Table2.ProjectID
AND dbo.Table1.ItemBaseLabel = dbo.Table2.ItemBaseLabel

Here you go!

-Dan|||where are the indices placed? have you looked at the execution plan?|||That's weird... I just checked the indices on the base table and there are three. One is By ItemID. Another is by ItemLabel and another is by ItemLabel, ItemParent, Item ID, and another field. Could they be throwing off the way the data is being stored?

There are no indices on the view and I cannot add one. It comes up with an error saying that it can't add an index because it's not schema based. Please, bear with me - I'm new to 2005. This was originally stored on MSSQL 7.0 and it worked fine there.

Thanks!

-Dan|||typically you want indices on search conditions, primary keys (there is usually a clustered one there) and the foriegn keys but you should examine the execution plan first to make sure this will help. if they are already there, make sure they are not fragmented, the statistics are up to date, and then if this is a sp, recompile it. I am not working with 2K5 just yet.|||I checked the indices and everything seems to be in order. I also tried it through a stored procedure and it still takes way too long.

Any other ideas?

-Dan|||for the third time... have you looked at the execution plan?|||Sorry. The execution plan said that a table scan on the dbo.Table2 was 100% cost. So I looked at the fields it was referencing and added a column to the Table2 index and then re-ran the execution plan and it was more divided among the tasks, now with 2 index scans.

Went back to the query and now it's blazing fast.

Apparently my listening skills are about as good as my databasing skills...

Thanks Thrasymachus. :)

-Dan

intermittently my SSIS Packages which are run through the JOB are failing

Hi SSIS Guru's,

I am facing a very strange problem.

We have 2 Physical Servers (A and B) on which we have installed the SQL Server, one primary (A) and other as secondary (B). And there is a cluster (C) available to acces the running server. I have created some SSIS packages which we installed on the Server A (Primary), and created the job on the cluster server which initiates the SSIS packages, whcih are installed in the File System.

The problem i am facing is the some thing related to Connection time out. And interestingly i am not getting this error Always. Approxiamtely For Every 5 Times once it;s Failing. I am copying the errors Which i encountered in the different runs.

The thing i am confused is why i am not geting the error all the time? And Why am i getting this error all the time in a different data flow task. My SSIS Package structure is I have created one master package and 6 Child packages. I am getting the connection string for the Data base from the Configuration file which is defined in the XML File.

The connection string that i am using is

Data Source=<<server name>>;User ID=DOMAIN\user;Initial Catalog=DatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;

*************************************************************************************************************************************

RUN 1 - Error
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 2:00:07 PM Error: 2007-09-15 14:02:35.92 Code: 0xC0202009 Source: ssis_emp Connection manager

"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An

OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete

login process due to delay in opening server connection". End Error Error: 2007-09-15 14:02:35.92 Code: 0xC020801C

Source: infr_char Get the Records from emp 1 [72] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

RUN 2 - Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 9:15:01 AM Error: 2007-09-15 09:17:01.64 Code: 0xC0202009 Source: ssis_emp Connection manager

"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An

OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete

login process due to delay in opening server connection". End Error Error: 2007-09-15 09:17:01.64 Code: 0xC020801C

Source: Data Flow Task Get the Records from emp [473] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection me... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run -3 Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 11:30:01 PM Error: 2007-09-14 23:32:21.28 Code: 0xC0202009 Source: ssis_dept Connection

manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:

0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable

to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:32:21.28 Code:

0xC020801C Source: Data Flow Task Get the Records from dept [632] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method ... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run - 4 Error

Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 11:00:02 PM Error: 2007-09-14 23:02:21.46 Code: 0xC0202009 Source: ssis_emp Connection

manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:

0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable

to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:02:21.46 Code:

0xC020801C Source: infr_itm_char_val Get the Records from emp_master [1] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireCon... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run -5 Error

Message
Executed as user: AMR\sys_calyp. ...Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp

1984-2005. All rights reserved. Started: 9:10:59 PM Error: 2007-09-14 21:12:23.25 Code: 0xC0202009 Source:

ssis_salgrade Connection manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.

Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005

Description: "Unable to complete login process due to delay in opening server connection". End Error Error: 2007-09-14

21:12:23.25 Code: 0xC020801C Source: Data Flow Task - ssis_salgrade get salgrade [3227] Description: SSIS Error

Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method c. The step failed.

*************************************************************************************************************************************

I thought i found the solution my self... I changed the delay validation to all the packages to true and the problem dissappeared Smile

intermittently my SSIS Packages which are run through the JOB are failing

Hi SSIS Guru's,

I am facing a very strange problem.

We have 2 Physical Servers (A and B) on which we have installed the SQL Server, one primary (A) and other as secondary (B). And there is a cluster (C) available to acces the running server. I have created some SSIS packages which we installed on the Server A (Primary), and created the job on the cluster server which initiates the SSIS packages, whcih are installed in the File System.

The problem i am facing is the some thing related to Connection time out. And interestingly i am not getting this error Always. Approxiamtely For Every 5 Times once it;s Failing. I am copying the errors Which i encountered in the different runs.

The thing i am confused is why i am not geting the error all the time? And Why am i getting this error all the time in a different data flow task. My SSIS Package structure is I have created one master package and 6 Child packages. I am getting the connection string for the Data base from the Configuration file which is defined in the XML File.

The connection string that i am using is

Data Source=<<server name>>;User ID=DOMAIN\user;Initial Catalog=DatabaseName;Provider=SQLNCLI.1;Integrated Security=SSPI;

*************************************************************************************************************************************

RUN 1 - Error
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 2:00:07 PM Error: 2007-09-15 14:02:35.92 Code: 0xC0202009 Source: ssis_emp Connection manager

"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An

OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete

login process due to delay in opening server connection". End Error Error: 2007-09-15 14:02:35.92 Code: 0xC020801C

Source: infr_char Get the Records from emp 1 [72] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

RUN 2 - Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 9:15:01 AM Error: 2007-09-15 09:17:01.64 Code: 0xC0202009 Source: ssis_emp Connection manager

"DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An

OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete

login process due to delay in opening server connection". End Error Error: 2007-09-15 09:17:01.64 Code: 0xC020801C

Source: Data Flow Task Get the Records from emp [473] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection me... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run -3 Error
Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 11:30:01 PM Error: 2007-09-14 23:32:21.28 Code: 0xC0202009 Source: ssis_dept Connection

manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:

0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable

to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:32:21.28 Code:

0xC020801C Source: Data Flow Task Get the Records from dept [632] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method ... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run - 4 Error

Message
Executed as user: AMR\sys_calyp. ...sion 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights

reserved. Started: 11:00:02 PM Error: 2007-09-14 23:02:21.46 Code: 0xC0202009 Source: ssis_emp Connection

manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code:

0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable

to complete login process due to delay in opening server connection". End Error Error: 2007-09-14 23:02:21.46 Code:

0xC020801C Source: infr_itm_char_val Get the Records from emp_master [1] Description: SSIS Error Code

DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireCon... The package execution fa... The step failed.

*************************************************************************************************************************************

*************************************************************************************************************************************

Run -5 Error

Message
Executed as user: AMR\sys_calyp. ...Execute Package Utility Version 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp

1984-2005. All rights reserved. Started: 9:10:59 PM Error: 2007-09-14 21:12:23.25 Code: 0xC0202009 Source:

ssis_salgrade Connection manager "DBCONNECTION" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.

Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005

Description: "Unable to complete login process due to delay in opening server connection". End Error Error: 2007-09-14

21:12:23.25 Code: 0xC020801C Source: Data Flow Task - ssis_salgrade get salgrade [3227] Description: SSIS Error

Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager

"DBCONNECTION" failed with error code 0xC0202009. There may be error messages posted before this with more information on

why the AcquireConnection method c. The step failed.

*************************************************************************************************************************************

I thought i found the solution my self... I changed the delay validation to all the packages to true and the problem dissappeared Smile

Intermittent Timeout - ExecuteNonQuery On Stored Procedure

Hi All,
I'll do my best to try and describe the issue I'm having with my
application.
I'm writing a VB.Net front end for a SQL 2000 Database. I have a generic
data layer which communicates with the database, and provides classes to the
front end application.
Most of the classes are filled using the stored procedures which fill
datatable which fill properties. However, I have a method in my login class,
which calls the ADO.net method ExecuteNonQuery on a stored procedure to
update a table (I've copied in the procedure T-SQL and the end of the mail -
it's nothing complicated!!!).
Intermittently, the method will not run, and errors on the ExecuteNonQuery
line with the error "Timeout expired. The timeout period elapsed prior to
completion of the operation or the server is not responding."
Before this runs, there is a method which fills a datatable using the Fill
Method of a Data Adapter and this runs everytime. However, the
ExecuteNonQuery does not run, and errors out.
When this does occur, I can open query analyzer and if I try to run any
stored procedures in the database, I get a timeout. Even Altering a stored
procedure times out. I can use other databases and run stored procedure in
them with no problems, but this specific database causes timeouts.
After say 5 minutes the attempt to run the ExecuteNonQuery works and it will
be fine for a while (couple of hours), then it will start to timeout again
for 5-10 mins.
What could be causing this, as it's database specific. Is there any way, I
can have the Database rebuild itself and clear out any dodgy temporary
tables?
Any method which uses a data adapter runs fine all the time, but the
ExecuteNonQuery fails intermittently.
I'm a bit lost really.
Any help is appreciated.
Thanks
Alex
******* Stored Procedure *********
ALTER PROC proc_Utility_UpdateUserLoggedIn
@.UserID int,
@.LoggedIn bit = 0
AS
SET NOCOUNT ON
UPDATE tblUser
SET
LastLogin = GetDate(),
LoggedIn = @.LoggedIn
WHERE UserID = @.UserID
*********************************
Hi Alex,
Are you ending properly transactions?
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
"Alex Stevens" <AlexStevens_NOSPAMPLEASE@.gcc.co.uk> wrote in message
news:eFahpgUoEHA.2612@.TK2MSFTNGP15.phx.gbl...
> Hi All,
> I'll do my best to try and describe the issue I'm having with my
> application.
> I'm writing a VB.Net front end for a SQL 2000 Database. I have a generic
> data layer which communicates with the database, and provides classes to
> the
> front end application.
> Most of the classes are filled using the stored procedures which fill
> datatable which fill properties. However, I have a method in my login
> class,
> which calls the ADO.net method ExecuteNonQuery on a stored procedure to
> update a table (I've copied in the procedure T-SQL and the end of the
> mail -
> it's nothing complicated!!!).
> Intermittently, the method will not run, and errors on the ExecuteNonQuery
> line with the error "Timeout expired. The timeout period elapsed prior to
> completion of the operation or the server is not responding."
> Before this runs, there is a method which fills a datatable using the Fill
> Method of a Data Adapter and this runs everytime. However, the
> ExecuteNonQuery does not run, and errors out.
> When this does occur, I can open query analyzer and if I try to run any
> stored procedures in the database, I get a timeout. Even Altering a stored
> procedure times out. I can use other databases and run stored procedure in
> them with no problems, but this specific database causes timeouts.
> After say 5 minutes the attempt to run the ExecuteNonQuery works and it
> will
> be fine for a while (couple of hours), then it will start to timeout again
> for 5-10 mins.
> What could be causing this, as it's database specific. Is there any way, I
> can have the Database rebuild itself and clear out any dodgy temporary
> tables?
> Any method which uses a data adapter runs fine all the time, but the
> ExecuteNonQuery fails intermittently.
> I'm a bit lost really.
> Any help is appreciated.
> Thanks
> Alex
>
> ******* Stored Procedure *********
> ALTER PROC proc_Utility_UpdateUserLoggedIn
> @.UserID int,
> @.LoggedIn bit = 0
> AS
> SET NOCOUNT ON
> UPDATE tblUser
> SET
> LastLogin = GetDate(),
> LoggedIn = @.LoggedIn
> WHERE UserID = @.UserID
> *********************************
>
|||Hi
Timeouts are caused by SQL not getting it's work finished in time. This
indicates a blocking or performance issue.
Make sure that you have appropriate indexes in place, run sp_who2 and look
for any processes that are blocked by other processes when you run your query
through your VB code or Query Analyser.
Regards
Mike
"Alex Stevens" wrote:

> Hi All,
> I'll do my best to try and describe the issue I'm having with my
> application.
> I'm writing a VB.Net front end for a SQL 2000 Database. I have a generic
> data layer which communicates with the database, and provides classes to the
> front end application.
> Most of the classes are filled using the stored procedures which fill
> datatable which fill properties. However, I have a method in my login class,
> which calls the ADO.net method ExecuteNonQuery on a stored procedure to
> update a table (I've copied in the procedure T-SQL and the end of the mail -
> it's nothing complicated!!!).
> Intermittently, the method will not run, and errors on the ExecuteNonQuery
> line with the error "Timeout expired. The timeout period elapsed prior to
> completion of the operation or the server is not responding."
> Before this runs, there is a method which fills a datatable using the Fill
> Method of a Data Adapter and this runs everytime. However, the
> ExecuteNonQuery does not run, and errors out.
> When this does occur, I can open query analyzer and if I try to run any
> stored procedures in the database, I get a timeout. Even Altering a stored
> procedure times out. I can use other databases and run stored procedure in
> them with no problems, but this specific database causes timeouts.
> After say 5 minutes the attempt to run the ExecuteNonQuery works and it will
> be fine for a while (couple of hours), then it will start to timeout again
> for 5-10 mins.
> What could be causing this, as it's database specific. Is there any way, I
> can have the Database rebuild itself and clear out any dodgy temporary
> tables?
> Any method which uses a data adapter runs fine all the time, but the
> ExecuteNonQuery fails intermittently.
> I'm a bit lost really.
> Any help is appreciated.
> Thanks
> Alex
>
> ******* Stored Procedure *********
> ALTER PROC proc_Utility_UpdateUserLoggedIn
> @.UserID int,
> @.LoggedIn bit = 0
> AS
> SET NOCOUNT ON
> UPDATE tblUser
> SET
> LastLogin = GetDate(),
> LoggedIn = @.LoggedIn
> WHERE UserID = @.UserID
> *********************************
>
>
|||I'm not using transactions in the stored procedure........?
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%23Au3lrUoEHA.3592@.TK2MSFTNGP14.phx.gbl...[vbcol=seagreen]
> Hi Alex,
> Are you ending properly transactions?
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & development
> miha at rthand com
> www.rthand.com
> "Alex Stevens" <AlexStevens_NOSPAMPLEASE@.gcc.co.uk> wrote in message
> news:eFahpgUoEHA.2612@.TK2MSFTNGP15.phx.gbl...
ExecuteNonQuery[vbcol=seagreen]
to[vbcol=seagreen]
Fill[vbcol=seagreen]
stored[vbcol=seagreen]
in[vbcol=seagreen]
again[vbcol=seagreen]
I
>
|||As you can see the stored procedure (at the bottom of the original email) is
an extremely simple update procedure.
The only thiing that has been run before that on the SQL database is a
SELECT statement (posted at the end) which returns a resultset also
implementing the NOLOCK to stop the table being locked on a simple read.
In query analyzer, Select statements work fine, but updates don't.

> Make sure that you have appropriate indexes in place, run sp_who2 and look
> for any processes that are blocked by other processes when you run your
query
> through your VB code or Query Analyser.
The table has an int Primary Key, when the application is started, I
sometimes get two processes one which has a batch end time, and one which
has a batch end time of 01/01/1900 (presumably a Null).
I can't track down where this erroneous process comes from (it is on the
database in question), because it doesn't appear when I set through the
code.
How can I check to see if a process is blocking the UPDATE process?
Thanks
Alex
******Stored Proc*******
ALTER PROC proc_Get_User
-- Date Created: 28 April 2004
-- Procedure Description: Standard Get procedure.
-- Created By: Alex Stevens
-- Template version 1.0 Dated: 28/04/2004 12:41:58
-- Generated by CodeSmith 2.5
-- Used in Classes:
@.UserID int = Null,
@.UserName varChar(20) = Null
AS
BEGIN
SELECT dbo.tblUser.*
FROM dbo.tblUser (NOLOCK)
WHERE (@.UserID IS NULL OR UserID = @.UserID) OR
(@.UserName IS NULL OR UserName = @.UserName)
ORDER BY UserName
END
*************
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:F92E78E3-70CF-44C2-824D-4C686642307C@.microsoft.com...
> Hi
> Timeouts are caused by SQL not getting it's work finished in time. This
> indicates a blocking or performance issue.
> Make sure that you have appropriate indexes in place, run sp_who2 and look
> for any processes that are blocked by other processes when you run your
query[vbcol=seagreen]
> through your VB code or Query Analyser.
> Regards
> Mike
> "Alex Stevens" wrote:
the[vbcol=seagreen]
class,[vbcol=seagreen]
mail -[vbcol=seagreen]
ExecuteNonQuery[vbcol=seagreen]
to[vbcol=seagreen]
Fill[vbcol=seagreen]
stored[vbcol=seagreen]
in[vbcol=seagreen]
will[vbcol=seagreen]
again[vbcol=seagreen]
I[vbcol=seagreen]