Need command line to change OPTION setting
mdgraves
Posts: 53
I need to change the number of days of backup logs we retain, across all my instances. Can you provide the command line to change that value (I can run in batch mode) vs me logging onto my many client instances manually?
Comments
1) Create a registry (.reg) file, with the following contents (%instance_name% is the name of the instance, ??? denotes the number of hours to wait, 24 for a day, 120 for 5 days, 240 for 10 days and so on...:
[HKEY_LOCAL_MACHINE\Software\Red Gate\SQL Backup\BackupSettingsGlobal\%instance_name%]
LogDeleteHours=???
If using a 64-bit machine, this would be the following:
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Red Gate\SQL Backup\BackupSettingsGlobal\%instance_name%]
LogDeleteHours=???
Then, to update; use the following command:
regedit /s <filename>
If you have more than one instance on a machine, you will need to modify/adapt this for each instance's name, but at least that's a lot quicker than doing every step by hand.
Hope that helps,
Jason
Thanks again.