|
This is how u restore database when the database already consist a copy of another database or other tables. Now this can be used
for any error. easier metod is to rename the files. But I perfer to do the things the right way.
Sorry Guys I am just about to leave. I am just putting up the chat log.
Hi: Pls i am tri=ying to restore a database to another database
Murugan Andezuthu Dharmaratnam: ok
Murugan Andezuthu Dharmaratnam: how can i help u
Hi: I got this errorystem.Data.sqlClient.sqlError
Murugan Andezuthu Dharmaratnam: can u tell me the exact steps
Hi: I copied the backup to be restored to thwe backuop folder of my sql server
Hi: created a dummy db
Murugan Andezuthu Dharmaratnam: ok
Hi: point to the diorectory
Hi: an d click ok
Hi: I got the error The backup set holds a backup of a database
Hi: other than the existing
Murugan Andezuthu Dharmaratnam: OK
Hi: I need ur help
Murugan Andezuthu Dharmaratnam: Now this is what u need to do
Hi: ok
Murugan Andezuthu Dharmaratnam: This error occurs because
Murugan Andezuthu Dharmaratnam: in the data director of sql
Murugan Andezuthu Dharmaratnam: and MDB and LOG file exists
Murugan Andezuthu Dharmaratnam: U need to delete the database
Murugan Andezuthu Dharmaratnam: go to the directory remove the log and mdb files
Hi: ok
Murugan Andezuthu Dharmaratnam: create database again
Murugan Andezuthu Dharmaratnam: and restore and select force restore over existing database
Murugan Andezuthu Dharmaratnam: and u will be good to go
Murugan Andezuthu Dharmaratnam: do u want step by step instructions
Hi: yes. new to database
Murugan Andezuthu Dharmaratnam: Ok
Murugan Andezuthu Dharmaratnam: right click on the database
Murugan Andezuthu Dharmaratnam: What ever temporary database u had created
Hi: ok
Murugan Andezuthu Dharmaratnam: Select Task -> Restore -> Database
Murugan Andezuthu Dharmaratnam: U get the restore database window
Hi: ok
Murugan Andezuthu Dharmaratnam: now on the left side u can see
Murugan Andezuthu Dharmaratnam: general and
Murugan Andezuthu Dharmaratnam: options
Murugan Andezuthu Dharmaratnam: click on options
Hi: ok
Murugan Andezuthu Dharmaratnam: U can see a grid
Murugan Andezuthu Dharmaratnam: orginal file name, file type, restoreas
Hi: ok
Murugan Andezuthu Dharmaratnam: click on restore as
Murugan Andezuthu Dharmaratnam: copy that directory path
Murugan Andezuthu Dharmaratnam: open windowsexplorer to go to that directory
Murugan Andezuthu Dharmaratnam: In Mine its
Murugan Andezuthu Dharmaratnam: C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\
Murugan Andezuthu Dharmaratnam: Brother R U There
Hi: yes Boss
Murugan Andezuthu Dharmaratnam: Ok
Murugan Andezuthu Dharmaratnam: now u locate the two files with the youdatabasename.mdb and yourdatabasename.ldf
Murugan Andezuthu Dharmaratnam: Do Nothing
Murugan Andezuthu Dharmaratnam: Wiat
Murugan Andezuthu Dharmaratnam: Wait
Hi: ok
Murugan Andezuthu Dharmaratnam: Now go back to Microsoft SQL Server Management Studio
Murugan Andezuthu Dharmaratnam: close the restore database window
Hi: k
Murugan Andezuthu Dharmaratnam: Right Click on the database and select delete
Hi: ok
Murugan Andezuthu Dharmaratnam: Now What u need to do is
Murugan Andezuthu Dharmaratnam: go back to windows explorer
Hi: ok
Murugan Andezuthu Dharmaratnam: delete the yourdatabase.ldf and yourdatabase.mdf file
Hi: ok
Murugan Andezuthu Dharmaratnam: OK
Murugan Andezuthu Dharmaratnam: Now
Murugan Andezuthu Dharmaratnam: Right click on the root tab Databases and select New Database
Murugan Andezuthu Dharmaratnam: Wait for me
hi: ok
Murugan Andezuthu Dharmaratnam: Right Click and select Restore -> Database
Murugan Andezuthu Dharmaratnam: Task -> Restore -> Database
hi: ok
Murugan Andezuthu Dharmaratnam: Now select
Murugan Andezuthu Dharmaratnam: from device
Murugan Andezuthu Dharmaratnam: The File Browser ...
Murugan Andezuthu Dharmaratnam: Select the backup
Murugan Andezuthu Dharmaratnam: click ok
Murugan Andezuthu Dharmaratnam: Now in the grid u can see the database
Murugan Andezuthu Dharmaratnam: check it yes
Murugan Andezuthu Dharmaratnam: go to options on the left menu
hi: ok
Murugan Andezuthu Dharmaratnam: Options
Murugan Andezuthu Dharmaratnam: Retore Options
Murugan Andezuthu Dharmaratnam: Check Overwrtie existing database
Murugan Andezuthu Dharmaratnam: Click On Ok
Murugan Andezuthu Dharmaratnam: U should be good to go
|