Tuesday, March 15, 2005

Backup all database on SQLserver

I found the sp below is useful. Originated from here.

USE master
GO

CREATE PROCEDURE sp_QuickBackup
AS
EXEC sp_MSForEachDB 'IF ''?'' <> ''tempdb'' BACKUP DATABASE [?] TO
DISK = ''c:\SQL Backups\?.bak'''
GO

0 Comments:

Post a Comment

<< Home