Solved

SQL SERVER BACKUPS

Posted on 2014-04-24
6
159 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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