SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backup to desktop


Backup to desktop

Author
Message
MSSQL_NOOB
MSSQL_NOOB
SSC Veteran
SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)

Group: General Forum Members
Points: 267 Visits: 173
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?
David Webb-CDS
David Webb-CDS
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4082 Visits: 8586
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search