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)
 Database restore

Author  Topic 

vdavid70
Yak Posting Veteran

67 Posts

Posted - 2005-08-15 : 07:32:29
I am trying to restore a database using sql server 2000 on a windows 2000 server. I am trying to restrict access but each time i execute the command
ALTER DATABASE clarity_production
SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
or

ALTER DATABASE clarity_production SET SINGLE_USER WITH ROLLBACK IMMEDIATE
or
exec sp_dboption, true etc
i keep getting the error

Server: Msg 3101, Level 16, State 1, Line 3
Exclusive access could not be obtained because the database is in use.
Server: Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
Now the question obviously is how do i overcome this hurdle.

vdavid70
Yak Posting Veteran

67 Posts

Posted - 2005-08-15 : 07:43:36
On the same database when i try to do the restore from query analyzer i get the following error logical file 'Everything_Data' is not part of the database everything use restore filelistonly to list the logical file nmaes. I have executed this restore filelistonly command and i am getting exactly 'Everything_Data' as the logicall file name, what am i missing here please help.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-08-16 : 02:45:33
You got first errot because you tried that query when QA pointed to the same DB
You need to use with Move option for the second problem
See Restore Database in BOL

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vdavid70
Yak Posting Veteran

67 Posts

Posted - 2005-08-16 : 09:58:29
Thanks,
The second error
('On the same database when i try to do the restore from query analyzer i get the following error logical file 'Everything_Data' is not part of the database everything use restore filelistonly to list the logical file nmaes. I have executed this restore filelistonly command and i am getting exactly 'Everything_Data' as the logicall file name, what am i missing here please help.')
i meant to write was from Enterprise manager and not Query analyzer.
Go to Top of Page
   

- Advertisement -