Showing posts with label 1and1. Show all posts
Showing posts with label 1and1. Show all posts

Wednesday, March 21, 2012

Dumping SQL database

My site is hosted with 1and1. They tell me I need to dump my SQL database before uploading it to their site. I have never done this before. I have looked in the online help and have asked them for help, but nothing seems to work. I've tried queries like the following:

DUMP DATABASE dbname TO DISK = 'C:\folder\filename'

It tells me it doesn't recognize "dbname", which is the name of the MDF file (without the ".mdf" extension). So I'm not sure what I should be using for database name.

I'm using Visual Studio 2005 Professional. Can someone help me with dumping my database? Thanks!

you can either Detach a database in which case you should beable to copy the mdf to a new location then reattach.

or you can backup a database to a file and then you copy the .bak file to the new location and restore the database.

this link would indicate that 1and1 want you to backup your database http://msdn2.microsoft.com/en-us/library/ms187315.aspx

its pretty easy to backup a database through the SQL Server IDE... and this link gives a detailed script that will backup all your databases...

http://www.sqlmag.com/Articles/ArticleID/46560/46560.html?Ad=1