Friday, February 24, 2012

DB maintenance Plan error

Hi,
I am using DB maintenance plan for the integrity checks
and have included the dbs
to repair minor problems but I think it needs the db to
be in single user mode before it can do it so my jobs
have been failing with these error message
Microsoft (R) SQLMaint Utility (Unicode), Version Logged
on to SQL Server 'SQLMELDEV' as 'NT AUTHORITY\SYSTEM'
(trusted)
Starting maintenance plan 'DB Maintenance Plan1' on
2/03/2005 9:00:00 AM
[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 'Northwind'
[Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
DATABASE statement failed.
[Microsoft][ODBC SQL Server Driver][SQL Server]
sp_dboption command failed.
[1] Database Northwind: 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 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 'DB Maintenance Plan1' on
2/03/2005 9:00:00 AM
SQLMAINT.EXE Process Exit Code: 1 (Failed)
Anyone know how i can overcome this one as I have about
10 dbs in that server.
Do i need to kill all the users before using it?
Any simple methods/logic?
AnupSure, un check the checkbox that says to fix minor issues. Then it won't
try and put it in single user mode. And if you do find errors you should be
the one to decide how you are going to approach the repair instead of
letting the mp blindly fix issues that you may never know you had.
Andrew J. Kelly SQL MVP
"Anup" <anonymous@.discussions.microsoft.com> wrote in message
news:2c5301c51eab$71f88340$a401280a@.phx.gbl...
> Hi,
> I am using DB maintenance plan for the integrity checks
> and have included the dbs
> to repair minor problems but I think it needs the db to
> be in single user mode before it can do it so my jobs
> have been failing with these error message
>
> Microsoft (R) SQLMaint Utility (Unicode), Version Logged
> on to SQL Server 'SQLMELDEV' as 'NT AUTHORITY\SYSTEM'
> (trusted)
> Starting maintenance plan 'DB Maintenance Plan1' on
> 2/03/2005 9:00:00 AM
> [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 'Northwind'
> [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
> DATABASE statement failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]
> sp_dboption command failed.
> [1] Database Northwind: 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 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 'DB Maintenance Plan1' on
> 2/03/2005 9:00:00 AM
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>
> Anyone know how i can overcome this one as I have about
> 10 dbs in that server.
> Do i need to kill all the users before using it?
> Any simple methods/logic?
> Anup|||Uncheck the 'repair minor errors' box for the integrity check job. It
requires that the database is put into single user mode before the DBCC can
be run. You don't want to automatically repair any errors without working
out why they happened.
Regards.
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"Anup" <anonymous@.discussions.microsoft.com> wrote in message
news:2c5301c51eab$71f88340$a401280a@.phx.gbl...
> Hi,
> I am using DB maintenance plan for the integrity checks
> and have included the dbs
> to repair minor problems but I think it needs the db to
> be in single user mode before it can do it so my jobs
> have been failing with these error message
>
> Microsoft (R) SQLMaint Utility (Unicode), Version Logged
> on to SQL Server 'SQLMELDEV' as 'NT AUTHORITY\SYSTEM'
> (trusted)
> Starting maintenance plan 'DB Maintenance Plan1' on
> 2/03/2005 9:00:00 AM
> [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 'Northwind'
> [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER
> DATABASE statement failed.
> [Microsoft][ODBC SQL Server Driver][SQL Server]
> sp_dboption command failed.
> [1] Database Northwind: 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 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 'DB Maintenance Plan1' on
> 2/03/2005 9:00:00 AM
> SQLMAINT.EXE Process Exit Code: 1 (Failed)
>
> Anyone know how i can overcome this one as I have about
> 10 dbs in that server.
> Do i need to kill all the users before using it?
> Any simple methods/logic?
> Anup|||But how will i know if has any errors during the process
any tools codes will be helpfull to check those
thanks

>--Original Message--
>Sure, un check the checkbox that says to fix minor
issues. Then it won't
>try and put it in single user mode. And if you do find
errors you should be
>the one to decide how you are going to approach the
repair instead of
>letting the mp blindly fix issues that you may never
know you had.
>--
>Andrew J. Kelly SQL MVP
>
>"Anup" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2c5301c51eab$71f88340$a401280a@.phx.gbl...
Logged[vbcol=seagreen]
>
>.
>|||The job will fail if there are errors. If not then it will succeed.
Andrew J. Kelly SQL MVP
"anup" <anonymous@.discussions.microsoft.com> wrote in message
news:2c6d01c51eb1$a69feab0$a401280a@.phx.gbl...[vbcol=seagreen]
> But how will i know if has any errors during the process
> any tools codes will be helpfull to check those
> thanks
>
> issues. Then it won't
> errors you should be
> repair instead of
> know you had.
> message
> Logged|||I have the same problem, but I have never had the box to fix minor...
checked. It is still unchecked, what could be wrong?
"Paul S Randal [MS]" skrev:

> Uncheck the 'repair minor errors' box for the integrity check job. It
> requires that the database is put into single user mode before the DBCC ca
n
> be run. You don't want to automatically repair any errors without working
> out why they happened.
> Regards.
> --
> Paul Randal
> Dev Lead, Microsoft SQL Server Storage Engine
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Anup" <anonymous@.discussions.microsoft.com> wrote in message
> news:2c5301c51eab$71f88340$a401280a@.phx.gbl...
>
>

No comments:

Post a Comment