Restoring a database backup in .BAK format using SQL Server 2005 | Learnxpress

Restoring a database backup in .BAK format using SQL Server 2005

October 10th, 2009 Anand Narayanaswamy 3 Comments

In most cases, you will be able to properly restore a SQL Server backup file in .BAK format using SQL Server 2005. But sometimes you will encounter the following error

Restore failed for Server ‘YOUR_COMPUTER_NAME’.  (Microsoft.SqlServer.Smo)

System.Data.SqlClient.SqlError: Directory lookup for the file "DRIVE:\SQL 2005\MSSQL.1\MSSQL\DATA\<<YOUR_DATABASE_NAME.mdf>>" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Smo)

Follow the steps mentioned below to resolve the above mentioned error.

(1) Right click Databases tree and select Restore Database

(2) Enter a database name in "To database" field

(3) Select From Device option and click the Ellipse. Click Add button and select the database file name in .BAK format

(4) Check mark the checkbox below the Restore column

(5) Select Options section and you will find two colums titled "Original File Name" and "Restore As".

(6) The error can be fixed by changing the Restore As path for both data and log file. The correct path should be

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\<<DATABASE_NAME>>.mdf
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\<<DATABASE_NAME>>.ldf

(7) You will now be able to restore the backup without any problem.

NOTE: You need to follow the steps 5, 6 and 7 only if you encounter the above mentioned error. Otherwise, you can finish the task in Step 4 itself.

sql server, sql server 2005, database, backup, restore



 

If You Like This Post, Share it With Your Friends & Peers

Digg
stumbleupon
Delicious
facebook
twitter
reddit
rss feed bookmar
   

3 Comments to “Restoring a database backup in .BAK format using SQL Server 2005”

  1. Jinsinger S. says:

    Great information. Solved my problem immediately

  2. Much appriciate for your helpful publish. I have been looking for this for a long time in many sites. Windows 7 is a amazing software ever. I suggest Win7Zilla to tweak Windows 7 effective

  3. This article had many good points, but I’m going to retweet it to my co-worker and see what they think. I’m always getting stuff in my email from them, so I might as well share some cool things I find. Thanks,

    L. Shany
    Custom software development

Leave your comment here:

Terms

  • how to take backup from sqlserver 2005 through ajax asp net2 0
  • sample database in bak format for sql server 2005
  • database backup SQL2005 visual studio 2008 C#
  • visual studio 2008 restore database
  • how to create backup and restore the sql server 2005 using asp net 2 0 codes

  • error 3 in sql server 2005 for vista database restore
  • failed with the operating system error 3(The system cannot find the path specified ) (Microsoft SqlServer Express Smo) when restore database sql2005
  • Restore a SQL Server 2008 Database into SQL Server 2005
  • SQL Server 2005 vs 2008 backup format
  • restoring data bases using c# in vs 2008
  • sql server 2005 express error de restaurar se recomienda utilizar la base
  • backup sql server 2005 from formatting server
  • System Data SqlClient SqlError: Directory lookup for the file failed with the operating system error 3(The system cannot find the path specified ) (Microsoft SqlServer Smo)
  • System Data SqlClient SqlError: Fehler bei der Verzeichnissuche
  • directory lookup for the file failed with the operating system error 3
  • how to take sql server 2005 database backup using c# 2 0
  • Logged in site Top commentator
  • system data sqlclient sqlerror: directory look up failed with the operation system error mssql server windows 7
  • restore SQL database & visual studio 2008
  • restore failed for server microsoft sqlserver smo systeem kan het opgegeven pad niet vinden
  • seo forum