简体   繁体   中英

TSQL attach db that is currently in use

I have a shaprepoint system and I cannot attach the sharedservices_db

It is in use when I attempt to attach it.

I have stopped that web server associated with sharepoint data but no change in db is in use.

Any ideas?

Do a select against sys.master_files for the file name that it's giving you grief about. From there, you can see what database is using that file.

But of greater concern is that you're not trying to attach a database that has been attached. You're trying to attach one that's still active. Take five minutes and re-evaluate what you're doing before you have an accident.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM