2011-06-23 08:38 AM
I'm really new to much of this being that I am a DBA but we are using SnapManager for our backups primarily and for a DR solution. As part of that when we add or remove databases we will have a NetApp backup failure due to the new / removed database not being present. I'm wondering if there is a way to automate the SnapManager Configuration Manager so that the removal / addition of a database will not cause issues or wondering if we only make the SQL job that runs the NetApp backup dynamic to only hit active databases if that will be sufficient. I'm pretty sure I tried just removing the database from the list in the SQL job in the past and still had the failure so it seems that we have to run Configuration Manager. Being that our schedule is to take snapshots every hour the window is pretty small for a database to be added / removed and for CM to be run all in that time.
Any thoughts / suggestions woudl be greatly appreciated.
2011-06-23 06:43 PM
I ran across this post a while ago:
and converted all of my SMSQL jobs to that format (C:\Program Files\NetApp\SnapManager for SQL Server\SmsqlJobLauncher.exe new-backup –svr '<servername>' -d '<servername>\<instance>', '0' ...) and everything works well. We can add/remove databases from those servers\instances without adjusting the SMSQL jobs (this assumes that the databases are added such that they follow the constraints of SMSQL requirements, in our case, separating the datafiles and TLogs on separate LUNS).
Hope this helps!
2011-06-24 04:50 AM
We also have standard-tasks to backup our servers:
new-backup –svr '<svr>\<ins>' -RetainBackupDays 7 -lb -bksif -RetainSnapofSnapInfoDays 7 -trlog –mgmt standard -ArchiveBackup -ArchivedBackupRetention Daily
But is there a way to update the automatically update the protection (dataset) information?
2011-06-24 01:45 PM
Thanks for that tip Jason. Does that preclude you from having to run Configuration Manager when the database is added or dropped? Is that what Adrian is referring to when stating "protection (dataset) information"?
Thanks again for the help and information.
2011-06-24 02:02 PM
Once we changed the SMSQL jobs to run with that set of parameters "-svr <servername> -d '<servername>\<instance>','0'" we have not had to run the configuration Manager when adding/removing databases (again, making sure that the databases we're adding conform the proper disk layout with datafiles on our datafile LUN and tlog on our transaction lun).
I'm afraid I don't quite understand what Adrian is referring to with the "protection (dataset) information". Presumably it's the "standard" in the -mgmt parameter. If that's the case, I don't have any information on that because we haven't changed any of that.
Hope this helps!
2011-06-26 11:37 PM
Adrian is referring to protection manager datasets,
The easiest way to check dataset configuration is to look in the SMSQL_SnapInfo dir and look at the xml file that contains the configuration. This will list all databases included in the dataset.
Again provided the database are in the same luns as already configured databases then they should be archived or mirrored appropriately, if they exist in new luns then you will need to rerun the configuration wizard to make sure the data gets added to the protection manager dataset.
2011-06-27 01:28 AM
Yes, I mean Protection Manager Datasets.
Is it allowed/supported to edit the xml-file manually? like a scheduled powershell script, which checks the instances for new databases and adds them to the xml?
2013-03-07 05:43 AM
In case of SnapVault:
I'm not able to provide you the scripts the are linked with monitoring / Scheduler and it's very difficult to extract the part of Database list.
To inculde new database to the backup set you can modify the file "SnapInfo__$Serveur__DataSet.xml" with 2 or 3 Scripts.
One script to list all db in your instance.
-- print "Hello"
SELECT (@@SERVERNAME), sysdb.name,
--WHEN (512) then 'Offline'
--WHEN (528) then 'Offline'
RIGHT(convert(varchar, getdate(), 112),2)+LEFT(convert(varchar, getdate(), 101),2)+LEFT(convert(varchar, getdate(), 112),4)
FROM master.dbo.sysdatabases sysdb
A Script to genrate the XML file:
$entete_file = '<?xml version="1.0"?>
Generate the file's body
#Creation footer du fichier xml
$footer =' </DataSet>