Hi, currently I have a shared web hosting with MS SQL server 2000 database.

I have already implemented the database, with all the data inside the database, on the server.

Now I wish to copy the whole database (.mdf) down to my PC, in case I wanna change hosting or in case the server broke down, and keep it as a safe backup.

I already created a backup of it, the .bak file, but it is all stored in the web hosting database server.

How can I actually copy the whole thing down to my pc ?

I am using Microsoft SQL Server Management Studio Express.

Thanks alot..

Recommended Answers

All 5 Replies

Manually you can stop the server copy the data files and then restart the server..

Manually you can stop the server copy the data files and then restart the server..

yeah, i do this way if i want to backup my database. i think this is a simple way.:)

and don't forget to stop a server for a while when you want to backup data cause it will give you an error.

sorry but it is a shared-hosting service. I don't have the access to the server files and such.
Only able to connect to their SQL Server.

FTP accounts only able to access db and wwwroot folders.

Give this a shot from within sqlcmd or osql....

EXEC sp_addumpdevice 'DISK', 'MyBackupToFTPland', 'DirectoryYouCanFTPFrom\backup.bak'

BACKUP DATABASE yourdatabase
TO MyBackupToFTPLand

Then you should be able to FTP it...assuming of course that SQL Server has write access to someplace that you have FTP read access too.... could get complicated. Check the BOL for more options. the DISK keyword is necessary but you should be able to get away without the other wacky names i've chosen. hope that helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.