Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Define variables for the computers that host the SQL Compliance Manager Agent and the new Collection Server. For example, if you plan to run a Visual Basic script locally on the computer that hosts the SQL Server, your script may include the following code: 
    ' Define the SQL Compliance Manager Agent server
    strComputer = "SQLServer01"
    strNewCollectionServer = "CollectionServer02"
     
  2. Declare the SQL Compliance Manager Agent and registry objects. For example, if you plan to run a Visual Basic script locally on the computer that hosts the SQL Server, your script may include the following code:
    ' Get the SQLcompliance Agent and registry objects
    Set objComplianceAgent = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2:Win32_Service='SQLcomplianceAgent'")
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\default:StdRegProv")

  3. Stop the SQL Compliance Manager Agent Service. For example, if you plan to run a Visual Basic script locally on the computer that hosts the SQL Server, your script may include the following code:
    ' Stop the SQLcompliance Agent Set flgStopStatus = objComplianceAgent.ExecMethod_("StopService")

  4. Change the registry key. For example, if you plan to run a Visual Basic script locally on the computer that hosts the SQL Server, your script may include the following code:
    ' Change the location of the Collection Server in the registry
    const HKEY_LOCAL_MACHINE = &H80000002
    strRegAgentPath = "SOFTWARE\Idera\SQLcompliance\SQLcomplianceAgent"
    strServerValName = "Server"
    objReg.GetStringValue HKEY_LOCAL_MACHINE, strRegAgentPath, strServerValName, strOldServer
    objReg.SetStringValue HKEY_LOCAL_MACHINE, strRegAgentPath,strServerValName, strNewCollectionServer
    WScript.Echo "Changed collection server from " & strOldServer & " to " & strNewCollectionServer
     
  5. Start the SQL Compliance Manager Agent Service. For example, if you plan to run a Visual Basic script locally on the computer that hosts the SQL Server, your script may include the following code:
    ' Restart the SQLcompliance Agent Set flgStartStatus = objComplianceAgent.ExecMethod_("StartService")

  6. Using an administrator account, run your script to update each SQL Compliance Manager Agent deployed to your registered SQL Servers.



Scroll pdf ignore
SQL Compliance Manager monitor, audit and alert on SQL user activity and data changes.
Newtabfooter
aliasIDERA
urlhttp://www.idera.com
 | 
Newtabfooter
aliasProducts
urlhttps://www.idera.com/productssolutions/sqlserver
 
Newtabfooter
aliasPurchase
urlhttps://www.idera.com/buynow/onlinestore
 | 
Newtabfooter
aliasSupport
urlhttps://idera.secure.force.com/
 | 
Newtabfooter
aliasCommunity
urlhttp://community.idera.com
 
|
 
Newtabfooter
aliasResources
urlhttp://www.idera.com/resourcecentral
 | 
Newtabfooter
aliasAbout Us
urlhttp://www.idera.com/about/aboutus
 
Newtabfooter
aliasLegal
urlhttps://www.idera.com/legal/termsofuse

...