0

i have a database named SAHS in my desktop having sqlserver 2000 installed i want to copy it in my laptop(64bit) having sql server 2008 .. i tried removing a backup of it..

like this ;

BACKUP DATABASE SAHS
TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\BACKUP\SAHSFullRM.bak' 
WITH FORMAT;
GO

can i copy the backup file in my laptop and use the restore statement?.. if yes please show the restore statement im getting error in this :

restore database SAHS 
from disk = 'C:...' 

saying operating system error. is there any other simpler way to do so..pls help

4
  • 1
    Did you create a blank database on your laptop first? You might also need the WITH MOVE option of the RESTORE command if your directories are different on your laptop. Commented Mar 9, 2012 at 12:57
  • i tried this too , it showed me operating system error and restoring cancelled abnormally.i tried restoring with with move too Commented Mar 9, 2012 at 13:04
  • ok sir .. actually im a newbie so quite unaware .. but thnq for making me understand the reputation rate concept .. :) Commented Mar 9, 2012 at 13:26
  • Have you tried using the restore methods in the SSMS UI? It would be easier if we had more information regarding the error message (if there is a number, etc). But as John Dewey pointed out the most common error associated with a restore is that of permissions on the folder where the backup file is being stored. IF your full error says: System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied)' then John is correct. Commented Mar 9, 2012 at 13:31

2 Answers 2

2

Make sure the target server has access to the folder containing the bak file. And on the target server you can try running the Restore Database wizard from SSMS.

Sign up to request clarification or add additional context in comments.

Comments

0

i did it myself .Open sqlserver management studio ,from the object explorer expand database column, right click any databse , select task --> restore --> database or Files or Filegroups , restore dialog box opes , write the new name of yor database in To Database , select location and type it in From Device option , select the checkbox , and click on OK .. ITS DONE .. this is a new feature in sqlserver 2008 ..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.