Hi,I was trying a database restore and it threw out Page errors.I had to restart the restore. But the database was in “Restoring..” state. I right clicked and deleted it on Mgmt Studio and it was gone.It doesn’t show in the SQL management studio.I thought it was ok and I tried the restorerestore database DBNAME from disk='\\landbbackup1\e$\MonthEndBackups\DBNAME_20120810.BAK' with replace, recovery, stats=5, maxtransfersize=1048576
I received this:Msg 3101, Level 16, State 1, Line 1Exclusive access could not be obtained because the database is in use.Msg 3013, Level 16, State 1, Line 1RESTORE DATABASE is terminating abnormally.
Then try dropping using the command line.drop database DBNAME
Got this:Msg 3702, Level 16, State 4, Line 1Cannot drop database "DBNAME" because it is currently in use.
When I try to list all the databases in the insance, it doesn’t show this database at allSELECT NAME FROM sys.sysdatabaseswhere name not in ('master', 'tempdb', 'model','msdb')
So, I tried to take it offline:USE masterALTER DATABASE [DBNAME] SET OFFLINE WITH ROLLBACK IMMEDIATE
No avail.Msg 5011, Level 14, State 6, Line 2User does not have permission to alter database 'DBNAME', the database does not exist, or the database is not in a state that allows access checks.Msg 5069, Level 16, State 1, Line 2ALTER DATABASE statement failed.
How do I carry on the restore?Thanks a lot for your time..