Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 restoring database on different server

Author  Topic 

Mankhan
Starting Member

2 Posts

Posted - 2012-04-04 : 17:07:41
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

5072 Posts

Posted - 2012-04-04 : 19:20:11
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)
Go to Top of Page

Mankhan
Starting Member

2 Posts

Posted - 2012-04-04 : 22:49:31
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
   

- Advertisement -