Link to home
Start Free TrialLog in
Avatar of yostnet
yostnet

asked on

SQL DB Restore

I have 2 databases (SERVICES and SERVICESTEST)

I need to restore the contents of SERVICESTEST into SERVICES.

I have made a backup of SERVICESTEST.BAK and I am trying to restore it over (with Overwrite box checked) and getting an error so I figure that I am doingit wrong.  

Before the restore, I changed the SERVICESTEST.BAK to SERVICES.BAK.

System.Data.SqlClient.SqlError: The file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\SERVICESTEST.mdf' cannot be overwritten.  It is being used by database 'SERVICESTEST'. (Microsoft.SqlServer.Smo)


I am sure that there is a better way to resolve this.

This is version SQLServer 2008
ASKER CERTIFIED SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of yostnet
yostnet

ASKER

got it thx