cancel
Showing results for 
Search instead for 
Did you mean: 
Karthikeyan_Sun
Level 6

Script to Count the SQL DB's backed up in Daily manner

Guidelines:

1. Create a file D:\Servers.txt with List of Clients

2. Open the script file and change the line below as per your installed path.

Set objExec = objShell.Exec("SETX HOMEPATH D:\Program Files\Veritas\NetBackup\bin")

3.Save this file and execute it.

4.Output will be saved in Excel under D:\Details.xls

Find the attaced file for sample output.

Let me know if you face any issues.

Comments
peterdcross
Level 4
The script addresses a problem in backups which is knowing how many data bases are backed up in each instance of SQL configured. The problem as I have found out, is knowing how many should be backed up and then comparing that to the actual backup count. I have had an occurrence where an SQL instance with Backup All in the script was hanging on a database file and the remaining databases were not backed up, something like 13 of 19 databases in one SQL instance, which was one of several in a 4 server active-active setup. The database admins were moving the databases across the servers on a regular basis to complicate the issue. What is needed is a count of the databases installed as well as this backup count, then a simple list of any unsuccessful backups. I hope this comment provides food for thought for you.
Sathish_Kumar_R
Level 3
Certified

Hi Karthikeyan,

As per your advice , i have placed the "Servers" file in D drive with some server names. Also my master server has been installed in D drive only.I am executing this script , but it fails with error. Please find the attachment.

 

 

Karthikeyan_Sun
Level 6

Hello,

Sorry i have missed comments. Check out this 2 lines. It uses a temp staging test file. which will be created under this folder Test. You can create a folder called Test else remove the Test from that script line.

 

File_Name="D:\Test\" & strcomputer & ".txt"
 
Set myFile1 = myobj.CreateTextFile(File_Name, 2)

 

Version history
Last update:
‎03-18-2009 01:32 AM
Updated by: