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
 General SQL Server Forums
 New to SQL Server Programming
 getting error while restoring databse

Author  Topic 

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-06-29 : 11:35:50
Hi all,

I am gettig error while restoring databse with sql server authrntication and using my username and password. I dont get this error when i use windows auhentication.

TITLE: Microsoft SQL Server Management Studio Express
------------------------------

Restore failed for Server 'CHRISU\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

System.Data.SqlClient.SqlError: RESTORE cannot process database 'IBAP' because it is in use by this session. It is recommended that the master database be used when performing this operation. (Microsoft.SqlServer.Express.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------

what can be reason. please help me.

Regards,
Asif Hameed

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2009-06-29 : 12:09:51
You're connected to the database you're trying to restore. There have to be no connections to the DB before you can restore it. That includes from object explorer.

Probably your SQL login has this DB as a default db, while the windows login has master.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

sparrow37
Posting Yak Master

148 Posts

Posted - 2009-06-29 : 13:10:31
thanks for help. I changed default db and it worked.
Go to Top of Page
   

- Advertisement -