Showing posts with label checks. Show all posts
Showing posts with label checks. Show all posts

Saturday, February 25, 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...
>> 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
>
>.
>|||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...
> 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...
>> 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
>>
>>.|||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 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
>
>

Friday, February 24, 2012

db maintenance issues with connection pooling

Hi,
Is there a way to do maintenance like integrity checks if there is still
a (sleeping)connection to a database? My maintenance jobs where you need
to be in single user mode fails. In our multi-tier environment we use an
applicationserver which uses connection pooling and a databaseserver
(SQL2K).
I've looked at dbcc opentran, but that doesn't work for me. The solution
i'm looking for is to check if there are any connections for a
particular database. If so, i want to disconnect it, but leave it in a
state so that the applicationserver doesn't have to restart it's
services (this is a manual proces).You could
SELECT cntr_value AS UsersConnected FROM master..sysperfinfo as p
WHERE p.object_name = 'SQLServer:General Statistics' And p.counter_name =
'User Connections'
this though will not give you the db upon which they are connected.
If you use -- sp_who 'active' this will give a more detailed breakdown of
active users and the db they are connected
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Jason" <jasonlewis@.hotmail.com> wrote in message
news:exafy5ujGHA.2200@.TK2MSFTNGP05.phx.gbl...
> Hi,
> Is there a way to do maintenance like integrity checks if there is still
> a (sleeping)connection to a database? My maintenance jobs where you need
> to be in single user mode fails. In our multi-tier environment we use an
> applicationserver which uses connection pooling and a databaseserver
> (SQL2K).
> I've looked at dbcc opentran, but that doesn't work for me. The solution
> i'm looking for is to check if there are any connections for a
> particular database. If so, i want to disconnect it, but leave it in a
> state so that the applicationserver doesn't have to restart it's
> services (this is a manual proces).

db maintanence plan failure

