Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
HollyMax
Starting Member
7 Posts |
Posted - 2007-02-07 : 04:37:31
|
can anyone tell me how to run the sp_resetstatus command. It's mentioned everywhere, but I haven't seen anywhere where the starting point is. I'm fairly desperate at this stage to get a problem fixed in a medical database.HollyMax |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2007-02-07 : 04:44:20
|
Here is what our good old friend BOL says: quote: Microsoft® SQL Server™ 2000 returns error 1105 and sets the status column of sysdatabases to suspect if SQL Server is unable to complete recovery on a database because the disk drive no longer has any free space. Follow these steps to resolve the problem: Execute sp_resetstatus. Use ALTER DATABASE to add a data file or log file to the database.Stop and restart SQL Server. With the extra space provided by the new data file or log file, SQL Server should be able to complete recovery of the database.Free disk space and rerun recovery. sp_resetstatus turns off the suspect flag on a database, but leaves all other database options intact.Caution Use sp_resetstatus only when directed by your primary support provider or as recommended in Troubleshooting. Otherwise, you might damage your database.Because this procedure modifies the system tables, the system administrator must enable updates to the system tables before creating this procedure. To enable updates, use this procedure:USE masterGOsp_configure 'allow updates', 1GORECONFIGURE WITH OVERRIDEGOAfter the procedure is created, immediately disable updates to the system tables:sp_configure 'allow updates', 0GORECONFIGURE WITH OVERRIDEGOsp_resetstatus can be executed only by the system administrator. Always shut down SQL Server immediately after executing this procedure.The syntax is:sp_resetstatus database_nameThis example turns off the suspect flag on the PRODUCTION database.sp_resetstatus PRODUCTIONHere is the result set:Database 'PRODUCTION' status reset!WARNING: You must reboot SQL Server prior to accessing this database!
Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-02-07 : 05:20:39
|
Hi HollyMax, welcome to SQL Team!You've posted in a "legacy database" forum for SQL 6.5 / 7.0In case it makes a difference to advise folk give: What version are you using?Kristen |
|
|
HollyMax
Starting Member
7 Posts |
Posted - 2007-02-07 : 05:24:20
|
Hello Kirsten it's sql 2000 enterprise that comes with windows 2003 sbs premium.HollyMax |
|
|
HollyMax
Starting Member
7 Posts |
Posted - 2007-02-07 : 05:27:51
|
thanks harsh_athalye. seen plenty of these articles. Where exactly do you run this sp_resetstaus command from. I don't do SQL, it's a medical database that their software support apparently don't know how to fix.If I can't reset the status I will have to restore from a backup and loose any data in between. |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-02-07 : 05:54:46
|
Continued over at http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=78726 |
|
|
|
|
|
|
|