Wednesday, March 21, 2012

How to change default backup destination to the other folders ?

By default,when I would like to back up any database by SSMS.

default destination on disk will be C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\ every time

Although I everytime change it to my backup folder.

Please let me know how to change it.

I believe you can either write a query or create a procedure:

e.g.

CREATE PROCEDURE mybackup
AS BACKUP DATABASE [databasename]TO DISK = N'c:\SQL\Backup\databasename.bak'WITH RETAINDAYS = 1, NOFORMAT, NOINIT,NAME = N'databasename-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10GO

No comments:

Post a Comment