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 |
manderson2228
Starting Member
3 Posts |
Posted - 2006-03-21 : 11:49:31
|
I have a database that i need to detach and move the transaction log. When i try to detach it it says the database is still in use. This is due to about 22 servers running a service that is always connected into the database. When i kill the process It automatically reconnects. Is there an easier way then logging into the 22 servers and killing the service to do this? Is there a way to lock a DB even if it's in use to not accept new connections then i can kill the processes? Anyone have a quicker way to accomplish this? |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-21 : 13:35:17
|
If it doesn't do any harm when disconnected (I mean to ur process, u may restart the SQL server or restart the machine and then try detaching |
 |
|
manderson2228
Starting Member
3 Posts |
Posted - 2006-03-21 : 14:10:36
|
They reconnect almost immediatly. |
 |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-21 : 14:48:03
|
Disconnect the network cable |
 |
|
manderson2228
Starting Member
3 Posts |
Posted - 2006-03-21 : 15:13:30
|
I am 3 states away. I am doing it remotly. ;) |
 |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-21 : 16:35:15
|
How do u restart the computer(Server) remotely |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-21 : 16:42:42
|
quote: Anyone have a quicker way to accomplish this?
Here's the best way:ALTER DATABASE DbName SET RESTRICTED_USER WITH ROLLBACK IMMEDIATEGOEXEC master.dbo.sp_detach_db...quote: How do u restart the computer(Server) remotely
Remote Desktop or Terminal Services. I haven't powered off a server in a couple of years. If my remote connectivity doesn't work, I contact a server admin.Tara Kizeraka tduggan |
 |
|
|
|
|