Comments
1 comment
-
All of SQL Backup's server settings are kept in the registry, so you could use xp_regread. (Note that it may not work on 32-bit sql servers on a 64-bit system, because to work around a bug in MS clustering, SQL Backup keeps all settings in the 64-bit hive regardless).
DECLARE @instanceName NVARCHAR(255) SELECT @instanceName= CASE WHEN @@SERVICENAME='MSSQLSERVER' THEN '(local)' WHEN @@SERVICENAME!='MSSQLSERVER' THEN @@SERVICENAME END DECLARE @SqlString NVARCHAR(500) SET @SqlString='EXEC xp_regread ''HKEY_LOCAL_MACHINE'',''SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal\'+@instanceName+''',''DataPath''' EXECUTE(@SqlString)
For the other settings, substitute one of these in the above code where you see DataPath:- MSDBDelete
- BackupFileName
- BackupFolder
- LogFolder
- LogDelete
- LogDeleteOptions
Add comment
Please sign in to leave a comment.
I want to know how can I get these information from TSQL? Can I change them from TSQL?
Thanks[/img]