SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 restoring database on different server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mankhan
Starting Member

Canada
2 Posts

Posted - 04/04/2012 :  17:07:41  Show Profile  Reply with Quote
Hi there.... I am using sql server 2005 management studio express...

I am trying to restore my database from different machine to another but i am getting this error ... please can anyone help me out... and the my backup is in .bak file .... i followed the standard procedure for restoring but couldnt fix the problem.... Urgently needed help ...
Below is the error::

System.Data.SqlClient.SqlError: Directory lookup for the file "c:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\OnlineBanking.mdf" failed with the operating system error 3(The system cannot find the path specified.). (Microsoft.SqlServer.Express.Smo



Thanks and Regards..
Mankhan

russell
Pyro-ma-ni-yak

USA
4964 Posts

Posted - 04/04/2012 :  19:20:11  Show Profile  Visit russell's Homepage  Reply with Quote
Seems either you're specifying an invalid path, or the SQL Service Account doesn't have permissions to access the directory it's in.

Try using a T-SQL Restore Database command instead of the GUI.

RESTORE DATABASE myDatabase
FROM DISK = 'F:\myDatabase.bak'
WITH
	MOVE '' to '',
	MOVE '' to '',
	STATS = 10;
GO
filling in the appropriate values in the MOVE clauses

and make sure that SQL Service account has permissions to access the file(s)

Edited by - russell on 04/04/2012 19:20:48
Go to Top of Page

Mankhan
Starting Member

Canada
2 Posts

Posted - 04/04/2012 :  22:49:31  Show Profile  Reply with Quote
Thanks for your help .... Cheers to you... It got resolved... The auto path being taken for data and log files were wrongly specified.

Atlas...! Resolved...



Thanks :)
Mankhan
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000