Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up all tables...

Status
Not open for further replies.

Rebies

Programmer
Mar 7, 2002
58
US
Just today I created a script that automatically backups all databases (including any new databases that might have recently been added.) I would be curious if anyone sees a problem with doing the following:

Step 1: Get all devices from master..sysdevices that are backup devices (Status = 16)

Step 2: Remove all of these backup devices

Step 3: Get all databases from master..sysdatabases

Step 4: Create new backup devices (so if new databases are added, they are automatically included in the backup)

Step 5: Run the backups of each database on its corresponding backup device.

As I see it, this should not create a problem, but I am fairly new to doing backups.

I can post the code if anyone wishes. It is about 2 pages long right now.

Andrew
 
Whoops, title was supposed to read

"Backing up all databases"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top