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 |
silas2
Yak Posting Veteran
65 Posts |
Posted - 2005-08-17 : 13:57:06
|
Is there a way you can find out how many conneections to a database there may be before running (for example) a restore procedure to warn that it wil fail? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-17 : 14:01:57
|
Why bother when you can easily disconnect them with this:ALTER DATABASE DBNameGoes SET READ_ONLY WITH ROLLBACK IMMEDIATEGORESTORE...GOAnd yes to see connections, you can run sp_who or sp_who2.Tara |
|
|
silas2
Yak Posting Veteran
65 Posts |
Posted - 2005-08-17 : 14:28:55
|
Just disconnect them, seems a bit harsh... |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-08-17 : 14:30:48
|
But isn't that what you intend to do when you perform a restore? Why let it fail when their is a solution?Tara |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|