Showing posts with label presently. Show all posts
Showing posts with label presently. Show all posts

Thursday, March 29, 2012

Backing up SQL Server 2005 Express

How can I back up existing SQL Server 2005 Express tables? I'm presently developing on a 4 year old laptop which is toooo sloooow and need to transfer the tables and data to a desktop system.

Copy the MyDatabase.mdf and MyDatabase.ldf files to the new system.

In the new system, use Attach... from SQL studio, to connect to the copied database.

Monday, March 19, 2012

back up from .bak file

I got a .bak file from my friend
I want to restore the data base (presently I don’t have any database in my system).

But while I try to restore it
I am getting an error


System.Data.SqlClient.SqlError: Directory lookup for the file "D:\Microsoft SQL Server 2005\mydatabase.mdf" failed with the operating system error 2(The system cannot find the file specified.). (Microsoft.SqlServer.Smo)

I have installed Microsoft sql server in a different directory
Not where he is installed

I can successfully restore the back up files of data base on my own system
But not the backup files created from others systemsWhen you restore the backup, there is a place on the dialog that will list all of the assoicated files for the backup and where they should be placed (.mdf, .ldf, etc.) The paths will default to the location that they were backed up from. You need to change these paths to where you want the files placed.