Compresses, encrypts, secures and monitors SQL Server backups.
Moderators: JonathanWatts, Chris Auckland, eddie davis, Colin Millerchip, Brian Harris, james.billings, RBA, petey
I want to know how can I get these information from TSQL? Can I change them from TSQL?
- Posts: 29
- Joined: Mon Apr 12, 2010 8:21 pm
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).
- Code: Select all
DECLARE @instanceName NVARCHAR(255)
WHEN @@SERVICENAME='MSSQLSERVER' THEN '(local)'
WHEN @@SERVICENAME!='MSSQLSERVER' THEN @@SERVICENAME
DECLARE @SqlString NVARCHAR(500)
SET @SqlString='EXEC xp_regread ''HKEY_LOCAL_MACHINE'',''SOFTWARE\\Red Gate\\SQL Backup\\BackupSettingsGlobal\\'+@instanceName+''',''DataPath'''
For the other settings, substitute one of these in the above code where you see DataPath:
- Posts: 6670
- Joined: Mon Aug 23, 2004 10:48 am
Return to SQL Backup 7
Who is online
Users browsing this forum: No registered users and 0 guests