Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Backup to desktop Expand / Collapse
Author
Message
Posted Thursday, December 20, 2012 12:47 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 2:22 PM
Points: 55, Visits: 165
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?
Post #1399089
Posted Thursday, December 20, 2012 12:59 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:43 PM
Points: 897, Visits: 7,109
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
Post #1399091
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse