Forum Discussion

L_BR's avatar
L_BR
Level 5
4 years ago

Wildcards for SQL Batch Script

I was speaking to our SQL Manager this morning and he voiced a pain point he has using the SQL Scripts (I've tried to get them to switch to SQLi policies but to no avail).

His issue is having to exclude DBs from a backup. Is there a way to use a wild card for the EXCLUDE option?

 

  • If I was the SQL admin:
    I would write a script to discover the sql databases that I do not want to backup and populate (or recreate) the netbackup script with the correct lines for every database.

    This script can be run manually or with windows scheduler every day, before the backup

     

4 Replies

  • I'm not aware there is a wildcard option for exclude option. My only thinking is move these DBs in a different instance and don't backup that instance.

    • L_BR's avatar
      L_BR
      Level 5

      Thanks Nic, unfortunately access to the DBs is outside of my control, I checked the SQL admin guide but didn't find anything so thought I'd ask the community.

      • StefanosM's avatar
        StefanosM
        Level 6

        If I was the SQL admin:
        I would write a script to discover the sql databases that I do not want to backup and populate (or recreate) the netbackup script with the correct lines for every database.

        This script can be run manually or with windows scheduler every day, before the backup