I have a Maintenance plan schedule on one my dev databases, and I'm
continually getting notices that it is failing. Here is the report that I
get:
Starting maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:00
PM
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft]
91;ODBC SQL
Server Driver][SQL Server]Database state cannot be changed while other u
sers
are using the database 'CRMDEV'
[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE st
atement
failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption comma
nd failed.
[1] Database CRMDEV: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft]
91;ODBC SQL
Server Driver][SQL Server]Repair statement not processed. Database needs
to
be in single user mode.
The following errors were found:
[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement
not
processed. Database needs to be in single user mode.
** Execution Time: 0 hrs, 0 mins, 1 secs **
End of maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:01 PM
SQLMAINT.EXE Process Exit Code: 1 (Failed)
How do I put a database in "single-user" mode to run an Integrity check?
Thanks,
SaraSaral6978 wrote:
> I have a Maintenance plan schedule on one my dev databases, and I'm
> continually getting notices that it is failing. Here is the report that I
> get:
> Starting maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:0
0 PM
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]Database state cannot be changed while other
users
> are using the database 'CRMDEV'
> [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE
statement
> failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption com
mand failed.
> [1] Database CRMDEV: Check Data and Index Linkage...
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]Repair statement not processed. Database nee
ds to
> be in single user mode.
> The following errors were found:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statemen
t not
> processed. Database needs to be in single user mode.
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> End of maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:01
PM
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>
> How do I put a database in "single-user" mode to run an Integrity check?
> Thanks,
> Sara
>
The maintenance plan is attempting to put the DB in single user mode
(that's what the failing ALTER DATABASE statement is doing). It's
failing because someone/something has a connection that can't be terminated.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||A database does NOT need to be in the single user mode to perform integrity
checks. But it does need to be in the single user mode to attempt any repair
.
Automated repair is a dangerous business, and I'd suggest that you modify
your maintenance plan to disable it. In addition, it's not rare for a
database to be left in the single user mode after the repair is done, thus
preventing others from using the database until you intervene.
Linchi
"Saral6978" wrote:
> I have a Maintenance plan schedule on one my dev databases, and I'm
> continually getting notices that it is failing. Here is the report that I
> get:
> Starting maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:0
0 PM
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]Database state cannot be changed while other
users
> are using the database 'CRMDEV'
> [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE
statement
> failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption com
mand failed.
> [1] Database CRMDEV: Check Data and Index Linkage...
> [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft]
[ODBC SQL
> Server Driver][SQL Server]Repair statement not processed. Database nee
ds to
> be in single user mode.
> The following errors were found:
> [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statemen
t not
> processed. Database needs to be in single user mode.
> ** Execution Time: 0 hrs, 0 mins, 1 secs **
> End of maintenance plan 'CRMDEV DB Maintenance Plan' on 1/11/2007 8:00:01
PM
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>
> How do I put a database in "single-user" mode to run an Integrity check?
> Thanks,
> Sara
>|||Linchi - thank you so much for your suggestion...I will disable the automati
c
repair...thanks!
"Linchi Shea" wrote:
[vbcol=seagreen]
> A database does NOT need to be in the single user mode to perform integrit
y
> checks. But it does need to be in the single user mode to attempt any repa
ir.
> Automated repair is a dangerous business, and I'd suggest that you modify
> your maintenance plan to disable it. In addition, it's not rare for a
> database to be left in the single user mode after the repair is done, thus
> preventing others from using the database until you intervene.
> Linchi
> "Saral6978" wrote:
>|||Okay - I just unchecked the "Attempt to repair" box, ran the Integrity check
,
and it was successful.
Thank you so much!
"Linchi Shea" wrote:
[vbcol=seagreen]
> A database does NOT need to be in the single user mode to perform integrit
y
> checks. But it does need to be in the single user mode to attempt any repa
ir.
> Automated repair is a dangerous business, and I'd suggest that you modify
> your maintenance plan to disable it. In addition, it's not rare for a
> database to be left in the single user mode after the repair is done, thus
> preventing others from using the database until you intervene.
> Linchi
> "Saral6978" wrote:
>
No comments:
Post a Comment