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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Inbound connections question

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
Go to Top of Page

manderson2228
Starting Member

3 Posts

Posted - 2006-03-21 : 14:10:36
They reconnect almost immediatly.
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-03-21 : 14:48:03
Disconnect the network cable
Go to Top of Page

manderson2228
Starting Member

3 Posts

Posted - 2006-03-21 : 15:13:30
I am 3 states away. I am doing it remotly. ;)
Go to Top of Page

Srinika
Master Smack Fu Yak Hacker

1378 Posts

Posted - 2006-03-21 : 16:35:15
How do u restart the computer(Server) remotely
Go to Top of Page

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 IMMEDIATE
GO
EXEC 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 Kizer
aka tduggan
Go to Top of Page
   

- Advertisement -