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 |
albertkohl
Aged Yak Warrior
740 Posts |
Posted - 2008-09-18 : 12:38:05
|
Hey guys, just wanted to see if anyone had insight on this, i'm probably just over looking something dumb.my server lost power during a fairly long query, and in doing so, caused the server to want to roll back the transaction logs.all i'd like to do, is login so i can select * into another db off a few other tables that were not involved, and then drop the database an move on with life, however every time i try:alter database mydb set emergency, i get:Msg 5011, Level 14, State 7, Line 1User does not have permission to alter database 'mydb' or the database does not exist.Msg 5069, Level 16, State 1, Line 1ALTER DATABASE statement failed.any ideas? i have tried my account, and sa login, both a part of sysadmin. |
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2008-09-18 : 16:24:32
|
Why do you need to set it to emergency mode? That's a last resort for fixing corruption.The server should come back up, SQL should be able to recover the DB in question (provided the log wasn't deleted/damaged) and then the DB should come online.If you run the following, what do you see for the DB in question?SELECT name, state_desc, is_cleanly_shutdown, user_access_desc from sys.databases--Gail ShawSQL Server MVP |
|
|
albertkohl
Aged Yak Warrior
740 Posts |
Posted - 2008-09-18 : 16:57:39
|
quote: Why do you need to set it to emergency mode? That's a last resort for fixing corruption.
as i mentioned, i have a few OLAP tables i need to get off the server that are read only, havnt had anything done to them in weeks, but if i have to restore from backup, it'll be like pulling teeth. i'm not concerned with the table that was being accessed at the time, i can toast that one.quote: The server should come back up, SQL should be able to recover the DB in question
i let the server try to recover for over 4days before i axed it, i dont think it's going to recover :( maybe i axed it prematurely, but i cant just keep sitting around and waiting, also, whenever sql enters the recover process, it tacks the CPU out to 100% and the machine is inaccessable, and useless...quote: If you run the following, what do you see for the DB in question?
RECOVER | 0 | MULTI_USER |
|
|
|
|
|
|
|