Hi all!
I have a DB Maintanence plan configured to run once a week that is supposed
to perform optimizations and integrity checks on all user databases. This is
split into 2 seperate jobs when I look at the Jobs node under SQL Agent. The
optimizations is set to run at 4 am & the integrity at 5 am. It appears that
the integrity check job keeps failing. The log says something about
'mosesdb' needs to be in single user mode. Any ideas? The optimization jobs
seems to complete OK
TIA!Param
Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
SQL Server is trying to repair some problems but it requires database to be
in single user mode.
"Param R." <pr@.nospam.com> wrote in message
news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
> Hi all!
> I have a DB Maintanence plan configured to run once a week that is
supposed
> to perform optimizations and integrity checks on all user databases. This
is
> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
The
> optimizations is set to run at 4 am & the integrity at 5 am. It appears
that
> the integrity check job keeps failing. The log says something about
> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
jobs
> seems to complete OK
> TIA!
>|||OK. But wouldnt I want it to fix any problems? What is the best way then?
thanks!
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
> Param
> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
> SQL Server is trying to repair some problems but it requires database to
> be
> in single user mode.
>
> "Param R." <pr@.nospam.com> wrote in message
> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> Hi all!
>> I have a DB Maintanence plan configured to run once a week that is
> supposed
>> to perform optimizations and integrity checks on all user databases. This
> is
>> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
> The
>> optimizations is set to run at 4 am & the integrity at 5 am. It appears
> that
>> the integrity check job keeps failing. The log says something about
>> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
> jobs
>> seems to complete OK
>> TIA!
>>
>|||If my car keep breaking down, I'd like to know why that happen so I can avoid it keeping breaking
down when I travel at high speed. I.e., if you get such problem, you want to do root-cause analysis
why they happen. Often it is because hardware problems.
In other words, the option in maint wiz is IMO not well thought through, and AFAIK, it will be
removed in next version of SQL Server. The option, btw makes maint wiz execute DBCC CHECKDB using
the REPAIR_FAST option.
To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in single user mode, so if you
have users in the database, the command and subsequently job will fail.
Also, you might want to check out: http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Param R." <pr@.nospam.com> wrote in message news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
> OK. But wouldnt I want it to fix any problems? What is the best way then?
> thanks!
> "Uri Dimant" <urid@.iscar.co.il> wrote in message news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
>> Param
>> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
>> SQL Server is trying to repair some problems but it requires database to be
>> in single user mode.
>>
>> "Param R." <pr@.nospam.com> wrote in message
>> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> Hi all!
>> I have a DB Maintanence plan configured to run once a week that is
>> supposed
>> to perform optimizations and integrity checks on all user databases. This
>> is
>> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
>> The
>> optimizations is set to run at 4 am & the integrity at 5 am. It appears
>> that
>> the integrity check job keeps failing. The log says something about
>> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
>> jobs
>> seems to complete OK
>> TIA!
>>
>>
>|||I agree I need to know what is causing the problem. But how can I find that
out? The database seems to appear functional from the application
perspective. How can I determine if it is corrupt and if so what is causing
it to be corrupt? The link below gives me some info, but not all.
thanks!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
> If my car keep breaking down, I'd like to know why that happen so I can
> avoid it keeping breaking down when I travel at high speed. I.e., if you
> get such problem, you want to do root-cause analysis why they happen.
> Often it is because hardware problems.
> In other words, the option in maint wiz is IMO not well thought through,
> and AFAIK, it will be removed in next version of SQL Server. The option,
> btw makes maint wiz execute DBCC CHECKDB using the REPAIR_FAST option.
> To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in
> single user mode, so if you have users in the database, the command and
> subsequently job will fail.
> Also, you might want to check out:
> http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Param R." <pr@.nospam.com> wrote in message
> news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
>> OK. But wouldnt I want it to fix any problems? What is the best way then?
>> thanks!
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message
>> news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
>> Param
>> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
>> SQL Server is trying to repair some problems but it requires database
>> to be
>> in single user mode.
>>
>> "Param R." <pr@.nospam.com> wrote in message
>> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> Hi all!
>> I have a DB Maintanence plan configured to run once a week that is
>> supposed
>> to perform optimizations and integrity checks on all user databases.
>> This
>> is
>> split into 2 seperate jobs when I look at the Jobs node under SQL
>> Agent.
>> The
>> optimizations is set to run at 4 am & the integrity at 5 am. It appears
>> that
>> the integrity check job keeps failing. The log says something about
>> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
>> jobs
>> seems to complete OK
>> TIA!
>>
>>
>>
>|||Maint wiz has an option to create a report file for each execution. Here you will find the error
messages.
In your situation, the problem is most likely not corruption. The problem is that maint wiz is
trying to set the database in single user mode (because of that option is checked), and you have
users connected to the database. Uncheck the option, and that problem will go away.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Param R." <pr@.nospam.com> wrote in message news:u5DxcdrEFHA.2232@.TK2MSFTNGP14.phx.gbl...
>I agree I need to know what is causing the problem. But how can I find that out? The database seems
>to appear functional from the application perspective. How can I determine if it is corrupt and if
>so what is causing it to be corrupt? The link below gives me some info, but not all.
> thanks!
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
>> If my car keep breaking down, I'd like to know why that happen so I can avoid it keeping breaking
>> down when I travel at high speed. I.e., if you get such problem, you want to do root-cause
>> analysis why they happen. Often it is because hardware problems.
>> In other words, the option in maint wiz is IMO not well thought through, and AFAIK, it will be
>> removed in next version of SQL Server. The option, btw makes maint wiz execute DBCC CHECKDB using
>> the REPAIR_FAST option.
>> To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in single user mode, so if
>> you have users in the database, the command and subsequently job will fail.
>> Also, you might want to check out: http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Param R." <pr@.nospam.com> wrote in message news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
>> OK. But wouldnt I want it to fix any problems? What is the best way then?
>> thanks!
>> "Uri Dimant" <urid@.iscar.co.il> wrote in message news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
>> Param
>> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
>> SQL Server is trying to repair some problems but it requires database to be
>> in single user mode.
>>
>> "Param R." <pr@.nospam.com> wrote in message
>> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
>> Hi all!
>> I have a DB Maintanence plan configured to run once a week that is
>> supposed
>> to perform optimizations and integrity checks on all user databases. This
>> is
>> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
>> The
>> optimizations is set to run at 4 am & the integrity at 5 am. It appears
>> that
>> the integrity check job keeps failing. The log says something about
>> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
>> jobs
>> seems to complete OK
>> TIA!
>>
>>
>>
>>
>

db maintanence plan failure

