Solved

SQL SERVER BACKUPS

Posted on 2014-04-24
6
161 Views
Last Modified: 2014-05-08
Hi

I use SQL SERVER 2008R2 and I Wonder if there is a way to perform backups of my databases on a map drive or a foreign server.

For now I'm able to perform backups only on local drives.

Thank you
0
Comment
Question by:jpmoreau
  • 3
  • 2
6 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40021296
EXEC XP_cmdshell<Your mapped drive letter here><UNC Path to shared drive>

that should let you back up to a shared drive :)
0
 

Author Comment

by:jpmoreau
ID: 40021336
ok

Is it permanent?
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40021380
it should be
I cannot say with absolute 100% confidence

you would wnat to do that for each lettered drive you have

to ensure it being permentant you can alway make that a stored procedure and set it to run at startup or as a job to run at 12:01am every day :)
0
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 

Author Comment

by:jpmoreau
ID: 40021396
Last question

Do I run this in SQLTRANSAT?
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40021576
No just in a query window or make a stored procedure
0
 
LVL 15

Accepted Solution

by:
Vikas Garg earned 500 total points
ID: 40029391
HI,

This can be achieved through the Following T-SQL

BACKUP DATABASE [dbname]
TO DISK = '\\RemoteSystem\Shared\dbname.Bak';
GO

However to perform it successfully few points need to be taken care.
The RemoteSystem and drive where you want the back up to be stored must be accessible by the Service account on which the SQL Service is running.


Thanks,
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question