Solved

SQL SERVER BACKUPS

Posted on 2014-04-24
6
160 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
TOOLS - convert T-SQL TO PL/SQL 3 54
SQL Server 2012 r2 - Varible Table 3 32
average of calculation (TSQL) 4 26
SQL - format decimal in a string 5 39
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 …
Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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