Hi all!
I have a DB Maintanence plan configured to run once a week that is supposed
to perform optimizations and integrity checks on all user databases. This is
split into 2 seperate jobs when I look at the Jobs node under SQL Agent. The
optimizations is set to run at 4 am & the integrity at 5 am. It appears that
the integrity check job keeps failing. The log says something about
'mosesdb' needs to be in single user mode. Any ideas? The optimization jobs
seems to complete OK
TIA!
Param
Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
SQL Server is trying to repair some problems but it requires database to be
in single user mode.
"Param R." <pr@.nospam.com> wrote in message
news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
> Hi all!
> I have a DB Maintanence plan configured to run once a week that is
supposed
> to perform optimizations and integrity checks on all user databases. This
is
> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
The
> optimizations is set to run at 4 am & the integrity at 5 am. It appears
that
> the integrity check job keeps failing. The log says something about
> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
jobs
> seems to complete OK
> TIA!
>
|||OK. But wouldnt I want it to fix any problems? What is the best way then?
thanks!
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
> Param
> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
> SQL Server is trying to repair some problems but it requires database to
> be
> in single user mode.
>
> "Param R." <pr@.nospam.com> wrote in message
> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
> supposed
> is
> The
> that
> jobs
>
|||If my car keep breaking down, I'd like to know why that happen so I can avoid it keeping breaking
down when I travel at high speed. I.e., if you get such problem, you want to do root-cause analysis
why they happen. Often it is because hardware problems.
In other words, the option in maint wiz is IMO not well thought through, and AFAIK, it will be
removed in next version of SQL Server. The option, btw makes maint wiz execute DBCC CHECKDB using
the REPAIR_FAST option.
To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in single user mode, so if you
have users in the database, the command and subsequently job will fail.
Also, you might want to check out: http://www.karaszi.com/SQLServer/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Param R." <pr@.nospam.com> wrote in message news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
> OK. But wouldnt I want it to fix any problems? What is the best way then?
> thanks!
> "Uri Dimant" <urid@.iscar.co.il> wrote in message news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
>
|||I agree I need to know what is causing the problem. But how can I find that
out? The database seems to appear functional from the application
perspective. How can I determine if it is corrupt and if so what is causing
it to be corrupt? The link below gives me some info, but not all.
thanks!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
> If my car keep breaking down, I'd like to know why that happen so I can
> avoid it keeping breaking down when I travel at high speed. I.e., if you
> get such problem, you want to do root-cause analysis why they happen.
> Often it is because hardware problems.
> In other words, the option in maint wiz is IMO not well thought through,
> and AFAIK, it will be removed in next version of SQL Server. The option,
> btw makes maint wiz execute DBCC CHECKDB using the REPAIR_FAST option.
> To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in
> single user mode, so if you have users in the database, the command and
> subsequently job will fail.
> Also, you might want to check out:
> http://www.karaszi.com/SQLServer/inf...suspect_db.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Param R." <pr@.nospam.com> wrote in message
> news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
>
|||Maint wiz has an option to create a report file for each execution. Here you will find the error
messages.
In your situation, the problem is most likely not corruption. The problem is that maint wiz is
trying to set the database in single user mode (because of that option is checked), and you have
users connected to the database. Uncheck the option, and that problem will go away.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Param R." <pr@.nospam.com> wrote in message news:u5DxcdrEFHA.2232@.TK2MSFTNGP14.phx.gbl...
>I agree I need to know what is causing the problem. But how can I find that out? The database seems
>to appear functional from the application perspective. How can I determine if it is corrupt and if
>so what is causing it to be corrupt? The link below gives me some info, but not all.
> thanks!
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in message
> news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
>

Sunday, February 19, 2012

db maintanence plan failure

Hi all!
I have a DB Maintanence plan configured to run once a week that is supposed
to perform optimizations and integrity checks on all user databases. This is
split into 2 seperate jobs when I look at the Jobs node under SQL Agent. The
optimizations is set to run at 4 am & the integrity at 5 am. It appears that
the integrity check job keeps failing. The log says something about
'mosesdb' needs to be in single user mode. Any ideas? The optimization jobs
seems to complete OK
TIA!Param
Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
SQL Server is trying to repair some problems but it requires database to be
in single user mode.
"Param R." <pr@.nospam.com> wrote in message
news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
> Hi all!
> I have a DB Maintanence plan configured to run once a week that is
supposed
> to perform optimizations and integrity checks on all user databases. This
is
> split into 2 seperate jobs when I look at the Jobs node under SQL Agent.
The
> optimizations is set to run at 4 am & the integrity at 5 am. It appears
that
> the integrity check job keeps failing. The log says something about
> 'mosesdb' needs to be in single user mode. Any ideas? The optimization
jobs
> seems to complete OK
> TIA!
>|||OK. But wouldnt I want it to fix any problems? What is the best way then?
thanks!
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:eSii%23klEFHA.2032@.tk2msftngp13.phx.gbl...
> Param
> Under Tab 'Integrity' uncheck 'Attempt to repair any minor problems'
> SQL Server is trying to repair some problems but it requires database to
> be
> in single user mode.
>
> "Param R." <pr@.nospam.com> wrote in message
> news:ed%23BifjEFHA.1012@.TK2MSFTNGP14.phx.gbl...
> supposed
> is
> The
> that
> jobs
>|||If my car keep breaking down, I'd like to know why that happen so I can avoi
d it keeping breaking
down when I travel at high speed. I.e., if you get such problem, you want to
do root-cause analysis
why they happen. Often it is because hardware problems.
In other words, the option in maint wiz is IMO not well thought through, and
AFAIK, it will be
removed in next version of SQL Server. The option, btw makes maint wiz execu
te DBCC CHECKDB using
the REPAIR_FAST option.
To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in sin
gle user mode, so if you
have users in the database, the command and subsequently job will fail.
Also, you might want to check out: http://www.karaszi.com/SQLServer/in...
uspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Param R." <pr@.nospam.com> wrote in message news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...[
vbcol=seagreen]
> OK. But wouldnt I want it to fix any problems? What is the best way then?
> thanks!
> "Uri Dimant" <urid@.iscar.co.il> wrote in message news:eSii%23klEFHA.2032@.t
k2msftngp13.phx.gbl...
>[/vbcol]|||I agree I need to know what is causing the problem. But how can I find that
out? The database seems to appear functional from the application
perspective. How can I determine if it is corrupt and if so what is causing
it to be corrupt? The link below gives me some info, but not all.
thanks!
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
> If my car keep breaking down, I'd like to know why that happen so I can
> avoid it keeping breaking down when I travel at high speed. I.e., if you
> get such problem, you want to do root-cause analysis why they happen.
> Often it is because hardware problems.
> In other words, the option in maint wiz is IMO not well thought through,
> and AFAIK, it will be removed in next version of SQL Server. The option,
> btw makes maint wiz execute DBCC CHECKDB using the REPAIR_FAST option.
> To be able to run DBCC CHECKDB with FAST_REPAIR, the database must be in
> single user mode, so if you have users in the database, the command and
> subsequently job will fail.
> Also, you might want to check out:
> http://www.karaszi.com/SQLServer/in..._suspect_db.asp
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Param R." <pr@.nospam.com> wrote in message
> news:%23Czx7SqEFHA.1188@.tk2msftngp13.phx.gbl...
>|||Maint wiz has an option to create a report file for each execution. Here you
will find the error
messages.
In your situation, the problem is most likely not corruption. The problem i
s that maint wiz is
trying to set the database in single user mode (because of that option is ch
ecked), and you have
users connected to the database. Uncheck the option, and that problem will g
o away.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Param R." <pr@.nospam.com> wrote in message news:u5DxcdrEFHA.2232@.TK2MSFTNGP14.phx.gbl...[vb
col=seagreen]
>I agree I need to know what is causing the problem. But how can I find that
out? The database seems
>to appear functional from the application perspective. How can I determine
if it is corrupt and if
>so what is causing it to be corrupt? The link below gives me some info, but
not all.
> thanks!
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:e20IkmqEFHA.1264@.TK2MSFTNGP12.phx.gbl...
>[/vbcol]

DB Maint. Plans on system databases

Is it recommended to run Optimization and Integrity Checks on system
databases? What's recommended?Hi,
Since the data change is very less, it is not required to perform a DBCC on
system database frequently.
May be you can execute the DBCC once in a month.
Thanks
Hari
MCDBA
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> Is it recommended to run Optimization and Integrity Checks on system
> databases? What's recommended?
>|||Thanks for the advice. Should I do this on all system databases?
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23s8Rpmm7DHA.2168@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Since the data change is very less, it is not required to perform a DBCC
on
> system database frequently.
> May be you can execute the DBCC once in a month.
>
> Thanks
> Hari
> MCDBA
>
> "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
>|||Hi,
You can do it on Master , MSDB and Model databases. Tempdb is not required,
since it is getting created on every service start.
Thanks
Hari
MCDBA
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:uoggYpm7DHA.1040@.TK2MSFTNGP10.phx.gbl...
> Thanks for the advice. Should I do this on all system databases?
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:%23s8Rpmm7DHA.2168@.TK2MSFTNGP12.phx.gbl...
> on
>|||Thanks Hari!
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:eZT3UBn7DHA.712@.tk2msftngp13.phx.gbl...
> Hi,
> You can do it on Master , MSDB and Model databases. Tempdb is not
required,
> since it is getting created on every service start.
> Thanks
> Hari
> MCDBA
>
> "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> news:uoggYpm7DHA.1040@.TK2MSFTNGP10.phx.gbl...
DBCC
>|||I agree with Hari regarding fragmentation. As for integrity checks, I'd do
it more often. Yes, I am paranoid.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> Is it recommended to run Optimization and Integrity Checks on system
> databases? What's recommended?
>

DB Maint. Plans on system databases

Is it recommended to run Optimization and Integrity Checks on system
databases? What's recommended?Hi,
Since the data change is very less, it is not required to perform a DBCC on
system database frequently.
May be you can execute the DBCC once in a month.
Thanks
Hari
MCDBA
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> Is it recommended to run Optimization and Integrity Checks on system
> databases? What's recommended?
>|||Thanks for the advice. Should I do this on all system databases?
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:%23s8Rpmm7DHA.2168@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Since the data change is very less, it is not required to perform a DBCC
on
> system database frequently.
> May be you can execute the DBCC once in a month.
>
> Thanks
> Hari
> MCDBA
>
> "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> > Is it recommended to run Optimization and Integrity Checks on system
> > databases? What's recommended?
> >
> >
>|||Hi,
You can do it on Master , MSDB and Model databases. Tempdb is not required,
since it is getting created on every service start.
Thanks
Hari
MCDBA
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:uoggYpm7DHA.1040@.TK2MSFTNGP10.phx.gbl...
> Thanks for the advice. Should I do this on all system databases?
> "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> news:%23s8Rpmm7DHA.2168@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > Since the data change is very less, it is not required to perform a DBCC
> on
> > system database frequently.
> > May be you can execute the DBCC once in a month.
> >
> >
> > Thanks
> > Hari
> > MCDBA
> >
> >
> > "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> > news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> > > Is it recommended to run Optimization and Integrity Checks on system
> > > databases? What's recommended?
> > >
> > >
> >
> >
>|||Thanks Hari!
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:eZT3UBn7DHA.712@.tk2msftngp13.phx.gbl...
> Hi,
> You can do it on Master , MSDB and Model databases. Tempdb is not
required,
> since it is getting created on every service start.
> Thanks
> Hari
> MCDBA
>
> "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> news:uoggYpm7DHA.1040@.TK2MSFTNGP10.phx.gbl...
> > Thanks for the advice. Should I do this on all system databases?
> >
> > "Hari" <hari_prasad_k@.hotmail.com> wrote in message
> > news:%23s8Rpmm7DHA.2168@.TK2MSFTNGP12.phx.gbl...
> > > Hi,
> > >
> > > Since the data change is very less, it is not required to perform a
DBCC
> > on
> > > system database frequently.
> > > May be you can execute the DBCC once in a month.
> > >
> > >
> > > Thanks
> > > Hari
> > > MCDBA
> > >
> > >
> > > "David Morrison" <davidbmorrison@.nospam.com> wrote in message
> > > news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> > > > Is it recommended to run Optimization and Integrity Checks on system
> > > > databases? What's recommended?
> > > >
> > > >
> > >
> > >
> >
> >
>|||I agree with Hari regarding fragmentation. As for integrity checks, I'd do
it more often. Yes, I am paranoid.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"David Morrison" <davidbmorrison@.nospam.com> wrote in message
news:O70Ikfm7DHA.1592@.TK2MSFTNGP10.phx.gbl...
> Is it recommended to run Optimization and Integrity Checks on system
> databases? What's recommended?
>