Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Backup all DBs of a SQL-Server Instance

By hangg,

The script allows to backup all databases if a SQL-Server Instance. It determine the backup-path by the environment variable DBBackupPath of the operating system. It also determines the SQL-Server instance on which it runs and uses the corresponding path.

1.) Create a Backup-Folder on the Server. The last part of the path must be "Backup"

(e.g. f:\MSSQL2005\Backup)

1a.) If there is a SQL-Server instance installed on the server the instancename must be previous before "Backup" (e.g. f:\MSSQL2005\Instance_Name\Backup

2.) Set the environment variable "DBBackupPath" to this folder

3.) Run the script by scheduler (ISQL/OSQL) or SQL-Query

Total article views: 2236 | Views in the last 30 days: 6
 
Related Articles
FORUM

Backup and Restore of Entire SQL Server 2005 Instance

How to backup and restore an entire SQL Server 2005 instance, not just the individual databases.

FORUM

Restore SQL backup (Data.DAT) into SQL Named Instance

Restore Backup into Named Instance

FORUM

Server to server backup

Server to server backup

FORUM

Named SQL Server Instance

Named SQL Server Instance

 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones