Backup to desktop

  • Connecting to MSSQL2000 (on a server somewhere) from SSMS2008 client on my desktop.

    I did a right click, Tasks and Backup... on one of the database. From there, I generate a script for the backup in SQL.

    Say, the following is the script.

    BACKUP DATABASE [DEVDB] TO DISK = N'\\different_server_name\DEVDB\bkup\DEVDB_20121220_120038.bak' WITH NOFORMAT, NOINIT, NAME = N'UploadDownloadDev-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

    GO

    My question is can I change the script to backup to my local C drive:

    BACKUP DATABASE [DEVDB] TO DISK = N'C:\BACKUP\DEVDB_20121220_120038.bak' WITH NOFORMAT, NOINIT, NAME = N'DevDB-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

    GO

    Run it from SSMS2008 client on my machine. Copy the backup home, restore it and have access to the data? If so, isn't that kinda dangerous? How do I prevent that from happening?

  • The command you showed:

    BACKUP DATABASE [DEVDB] TO DISK = N'C:\BACKUP\DEVDB_20121220_120038.bak' WITH NOFORMAT, NOINIT, NAME = N'UploadDownloadDev-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10

    GO

    would put the backup on the SQL Server's 'C' drive. In order to back up to your local drive, the UNC name of the share on your local machine would have to be used, and you'd have to have rights to issue a backup command against that database, and I believe the account the SQL Server was running under would have to have access to that share.


    And then again, I might be wrong ...
    David Webb

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply