Solved

SQL SERVER BACKUPS

Posted on 2014-04-24
6
157 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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 14

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now