Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Being new to SMSQL, I'm trying to identify the best procedure to update the Backup script when we add another DB to our SQL Cluster. From what I can gather I have a couple of options:
- Go into the SQL job within SSMS and add the name of the DB in the script
- Recreate the job in SMSQL and recreate the schedule in SSMS?
I'm to use to SSMS that will automatically add any new DB into the Maintenance plan
Is there a better way?
thanks in advance.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In SSMS, if you look at the job that was created by SMSQL, you'll see that it just has a single step that runs "SmsqlJobLauncher.exe" followed by the "new-backup" command, which itself is followed by a number of parameters. To include or exclude databases from the backup job, look for the "-d" parameter (which is short for "-Database"), it's followed by at least 3 values: <<SQL server instance>, <Number of databases>, <db1>,<db2>,<db3>..>.
Say, for example, the job is backing up 3 databases named db1, db2, and db3, the command in the job step would include:
-d 'server\instance', '3', 'db1', 'db2', 'db3'
If you wanted to add a fourth database named db4 to the backup job, you would change that part of the command to:
-d 'server\instance', '4', 'db1', 'db2', 'db3', 'db4'
You can check out more details about all of the parameters that "new-backup" takes at this page:
https://now.netapp.com/NOW/knowledge/docs/SnapManager/relsmsql51/html/software/install/cli3.htm
You might also want to check out a script that someone else in this forum made, it creates a job that dynamically builds the "new-backup" command to include all user databases in the instance and then runs the command. You may have to tweak parts of it to make sure that all the other command parameters are suited to your environment, but it's a good starting point:
