| Author |
Topic |
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-04 : 20:28:07
|
| im thinking of setting up this function to run weekly on our databases.i wouldve liked to use DBCC CHECKDB with REPAIR_FAST however db needs to be in single urser mode which to me is inconvenient to send db offline then online in single user mode then ofline and online into normal mode...also is it possible to store results of DBCC CHECKDB, i know their stored somewhere in tempdb, how could i access them, as this procedure runs automatically i am going to set up an email with results of DBCC CHECKDB to be sent to dbas. |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-04 : 20:33:18
|
| okay TABLERESULTS helped solve one issue now the single user mode issue? |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-04 : 21:32:06
|
| although theres no replies yet, thought id keep posting my updates incase anyone sees this and needs the help...ive figured i can use sp_dboption dbname, single, trueto change to single usermode, however now its saying that other users are logged into db, no one is using it, im trying to find how to force this option or booth others on |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-02-05 : 02:41:07
|
| "DBCC CHECKDB with REPAIR_FAST"You want to run this, with automatic repair, whilst people are using the database?You don't care if the database is corrupted and what data the Repair will remove?Bad idea IMHOKristen |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-05 : 19:23:19
|
| REPAIR_FAST doesnt remove any data from my understanding...why would you assume im not interested if database is corrupted? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-05 : 19:29:09
|
| You should not automate this. Only automate running DBCC CHECKDB. On failure of the job, have it page someone, preferably a mailing list of DBAs. And you should be using ALTER DATABASE instead of sp_dboption.Tara Kizer |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-05 : 19:36:15
|
| yep im writting it up now, the thing that confuses me is , i get these error numbers when i run it but then it says it found 0 errors and 0 inconsistancies..? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-02-06 : 11:12:16
|
| Post your DBCC output in the Data Corruption forum so that a Microsoft engineer can review it.Tara Kizer |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-02-06 : 11:25:17
|
| "i get these error numbers"Is that just the progress stuff?If you put "WITH NO_INFOMSGS" on the end of the DBCC command do they go away?Kristen |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-06 : 18:33:43
|
| yep putting that takes them away, but will that mean it also takes away any inconsistancy errors? |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-02-07 : 02:31:03
|
| I suggest you read the documentation so you understand what the various options you are using do!Kristen |
 |
|
|
rnbguy
Constraint Violating Yak Guru
293 Posts |
Posted - 2007-02-07 : 17:18:42
|
| its okay its working perfect now.. thanx |
 |
|
|
|