cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup - MSSQL to backup multiple instances .bch script?

I am trying to consolidate the amount of mssql policies and .bch scripts that i have. Out of curiosity, has anyone been able to put multiple instances into a single .bch file? I looked through the mssql guide but i cant seem to find much on editing the .bch file to include that information. Thanks!
1 Solution

Accepted Solutions
Accepted Solution!

Figured out the issue with


Figured out the issue with symantec; seems that there were "blank" lines underneath the .bch files that were on the systems. While not noticeable to us, apparently the programming language interprets these as <> and hiccuped on these commands. So when in doubt, open in notepad and try to clean out all the "additional" existing lines on the file.

Even symantec was flabbergasted for awhile till they found that.

Also, as a note, while the netbackup documentation says that the SQLHOST line is unnecessary, it should actually say "REQUIRES" removal. This was also an issue that symantec discovered with us.

View solution in original post

13 Replies

$ALL


If SQLINSTANCE $ALL is used, then it must appear in the first operation of

the batch file. Each operation in the batch file is performed for all SQL Server

instances on the client where the batch file is executed. Also, it is not necessary

to specify an SQLHOST or SQLINSTANCE on any subsequent operations.

Seem to have an issue when i


Seem to have an issue when i try to use this. They are not clustered, but all instances exist on the single system. When i do SQLINSTANCE $ALL on the first operation of the batch file, and remove any subsequent sqlhost or sqlinstance operations, I get an error code status 2 on the backup. If i manually include each sqlinstance, it works just fine. Any ideas?

hmmm

according to this old post
https://www-secure.symantec.com/connect/forums/sql-agent-backup-using-sqlinstance-all



"Symantec got back to me just over a week ago with the following.

The SQLINSTANCE $ALL will only work on a standalone machine with multiple SQL instances and is not designed to work on either a MSCS or Veritas cluster.  The function makes a call to the physical "host" name and enumerates all SQL instances attached to that name - it does not enumerate SQL instances attached to a cluster group name."
 

If 'SQLINSTANCE $ALL' is used

If 'SQLINSTANCE $ALL' is used to backup all instances in a clustered MS SQL Server,
the backup will fail with status 2.

http://seer.entsupport.symantec.com/docs/351499.htm

R u using the wizard?


Are U using the wizard?

there is an option ALL BUT SELECTED that create that template.


Like i said, i am NOT using a


Like i said, i am NOT using a cluster. This is one physical host with all instances. Any ideas?

Yes, but it will only

Yes, but it will only generate it for that individual instance on which im focused on. Thats part of the problem.

Can U create 2 templates


Can U create 2 templates e call both from the policy.



Have U try it ?

Of course i can create 2


Of course i can create 2 templates, but then I have to create multiple policies that would have additional templates in each policy. This is not the design of netbackup, so i shouldn't have to do it this way.

Also, if i insert the sql instances manually, i have discovered that it only backs up the very last one listed.

OPERATION BACKUP
DATABASE $ALL
SQLHOST "clientserverhere"
SQLINSTANCE "default"
SQLINSTANCE "DEV01"
SQLINSTANCE "DEV02"
NBSERVER "masterserverhere"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
ENDOPER TRUE


To get back to Bill's post

To get back to Bill's post -
http://seer.entsupport.symantec.com/docs/351499.htm

I do understand that you don't have a cluster, but have you checked to see what error is logged in your dbclient log file?

Please also share O/S, NBU and SQL versions.

did you try

SQLINSTANCE $ALL at the top of the list per earlier post (and Sample 12 in the SQL Admin Guide)


SQLINSTANCE $ALL

OPERATION BACKUP

DATABASE $ALL

NBSERVER "BEARING"

MAXTRANSFERSIZE 6

BLOCKSIZE 7

NUMBUFS 2

ENDOPER TRUE

Accepted Solution!

Figured out the issue with


Figured out the issue with symantec; seems that there were "blank" lines underneath the .bch files that were on the systems. While not noticeable to us, apparently the programming language interprets these as <> and hiccuped on these commands. So when in doubt, open in notepad and try to clean out all the "additional" existing lines on the file.

Even symantec was flabbergasted for awhile till they found that.

Also, as a note, while the netbackup documentation says that the SQLHOST line is unnecessary, it should actually say "REQUIRES" removal. This was also an issue that symantec discovered with us.

View solution in original post

well ain't that a .bch

well ain't that a .bch surprise