We are having a problem with a report that is scheduled to be emailed
only works sometimes. Other time it fails with a "Reporting Services
Failure sending mail: Cannot access a closed file" error message.
The report is running off a snapshot that is generated every half hour
and a subscription is setup to email the report to some users. The
snapshot is generated even when the email fails.
It seems the problem is pointed to by userName: [DOMAIN\username]not
found in the database. This seems to be a security problem - but why
would it work sometimes? The log file is below for reference. The user
in question is in the same domain as the report service is running
under.
Environment:
Report service SP2 running on a Windows 2003 EE with SQL Server 2000
Active Director Domain server running on Windows 2003 EE
The report server service is running under a domain account that is in
the local administrator group on the local server.
Has anyone seen this problem?
Thanks
ReportingServicesService!library!2b4!09/02/2005-09:09:38:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server
system properties.
ReportingServicesService!session!2b4!09/02/2005-09:09:38:: i INFO:
LoadSnapshot: Item with session: tc2ixx55bnczhjifyjr2z42q, reportPath:
/Company Reports/MyReport, userName: [DOMAIN\username]not found in the
database
ReportingServicesService!chunks!2b4!09/02/2005-09:09:38:: i INFO: ###
GetReportChunk('MyReport_style', 1), chunk was not found!
this=38c10bb1-1bae-4d41-a03e-f56437fc3c86
ReportingServicesService!emailextension!2b4!09/02/2005-09:09:38:: Error
sending email. System.ObjectDisposedException: Cannot access a closed
file.
at System.IO.__Error.FileNotOpen()
at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32
count)
at
Microsoft.ReportingServices.Library.PartitionFileStream.Read(Byte[]
buffer, Int32 offset, Int32 count)
at
Microsoft.ReportingServices.Library.MemoryUntilThresholdStream.Read(Byte[]
buffer, Int32 offset, Int32 count)
at Microsoft.ReportingServices.Library.RSStream.Read(Byte[] buffer,
Int32 offset, Int32 count)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
message, RenderedOutputFile[] reportData, Notification notification,
SubscriptionData data)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage
message, Notification notification, SubscriptionData data)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification
notification)
at
Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification
notification)
ReportingServicesService!notification!2b4!09/02/2005-09:09:38::
Notification 2180101f-6faa-41b7-b1a0-b3217c5d630e completed. Success:
False, Status: Failure sending mail: Cannot access a closed file.,
DeliveryExtension: Report Server Email, Report: MyReport, Attempt 0
ReportingServicesService!dbpolling!2b4!09/02/2005-09:09:38::
NotificationPolling finished processing item
2180101f-6faa-41b7-b1a0-b3217c5d630ejmbackup1024@.gmail.com wrote:
> We are having a problem with a report that is scheduled to be emailed
> only works sometimes. Other time it fails with a "Reporting Services
> Failure sending mail: Cannot access a closed file" error message.
> The report is running off a snapshot that is generated every half hour
> and a subscription is setup to email the report to some users. The
> snapshot is generated even when the email fails.
> It seems the problem is pointed to by userName: [DOMAIN\username]not
> found in the database. This seems to be a security problem - but why
> would it work sometimes? The log file is below for reference. The user
> in question is in the same domain as the report service is running
> under.
> Environment:
> Report service SP2 running on a Windows 2003 EE with SQL Server 2000
> Active Director Domain server running on Windows 2003 EE
> The report server service is running under a domain account that is in
> the local administrator group on the local server.
> Has anyone seen this problem?
> Thanks
> ReportingServicesService!library!2b4!09/02/2005-09:09:38:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
> system properties.
> ReportingServicesService!session!2b4!09/02/2005-09:09:38:: i INFO:
> LoadSnapshot: Item with session: tc2ixx55bnczhjifyjr2z42q, reportPath:
> /Company Reports/MyReport, userName: [DOMAIN\username]not found in the
> database
> ReportingServicesService!chunks!2b4!09/02/2005-09:09:38:: i INFO: ###
> GetReportChunk('MyReport_style', 1), chunk was not found!
> this=38c10bb1-1bae-4d41-a03e-f56437fc3c86
> ReportingServicesService!emailextension!2b4!09/02/2005-09:09:38:: Error
> sending email. System.ObjectDisposedException: Cannot access a closed
> file.
> at System.IO.__Error.FileNotOpen()
> at System.IO.FileStream.Read(Byte[] array, Int32 offset, Int32
> count)
> at
> Microsoft.ReportingServices.Library.PartitionFileStream.Read(Byte[]
> buffer, Int32 offset, Int32 count)
> at
> Microsoft.ReportingServices.Library.MemoryUntilThresholdStream.Read(Byte[]
> buffer, Int32 offset, Int32 count)
> at Microsoft.ReportingServices.Library.RSStream.Read(Byte[] buffer,
> Int32 offset, Int32 count)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.EmbedReport(IMessage
> message, RenderedOutputFile[] reportData, Notification notification,
> SubscriptionData data)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.ConstructMessageBody(IMessage
> message, Notification notification, SubscriptionData data)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.CreateMessage(Notification
> notification)
> at
> Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification
> notification)
> ReportingServicesService!notification!2b4!09/02/2005-09:09:38::
> Notification 2180101f-6faa-41b7-b1a0-b3217c5d630e completed. Success:
> False, Status: Failure sending mail: Cannot access a closed file.,
> DeliveryExtension: Report Server Email, Report: MyReport, Attempt 0
> ReportingServicesService!dbpolling!2b4!09/02/2005-09:09:38::
> NotificationPolling finished processing item
> 2180101f-6faa-41b7-b1a0-b3217c5d630e
Experiencing a very similar issue, running SP1. I created a
parameterized report, from which 93 link reports point to. Those 93
linked reports are set to run nightly at 2:00 am by generating a
snapshot (for historical purposes). All 93 snapshots were created
within about 3 mintutes of 2:00 am. The subscription is suposed to
fire an email whenever it is updated, but only half or so are
successful. On those that are unsuccessful, I get no error message at
all.
It seems timed subscriptions work just fine. Perhaps what I will do is
send the email based only on a timed subscription and also create a
snapshot for historical purposes...I would much rather not have to do
double the processor work, as many more reports are needed for
conversion.
Showing posts with label fails. Show all posts
Showing posts with label fails. Show all posts
Wednesday, March 28, 2012
Wednesday, March 7, 2012
Integrity Check From Maintenance Plan Fails - Error 22029
Hello,
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
John
Specify a report file for the job and check for the specific errors in the report file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 years.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
John
Specify a report file for the job and check for the specific errors in the report file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 years.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
Integrity Check From Maintenance Plan Fails - Error 22029
Hello,
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years
.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
JohnSpecify a report file for the job and check for the specific errors in the r
eport file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 yea
rs.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access
to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years
.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
JohnSpecify a report file for the job and check for the specific errors in the r
eport file.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 yea
rs.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access
to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
Integrity Check From Maintenance Plan Fails - Error 22029
Hello,
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
JohnSpecify a report file for the job and check for the specific errors in the report file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 years.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
I created a Maintenance plan and the only thing I have it do is perform an
Integrity Check on the database. It's been running successfully for 2 years.
I recently Added Replication to this server, having the data from this
server replicated onto a backup server. During that setup, I had to let
SQLServer Agent run as a different user than the system Administrator for
some reason. So I changed it to run as a different Windows User that has
Administrator privileges.
The command for the check is:
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
Now the Integrity Check won't run.
The user is set as a user on the Server with Admin privileges with Access to
the database in question.
Since I'm trying to let it do the minor repair, could it be that Agent
running as a different user doesn't get the exclusive access it needs?
Thanks for any help.
JohnSpecify a report file for the job and check for the specific errors in the report file.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"John Manion" <JohnManion@.discussions.microsoft.com> wrote in message
news:E77351D7-DA36-43B4-9C61-C31FCF1EBA99@.microsoft.com...
> Hello,
> I created a Maintenance plan and the only thing I have it do is perform an
> Integrity Check on the database. It's been running successfully for 2 years.
> I recently Added Replication to this server, having the data from this
> server replicated onto a backup server. During that setup, I had to let
> SQLServer Agent run as a different user than the system Administrator for
> some reason. So I changed it to run as a different Windows User that has
> Administrator privileges.
> The command for the check is:
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> D2A9902D-1F5F-4FCB-8819-62609F141FD5 -WriteHistory -CkDBRepair '
> Now the Integrity Check won't run.
> The user is set as a user on the Server with Admin privileges with Access to
> the database in question.
> Since I'm trying to let it do the minor repair, could it be that Agent
> running as a different user doesn't get the exclusive access it needs?
> Thanks for any help.
> John
Integrity Check Fails
I setup a DB Maint, Plan for several databases however,
the Integrity Check job fails for a few of my databases.
The error is "Repair statement not processed. Database
needs to be in single user mode."
Any thoughts on why this is happening?
Thanks,
DonPretty much what it says. What version and service pack of SQL Server? Note that you can't put
master in single user mode. I recommend that you remove that darn option to "attempt to repair minor
problems". :-)
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Don" <drduquette@.aol.com> wrote in message news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> I setup a DB Maint, Plan for several databases however,
> the Integrity Check job fails for a few of my databases.
> The error is "Repair statement not processed. Database
> needs to be in single user mode."
> Any thoughts on why this is happening?
> Thanks,
> Don|||Thanks for the quick response! We are using SQLserver
2000 service pack 3. I realize that I could uncheck the
repair but that defeats the purpose if there is a problem
with the database. In addition, MS recommends that the
repair option be checked.
Is there any work around to this issue of putting the DB
in single user mode?
Thanks,
Don
>--Original Message--
>Pretty much what it says. What version and service pack
of SQL Server? Note that you can't put
>master in single user mode. I recommend that you remove
that darn option to "attempt to repair minor
>problems". :-)
>--
>Tibor Karaszi, SQL Server MVP
>Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
>"Don" <drduquette@.aol.com> wrote in message
news:000001c36ca4$732448e0$a101280a@.phx.gbl...
>> I setup a DB Maint, Plan for several databases however,
>> the Integrity Check job fails for a few of my databases.
>> The error is "Repair statement not processed. Database
>> needs to be in single user mode."
>> Any thoughts on why this is happening?
>> Thanks,
>> Don
>
>.
>|||Don,
Tibor mentioned a restriction on master. In addition, if a database has any
open connections it cannot be changed to single user mode unless you use the
WITH ROLLBACK clauses.
ALTER DATABASE mydatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
This breaks all unqualified connections and switches to single user mode.
(Much easier than the old method of writing a looping procedure to KILL
connections until they were finally all gone.)
Russell Fields
"Don" <drduquette@.aol.com> wrote in message
news:0e9901c36ca7$0659c2f0$a301280a@.phx.gbl...
> Thanks for the quick response! We are using SQLserver
> 2000 service pack 3. I realize that I could uncheck the
> repair but that defeats the purpose if there is a problem
> with the database. In addition, MS recommends that the
> repair option be checked.
> Is there any work around to this issue of putting the DB
> in single user mode?
> Thanks,
> Don
> >--Original Message--
> >Pretty much what it says. What version and service pack
> of SQL Server? Note that you can't put
> >master in single user mode. I recommend that you remove
> that darn option to "attempt to repair minor
> >problems". :-)
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> >"Don" <drduquette@.aol.com> wrote in message
> news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> >> I setup a DB Maint, Plan for several databases however,
> >> the Integrity Check job fails for a few of my databases.
> >> The error is "Repair statement not processed. Database
> >> needs to be in single user mode."
> >>
> >> Any thoughts on why this is happening?
> >>
> >> Thanks,
> >> Don
> >
> >
> >.
> >|||The purpose of CHECKDB is to get *notified* in the unlikely event of a problem. I surely don't want
some background thing try to repair the database if I run into a problem with it. I want to be
there, do a log backup first, think, etc etc etc.
Anyhow, master cannot be in single user mode, if this is the one which is causing your problem, then
you have to remove it from the plan, or don't do background repair.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Don" <drduquette@.aol.com> wrote in message news:0e9901c36ca7$0659c2f0$a301280a@.phx.gbl...
> Thanks for the quick response! We are using SQLserver
> 2000 service pack 3. I realize that I could uncheck the
> repair but that defeats the purpose if there is a problem
> with the database. In addition, MS recommends that the
> repair option be checked.
> Is there any work around to this issue of putting the DB
> in single user mode?
> Thanks,
> Don
> >--Original Message--
> >Pretty much what it says. What version and service pack
> of SQL Server? Note that you can't put
> >master in single user mode. I recommend that you remove
> that darn option to "attempt to repair minor
> >problems". :-)
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> >"Don" <drduquette@.aol.com> wrote in message
> news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> >> I setup a DB Maint, Plan for several databases however,
> >> the Integrity Check job fails for a few of my databases.
> >> The error is "Repair statement not processed. Database
> >> needs to be in single user mode."
> >>
> >> Any thoughts on why this is happening?
> >>
> >> Thanks,
> >> Don
> >
> >
> >.
> >
the Integrity Check job fails for a few of my databases.
The error is "Repair statement not processed. Database
needs to be in single user mode."
Any thoughts on why this is happening?
Thanks,
DonPretty much what it says. What version and service pack of SQL Server? Note that you can't put
master in single user mode. I recommend that you remove that darn option to "attempt to repair minor
problems". :-)
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Don" <drduquette@.aol.com> wrote in message news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> I setup a DB Maint, Plan for several databases however,
> the Integrity Check job fails for a few of my databases.
> The error is "Repair statement not processed. Database
> needs to be in single user mode."
> Any thoughts on why this is happening?
> Thanks,
> Don|||Thanks for the quick response! We are using SQLserver
2000 service pack 3. I realize that I could uncheck the
repair but that defeats the purpose if there is a problem
with the database. In addition, MS recommends that the
repair option be checked.
Is there any work around to this issue of putting the DB
in single user mode?
Thanks,
Don
>--Original Message--
>Pretty much what it says. What version and service pack
of SQL Server? Note that you can't put
>master in single user mode. I recommend that you remove
that darn option to "attempt to repair minor
>problems". :-)
>--
>Tibor Karaszi, SQL Server MVP
>Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
>"Don" <drduquette@.aol.com> wrote in message
news:000001c36ca4$732448e0$a101280a@.phx.gbl...
>> I setup a DB Maint, Plan for several databases however,
>> the Integrity Check job fails for a few of my databases.
>> The error is "Repair statement not processed. Database
>> needs to be in single user mode."
>> Any thoughts on why this is happening?
>> Thanks,
>> Don
>
>.
>|||Don,
Tibor mentioned a restriction on master. In addition, if a database has any
open connections it cannot be changed to single user mode unless you use the
WITH ROLLBACK clauses.
ALTER DATABASE mydatabase
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
This breaks all unqualified connections and switches to single user mode.
(Much easier than the old method of writing a looping procedure to KILL
connections until they were finally all gone.)
Russell Fields
"Don" <drduquette@.aol.com> wrote in message
news:0e9901c36ca7$0659c2f0$a301280a@.phx.gbl...
> Thanks for the quick response! We are using SQLserver
> 2000 service pack 3. I realize that I could uncheck the
> repair but that defeats the purpose if there is a problem
> with the database. In addition, MS recommends that the
> repair option be checked.
> Is there any work around to this issue of putting the DB
> in single user mode?
> Thanks,
> Don
> >--Original Message--
> >Pretty much what it says. What version and service pack
> of SQL Server? Note that you can't put
> >master in single user mode. I recommend that you remove
> that darn option to "attempt to repair minor
> >problems". :-)
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> >"Don" <drduquette@.aol.com> wrote in message
> news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> >> I setup a DB Maint, Plan for several databases however,
> >> the Integrity Check job fails for a few of my databases.
> >> The error is "Repair statement not processed. Database
> >> needs to be in single user mode."
> >>
> >> Any thoughts on why this is happening?
> >>
> >> Thanks,
> >> Don
> >
> >
> >.
> >|||The purpose of CHECKDB is to get *notified* in the unlikely event of a problem. I surely don't want
some background thing try to repair the database if I run into a problem with it. I want to be
there, do a log backup first, think, etc etc etc.
Anyhow, master cannot be in single user mode, if this is the one which is causing your problem, then
you have to remove it from the plan, or don't do background repair.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Don" <drduquette@.aol.com> wrote in message news:0e9901c36ca7$0659c2f0$a301280a@.phx.gbl...
> Thanks for the quick response! We are using SQLserver
> 2000 service pack 3. I realize that I could uncheck the
> repair but that defeats the purpose if there is a problem
> with the database. In addition, MS recommends that the
> repair option be checked.
> Is there any work around to this issue of putting the DB
> in single user mode?
> Thanks,
> Don
> >--Original Message--
> >Pretty much what it says. What version and service pack
> of SQL Server? Note that you can't put
> >master in single user mode. I recommend that you remove
> that darn option to "attempt to repair minor
> >problems". :-)
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> >"Don" <drduquette@.aol.com> wrote in message
> news:000001c36ca4$732448e0$a101280a@.phx.gbl...
> >> I setup a DB Maint, Plan for several databases however,
> >> the Integrity Check job fails for a few of my databases.
> >> The error is "Repair statement not processed. Database
> >> needs to be in single user mode."
> >>
> >> Any thoughts on why this is happening?
> >>
> >> Thanks,
> >> Don
> >
> >
> >.
> >
Subscribe to:
Posts (Atom)