February 18, 2010 at 1:34 pm
I am trying to do a filegroup restore and getting following error.
Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
I believe filegroup restore is a on line process then why I am getting above error.
February 18, 2010 at 2:02 pm
Issue the command to determine who is connected to the database.
Then you will need to Kill the connections to the Database.
Make sure that you are not connected to the Database...
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 18, 2010 at 11:40 pm
r u restoring primary file group??
Regards,
[font="Verdana"]Sqlfrenzy[/font]
February 19, 2010 at 8:28 am
Nope, I am not restoring primary file group. I am taking copy only backup. When I created new test database and took the backup and then restore file group it did work but when I restore the old backup it does not work. I am using following script to restore database.
use master
go
RESTORE DATABASE IDX FILEGROUP = 'FILEGROUP_TRNA1'
FROM DISK = '\\scdc332db\p$\backup\HB_IDX.BAK'
WITH REPLACE
February 19, 2010 at 9:44 am
The Database is in use.
Did you ever do the following?
Issue the command to determine who is connected to the database.
Then you will need to Kill the connections to the Database.
Make sure that you are not connected to the Database...
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 19, 2010 at 10:43 am
Acutally, Filegroup restore does not need to kill the user connection. Database can be online while doing file group restore.
When I was doing restore there was no user connected to the database.
February 19, 2010 at 12:24 pm
That is really wierd. The database is in use and it would appear that the operation that your are attempting to perform requires Exclusive Access.
Exclusive access could not be obtained because the database is in use.
Must be an erroneous message.
Regards...
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply