Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to copy SQL database?

Status
Not open for further replies.

jruiseco

Programmer
Oct 10, 2001
52
US
I need to copy a SQL database from a server and FTP to get it. Is there a way to copy the db in 1 neat file like Access?

What is the easiest way to get a SQL db copy?

Thanks...
 
jruiseco,

I don't know if this is the 'best' way, but what I've done in the past is shut down SQL Server and then zip the .mdf and .ldf. The zipping alone will probably take you an hour at least, and probably more depending upon the size of your database. When you're finished zipping up the file, don't forget to start SQL server again. Then just FTP it where ever you want.

earme
 
I see...

I'm new to SQL and thought that SQL didn't create .mdf and .ldf files like Access does. Guess I was wrong. Nice to know that.

Thanks...
 
Once you have the file do you just setup the DSN for it and go? What special things do you have to do to get it running?
 
Once you have the files on another pc you can unzip the files anywhere you like and then from Enterprise Manager right click on the Databases folder and choose 'Attach Database'. It will ask for the location of the mdf file and give you the option to attach it as a different name.
After this you should see it under the database folder and be able to look at it exactly like you did on the other pc. And you should be good to go.

earme
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top