Logo

20/05/2012

Supporto OnLine

Supporto Tecnico OnLine

Prima di accedere contattare i nostri tecnici per attivare la sessione

Remove APEX Sql Monitor PDF Stampa E-mail

Dopo aver disinstallato APEX Sql Log Monitor il componente server (se non disabilitato prima della disinstallazione) potrebbe restare attivo con la conseguenza di vedere il database msdb (msdb.mdf) estendersi a dimensioni spropositate.

 

Per eliminare il log di Sql Monitor usare la procedura sotto indicata ed eliminare da msdb la tabella APEXSQL_LOG_Login

 

From:http://www.apexsql.com/training/2007/08/how-to-uninstall-apexsqlconnectionmonit_09.htm

 

DESCRIPTION
Uninstalling ApexSQL Log client components doesn't uninstall ApexSQL Log server-side components . ApexSQL Log is licensed per server thus, server-side components can only be installed on one machine while the client-side components can be installed on as many machines as the user wants. It is by design then that server-side components are not uninstalled when client-side components are uninstalled. The exception is when the server-side components are installed WITH the client-side components during setup.

SOLUTION
In this case, uninstalling the client-side components also removes the server-side components. This whole approach may be changed in future versions of ApexSQL Log to avoid confusion. For now though, the following procedure will uninstall the server-side components of ApexSQL Log:

ApexSQL Log 2005
1. Execute the following script on your server:

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor_Stop')
  EXEC MASTER.DBO.XP_APEXSQLCONNECTIONMONITOR_STOP

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLLog')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLLog'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_InitLogNav')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_InitLogNav'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_UnInitLogNav')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_UnInitLogNav'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLConnectionMonitor'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor_Stop')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLConnectionMonitor_Stop'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor_Info')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLConnectionMonitor_Info'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor_Enable')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLConnectionMonitor_Enable'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSQLConnectionMonitor_Disable')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSQLConnectionMonitor_Disable'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_EnableLiveLog')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_EnableLiveLog'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_DisableLiveLog')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_DisableLiveLog'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_GetLiveLogStatus')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_GetLiveLogStatus'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_open')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_open'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_is_open')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_is_open'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_is_valid')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_is_valid'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_seekga')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_seekga'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_seekgr')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_seekgr'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_tellg')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_tellg'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_read')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_read'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'ln_close')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'ln_close'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'sp_ApexSQLConnectionMonitor_Start')
  EXEC MASTER.DBO.SP_PROCOPTION
    'sp_ApexSQLConnectionMonitor_Start' ,
    'startup' ,
    'false'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'sp_ApexSQLConnectionMonitor_Start')
  EXEC MASTER.DBO.SP_EXECUTESQL
    N'DROP PROCEDURE sp_ApexSQLConnectionMonitor_Start'

DBCC LOGNAVXP
DBCC APEXSQLLOGXPROCS
DBCC APEXSQLSERVERXPROCS

2. On the command line of your server, go to the SQL Server's Binn directory and execute the following command from : ApexSqlServerHelper /unload
3. Delete all binaries that start with ApexSql* from SQL Server's Binn folder.
4. Drop msdb.dbo.APEXSQL_LOG_LOGIN table if you don't need data that's stored in it (it's your login data - that's why we don't drop it automatically)


ApexSQL Log 2008
1. Execute the following script on your server:
IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008_Stop')
  EXEC MASTER.DBO.XP_APEXSQLCONNECTIONMONITOR2008_STOP

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlLog2008')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlLog2008'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlLogApi2008')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlLogApi2008'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlRecover2008')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlRecover2008'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlConnectionMonitor2008'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008_Stop')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlConnectionMonitor2008_Stop'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008_Info')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlConnectionMonitor2008_Info'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008_Enable')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlConnectionMonitor2008_Enable'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'xp_ApexSqlConnectionMonitor2008_Disable')
  EXEC MASTER.DBO.SP_DROPEXTENDEDPROC
    'xp_ApexSqlConnectionMonitor2008_Disable'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'sp_ApexSqlConnectionMonitor2008_Start')
  EXEC MASTER.DBO.SP_PROCOPTION
    'sp_ApexSqlConnectionMonitor2008_Start' ,
    'startup' ,
    'false'

IF EXISTS (SELECT *
           FROM   MASTER.DBO.SYSOBJECTS
           WHERE  NAME = 'sp_ApexSqlConnectionMonitor2008_Start')
  EXEC MASTER.DBO.SP_EXECUTESQL
    N'DROP PROCEDURE sp_ApexSqlConnectionMonitor2008_Start'

DBCC APEXSQLSERVERXPROCS2008 (FREE)

2. On the command line of your server, go to the SQL Server's Binn directory and execute the following command from : ApexSqlServerHelper2008 /unload
3. Delete all binaries that start with ApexSql* from SQL Server's Binn folder.
4. Drop msdb.dbo.APEXSQL_LOG_LOGIN table if you don't need data that's stored in it (it's your login data - that's why we don't drop it automatically)

Alternatively, the server-side components can also be uninstalled from the ApexSQL Log client.



This uninstalls all server-side components as well as the Connection monitor.

If all of the above fail to kill the ApexSQL Connection Monitor process, please try the following:

1) Go to your SQL Server's binn directory (e.g. C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn)
2) Rename ApexSqlConnectionMonitor2008.exe to another name.
3) Go to Task Manager and kill the ApexSqlConnectionMonitor2008.exe process
4) Delete the (renamed) file



What is the ApexSqlConnectionMonitor2008.exe for?

To obtain NT user name and other connection specific information, ApexSQL Log uses active connection monitoring through the ApexSQLConnectionMonitor.exe process. This process is designed to be very lightweight, fast, and non-intrusive so it does not interrupt the normal functioning of Microsoft SQL Server. Once the Connection Monitor is installed (it is a part of installed server side components), it will, for each new connection, store a row into a table. During auditing, ApexSQL Log queries the login table to obtain connection specific information for each transaction. ApexSQL Log returns this information as blank if information cannot be obtained.

Note: Connection monitoring works only for Microsoft SQL Server 2000 and SQL Server 2005. It requires that the account under which SQL Server service is running has login permission to the SQL Server itself.

Connection monitoring also allows user names on operations from linked servers (that occurred while it was alive) to be known. Moreover, with connection monitoring, ApexSQL Log can show user names even for dropped users.
As not to consume machine resources, ApexSQL Log stops the process when it fails consecutively for 5 times in 1 minute or less.

AUTHOR
Dmitriy Dyubchenko