Forum Discussion

alazanowski's avatar
14 years ago

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!

  • 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.

13 Replies

  • 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."
     


  • 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?

  • 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.