misermice
asked on
Restore DB fails
I created two named instances on my machine
SYED
DEVDB
Backed up AdventureWorks to C:Backup/bkp1
tried to restore onto DEVDB ????
It fails.. it says
TITLE: Microsoft SQL Server Management Studio-------------------- ---------- Restore failed for Server 'ZAFAR-PC\DEVDB'. (Microsoft.SqlServer.SmoEx tended)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Restore+Server&LinkId=20476------------------------------ADDITIONAL INFORMATION:System.Data.Sq lClient.Sq lError: The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'RestoreContainer::Validat eTargetFor Creation' on 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER 2\MSSQL\DA TA\Adventu reWorks.md f'. (Microsoft.SqlServer.Smo)F or help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&LinkId=20476------------------------------BUTTONS:OK------------------------------ - did not match any documents.
After several tries I tried the following
1. Disconnected the first Instance completely... NO USE
2. Restarted SSMS...................... .......... .......... ... NO USE
just now while I am typing this question in EE i tried again..
very carelessly ..so i gave DB name as 1234
...and it worked..
So When i restore DB on to another Instance do i have to change the DB name ?
My SS Config Manager Screen shot is attached
Please Help
error1.PNG
SYED
DEVDB
Backed up AdventureWorks to C:Backup/bkp1
tried to restore onto DEVDB ????
It fails.. it says
TITLE: Microsoft SQL Server Management Studio--------------------
After several tries I tried the following
1. Disconnected the first Instance completely... NO USE
2. Restarted SSMS......................
just now while I am typing this question in EE i tried again..
very carelessly ..so i gave DB name as 1234
...and it worked..
So When i restore DB on to another Instance do i have to change the DB name ?
My SS Config Manager Screen shot is attached
Please Help
error1.PNG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Awesome
That was my exact problem
That was my exact problem
Seems like you tried to restore it in the same instance where you took the backup from and hence it would have failed..
Changing DB Name is required if any database is already present with that name.