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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-24 : 06:54:32
|
| Tammi writes "There is a stored procedure to run a backup on one database that is running on SQL 2000.I tried restoring the DB and got the message that said the DB was in use.So I tried to run ALTER DATABASE SET SINGLE_USER and it didn't do anything because (I'm guessing here) the only user logged on had a process that was "sleeping" and I'm guessing the SINGLE_USER command didn't end the process because sleeping doesn't end until another command is received.Am I on the right train of thought here?The user that is logged on to the system has the role db_owner.Shouldn't I be able to run the RESTORE as that user in the db_owner role?Am I going about this the wrong way? How do companies that have live databases running do a restore to the same database?I have read the online book several days and still I'm not sure what I'm doing wrong.Thanks for your assistance.Tammi" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-24 : 06:57:42
|
| You can back up a database while it is still online and actively used. But a database cannot have any active sessions in it when it is restored, not even a single user, not even if they're dbo. You would only restore a database if you are doing a planned move or emergency maintenance, either way there will be downtime during the restoration process. |
 |
|
|
|
|
|