I am currently attempting to upgrade the database schema for Symantec from version 12.6 to version 14.0.2349.0100 and I am encountering the following error when attempting the upgrade,
I have followed the steps shown in the following article https://support.symantec.com/en_US/article.TECH228988.html#UserRightsUnknown
I have verified that the permissions in the group policy are all correct as well. The following is the log file from the failed upgrade, any insights to the problem would be appreciated.
2017-08-02 15:35:23.738 THREAD 1 SEVERE: ================== Server Environment ===================
2017-08-02 15:35:23.738 THREAD 1 SEVERE: os.name = Windows Server 2008 R2
2017-08-02 15:35:23.738 THREAD 1 SEVERE: os.version = 6.1
2017-08-02 15:35:23.738 THREAD 1 SEVERE: os.arch = x64
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.version = 1.8.0_111
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.vendor = Oracle Corporation
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.vm.name = Java HotSpot(TM) 64-Bit Server VM
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.vm.version = 25.111-b14
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.home = C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\jre
2017-08-02 15:35:23.738 THREAD 1 SEVERE: catalina.home = C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\tomcat
2017-08-02 15:35:23.738 THREAD 1 SEVERE: java.user = null
2017-08-02 15:35:23.738 THREAD 1 SEVERE: user.language = en
2017-08-02 15:35:23.738 THREAD 1 SEVERE: user.country = US
2017-08-02 15:35:23.738 THREAD 1 SEVERE: scm.server.version = 14.0.2349.0100
2017-08-02 15:35:23.738 THREAD 1 INFO: Main> Main>> Checking upgrade arguments... Command-line argument is empty.
2017-08-02 15:35:23.738 THREAD 1 INFO: Main> Main>> Server Home = C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\tomcat
2017-08-02 15:35:23.770 THREAD 1 INFO: ServerXml>> verifyAndRetrieveROOTXml>> Verifying ROOT.xml...
2017-08-02 15:35:23.832 THREAD 1 INFO: ServerXml>> verifyAndRetrieveXmlFile>> .xml file is valid, deleting backup file...
2017-08-02 15:35:23.832 THREAD 1 INFO: ServerXml>> verifyAndRetrieveXmlFile>> .xml file is valid, deleting backup file...
2017-08-02 15:35:23.863 THREAD 1 INFO: create a new RootXMLHandler
2017-08-02 15:35:24.128 THREAD 1 INFO: DatabaseUtilities> initDataSource>> Found 12.x driver
2017-08-02 15:35:24.160 THREAD 1 INFO: Main> Main>> Database server is Embedded.
2017-08-02 15:35:24.175 THREAD 1 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:24.222 THREAD 1 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 4
2017-08-02 15:35:24.222 THREAD 1 INFO: Main> Main>> Database server is Embedded. Embedded DB version (before upgrade) is 16.x or above. Testing DB connection... Current time = Wed Aug 02 15:35:24 EDT 2017
2017-08-02 15:35:24.222 THREAD 1 INFO: DatabaseUtilities> testDBConnection>> Testing DB connection using 'DefaultDatabaseConnection' method. Parameters used (needDateFormat: false, isRetryUntilDBUp: false, defaultConnectionMaxRetry: 20)
2017-08-02 15:35:24.222 THREAD 1 INFO: initializing DBConnectionProxy
2017-08-02 15:35:24.222 THREAD 1 INFO: loading impersonate library
2017-08-02 15:35:24.238 THREAD 1 INFO: successfully loaded impersonate library
2017-08-02 15:35:24.378 THREAD 1 INFO: Main> Main>> DB(Embedded) test connection succeeded. Continuing with upgrade process... Current time = Wed Aug 02 15:35:24 EDT 2017
2017-08-02 15:35:26.047 THREAD 1 INFO: Main> executePreLaunchSteps>> Config schema format is getting upgraded from (schema version from db): 12.1.6.6
2017-08-02 15:35:26.250 THREAD 1 INFO: Saving disaster recovery data to: C:\Program Files (x86)\Symantec\Symantec Endpoint Protection Manager\tomcat\..\Server Private Key Backup\recovery_2017-08-02-15-35-26.zip
2017-08-02 15:35:26.250 THREAD 1 INFO: RecoveryData> write>> Error: Unexpected result. mPreferredCommSecurityProtocol is null.
2017-08-02 15:35:26.312 THREAD 1 INFO: Main> executePreLaunchSteps>> DbVersion: 12.1.6.6 schemaVersionFromDB: 12.1.6.6 isSpm51Mr7: false hasOtherOSAgents: false dbcompanySize: 3 dbConnected: true isTelemetryOptedInFromDB: true
2017-08-02 15:35:26.312 THREAD 1 INFO: Main> checkUpgradeFeasibility>> Checking for upgrade feasibility, current schema version = 14.0.0.4, schema version from db = 12.1.6.6
2017-08-02 15:35:26.312 THREAD 1 INFO: VersionToBeSupported: 12.1.6.6
2017-08-02 15:35:26.312 THREAD 1 INFO: SchemaVersion>> isSupported> versionToBeSupported '12.1.6.6 is supported for this release
2017-08-02 15:35:26.312 THREAD 1 INFO: Main> displayOnlineServerListIfAny>> Checking online servers. siteId = 05290FAEC0A8010E016F860ECF1AB6E0
2017-08-02 15:35:26.422 THREAD 1 INFO: SYSOUT : Checking onlist status for server BES
2017-08-02 15:35:26.422 THREAD 1 INFO: SYSOUT : [name=BES,id=0D743126C0A8010E005CE20186AE7D31] is offline
2017-08-02 15:35:26.422 THREAD 1 INFO: Main> displayOnlineServerListIfAny>> Checking online servers. Exclude local server id = 0D743126C0A8010E005CE20186AE7D31
2017-08-02 15:35:26.422 THREAD 1 INFO: Main> displayOnlineServerListIfAny>> Online servers = []
2017-08-02 15:35:26.422 THREAD 1 INFO: Main> launchMainFrame>> Launching the UI.
2017-08-02 15:35:26.624 THREAD 1 INFO: ServerConfigurationRemediator >> needChooseLaunchServicePort >> needChooseLaunchServicePort=false serverVersionPreUpgrade=null
2017-08-02 15:35:26.624 THREAD 1 INFO: MainFrame> MainFrame>> needToShowUpgradeServerPropPanel: false
2017-08-02 15:35:26.656 THREAD 1 INFO: isLicenseInstallationValid: sep.slf =true OD file=true
2017-08-02 15:35:26.656 THREAD 1 INFO: MainFrame >> needShowUpgradeDBTasksConfigPanel >> skipping panel because preUpgradeVersion=null
2017-08-02 15:35:42.739 THREAD 27 INFO: Run LiveUpdate during upgrade=true
2017-08-02 15:35:42.770 THREAD 31 WARNING: Upgrade> doUpgrade>> Upgrade process started @ : 0
2017-08-02 15:35:42.770 THREAD 31 INFO: Upgrade> doUpgrade>> Initializing upgrade steps...
2017-08-02 15:35:42.770 THREAD 31 INFO: UpgradeStep >> checkUpgradeStatus.
2017-08-02 15:35:42.770 THREAD 31 INFO: Upgrade> doUpgrade>> Initializing upgrade steps done!
2017-08-02 15:35:42.786 THREAD 31 WARNING: Upgrade> doUpgrade>> Stopping SemSrv...
2017-08-02 15:35:42.848 THREAD 31 INFO: The Symantec Endpoint Protection Manager API Service service is not started.More help is available by typing NET HELPMSG 3521.
2017-08-02 15:35:42.848 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop semapisrv, process return value = 2
2017-08-02 15:35:42.848 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Waiting for service termination: semapisrv
2017-08-02 15:35:42.848 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service semapisrv
2017-08-02 15:35:42.880 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for semapisrv' service is 1
2017-08-02 15:35:42.880 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Service is stopped.
2017-08-02 15:35:42.926 THREAD 31 INFO: The Symantec Endpoint Protection Manager service is not started.More help is available by typing NET HELPMSG 3521.
2017-08-02 15:35:42.926 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop semsrv, process return value = 2
2017-08-02 15:35:42.926 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Waiting for service termination: semsrv
2017-08-02 15:35:42.926 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service semsrv
2017-08-02 15:35:42.973 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for semsrv' service is 1
2017-08-02 15:35:42.973 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Service is stopped.
2017-08-02 15:35:43.020 THREAD 31 INFO: The Symantec Endpoint Protection Manager Webserver service is not started.More help is available by typing NET HELPMSG 3521.
2017-08-02 15:35:43.020 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop semwebsrv, process return value = 2
2017-08-02 15:35:43.067 THREAD 31 INFO: The Symantec Endpoint Protection Launcher service is not started.More help is available by typing NET HELPMSG 3521.
2017-08-02 15:35:43.067 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop semlaunchsrv, process return value = 2
2017-08-02 15:35:43.067 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Waiting for service termination: semlaunchsrv
2017-08-02 15:35:43.067 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service semlaunchsrv
2017-08-02 15:35:43.114 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for semlaunchsrv' service is 1
2017-08-02 15:35:43.114 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Service is stopped.
2017-08-02 15:35:43.114 THREAD 31 WARNING: Upgrade> doUpgrade>> Stopping SemSrv done!
2017-08-02 15:35:43.114 THREAD 31 INFO: ServerXml> createBackupFile>> Is backup file created ? true
2017-08-02 15:35:43.114 THREAD 31 INFO: ServerXml> backupServerROOTXmlFiles>> Is ROOT.xml.bak file created ? true
2017-08-02 15:35:43.114 THREAD 31 INFO: ServerXml> createBackupFile>> Is backup file created ? true
2017-08-02 15:35:43.114 THREAD 31 INFO: ServerXml> backupServerROOTXmlFiles>> Is Server.xml.bak file deleted ? true
2017-08-02 15:35:43.114 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:43.145 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 4
2017-08-02 15:35:45.703 THREAD 31 INFO: The Symantec Embedded Database service is stopping.The Symantec Embedded Database service was stopped successfully.
2017-08-02 15:35:45.703 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop SQLANYs_sem5, process return value = 0
2017-08-02 15:35:45.703 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Waiting for service termination: SQLANYs_sem5
2017-08-02 15:35:45.703 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:45.734 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 1
2017-08-02 15:35:45.734 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Service is stopped.
2017-08-02 15:35:45.765 THREAD 31 INFO: UpgradeDBUtil> getEmbeddedDBVersion>> embeddedDBVersion matching string = 12.0.1.3152
2017-08-02 15:35:50.695 THREAD 31 INFO: The Symantec Embedded Database service is starting..The Symantec Embedded Database service was started successfully.
2017-08-02 15:35:50.695 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - start SQLANYs_sem5, process return value = 0
2017-08-02 15:35:50.695 THREAD 31 INFO: Upgrade> doUpgrade>> Embedded database is 12x or higher, version number is 12.0.1.3152
2017-08-02 15:35:50.726 THREAD 31 INFO: 'SQLANYs_sem5' service is installed...
2017-08-02 15:35:50.726 THREAD 31 INFO: STATE : 4 RUNNING
2017-08-02 15:35:50.726 THREAD 31 INFO: Upgrade> doUpgrade>> Embedded database 12x or higher upgrade process done!
2017-08-02 15:35:50.773 THREAD 31 INFO: The requested service has already been started.More help is available by typing NET HELPMSG 2182.
2017-08-02 15:35:50.773 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - start SQLANYs_sem5, process return value = 2
2017-08-02 15:35:50.773 THREAD 31 INFO: Waiting for service running: SQLANYs_sem5
2017-08-02 15:35:50.773 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:50.804 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 4
2017-08-02 15:35:50.804 THREAD 31 INFO: The service SQLANYs_sem5 has already been started.
2017-08-02 15:35:56.841 THREAD 31 INFO: The Symantec Embedded Database service is stopping.The Symantec Embedded Database service was stopped successfully.
2017-08-02 15:35:56.841 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - stop SQLANYs_sem5, process return value = 0
2017-08-02 15:35:56.841 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Waiting for service termination: SQLANYs_sem5
2017-08-02 15:35:56.841 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:56.873 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 1
2017-08-02 15:35:56.873 THREAD 31 INFO: SemServiceManager> waitForServiceTermination>> Service is stopped.
2017-08-02 15:35:59.197 THREAD 31 INFO: The Symantec Embedded Database service is starting.The Symantec Embedded Database service was started successfully.
2017-08-02 15:35:59.197 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - start SQLANYs_sem5, process return value = 0
2017-08-02 15:35:59.197 THREAD 31 INFO: Waiting for service running: SQLANYs_sem5
2017-08-02 15:35:59.197 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:59.228 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 4
2017-08-02 15:35:59.228 THREAD 31 INFO: The service SQLANYs_sem5 has already been started.
2017-08-02 15:35:59.259 THREAD 31 INFO: The requested service has already been started.More help is available by typing NET HELPMSG 2182.
2017-08-02 15:35:59.259 THREAD 31 INFO: SemServiceManager> serviceControl>> Executed command - start SQLANYs_sem5, process return value = 2
2017-08-02 15:35:59.259 THREAD 31 INFO: Waiting for service running: SQLANYs_sem5
2017-08-02 15:35:59.259 THREAD 31 INFO: SemServiceManager> getServiceStatus>> Retrieve status for service SQLANYs_sem5
2017-08-02 15:35:59.291 THREAD 31 INFO: SemServiceManager> getServiceStatus>> The status for SQLANYs_sem5' service is 4
2017-08-02 15:35:59.291 THREAD 31 INFO: The service SQLANYs_sem5 has already been started.
2017-08-02 15:35:59.291 THREAD 31 INFO: DatabaseUtilities> testDBConnection>> Testing DB connection using 'DefaultDatabaseConnection' method. Parameters used (needDateFormat: false, isRetryUntilDBUp: false, defaultConnectionMaxRetry: 20)
2017-08-02 15:35:59.384 THREAD 31 INFO: isLicenseInstallationValid: sep.slf =true OD file=true
2017-08-02 15:35:59.540 THREAD 31 INFO: UpgradeDBUtil> createODBC>> Creating ODBC... [dbServer: localhost, dbDomain: , dbUser: REPORTER_DBA, dbPwd: ***, dbName: sem5, dbServerPort: 2638, dbVendor: Embedded, SPMport: 8444, remotePort: 9090]
2017-08-02 15:35:59.649 THREAD 31 INFO: UpgradeDBUtil> createODBC>> Creating ODBC done!
2017-08-02 15:35:59.649 THREAD 31 INFO: UpgradeStep >> checkUpgradeStatus.
2017-08-02 15:35:59.649 THREAD 31 INFO: UpgradeStep >> checkUpgradeStatus.
2017-08-02 15:35:59.649 THREAD 31 INFO: Set the config manager cache threshold to 500!
2017-08-02 15:35:59.665 THREAD 31 INFO: updateEmbeddedStatementCount done
2017-08-02 15:35:59.727 THREAD 31 INFO: Upgrade> doUpgrade>> Config schema format is getting upgraded from 12.1.6.6 to 14.0.0.4
2017-08-02 15:35:59.743 THREAD 31 WARNING: Upgrade> doUpgrade>> Upgrading database schema... [formatVersion = 12.1.6.6, dbVersion = 12.1.6.6]
2017-08-02 15:35:59.790 THREAD 31 INFO: Process SQL script file:EmbeddedPorscheMP5ToPorscheMP6.sql
2017-08-02 15:35:59.790 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@590407c0
2017-08-02 15:35:59.790 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12', 'OS X', '10.12', 'OS X', '', 10, 12, '10.12', 2,0,1,0, 'MACOS_10_12')
2017-08-02 15:35:59.790 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12', 'OS X', '10.12', 'OS X', '', 10, 12, '10.12', 2,0,1,0, 'MACOS_10_12')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.0') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.0', 'OS X', '10.12.0', 'OS X', '', 10, 12, '10.12.0', 2,0,1,0, 'MACOS_10_12_0')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.1') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.1', 'OS X', '10.12.1', 'OS X', '', 10, 12, '10.12.1', 2,0,1,0, 'MACOS_10_12_1')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.2') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.2', 'OS X', '10.12.2', 'OS X', '', 10, 12, '10.12.2', 2,0,1,0, 'MACOS_10_12_2')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.3') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.3', 'OS X', '10.12.3', 'OS X', '', 10, 12, '10.12.3', 2,0,1,0, 'MACOS_10_12_3')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.4') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.4', 'OS X', '10.12.4', 'OS X', '', 10, 12, '10.12.4', 2,0,1,0, 'MACOS_10_12_4')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.5') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.5', 'OS X', '10.12.5', 'OS X', '', 10, 12, '10.12.5', 2,0,1,0, 'MACOS_10_12_5')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.6') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.6', 'OS X', '10.12.6', 'OS X', '', 10, 12, '10.12.6', 2,0,1,0, 'MACOS_10_12_6')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.7') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.7', 'OS X', '10.12.7', 'OS X', '', 10, 12, '10.12.7', 2,0,1,0, 'MACOS_10_12_7')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.8') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.8', 'OS X', '10.12.8', 'OS X', '', 10, 12, '10.12.8', 2,0,1,0, 'MACOS_10_12_8')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.9') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.9', 'OS X', '10.12.9', 'OS X', '', 10, 12, '10.12.9', 2,0,1,0, 'MACOS_10_12_9')
2017-08-02 15:35:59.805 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.10') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.10', 'OS X', '10.12.10', 'OS X', '', 10, 12, '10.12.10', 2,0,1,0, 'MACOS_10_12_10')
2017-08-02 15:35:59.821 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT
2017-08-02 15:36:00.039 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @oldestAllowedSig ntext, @oldestAllowedSonar ntext, @oldestAllowedDownloadAdvisor ntext, @avDefsEnabled BIT, @ipsSignaturesEnabled BIT, @sonarDefsEnabled BIT, @downloadAdvisorContentEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT count(SA.AGENT_ID) AS COUNT FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) AND SA.AGENT_TYPE=105 AND (SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT ON SA.PATTERN_IDX=PAT.PATTERN_IDX WHERE SA.AP_ONOFF NOT IN (2, 127) AND MAJOR_VERSION != 5 AND PAT.PATTERN_TYPE=''VIRUS_DEFS'' AND (PAT.VERSION IS NULL OR PAT.VERSION <= ''' || @oldestAllowedDef || ''') AND (' || @avDefsEnabled || ' = 1 )) OR SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS ON SC.PATTERN_IDX=V_IPS.PATTERN_IDX INNER JOIN V_SEM_COMPUTER I WITH (NOLOCK) ON I.COMPUTER_ID=SA.COMPUTER_ID WHERE ((SA.MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127))) AND (V_IPS.DELETED=0 OR V_IPS.DELETED IS NULL) AND SA.MAJOR_VERSION>10 AND ' || @ipsSignaturesEnabled || ' = 1 GROUP BY SA.AGENT_ID HAVING ((MAX(V_IPS.VERSION) IS NULL) OR (MAX(V_IPS.VERSION) <= ''' || @oldestAllowedSig || '''))) OR SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_SONAR ON SC.PATTERN_IDX=V_SONAR.PATTERN_IDX WHERE (V_SONAR.DELETED=0 OR V_SONAR.DELETED IS NULL) AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF NOT IN (2, 127) AND ' || @sonarDefsEnabled || ' = 1 GROUP BY SA.AGENT_ID HAVING (MAX(V_SONAR.VERSION) IS NULL OR MAX(V_SONAR.VERSION) <= ''' || @oldestAllowedSonar || ''')) OR SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_MR_CLEAN ON SC.PATTERN_IDX=V_MR_CLEAN.PATTERN_IDX WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND (V_MR_CLEAN.DELETED=0 OR V_MR_CLEAN.DELETED IS NULL) AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.DA_ONOFF NOT IN (2, 127) AND SA.CIDS_DRV_ONOFF NOT IN (2, 127) AND ' || @downloadAdvisorContentEnabled || ' = 1 GROUP BY SA.AGENT_ID HAVING (MAX(V_MR_CLEAN.VERSION) IS NULL OR MAX(V_MR_CLEAN.VERSION) <= ''' || @oldestAllowedDownloadAdvisor || '''))) ' || @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:00.086 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_MAC_EE_COUNT
2017-08-02 15:36:00.117 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_MAC_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @oldestAllowedSig ntext, @outdatedAVDef ntext, @outdatedIPSSig ntext, @avDefsEnabled BIT, @ipsSignaturesEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT count(*) AS COUNT FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.DELETED=0 AND (SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT AS SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT ON SA.PATTERN_IDX=PAT.PATTERN_IDX WHERE SA.AP_ONOFF NOT IN (2,127) AND SA.DELETED=0 AND SA.STATUS=1 AND MAJOR_VERSION != 5 AND SA.AGENT_TYPE=105 AND PAT.PATTERN_TYPE=''VIRUS_DEFS'' AND (' || @avDefsEnabled || ' = 1 ) AND (PAT.VERSION IS NULL OR PAT.VERSION <= (CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedDef || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedAVDef || ''' END )) ) OR SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS ON SC.PATTERN_IDX=V_IPS.PATTERN_IDX INNER JOIN V_SEM_COMPUTER I WITH (NOLOCK) ON I.COMPUTER_ID=SA.COMPUTER_ID WHERE ((MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION = 12 AND MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION = 12 AND MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF NOT IN (2, 27))) AND SA.DELETED=0 AND SA.STATUS=1 AND (V_IPS.DELETED=0 OR V_IPS.DELETED IS NULL) AND SA.AGENT_TYPE=105 AND SA.MAJOR_VERSION>10 AND ' || @ipsSignaturesEnabled || ' = 1 GROUP BY SA.AGENT_ID, SA.R_OS_TYPE HAVING ((MAX(V_IPS.VERSION) IS NULL) OR (MAX(V_IPS.VERSION) <=(CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedSig || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedIPSSig || ''' END ))))) AND SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) ' || @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:00.164 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_LINUX_EE_COUNT
2017-08-02 15:36:00.227 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_LINUX_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @outdatedAVDef ntext,@avDefsEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT count(*) AS COUNT FROM SEM_AGENT AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.DELETED=0 AND SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT AS SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT ON SA.PATTERN_IDX=PAT.PATTERN_IDX WHERE SA.AP_ONOFF NOT IN (2, 127) AND SA.DELETED=0 AND SA.STATUS=1 AND MAJOR_VERSION != 5 AND SA.AGENT_TYPE=105 AND PAT.PATTERN_TYPE=''VIRUS_DEFS'' AND (' || @avDefsEnabled || ' = 1 ) AND (PAT.VERSION IS NULL OR PAT.VERSION <= (CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedDef || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632,269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedAVDef || ''' END )) ) AND SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000) ' || @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:00.289 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW
2017-08-02 15:36:00.320 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW( IN @userId varchar(32), IN @InputXml ntext, IN @tooolddef varchar(19), IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) INNER JOIN V_GROUPS G ON G.ID=SA.GROUP_ID INNER JOIN V_DOMAINS S ON S.ID=SA.DOMAIN_ID LEFT OUTER JOIN SEM_CONTENT SC with (NOLOCK) on SC.AGENT_ID=SA.AGENT_ID LEFT OUTER JOIN V_SONAR ON SC.PATTERN_IDX=V_SONAR.PATTERN_IDX WHERE SA.AGENT_TYPE='105' AND SA.DELETED=0 and (V_SONAR.DELETED=0 OR V_SONAR.DELETED IS NULL) AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) and SC.DELETED=0 AND (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632,269093888) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) GROUP BY SA.AGENT_ID HAVING ( MAX(V_SONAR.VERSION) IS NULL OR MAX(V_SONAR.VERSION) <=@tooOldDef) END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) INNER JOIN V_SEM_COMPUTER I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID INNER JOIN V_GROUPS G ON G.ID=SA.GROUP_ID INNER JOIN V_DOMAINS S ON S.ID=SA.DOMAIN_ID LEFT OUTER JOIN SEM_CONTENT SC with (NOLOCK) on SC.AGENT_ID=SA.AGENT_ID LEFT OUTER JOIN V_SONAR ON SC.PATTERN_IDX=V_SONAR.PATTERN_IDX WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 and (V_SONAR.DELETED=0 OR V_SONAR.DELETED IS NULL) AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) and SC.DELETED=0 and (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632,269093888) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) AND SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' GROUP BY SA.AGENT_ID HAVING ( MAX(V_SONAR.VERSION) IS NULL OR MAX(V_SONAR.VERSION) <=''' + @tooOldDef + ''') '; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:00.445 THREAD 31 INFO: Process SQL script file:EmbeddedPorscheMP4ToLamborghiniCustomerPreview.sql
2017-08-02 15:36:00.445 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@697e3fe0
2017-08-02 15:36:00.445 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_COMPUTER' AND C.NAME='PUB_KEY') BEGIN ALTER TABLE SEM_COMPUTER ADD PUB_KEY char(512) NULL END
2017-08-02 15:36:00.445 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_COMPUTER' AND C.NAME='PUB_KEY') BEGIN ALTER TABLE SEM_COMPUTER ADD PUB_KEY char(512) NULL END
2017-08-02 15:36:00.507 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_COMPUTER' AND C.NAME='ATP_DEVICE_ID') BEGIN ALTER TABLE SEM_COMPUTER ADD ATP_DEVICE_ID varchar(36) NULL END
2017-08-02 15:36:00.507 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_COMPUTER' AND C.NAME='DEVICE_INFO') BEGIN ALTER TABLE SEM_COMPUTER ADD DEVICE_INFO varchar(1024) NULL END
2017-08-02 15:36:00.523 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'NOTIFICATION' AND C.NAME='EMAILSUBJECT') BEGIN ALTER TABLE NOTIFICATION ADD EMAILSUBJECT NVARCHAR(255) DEFAULT '' END
2017-08-02 15:36:00.523 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_AGENT' AND C.NAME='PEP_ONOFF') BEGIN ALTER TABLE SEM_AGENT ADD PEP_ONOFF TINYINT END
2017-08-02 15:36:00.539 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'INVENTORYREPORT' AND C.NAME='PEP_ONOFF') BEGIN ALTER TABLE INVENTORYREPORT ADD PEP_ONOFF TINYINT NOT NULL Default 127 END
2017-08-02 15:36:00.539 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11', 'OS X', '10.11', 'OS X', '', 10, 11, '10.11', 2,0,1,0, 'MACOS_10_11')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.0') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.0', 'OS X', '10.11.0', 'OS X', '', 10, 11, '10.11.0', 2,0,1,0, 'MACOS_10_11_0')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.1') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.1', 'OS X', '10.11.1', 'OS X', '', 10, 11, '10.11.1', 2,0,1,0, 'MACOS_10_11_1')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.2') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.2', 'OS X', '10.11.2', 'OS X', '', 10, 11, '10.11.2', 2,0,1,0, 'MACOS_10_11_2')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.3') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.3', 'OS X', '10.11.3', 'OS X', '', 10, 11, '10.11.3', 2,0,1,0, 'MACOS_10_11_3')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.4') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.4', 'OS X', '10.11.4', 'OS X', '', 10, 11, '10.11.4', 2,0,1,0, 'MACOS_10_11_4')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.5') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.5', 'OS X', '10.11.5', 'OS X', '', 10, 11, '10.11.5', 2,0,1,0, 'MACOS_10_11_5')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.6') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.6', 'OS X', '10.11.6', 'OS X', '', 10, 11, '10.11.6', 2,0,1,0, 'MACOS_10_11_6')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.7') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.7', 'OS X', '10.11.7', 'OS X', '', 10, 11, '10.11.7', 2,0,1,0, 'MACOS_10_11_7')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.8') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.8', 'OS X', '10.11.8', 'OS X', '', 10, 11, '10.11.8', 2,0,1,0, 'MACOS_10_11_8')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.9') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.9', 'OS X', '10.11.9', 'OS X', '', 10, 11, '10.11.9', 2,0,1,0, 'MACOS_10_11_9')
2017-08-02 15:36:00.554 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.11.10') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.11.10', 'OS X', '10.11.10', 'OS X', '', 10, 11, '10.11.10', 2,0,1,0, 'MACOS_10_11_10')
2017-08-02 15:36:00.570 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'Windows 10 Enterprise 2015 LTSB') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('Windows 10 Enterprise 2015 LTSB', 'Windows 10', 'Enterprise 2015 LTSB', 'Windows 10', 'Enterprise', 10, 0, '10.0', 1,0,1,0, 'WINDOWS_10_ENT_2015_LTSB')
2017-08-02 15:36:00.570 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='OAUTH_ACCESS_TOKEN' AND COLUMN_NAME = 'DOMAIN_ID') BEGIN ALTER TABLE OAUTH_ACCESS_TOKEN ADD DOMAIN_ID VARCHAR(80) END
2017-08-02 15:36:00.570 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='OAUTH_REFRESH_TOKEN' AND COLUMN_NAME = 'DOMAIN_ID') BEGIN ALTER TABLE OAUTH_REFRESH_TOKEN ADD DOMAIN_ID VARCHAR(80) END
2017-08-02 15:36:00.570 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='OAUTH_CLIENT_DETAILS' AND COLUMN_NAME = 'REFRESH_TOKEN_VALIDITY') BEGIN ALTER TABLE OAUTH_CLIENT_DETAILS ADD REFRESH_TOKEN_VALIDITY INT END
2017-08-02 15:36:00.570 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='OAUTH_CLIENT_DETAILS' AND COLUMN_NAME = 'ADDITIONAL_INFORMATION') BEGIN ALTER TABLE OAUTH_CLIENT_DETAILS ADD ADDITIONAL_INFORMATION VARCHAR(4096) END
2017-08-02 15:36:00.585 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='OAUTH_CLIENT_DETAILS' AND COLUMN_NAME = 'AUTOAPPROVE') BEGIN ALTER TABLE OAUTH_CLIENT_DETAILS ADD AUTOAPPROVE VARCHAR(256) END
2017-08-02 15:36:00.585 THREAD 31 INFO: UPDATE OAUTH_CLIENT_DETAILS SET SCOPE = 'read,trust,write'
2017-08-02 15:36:00.585 THREAD 31 INFO: DROP TABLE ENROLMENT_JOB_STATUS
2017-08-02 15:36:00.617 THREAD 31 INFO: CREATE TABLE ENROLMENT_JOB_STATUS( JOB_STATUS_ID char(32) NOT NULL, JOB_STATUS NVARCHAR(256) NULL, SUCCESS_COUNT int NULL, FAIL_COUNT int NULL, TOTAL_COUNT int NULL, JOB_REQUEST_TIME bigint NULL, ROW_LAST_UPDATED bigint NULL )
2017-08-02 15:36:00.648 THREAD 31 INFO: ALTER TABLE ENROLMENT_JOB_STATUS ADD CONSTRAINT PK_ENROLMENT_JOB_STATUS PRIMARY KEY (JOB_STATUS_ID)
2017-08-02 15:36:01.131 THREAD 31 INFO: DROP PROCEDURE SEM_COMPUTER_DEVICE_INFO_UPDATE
2017-08-02 15:36:01.147 THREAD 31 INFO: CREATE PROCEDURE SEM_COMPUTER_DEVICE_INFO_UPDATE @hardwareKey char(32), @domainId char(32), @atpDeviceId char(32), @atpDeviceInfo char(1024), @publicKey char(512), @usn bigint, @currentTimeStamp bigint AS BEGIN IF EXISTS( SELECT * FROM SEM_Computer WHERE SEM_Computer.hardware_key = @hardwareKey AND SEM_Computer.Domain_id = @domainId AND SEM_Computer.deleted = 0 AND SEM_Computer.PUB_KEY = @publicKey) BEGIN UPDATE SEM_COMPUTER SET ATP_DEVICE_ID = @atpDeviceId,DEVICE_INFO =@atpDeviceInfo,USN = @usn , TIME_STAMP = @currentTimeStamp WHERE HARDWARE_KEY =@hardwareKey AND DOMAIN_ID = @domainId AND PUB_KEY = @publicKey UPDATE SEM_CLIENT SET USN = @usn , TIME_STAMP = @currentTimeStamp WHERE HARDWARE_KEY = @hardwareKey AND DOMAIN_ID = @domainId AND DELETED = 0END END
2017-08-02 15:36:01.194 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_AGENT' AND C.NAME='EDR_STATUS') BEGIN ALTER TABLE SEM_AGENT ADD EDR_STATUS TINYINT NULL END
2017-08-02 15:36:01.209 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_AGENT' AND C.NAME='ATP_SERVER') BEGIN ALTER TABLE SEM_AGENT ADD ATP_SERVER VARCHAR(300) END
2017-08-02 15:36:01.209 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'COMPLIANCE_REPORT' AND C.NAME='APP_NAME') BEGIN ALTER TABLE COMPLIANCE_REPORT ADD APP_NAME NVARCHAR(512) NULL END
2017-08-02 15:36:01.225 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'COMPLIANCE_REPORT' AND C.NAME='LOCATION_NAME') BEGIN ALTER TABLE COMPLIANCE_REPORT ADD LOCATION_NAME NVARCHAR(512) NULL END
2017-08-02 15:36:01.241 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'COMPLIANCE_REPORT' AND C.NAME='PROFILE_SERIAL_NO') BEGIN ALTER TABLE COMPLIANCE_REPORT ADD PROFILE_SERIAL_NO NVARCHAR(255) NULL END
2017-08-02 15:36:01.241 THREAD 31 INFO: ALTER TABLE SCANS MODIFY VSIC_SCAN tinyint NULL
2017-08-02 15:36:01.677 THREAD 31 INFO: DROP VIEW V_AGENT_INCL_RISK_INFO
2017-08-02 15:36:01.724 THREAD 31 INFO: CREATE VIEW V_AGENT_INCL_RISK_INFO AS SELECT *, POWERERASER_PENDING.ALERTS_COUNT AS POWERERASER_PENDING_ALERTS FROM SEM_AGENT SA with (NOLOCK) LEFT JOIN (SELECT COUNT(A.ALERT_IDX) AS ALERTS_COUNT,A.COMPUTER_IDX FROM ALERTS A with (NOLOCK) WHERE A.SOURCE='PowerEraser' AND A.ACTUALACTION_IDX=14 AND A.DELETED=0 AND A.Mother_Idx = '' AND (DATEDIFF(day,A.ALERTDATETIME, GETDATE()) < 30) GROUP BY A.COMPUTER_IDX) AS POWERERASER_PENDING ON POWERERASER_PENDING.COMPUTER_IDX = SA.COMPUTER_ID
2017-08-02 15:36:01.787 THREAD 31 INFO: DROP VIEW V_SCANS
2017-08-02 15:36:01.802 THREAD 31 INFO: CREATE VIEW V_SCANS as select * from SCANS where DELETED=0
2017-08-02 15:36:01.849 THREAD 31 INFO: DROP VIEW V_AGENT_INCL_GROUP_ID
2017-08-02 15:36:01.896 THREAD 31 INFO: CREATE VIEW V_AGENT_INCL_GROUP_ID as SELECT AGENT_ID, AGENT_TYPE, R_OS_TYPE, COMPUTER_ID, DOMAIN_ID, GROUP_ID, AGENT_VERSION, PROFILE_VERSION, PROFILE_SERIAL_NO, PROFILE_CHECKSUM, IDS_VERSION, IDS_SERIAL_NO, IDS_CHECKSUM, HI_STATUS, HI_REASONCODE, HI_REASONDESC, CREATION_TIME, STATUS, LAST_UPDATE_TIME, LAST_SERVER_ID, LAST_SITE_ID, ATTRIBUTE_EXTENSION, FULL_NAME, EMAIL, JOB_TITLE, DEPARTMENT, EMPLOYEE_NUMBER, EMPLOYMENT_STATUS, OFFICE_PHONE, MOBILE_PHONE, HOME_PHONE, USN, TIME_STAMP, DELETED, PATTERN_IDX, AP_ONOFF, INFECTED, WORSTINFECTION_IDX, LAST_SCAN_TIME, LAST_VIRUS_TIME, CONTENT_UPDATE, AVENGINE_ONOFF, TAMPER_ONOFF, MAJOR_VERSION, MINOR_VERSION, REBOOT_REQUIRED, REBOOT_REASON, LICENSE_STATUS, LICENSE_EXPIRY, TIMEZONE, FIREWALL_ONOFF, FREE_MEM, FREE_DISK, LAST_DOWNLOAD_TIME, CURRENT_CLIENT_ID, LICENSE_ID, IS_GRACE, SNAC_LICENSE_ID, PTP_ONOFF, LAST_HEURISTIC_THREAT_TIME, BASH_STATUS, DA_ONOFF, CIDS_DRV_ONOFF, CIDS_SILENT_MODE, CIDS_DRV_MULF_CODE, CIDS_BROWSER_IE_ONOFF, CIDS_BROWSER_FF_ONOFF, CIDS_ENGINE_VERSION, CIDS_DEFSET_VERSION, DEPLOY_STATUS, DEPLOY_MSG, DEPLOY_PRE_VER, DEPLOY_TARGET_VER, DEPLOY_RUNNING_VER, DEPLOY_TIMESTAMP, OS_BIT_TYPE, ELAM_ONOFF, OSELAM_STATUS, VSIC_STATUS, IS_NPVDI_CLIENT, SVA_ID, LAST_CONNECTED_IP_ADDR, CAST((case when LAST_CONNECTED_IP_ADDR < 0 then 0xFFFFFFFF + LAST_CONNECTED_IP_ADDR else LAST_CONNECTED_IP_ADDR end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LAST_CONNECTED_IP_ADDR < 0 then 0xFFFFFFFF + LAST_CONNECTED_IP_ADDR else LAST_CONNECTED_IP_ADDR end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LAST_CONNECTED_IP_ADDR < 0 then 0xFFFFFFFF + LAST_CONNECTED_IP_ADDR else LAST_CONNECTED_IP_ADDR end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LAST_CONNECTED_IP_ADDR < 0 then 0xFFFFFFFF + LAST_CONNECTED_IP_ADDR else LAST_CONNECTED_IP_ADDR end & 0xFF as VARCHAR) as LAST_CONNECTED_IP_ADDR_TEXT, INSTALL_TYPE, PEP_ONOFF, EDR_STATUS, ATP_SERVER FROM SEM_AGENT with (NOLOCK)
2017-08-02 15:36:01.958 THREAD 31 INFO: DROP TABLE SEM_AGENT_INFECTION_HISTORY
2017-08-02 15:36:01.974 THREAD 31 INFO: CREATE TABLE SEM_AGENT_INFECTION_HISTORY( SEQ_ID BIGINT NOT NULL IDENTITY, COMPUTER_IDX CHAR(32) NOT NULL, USN BIGINT NOT NULL DEFAULT 1, TIME_STAMP BIGINT NOT NULL DEFAULT 0, EVENT_ID INT NOT NULL, DELETED TINYINT NOT NULL DEFAULT 0, EVENT_TIME DATETIME NOT NULL )
2017-08-02 15:36:01.989 THREAD 31 INFO: CREATE UNIQUE CLUSTERED INDEX IX_SEM_AGENT_INFECTION_HISTORY ON SEM_AGENT_INFECTION_HISTORY ( EVENT_TIME, EVENT_ID, COMPUTER_IDX )
2017-08-02 15:36:02.005 THREAD 31 INFO: DROP VIEW V_INFECTED_AGENT_HISTORY
2017-08-02 15:36:02.036 THREAD 31 INFO: CREATE VIEW V_INFECTED_AGENT_HISTORY AS WITH Level1 AS ( /* apply row numbers */ SELECT COMPUTER_IDX, EVENT_TIME, EVENT_ID, ROW_NUMBER() OVER (PARTITION BY COMPUTER_IDX ORDER BY EVENT_TIME) AS ROW_NUM FROM SEM_AGENT_INFECTION_HISTORY) ,Level2 AS ( /*find the last and next event type for each row */ SELECT A.COMPUTER_IDX , A.EVENT_TIME , A.EVENT_ID , COALESCE(LastVal.EVENT_ID, -1) AS LAST_EVENT , COALESCE(NextVal.EVENT_ID, -1) AS NEXT_EVENT FROM Level1 A LEFT JOIN Level1 LastVal ON A.COMPUTER_IDX = LastVal.COMPUTER_IDX AND A.ROW_NUM - 1 = LastVal.ROW_NUM LEFT JOIN Level1 NextVal ON A.COMPUTER_IDX = NextVal.COMPUTER_IDX AND A.ROW_NUM + 1 = NextVal.ROW_NUM) ,Level3 AS ( /* reapply row numbers to row-eliminated set */ SELECT COMPUTER_IDX , EVENT_TIME , EVENT_ID , LAST_EVENT , NEXT_EVENT , ROW_NUMBER() OVER ( PARTITION BY COMPUTER_IDX ORDER BY EVENT_TIME ) AS ROW_NBR FROM Level2 WHERE NOT( EVENT_ID = 200 AND LAST_EVENT = -1 ) AND NOT ( EVENT_ID = 100 AND LAST_EVENT = 100 ) AND NOT ( EVENT_ID = 200 AND LAST_EVENT = 200)) ,INFECTED_AGENT_HISTORY AS (/* pair infected and cleared rows */ SELECT A.COMPUTER_IDX , A.EVENT_TIME AS INFECTED_DATETIME, B.EVENT_TIME AS CLEARED_DATETIME FROM Level3 A LEFT OUTER JOIN Level3 B ON A.COMPUTER_IDX = B.COMPUTER_IDX AND A.ROW_NBR + 1 = B.ROW_NBR WHERE A.EVENT_ID = 100 ) SELECT * FROM INFECTED_AGENT_HISTORY
2017-08-02 15:36:02.067 THREAD 31 INFO: SET TEMPORARY OPTION MAX_RECURSIVE_ITERATIONS=100000
2017-08-02 15:36:02.067 THREAD 31 INFO: SET TEMPORARY OPTION STRING_RTRUNCATION='off'
2017-08-02 15:36:02.067 THREAD 31 INFO: DROP TABLE DATE_DIMENSION
2017-08-02 15:36:02.099 THREAD 31 INFO: WITH RECURSIVE DATE_RANGE (START_DATE) AS ( SELECT CAST('2000-01-01' AS DATETIME) AS START_DATE UNION ALL SELECT START_DATE + 1 FROM DATE_RANGE WHERE START_DATE + 1 <= '2020-12-31' ) SELECT CAST(CONVERT(VARCHAR(10), START_DATE, 112) AS INT) AS DATE_KEY, START_DATE AS CALENDAR_DATE, CONVERT(VARCHAR(10), START_DATE, 111) AS [YYYY/MM/DD] , CONVERT(VARCHAR(11), START_DATE, 100) AS [MON DD YYYY] , CONVERT(VARCHAR(11), START_DATE, 120) AS [YYYY-MM-DD], YEAR(START_DATE) AS YEAR , DATENAME(YEAR,START_DATE) AS YEAR_NAME , DATEPART(qq, START_DATE) AS QUARTER , DATENAME(YEAR, START_DATE)+'Q'+DATENAME(QUARTER, START_DATE) AS QUARTER_NAME , MONTH(START_DATE) AS MONTH , DATENAME(MM, START_DATE) AS MONTH_NAME , LEFT(DATENAME(MM, START_DATE), 3) AS MONTH_SHORT_NAME, DATEDIFF(MM, DATEADD(QQ, DATEDIFF(QQ, '1900-01-01', START_DATE), '1900-01-01'), START_DATE) + 1 AS MONTH_NUM_OF_QUARTER , CONVERT(VARCHAR(4),YEAR(START_DATE))+'-Week-'+CAST(DATEPART(WK,START_DATE) AS VARCHAR) AS WEEK_NAME, DATEPART(WK, START_DATE) AS WEEK_NUM_OF_YEAR , DATEDIFF(WK, DATEADD(QQ, DATEDIFF(QQ, '1900-01-01', START_DATE), '1900-01-01'), START_DATE) + 1 AS WEEK_NUM_OF_QUARTER , DATEDIFF(WK, DATEADD(MM, DATEDIFF(MM, '1900-01-01', START_DATE), '1900-01-01'), START_DATE) + 1 AS WEEK_NUM_OF_MONTH , DATENAME(DW, START_DATE) AS DAY_OF_WEEK, LEFT(DATENAME(DW, START_DATE), 3) AS SHORT_DAY_OF_WEEK , DATEPART(DY, START_DATE) AS DAY_NUM_OF_YEAR , DATEDIFF(DD, DATEADD(QQ, DATEDIFF(QQ, '1900-01-01', START_DATE), '1900-01-01'), START_DATE) + 1 AS DAY_NUM_OF_QUARTER , DAY(START_DATE) AS DAY_NUM_OF_MONTH , DATEPART(DW, START_DATE) AS DAY_NUM_OF_WEEK INTO DATE_DIMENSION FROM DATE_RANGE
2017-08-02 15:36:03.035 THREAD 31 INFO: DROP TABLE TIME_OF_DAY
2017-08-02 15:36:03.565 THREAD 31 INFO: CREATE TABLE TIME_OF_DAY ( HOUR_ID TINYINT )
2017-08-02 15:36:03.581 THREAD 31 INFO: INSERT INTO TIME_OF_DAY VALUES (0) INSERT INTO TIME_OF_DAY VALUES (1) INSERT INTO TIME_OF_DAY VALUES (2) INSERT INTO TIME_OF_DAY VALUES (3) INSERT INTO TIME_OF_DAY VALUES (4) INSERT INTO TIME_OF_DAY VALUES (5) INSERT INTO TIME_OF_DAY VALUES (6) INSERT INTO TIME_OF_DAY VALUES (7) INSERT INTO TIME_OF_DAY VALUES (8) INSERT INTO TIME_OF_DAY VALUES (9) INSERT INTO TIME_OF_DAY VALUES (10) INSERT INTO TIME_OF_DAY VALUES (11) INSERT INTO TIME_OF_DAY VALUES (12) INSERT INTO TIME_OF_DAY VALUES (13) INSERT INTO TIME_OF_DAY VALUES (14) INSERT INTO TIME_OF_DAY VALUES (15) INSERT INTO TIME_OF_DAY VALUES (16) INSERT INTO TIME_OF_DAY VALUES (17) INSERT INTO TIME_OF_DAY VALUES (18) INSERT INTO TIME_OF_DAY VALUES (19) INSERT INTO TIME_OF_DAY VALUES (20) INSERT INTO TIME_OF_DAY VALUES (21) INSERT INTO TIME_OF_DAY VALUES (22) INSERT INTO TIME_OF_DAY VALUES (23)
2017-08-02 15:36:03.596 THREAD 31 INFO: IF(OBJECT_ID('SEM_GET_COMPUTERS')>0) BEGIN DROP PROCEDURE SEM_GET_COMPUTERS END
2017-08-02 15:36:03.737 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_COMPUTERS ( @PageIndex INT=1, @PageSize INT=10, @SortBy VARCHAR(128) = 'computer_name', @SortOrder VARCHAR(4) = 'ASC', @LastUpdateTime BIGINT =NULL, @DomainId CHAR(32) = NULL, @TotalCount INT OUTPUT ) AS BEGIN SET NOCOUNT ON DECLARE @RowStart INT DECLARE @RowEnd INT /* If Inputs are NULL or 0 init to default values */ IF(ISNULL(@SortBy,'') = '' ) SET @SortBy = 'computer_name' IF(ISNULL(@SortOrder,'') = '' ) SET @SortOrder = 'ASC' IF(ISNULL(@PageSize,0) = 0) SET @PageSize = 10 IF(ISNULL(@PageIndex,0) = 0) SET @PageIndex = 1 SET @RowStart = ((@PageIndex -1)*@PageSize + 1) SET @RowEnd = @RowStart + @PageSize -1 SELECT * FROM ( SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN @SortOrder ='DESC' THEN ( CASE @SortBy WHEN 'COMPUTER_ID' THEN VSC.COMPUTER_ID WHEN 'DOMAIN_ID' THEN VSC.DOMAIN_ID WHEN 'COMPUTER_NAME' THEN VSC.COMPUTER_NAME WHEN 'COMPUTER_DOMAIN_NAME' THEN VSC.COMPUTER_DOMAIN_NAME ELSE VSC.COMPUTER_ID END ) END DESC, CASE WHEN @SortOrder ='ASC' THEN ( CASE @SortBy WHEN 'COMPUTER_ID' THEN VSC.COMPUTER_ID WHEN 'DOMAIN_ID' THEN VSC.DOMAIN_ID WHEN 'COMPUTER_NAME' THEN VSC.COMPUTER_NAME WHEN 'COMPUTER_DOMAIN_NAME' THEN VSC.COMPUTER_DOMAIN_NAME ELSE VSC.COMPUTER_ID END ) END ASC )AS "RowNum", VSC.COMPUTER_ID, VSC.DOMAIN_ID, VDA.NAME AS DOMAIN_NAME, VG.ID AS GROUP_ID, VG.NAME AS GROUP_NAME, VSC.HARDWARE_KEY, VSC.COMPUTER_NAME, VSC.COMPUTER_DOMAIN_NAME, VSC.COMPUTER_DESCRIPTION, VSC.OPERATION_SYSTEM, COALESCE(UPPER(VSC.MAC_ADDR1),'') AS MAC_ADDR1, COALESCE(UPPER(VSC.MAC_ADDR2),'') AS MAC_ADDR2, COALESCE(UPPER(VSC.MAC_ADDR3),'') AS MAC_ADDR3, COALESCE(UPPER(VSC.MAC_ADDR4),'') AS MAC_ADDR4, IP_ADDR1, IP_ADDR2, IP_ADDR3, IP_ADDR4, CASE WHEN VSC.IP_ADDR1_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR1_TEXT = '...' THEN ''ELSE VSC.IP_ADDR1_TEXT END AS IP_ADDR1_TEXT, CASE WHEN VSC.IP_ADDR2_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR2_TEXT = '...' THEN ''ELSE VSC.IP_ADDR2_TEXT END AS IP_ADDR2_TEXT, CASE WHEN VSC.IP_ADDR3_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR3_TEXT = '...' THEN ''ELSE VSC.IP_ADDR3_TEXT END AS IP_ADDR3_TEXT, CASE WHEN VSC.IP_ADDR4_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR4_TEXT = '...' THEN ''ELSE VSC.IP_ADDR4_TEXT END AS IP_ADDR4_TEXT, VSC.DELETED, VAIG.HI_STATUS, VAIG.HI_REASONCODE,VAIG.AGENT_VERSION, VSC.BIOS_SERIALNUMBER, VSC.BIOS_VERSION, VSC.UUID,VSC.PROCESSOR_TYPE,VSC.PROCESSOR_CLOCK,VSC.PROCESSOR_NUM,VSC.MEMORY, CASE WHEN VSC.OS_FUNCTION IS NULL THEN 0 ELSE VSC.OS_FUNCTION END AS OS_FUNCTION, VAIG.R_OS_TYPE, OS.OS_NAME, OS.SPC_OS_VERSION, OS.OS_MAJOR,OS.OS_MINOR,VSC.SERVICE_PACK,VAIG.OS_BIT_TYPE, VSC.OS_LANG, VSC.CURRENT_LOGIN_USER, VSC.DISK_TOTAL, HV.HYPERVISOR_VENDOR_NAME, GL.GUP_ID, VSC.PUB_KEY, VSC.ATP_DEVICE_ID, VSC.DEVICE_INFO, SA.AGENT_ID,SA.AGENT_TYPE,SA.HI_REASONDESC,SA.PROFILE_VERSION,SA.PROFILE_SERIAL_NO,SA.PROFILE_CHECKSUM, SA.IDS_VERSION,SA.IDS_SERIAL_NO,SA.IDS_CHECKSUM,SA.CREATION_TIME,SA.STATUS,SA.LAST_UPDATE_TIME, SA.LAST_SERVER_ID,mapServer.NAME AS LAST_SERVER_NAME, SA.LAST_SITE_ID,mapSite.NAME AS LAST_SITE_NAME,SA.ATTRIBUTE_EXTENSION, SA.FULL_NAME,SA.EMAIL,SA.JOB_TITLE,SA.DEPARTMENT,SA.EMPLOYEE_NUMBER,SA.EMPLOYMENT_STATUS,SA.OFFICE_PHONE, SA.MOBILE_PHONE,SA.HOME_PHONE,SA.TIME_STAMP AS AGENT_TIME_STAMP,SA.USN AS AGENT_USN, SA.PATTERN_IDX,SA.AP_ONOFF,SA.INFECTED,SA.WORSTINFECTION_IDX,SA.LAST_SCAN_TIME,SA.LAST_VIRUS_TIME, SA.CONTENT_UPDATE,SA.AVENGINE_ONOFF,SA.TAMPER_ONOFF,SA.MAJOR_VERSION,SA.MINOR_VERSION,SA.REBOOT_REQUIRED, SA.REBOOT_REASON,SA.LICENSE_STATUS,SA.LICENSE_EXPIRY,SA.TIMEZONE,SA.FIREWALL_ONOFF,SA.FREE_MEM,SA.FREE_DISK, SA.LAST_DOWNLOAD_TIME,SA.CURRENT_CLIENT_ID,SA.LICENSE_ID,SA.IS_GRACE,SA.SNAC_LICENSE_ID,SA.PTP_ONOFF, SA.LAST_HEURISTIC_THREAT_TIME,SA.BASH_STATUS,SA.DA_ONOFF,SA.CIDS_DRV_ONOFF,SA.CIDS_SILENT_MODE, SA.CIDS_DRV_MULF_CODE,SA.CIDS_BROWSER_IE_ONOFF,SA.CIDS_BROWSER_FF_ONOFF,SA.CIDS_ENGINE_VERSION, SA.CIDS_DEFSET_VERSION,SA.DEPLOY_STATUS,SA.DEPLOY_MSG,SA.DEPLOY_PRE_VER,SA.DEPLOY_TARGET_VER, SA.DEPLOY_RUNNING_VER,SA.DEPLOY_TIMESTAMP,SA.ELAM_ONOFF,SA.OSELAM_STATUS,SA.VSIC_STATUS,SA.IS_NPVDI_CLIENT, SA.SVA_ID,VAIG.LAST_CONNECTED_IP_ADDR_TEXT,SA.INSTALL_TYPE,SA.PEP_ONOFF,SA.EDR_STATUS,SA.ATP_SERVER, VSC.GATEWAY1_TEXT,VSC.GATEWAY2_TEXT,VSC.GATEWAY3_TEXT,VSC.GATEWAY4_TEXT, VSC.SUBNET_MASK1_TEXT,VSC.SUBNET_MASK2_TEXT,VSC.SUBNET_MASK3_TEXT,VSC.SUBNET_MASK4_TEXT, VSC.CURRENT_LOGIN_DOMAIN,VSC.TPM_DEVICE,DNS_SERVER1_TEXT,VSC.DNS_SERVER2_TEXT, VSC.WINS_SERVER1_TEXT,VSC.WINS_SERVER2_TEXT,VSC.DHCP_SERVER_TEXT, VSC.TIME_STAMP AS COMPUTER_TIME_STAMP,VSC.USN AS COMPUTER_USN, VSC.DISK_DRIVE,VSC.HYPERVISOR_VENDOR_ID,VSC.KERNEL,VSC.EWF,VSC.FBWF,VSC.UWFFROM V_SEM_COMPUTER VSC INNER JOIN V_DOMAINS AS VDA ON VSC.DOMAIN_ID = VDA.ID INNER JOIN SEM_CLIENT AS SC ON VSC.HARDWARE_KEY = SC.HARDWARE_KEY AND VSC.COMPUTER_ID = SC.COMPUTER_ID INNER JOIN V_GROUPS AS VG ON SC.GROUP_ID = VG.ID INNER JOIN V_AGENT_INCL_GROUP_ID VAIG ON VAIG.COMPUTER_ID=VSC.COMPUTER_ID LEFT JOIN SEM_OS_INFO OS ON VSC.OPERATION_SYSTEM=OS.OPERATING_SYSTEM INNER JOIN HYPERVISOR_VENDOR HV ON VSC.HYPERVISOR_VENDOR_ID=HV.HYPERVISOR_VENDOR_ID LEFT JOIN GUP_LIST GL ON VSC.COMPUTER_ID=GL.COMPUTER_ID INNER JOIN SEM_AGENT SA ON VSC.COMPUTER_ID=SA.COMPUTER_ID INNER JOIN IDENTITY_MAP mapServer on SA.LAST_SERVER_ID=mapServer.ID INNER JOIN IDENTITY_MAP mapSite on SA.LAST_SITE_ID=mapSite.IDWHERE VSC.DELETED = 0 AND SA.LAST_UPDATE_TIME > COALESCE(@LastUpdateTime, 0) AND VSC.DOMAIN_ID = COALESCE(@DomainId, VSC.DOMAIN_ID) ) AS A WHERE RowNum between @RowStart AND @RowEnd /* Get TotalCount */ SELECT @TotalCount = COUNT(VSC.COMPUTER_ID) FROM V_SEM_COMPUTER VSC INNER JOIN V_DOMAINS AS VDA ON VSC.DOMAIN_ID = VDA.ID INNER JOIN SEM_CLIENT AS SC ON VSC.HARDWARE_KEY = SC.HARDWARE_KEY AND VSC.COMPUTER_ID = SC.COMPUTER_ID INNER JOIN V_GROUPS AS VG ON SC.GROUP_ID = VG.ID INNER JOIN V_AGENT_INCL_GROUP_ID VAIG ON VAIG.COMPUTER_ID=VSC.COMPUTER_ID LEFT JOIN SEM_OS_INFO OS ON VSC.OPERATION_SYSTEM=OS.OPERATING_SYSTEM INNER JOIN HYPERVISOR_VENDOR HV ON VSC.HYPERVISOR_VENDOR_ID=HV.HYPERVISOR_VENDOR_ID LEFT JOIN GUP_LIST GL ON VSC.COMPUTER_ID=GL.COMPUTER_ID INNER JOIN SEM_AGENT SA ON VSC.COMPUTER_ID=SA.COMPUTER_ID WHERE VSC.DELETED = 0 AND SA.LAST_UPDATE_TIME > COALESCE(@LastUpdateTime, 0) AND VSC.DOMAIN_ID = COALESCE(@DomainId, VSC.DOMAIN_ID) END
2017-08-02 15:36:04.049 THREAD 31 INFO: IF(OBJECT_ID('SEM_GET_GUP_STATUS')>0) BEGIN DROP PROCEDURE SEM_GET_GUP_STATUS END
2017-08-02 15:36:04.095 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_GUP_STATUS AS BEGIN SELECT DISTINCT COMP.COMPUTER_NAME,COMP.IP_ADDR1_TEXT,CONVERT(VARCHAR,Dateadd(SECOND, LAST_UPDATE_TIME/1000, '19700101'), 120) AS LASTHEARTBEAT,AGENT.PORT,AGENT.STATUS, AGENT.CIDS_DRV_ONOFF,AGENT.HI_STATUS,AGENT.AGENT_VERSION,PATTERN.VERSION AS AVAS,PATTERN.SEQUENCE AS SEQ,MAX(PAT.VERSION) AS IPS,ID_MAP.NAME AS SEMGROUP,COMP.COMPUTER_DOMAIN_NAME, V_DOMAINS.NAME AS SEPDOMAIN,AGENT.FREE_DISK AS FREEDISK,COMP.DISK_DRIVE,AGENT.FREE_MEM AS FREEMEM,COMP.MEMORY AS TOTALMEM,COMP.OPERATION_SYSTEM,COMP.PROCESSOR_TYPE,COMP.PROCESSOR_CLOCK AS CPUMHZ FROM( SELECT DISTINCT AGENT.*,GUP.PORT FROM SEM_AGENT AS AGENT,GUP_LIST AS GUP WHERE GUP.COMPUTER_ID = AGENT.COMPUTER_ID AND GUP.DELETED = 0 AND AGENT.DELETED = 0) AS AGENT LEFT OUTER JOIN V_SEM_COMPUTER AS COMP ON AGENT.COMPUTER_ID = COMP.COMPUTER_ID LEFT OUTER JOIN V_GROUPS AS ID_MAP ON ID_MAP.ID = AGENT.GROUP_ID LEFT OUTER JOIN V_DOMAINS ON V_DOMAINS.ID = AGENT.DOMAIN_ID LEFT OUTER JOIN PATTERN ON PATTERN.PATTERN_IDX = AGENT.PATTERN_IDX LEFT OUTER JOIN SEM_CONTENT SC ON SC.AGENT_ID = AGENT.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS AS PAT ON SC.PATTERN_IDX = PAT.PATTERN_IDX GROUP BY COMP.COMPUTER_NAME,COMP.IP_ADDR1_TEXT,CONVERT(VARCHAR, Dateadd(SECOND, LAST_UPDATE_TIME/1000, '19700101'), 120),AGENT.PORT, AGENT.STATUS, AGENT.CIDS_DRV_ONOFF, AGENT.HI_STATUS,AGENT.AGENT_VERSION,PATTERN.VERSION,PATTERN.SEQUENCE,ID_MAP.NAME,COMP.COMPUTER_DOMAIN_NAME,V_DOMAINS.NAME,AGENT.FREE_DISK,COMP.DISK_DRIVE,AGENT.FREE_MEM,COMP.MEMORY, COMP.OPERATION_SYSTEM, COMP.PROCESSOR_TYPE, COMP.PROCESSOR_CLOCK ORDER BY AGENT.STATUS ASC,AGENT.HI_STATUS ASC END
2017-08-02 15:36:04.142 THREAD 31 INFO: IF(OBJECT_ID('SEM_CLIENT_ONLINE_OFFLINE_COUNT_STATS')>0) BEGIN DROP PROCEDURE SEM_CLIENT_ONLINE_OFFLINE_COUNT_STATS END
2017-08-02 15:36:04.173 THREAD 31 INFO: CREATE PROCEDURE SEM_CLIENT_ONLINE_OFFLINE_COUNT_STATS AS BEGIN SET NOCOUNT ON SELECT CASE when (STATUS=0) then 'OFFLINE' when (STATUS=1) then 'ONLINE' end as "STATUS", count(*) as COUNT FROM V_AGENT_INCL_GROUP_ID as SA with (NOLOCK) LEFT OUTER JOIN PATTERN PAT on SA.PATTERN_IDX=PAT.PATTERN_IDX INNER JOIN V_GROUPS G on G.ID=SA.GROUP_ID INNER JOIN V_SERVERS P on P.ID=SA.LAST_SERVER_ID INNER JOIN V_DOMAINS S on S.ID=SA.DOMAIN_ID INNER JOIN IDENTITY_MAP Q on Q.ID=SA.LAST_SITE_ID INNER JOIN V_SEM_COMPUTER I on I.COMPUTER_ID=SA.COMPUTER_ID WHERE I.DELETED = 0 and SA.DELETED = 0 and P.NAME != '' GROUP BY STATUS ORDER BY STATUS DESC END
2017-08-02 15:36:04.345 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='NOTIFICATIONALERTS' AND COLUMN_NAME = 'VISIBILITY_FLAGS') BEGIN ALTER TABLE NOTIFICATIONALERTS ADD VISIBILITY_FLAGS INT NULL END
2017-08-02 15:36:04.345 THREAD 31 INFO: IF(OBJECT_ID('SEM_CRITICAL_EVENTS_INFO')>0) BEGIN DROP PROCEDURE SEM_CRITICAL_EVENTS_INFO END
2017-08-02 15:36:04.423 THREAD 31 INFO: CREATE PROCEDURE SEM_CRITICAL_EVENTS_INFO( IN @Acknowledged SMALLINT, IN @VisibilityFlag SMALLINT ) AS BEGIN select NA.IDX AS Event_ID ,NA.ALERTDATETIME,NA.SUBJECT,NA.MSG AS EVENT_MESSAGE,NA.ACKNOWLEDGED FROM NOTIFICATIONALERTS AS NA WHERE NA.ACKNOWLEDGED= @Acknowledged AND NA.VISIBILITY_FLAGS = @VisibilityFlag END
2017-08-02 15:36:04.485 THREAD 31 INFO: IF(OBJECT_ID('SEM_ACKNOWLEDGE_CRITICAL_EVENTS')>0) BEGIN DROP PROCEDURE SEM_ACKNOWLEDGE_CRITICAL_EVENTS END
2017-08-02 15:36:04.517 THREAD 31 INFO: CREATE PROCEDURE SEM_ACKNOWLEDGE_CRITICAL_EVENTS( IN @EventID char(32), IN @Usn BIGINT, IN @Time_Stamp BIGINT, IN @AcknowledgedTime DATETIME , IN @VisibilityFlag INT, IN @Acknowledged INT ) AS BEGIN update notificationalerts set Acknowledged = @Acknowledged, USN = @Usn, TIME_STAMP = @Time_Stamp, ACKNOWLEDGED_TIME=@AcknowledgedTime where Idx =@EventID AND VISIBILITY_FLAGS = @VisibilityFlag END
2017-08-02 15:36:04.595 THREAD 31 INFO: IF(OBJECT_ID('SEM_CLIENT_VERSION')>0) BEGIN DROP PROCEDURE SEM_CLIENT_VERSION END
2017-08-02 15:36:04.610 THREAD 31 INFO: CREATE PROCEDURE SEM_CLIENT_VERSION AS BEGIN select AGENT_VERSION,COUNT(*)as CLIENT_COUNT from V_AGENT_INCL_GROUP_ID where DELETED = 0 group by AGENT_VERSION END
2017-08-02 15:36:04.641 THREAD 31 INFO: IF(OBJECT_ID('SEM_REPORT_GET_CONTENT_DOWNLOAD_SOURCE')>0) BEGIN DROP PROCEDURE SEM_REPORT_GET_CONTENT_DOWNLOAD_SOURCE END
2017-08-02 15:36:04.688 THREAD 31 INFO: CREATE PROCEDURE SEM_REPORT_GET_CONTENT_DOWNLOAD_SOURCE AS BEGIN SET NOCOUNT ON SELECT T1.SOURCE_TYPE, ISNULL(T2.AGENT_COUNT, T1.AGENT_COUNT) AS AGENT_COUNT FROM (SELECT '1:SEPM' AS SOURCE_TYPE, 0 AS AGENT_COUNT UNION ALL SELECT '2:GUP', 0 UNION ALL SELECT '3:PUBLIC_LU', 0 UNION ALL SELECT '4:INTERNAL_LUA', 0 UNION ALL SELECT '5:OTHER', 0) AS T1 LEFT JOIN ( SELECT ISNULL(T.SOURCE_TYPE, '5:OTHER') AS SOURCE_TYPE, COUNT(*) AGENT_COUNT FROM SEM_AGENT AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER I ON I.COMPUTER_ID=SA.COMPUTER_ID LEFT OUTER JOIN ( SELECT DISTINCT L1.COMPUTER_ID, CASE WHEN L2.EVENT_DESC LIKE '%management server%' THEN '1:SEPM'WHEN L2.EVENT_DESC LIKE '%Group Update Provider successfully%' THEN '2:GUP'WHEN (L2.EVENT_DESC LIKE '%symantecliveupdate.com%'OR L2.EVENT_DESC LIKE '%liveupdate.symantec.com%'OR L2.EVENT_DESC LIKE '%update.symantec.com%') AND L2.EVENT_DESC LIKE '%LiveUpdate was successfully%' THEN '3:PUBLIC_LU'WHEN (L2.EVENT_DESC NOT LIKE '%symantecliveupdate.com%' AND L2.EVENT_DESC NOT LIKE '%liveupdate.symantec.com%' AND L2.EVENT_DESC NOT LIKE '%update.symantec.com%') AND L2.EVENT_DESC LIKE '%LiveUpdate was successfully%' THEN '4:INTERNAL_LUA'ELSE '5:OTHER' END AS SOURCE_TYPE FROM (SELECT COMPUTER_ID, MAX(EVENT_TIME) AS MAX_EVENT_TIME FROM V_AGENT_SYSTEM_LOG WHERE EVENT_ID IN ('302449420', '302450688') AND SEVERITY = 0 AND EVENT_DESC LIKE '%downloaded%'GROUP BY COMPUTER_ID) L1 JOIN V_AGENT_SYSTEM_LOG L2 ON L2.COMPUTER_ID = L1.COMPUTER_ID AND L2.EVENT_TIME = L1.MAX_EVENT_TIME JOIN SEM_COMPUTER C ON C.COMPUTER_ID = L2.COMPUTER_ID WHERE L2.EVENT_ID IN ('302449420', '302450688') AND L2.SEVERITY = 0 AND EVENT_DESC LIKE '%downloaded%' ) AS T ON SA.COMPUTER_ID = T.COMPUTER_ID WHERE I.DELETED = 0 AND SA.DELETED = 0 GROUP BY SOURCE_TYPE ) AS T2 ON T1.SOURCE_TYPE = T2.SOURCE_TYPE ORDER BY T1.SOURCE_TYPE END
2017-08-02 15:36:04.735 THREAD 31 INFO: IF(OBJECT_ID('SEM_REPORT_GET_RISK_DISTRIBUTION')>0) BEGIN DROP PROCEDURE SEM_REPORT_GET_RISK_DISTRIBUTION END
2017-08-02 15:36:04.797 THREAD 31 INFO: CREATE PROCEDURE SEM_REPORT_GET_RISK_DISTRIBUTION ( IN @StartDate DATETIME, IN @EndDate DATETIME ) AS BEGIN DECLARE @StartDateInMS BIGINT, @EndDateInMS BIGINT SELECT @StartDateInMS = CAST(DATEDIFF(SECOND , '1970-01-01', @StartDate) AS BIGINT) * 1000, @EndDateInMS = CAST(DATEDIFF(SECOND , '1970-01-01', @EndDate) AS BIGINT) * 1000 SELECT * FROM (SELECT SUM(CASE WHEN AP_ONOFF = 1 THEN 1 ELSE 0 END) AS AV_CLIENT_COUNT, SUM(CASE WHEN PTP_ONOFF = 1 THEN 1 ELSE 0 END) AS SONAR_CLIENT_COUNT, SUM(CASE WHEN DA_ONOFF = 1 THEN 1 ELSE 0 END) AS DI_CLIENT_COUNT, SUM(CASE WHEN (CIDS_DRV_ONOFF=1 OR CIDS_BROWSER_IE_ONOFF=1 OR CIDS_BROWSER_FF_ONOFF=1) THEN 1 ELSE 0 END) AS IP_CLIENT_COUNT FROM SEM_AGENT WHERE DELETED=0 OR DELETED is NULL) AS T1, (SELECT ISNULL(SUM(CASE WHEN ((V.TYPE != 3 AND V.TYPE != 10014 AND V.DETECTION_TYPE=0) OR (V.TYPE = 3 AND V.DETECTION_TYPE=1)) THEN A.NOOFVIRUSES ELSE 0 END), 0) AS AV_RISK_COUNT, ISNULL(SUM(CASE WHEN (A.SOURCE != 'Heuristic Scan' AND V.TYPE = 18) THEN A.NOOFVIRUSES ELSE 0 END), 0) AS DI_RISK_COUNT, ISNULL(SUM(CASE WHEN (A.SOURCE= 'Heuristic Scan' AND V.TYPE != 502 AND HP.DETECTION_TYPE NOT IN(3,4)) THEN A.NOOFVIRUSES ELSE 0 END), 0) AS SONAR_RISK_COUNT, ISNULL((SELECT SUM(ATL.REPETITION) FROM V_AGENT_SECURITY_LOG AS ATL INNER JOIN V_SEM_COMPUTER I ON I.COMPUTER_ID=ATL.COMPUTER_ID WHERE ATL.EVENT_ID IN (206,249) AND ATL.TRAFFIC_DIRECTION IN (1,2) AND ATL.EVENT_TIME BETWEEN @StartDateInMS AND @EndDateInMS AND I.DELETED = 0), 0) AS IP_RISK_COUNT FROM ALERTS AS A WITH (NOLOCK) INNER JOIN V_VIRUS V WITH (NOLOCK) ON A.VIRUSNAME_IDX = V.VIRUSNAME_IDX INNER JOIN V_SEM_COMPUTER AS I WITH (NOLOCK) ON A.COMPUTER_IDX = I.COMPUTER_ID INNER JOIN V_HPP_APPLICATION_RISK HP WITH (NOLOCK) ON A.HPP_APP_IDX = HP.APP_IDX WHERE A.MOTHER_IDX = '' AND A.ALERT_IDX in (1,2,5,6,10) AND A.DELETED=0 and I.DELETED=0 AND A.ALERTDATETIME BETWEEN @StartDate AND @EndDate) AS T2 END
2017-08-02 15:36:04.875 THREAD 31 INFO: IF(OBJECT_ID('SEM_REPORT_CLIENT_INFECTION_HISTORY')>0) BEGIN DROP PROCEDURE SEM_REPORT_CLIENT_INFECTION_HISTORY END
2017-08-02 15:36:04.922 THREAD 31 INFO: CREATE PROCEDURE SEM_REPORT_CLIENT_INFECTION_HISTORY( @StartAt DATETIME, @EndAt DATETIME, @TzOffsetInMinutes SMALLINT, @ReportType VARCHAR(5) ) AS BEGIN IF @ReportType = 'DAY' /* DAILY VIEW */ BEGIN SELECT D.[YEAR], D.[MONTH], NULL AS [WEEK], D.DAY_NUM_OF_MONTH AS [DAY], NULL AS [HOUR], COUNT(DISTINCT COMPUTER_IDX) AS INFECTION_COUNT FROM (SELECT COMPUTER_IDX, DATEADD(MINUTE, @TzOffsetInMinutes, INFECTED_DATETIME) AS INFECTED_DATETIME, /* Handle local date conversion */ DATEADD(MINUTE, @TzOffsetInMinutes, CLEARED_DATETIME) AS CLEARED_DATETIME FROM V_INFECTED_AGENT_HISTORY) AS H, DATE_DIMENSION AS D WHERE (D.CALENDAR_DATE > H.INFECTED_DATETIME OR CONVERT(VARCHAR(10), H.INFECTED_DATETIME, 111) = D.[YYYY/MM/DD]) AND D.CALENDAR_DATE >= @StartAt AND D.CALENDAR_DATE < @EndAt AND (H.INFECTED_DATETIME BETWEEN @StartAt AND @EndAt OR H.CLEARED_DATETIME BETWEEN @StartAt AND @EndAt OR (H.INFECTED_DATETIME < @StartAt AND H.CLEARED_DATETIME IS NULL)) AND (D.CALENDAR_DATE < H.CLEARED_DATETIME OR H.CLEARED_DATETIME IS NULL) GROUP BY D.[YEAR], D.[MONTH], D.DAY_NUM_OF_MONTH ORDER BY D.[YEAR], D.[MONTH], D.DAY_NUM_OF_MONTH END ELSE IF @ReportType = 'WEEK' /* WEEKLY VIEW */ BEGIN /* Use Sunday of the week to represent WEEK since the week number has the shifting issue, the format is yyyyMMdd, i.e. */ SELECT D.[YEAR], NULL AS [MONTH], CAST(CONVERT(VARCHAR(10), DATEADD(DAY, -DATEPART(DW, D.CALENDAR_DATE) + 1, D.CALENDAR_DATE), 112) AS INT) AS [WEEK], NULL AS [DAY], NULL AS [HOUR], COUNT(DISTINCT COMPUTER_IDX) AS INFECTION_COUNT FROM (SELECT COMPUTER_IDX, DATEADD(MINUTE, @TzOffsetInMinutes, INFECTED_DATETIME) AS INFECTED_DATETIME, /* Handle local date conversion */ DATEADD(MINUTE, @TzOffsetInMinutes, CLEARED_DATETIME) AS CLEARED_DATETIME FROM V_INFECTED_AGENT_HISTORY) AS H, DATE_DIMENSION AS D WHERE (D.CALENDAR_DATE > H.INFECTED_DATETIME OR CONVERT(VARCHAR(10), H.INFECTED_DATETIME, 111) = D.[YYYY/MM/DD]) AND D.CALENDAR_DATE >= @StartAt AND D.CALENDAR_DATE < @EndAt AND (H.INFECTED_DATETIME BETWEEN @StartAt AND @EndAt OR H.CLEARED_DATETIME BETWEEN @StartAt AND @EndAt OR (H.INFECTED_DATETIME < @StartAt AND H.CLEARED_DATETIME IS NULL)) AND (D.CALENDAR_DATE < H.CLEARED_DATETIME OR H.CLEARED_DATETIME IS NULL) GROUP BY D.[YEAR], CAST(CONVERT(VARCHAR(10), DATEADD(DAY, -DATEPART(DW, D.CALENDAR_DATE) + 1, D.CALENDAR_DATE), 112) AS INT) ORDER BY D.[YEAR], 3 END ELSE IF @ReportType = 'MONTH' /* MONTHLY VIEW */ BEGIN SELECT D.[YEAR], D.[MONTH] AS [MONTH], NULL AS [WEEK], NULL AS [DAY], NULL AS [HOUR], COUNT(DISTINCT COMPUTER_IDX) AS INFECTION_COUNT FROM (SELECT COMPUTER_IDX, DATEADD(MINUTE, @TzOffsetInMinutes, INFECTED_DATETIME) AS INFECTED_DATETIME, /* Handle local date conversion */ DATEADD(MINUTE, @TzOffsetInMinutes, CLEARED_DATETIME) AS CLEARED_DATETIME FROM V_INFECTED_AGENT_HISTORY) AS H, DATE_DIMENSION AS D WHERE (D.CALENDAR_DATE > H.INFECTED_DATETIME OR CONVERT(VARCHAR(10), H.INFECTED_DATETIME, 111) = D.[YYYY/MM/DD]) AND D.CALENDAR_DATE >= @StartAt AND D.CALENDAR_DATE < @EndAt AND (H.INFECTED_DATETIME BETWEEN @StartAt AND @EndAt OR H.CLEARED_DATETIME BETWEEN @StartAt AND @EndAt OR (H.INFECTED_DATETIME < @StartAt AND H.CLEARED_DATETIME IS NULL)) AND (D.CALENDAR_DATE < H.CLEARED_DATETIME OR H.CLEARED_DATETIME IS NULL) GROUP BY D.[YEAR], D.[MONTH] ORDER BY D.[YEAR], D.[MONTH] END ELSE IF @ReportType = 'HOUR' /* HOURLY VIEW */ BEGIN SELECT D.[YEAR], D.[MONTH], NULL AS [WEEK], D.DAY_NUM_OF_MONTH AS [DAY], T.HOUR_ID AS [HOUR], COUNT(DISTINCT COMPUTER_IDX) AS INFECTION_COUNT FROM (SELECT COMPUTER_IDX, DATEADD(MINUTE, @TzOffsetInMinutes, INFECTED_DATETIME) AS INFECTED_DATETIME, /* Handle local date conversion */ DATEADD(MINUTE, @TzOffsetInMinutes, CLEARED_DATETIME) AS CLEARED_DATETIME FROM V_INFECTED_AGENT_HISTORY) AS H, DATE_DIMENSION AS D, TIME_OF_DAY AS T WHERE (DATEADD(HOUR, T.HOUR_ID, D.CALENDAR_DATE) > H.INFECTED_DATETIME OR CONVERT(VARCHAR(10), H.INFECTED_DATETIME, 111) = D.[YYYY/MM/DD]) AND DATEADD(HOUR, T.HOUR_ID, D.CALENDAR_DATE) >= @StartAt AND DATEADD(HOUR, T.HOUR_ID, D.CALENDAR_DATE) < @EndAt AND (H.INFECTED_DATETIME BETWEEN @StartAt AND @EndAt OR H.CLEARED_DATETIME BETWEEN @StartAt AND @EndAt OR (H.INFECTED_DATETIME < @StartAt AND H.CLEARED_DATETIME IS NULL)) AND (DATEADD(HOUR, T.HOUR_ID, D.CALENDAR_DATE) < H.CLEARED_DATETIME OR H.CLEARED_DATETIME IS NULL) GROUP BY D.[YEAR], D.[MONTH], D.DAY_NUM_OF_MONTH, T.HOUR_ID ORDER BY D.[YEAR], D.[MONTH], D.DAY_NUM_OF_MONTH, T.HOUR_ID END END
2017-08-02 15:36:05.047 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_AGENT' AND C.NAME='EDR_STATUS') BEGIN ALTER TABLE SEM_AGENT ADD EDR_STATUS TINYINT NULL END
2017-08-02 15:36:05.063 THREAD 31 INFO: IF NOT EXISTS (SELECT C.NAME FROM SYSOBJECTS S, SYSCOLUMNS C WHERE C.ID = S.ID AND S.NAME = 'SEM_AGENT' AND C.NAME='ATP_SERVER') BEGIN ALTER TABLE SEM_AGENT ADD ATP_SERVER VARCHAR(300) NULL END
2017-08-02 15:36:05.063 THREAD 31 INFO: DROP TABLE UPGRADE_CONTENT_LOOKUP
2017-08-02 15:36:05.078 THREAD 31 INFO: CREATE TABLE UPGRADE_CONTENT_LOOKUP ( CLIENT_VERSION int NOT NULL, OS varchar(50) NOT NULL, CONTENT_TYPE varchar(50) NOT NULL, CONTENT_ZIP_FILE_NAME varchar(50) NOT NULL, CLIENT_MONIKER varchar(50) NOT NULL )
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN32BIT','CIDS','IDS','{55DE35DC-862A-44c9-8A2B-3EF451665D0A}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN64BIT','CIDS','IDS','{55DE35DC-862A-44c9-8A2B-3EF451665D0A}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN32BIT','IRON Whitelist','IronWL','{EDBD3BD0-8395-4d4d-BAC9-19DD32EF4758}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN64BIT','IRON Whitelist','IronWL','{EDBD3BD0-8395-4d4d-BAC9-19DD32EF4758}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN32BIT','IRON Revocation','IronRevoke','{810D5A61-809F-49c2-BD75-177F0647D2BA}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN64BIT','IRON Revocation','IronRevoke','{810D5A61-809F-49c2-BD75-177F0647D2BA}')
2017-08-02 15:36:05.109 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN32BIT','IRON Reputation','Iron','{263395A0-D3D8-4be4-80B5-202C94EF4AA0}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN64BIT','IRON Reputation','Iron','{263395A0-D3D8-4be4-80B5-202C94EF4AA0}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN32BIT','BASH','Bash','{D6AEBC07-D833-485f-9723-6C908D37F806}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12100000,'WIN64BIT','BASH','Bash','{D6AEBC07-D833-485f-9723-6C908D37F806}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12120000,'WIN32BIT','EFAVT','EFAVT','{E8827B4A-4F58-4dea-8C93-07B32A63D1C5}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12120000,'WIN64BIT','EFAVT','EFAVT','{E8827B4A-4F58-4dea-8C93-07B32A63D1C5}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12150000,'WIN32BIT','SMR','SMR','{5A7367E1-D1F6-43b5-BD94-4AFFA896D724}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12150000,'WIN64BIT','SMR','SMR','{5A7367E1-D1F6-43b5-BD94-4AFFA896D724}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN32BIT','RAV_DEFS','V3','{7C177419-4112-42B6-8CEF-094385474554}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN64BIT','RAV_DEFS','V3','{67F66706-F04B-4432-9947-F8354949D2A6}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN32BIT','AV_DEFS','V15','{1A79EE79-891B-4CB6-9A00-8D07FC6BF1FF}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN64BIT','AV_DEFS','V15','{151387BE-8D1C-467D-8B7A-AC215B16A144}')
2017-08-02 15:36:05.125 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN32BIT','EDR','EDR','{03485132-6B4C-4075-8B19-3BE002B2AE80}')
2017-08-02 15:36:05.141 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN64BIT','EDR','EDR','{03485132-6B4C-4075-8B19-3BE002B2AE80}')
2017-08-02 15:36:05.141 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN32BIT','STIC','STIC','{075551EC-66BD-4487-9E2E-40645AF6F8B0}')
2017-08-02 15:36:05.141 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN64BIT','STIC','STIC','{075551EC-66BD-4487-9E2E-40645AF6F8B0}')
2017-08-02 15:36:05.156 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN32BIT','CIDS','IDS','{55DE35DC-862A-44c9-8A2B-3EF451665D0A}')
2017-08-02 15:36:05.156 THREAD 31 INFO: INSERT INTO UPGRADE_CONTENT_LOOKUP(CLIENT_VERSION,OS,CONTENT_TYPE,CONTENT_ZIP_FILE_NAME,CLIENT_MONIKER) VALUES (12200000,'WIN64BIT','CIDS','IDS','{55DE35DC-862A-44c9-8A2B-3EF451665D0A}')
2017-08-02 15:36:05.156 THREAD 31 INFO: IF(OBJECT_ID('VERSION_NTH_PART')>0) BEGIN DROP FUNCTION VERSION_NTH_PART END
2017-08-02 15:36:05.203 THREAD 31 INFO: /* Returns part of the version string. Index Starts from 1 * VERSION_NTH_PART('12.1.670.4000',3) -> returns 670 as integer */ CREATE FUNCTION VERSION_NTH_PART (@VERSION_STRING VARCHAR(50), @PART_NO INTEGER ) RETURNS INTEGER AS BEGIN DECLARE @RETURN_VALUE INTEGER DECLARE @START_INDEX INTEGER DECLARE @END_INDEX INTEGER DECLARE @PART_TEMP INTEGER DECLARE @DO_TERMINATE bit DECLARE@PART_TEMP_STR VARCHAR(50) SET @RETURN_VALUE = NULL SET @START_INDEX = 1 SET @END_INDEX = 0 SET @PART_TEMP = 0 SET @DO_TERMINATE = 0 IF @VERSION_STRING IS NOT NULL BEGIN SET @RETURN_VALUE = 0 while @PART_TEMP < @PART_NO BEGIN SET @END_INDEX = CHARINDEX('.', @VERSION_STRING) IF @END_INDEX = 0 BEGIN IF @PART_NO - @PART_TEMP > 1 BEGIN SET @DO_TERMINATE = 1 RETURN @RETURN_VALUE END SET @PART_TEMP = @PART_NO SET @END_INDEX = len(@VERSION_STRING) + 1 END ELSE BEGIN SET @PART_TEMP = @PART_TEMP + 1 END IF @PART_TEMP = @PART_NO AND @DO_TERMINATE = 0 BEGIN SET @PART_TEMP_STR = SUBSTRING(@VERSION_STRING, @START_INDEX, @END_INDEX - @START_INDEX) IF ISNUMERIC(@PART_TEMP_STR) = 1 BEGIN SET @RETURN_VALUE = CONVERT(INT, @PART_TEMP_STR)END ELSE BEGIN SET @RETURN_VALUE = 0 END END ELSE BEGIN SET @START_INDEX = @END_INDEX + 1 /* Replacing '.' with '#' so in next iteration charindex call above can get next '.' charindex in sql anywhere have no parameter for offset to start with. */ SET @VERSION_STRING = stuff(@VERSION_STRING, @END_INDEX, 1, '#') END END END RETURN @RETURN_VALUE END
2017-08-02 15:36:05.265 THREAD 31 INFO: IF(OBJECT_ID('COMPARE_VERSION_NUMBERS')>0) BEGIN DROP FUNCTION COMPARE_VERSION_NUMBERS END
2017-08-02 15:36:05.312 THREAD 31 INFO: /* * Compares two version strings and returns * -1 : target has higher version number (later version) * 0 : same * 1 : source has higher version number (later version) */ CREATE FUNCTION COMPARE_VERSION_NUMBERS(@SOURCE VARCHAR(50), @TARGET VARCHAR(50), @NO_OF_PARTS INTEGER = 4 ) RETURNS INTEGER AS BEGIN DECLARE @RETURN_VALUE INTEGER DECLARE @PART_INDEX INTEGER DECLARE @SOURCE_PART_VALUE INTEGER DECLARE @TARGET_PART_VALUE INTEGER SET @RETURN_VALUE = 0 SET @PART_INDEX = 1 SET @SOURCE_PART_VALUE = 0 SET @TARGET_PART_VALUE = 0 /* To avoid long loops incase if caller incorrectly pass large value of @NO_OF_PARTS */ IF @NO_OF_PARTS > 10 BEGIN SET @NO_OF_PARTS = 10 END WHILE (@PART_INDEX <= @NO_OF_PARTS AND @RETURN_VALUE = 0) BEGIN SET @SOURCE_PART_VALUE = VERSION_NTH_PART(@SOURCE, @PART_INDEX) SET @TARGET_PART_VALUE = VERSION_NTH_PART(@TARGET, @PART_INDEX) IF @SOURCE_PART_VALUE > @TARGET_PART_VALUE SET @RETURN_VALUE = 1 ELSE IF @SOURCE_PART_VALUE < @TARGET_PART_VALUE SET @RETURN_VALUE = -1 SET @PART_INDEX = @PART_INDEX + 1 END RETURN @RETURN_VALUE END
2017-08-02 15:36:05.359 THREAD 31 INFO: ALTER TABLE VIRUS MODIFY CATEGORY DEFAULT 1
2017-08-02 15:36:07.465 THREAD 31 INFO: UPDATE VIRUS SET CATEGORY = 1 WHERE CATEGORY = -1 OR CATEGORY = 0
2017-08-02 15:36:07.559 THREAD 31 INFO: ALTER TABLE VIRUS MODIFY MAXCATEGORY DEFAULT 1
2017-08-02 15:36:08.822 THREAD 31 INFO: UPDATE VIRUS SET MAXCATEGORY = 1 WHERE MAXCATEGORY = -1 OR MAXCATEGORY = 0
2017-08-02 15:36:08.916 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=INVENTORYREPORT,col_idx=INVENTORYFILTER_IDX
2017-08-02 15:36:08.931 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=INVENTORYREPORT, idx_constraint=PK_INVENTORYREPORT
2017-08-02 15:36:08.931 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_INVENTORYREPORT' ) ALTER TABLE INVENTORYREPORT DROP CONSTRAINT PK_INVENTORYREPORT
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=INVENTORYREPORT
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=INVENTORYREPORT
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=INVENTORYREPORT
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=INVENTORYREPORT, idx_del_list=[]
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=INVENTORYREPORT
2017-08-02 15:36:09.353 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=INVENTORYREPORT
2017-08-02 15:36:09.696 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=INVENTORYREPORT
2017-08-02 15:36:09.696 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=INVENTORYREPORT
2017-08-02 15:36:09.696 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=ALERTFILTER,col_idx=ALERTFILTER_IDX
2017-08-02 15:36:09.696 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=ALERTFILTER, idx_constraint=PK_ALERTFILTER
2017-08-02 15:36:09.696 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_ALERTFILTER' ) ALTER TABLE ALERTFILTER DROP CONSTRAINT PK_ALERTFILTER
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=ALERTFILTER
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=ALERTFILTER
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=ALERTFILTER
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=ALERTFILTER, idx_del_list=[]
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=ALERTFILTER
2017-08-02 15:36:10.055 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=ALERTFILTER
2017-08-02 15:36:10.491 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=ALERTFILTER
2017-08-02 15:36:10.491 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=ALERTFILTER
2017-08-02 15:36:10.491 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=AUDIT_REPORT,col_idx=AUDITFILTER_IDX
2017-08-02 15:36:10.491 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=AUDIT_REPORT, idx_constraint=PK_AUDITREPORT
2017-08-02 15:36:10.491 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_AUDITREPORT' ) ALTER TABLE AUDIT_REPORT DROP CONSTRAINT PK_AUDITREPORT
2017-08-02 15:36:11.162 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=AUDIT_REPORT
2017-08-02 15:36:11.178 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=AUDIT_REPORT
2017-08-02 15:36:11.178 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=AUDIT_REPORT
2017-08-02 15:36:11.178 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=AUDIT_REPORT, idx_del_list=[]
2017-08-02 15:36:11.178 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=AUDIT_REPORT
2017-08-02 15:36:11.178 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=AUDIT_REPORT
2017-08-02 15:36:11.693 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=AUDIT_REPORT
2017-08-02 15:36:11.693 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=AUDIT_REPORT
2017-08-02 15:36:11.693 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=BEHAVIOR_REPORT,col_idx=BEHAVIORFILTER_IDX
2017-08-02 15:36:11.693 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=BEHAVIOR_REPORT, idx_constraint=PK_BEHAVIORREPORT
2017-08-02 15:36:11.693 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_BEHAVIORREPORT' ) ALTER TABLE BEHAVIOR_REPORT DROP CONSTRAINT PK_BEHAVIORREPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=BEHAVIOR_REPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=BEHAVIOR_REPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=BEHAVIOR_REPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=BEHAVIOR_REPORT, idx_del_list=[]
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=BEHAVIOR_REPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=BEHAVIOR_REPORT
2017-08-02 15:36:12.005 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, update default value sql=UPDATE BEHAVIOR_REPORT SET BEHAVIORTYPE=0 WHERE BEHAVIORTYPE IS NULL
2017-08-02 15:36:12.005 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, convert nullable column sql=ALTER TABLE BEHAVIOR_REPORT MODIFY BEHAVIORTYPE NOT NULL DEFAULT 0
2017-08-02 15:36:12.894 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=BEHAVIOR_REPORT
2017-08-02 15:36:12.894 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=BEHAVIOR_REPORT
2017-08-02 15:36:12.894 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=COMPLIANCE_REPORT,col_idx=COMPLIANCEFILTER_IDX
2017-08-02 15:36:12.894 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=COMPLIANCE_REPORT, idx_constraint=PK_COMPLIANCEREPORT
2017-08-02 15:36:12.894 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_COMPLIANCEREPORT' ) ALTER TABLE COMPLIANCE_REPORT DROP CONSTRAINT PK_COMPLIANCEREPORT
2017-08-02 15:36:13.206 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=COMPLIANCE_REPORT
2017-08-02 15:36:13.206 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=COMPLIANCE_REPORT
2017-08-02 15:36:13.221 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=COMPLIANCE_REPORT
2017-08-02 15:36:13.221 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=COMPLIANCE_REPORT, idx_del_list=[]
2017-08-02 15:36:13.221 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=COMPLIANCE_REPORT
2017-08-02 15:36:13.221 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=COMPLIANCE_REPORT
2017-08-02 15:36:13.221 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, update default value sql=UPDATE COMPLIANCE_REPORT SET COMPLIANCE_TYPE=0 WHERE COMPLIANCE_TYPE IS NULL
2017-08-02 15:36:13.221 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, convert nullable column sql=ALTER TABLE COMPLIANCE_REPORT MODIFY COMPLIANCE_TYPE NOT NULL DEFAULT 0
2017-08-02 15:36:13.861 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=COMPLIANCE_REPORT
2017-08-02 15:36:13.861 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=COMPLIANCE_REPORT
2017-08-02 15:36:13.861 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=COMMAND_REPORT,col_idx=COMMANDFILTER_IDX
2017-08-02 15:36:13.861 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=COMMAND_REPORT, idx_constraint=PK_COMMANDREPORT
2017-08-02 15:36:13.861 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_COMMANDREPORT' ) ALTER TABLE COMMAND_REPORT DROP CONSTRAINT PK_COMMANDREPORT
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=COMMAND_REPORT
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=COMMAND_REPORT
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=COMMAND_REPORT
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=COMMAND_REPORT, idx_del_list=[]
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=COMMAND_REPORT
2017-08-02 15:36:14.391 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=COMMAND_REPORT
2017-08-02 15:36:14.844 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=COMMAND_REPORT
2017-08-02 15:36:14.844 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=COMMAND_REPORT
2017-08-02 15:36:14.859 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=THREATREPORT,col_idx=THREATFILTER_IDX
2017-08-02 15:36:14.859 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=THREATREPORT, idx_constraint=PK_THREATREPORT
2017-08-02 15:36:14.859 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_THREATREPORT' ) ALTER TABLE THREATREPORT DROP CONSTRAINT PK_THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=THREATREPORT, idx_del_list=[]
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=THREATREPORT
2017-08-02 15:36:15.359 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, update default value sql=UPDATE THREATREPORT SET FILTER_TYPE=0 WHERE FILTER_TYPE IS NULL
2017-08-02 15:36:15.359 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, convert nullable column sql=ALTER TABLE THREATREPORT MODIFY FILTER_TYPE NOT NULL DEFAULT 0
2017-08-02 15:36:16.107 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=THREATREPORT
2017-08-02 15:36:16.107 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=THREATREPORT
2017-08-02 15:36:16.107 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=FIREWALL_REPORT,col_idx=FIREWALLFILTER_IDX
2017-08-02 15:36:16.107 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=FIREWALL_REPORT, idx_constraint=PK_FIREWALLREPORT
2017-08-02 15:36:16.107 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_FIREWALLREPORT' ) ALTER TABLE FIREWALL_REPORT DROP CONSTRAINT PK_FIREWALLREPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=FIREWALL_REPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=FIREWALL_REPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=FIREWALL_REPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=FIREWALL_REPORT, idx_del_list=[]
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=FIREWALL_REPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=FIREWALL_REPORT
2017-08-02 15:36:16.497 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, update default value sql=UPDATE FIREWALL_REPORT SET FIREWALLTYPE=0 WHERE FIREWALLTYPE IS NULL
2017-08-02 15:36:16.497 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, convert nullable column sql=ALTER TABLE FIREWALL_REPORT MODIFY FIREWALLTYPE NOT NULL DEFAULT 0
2017-08-02 15:36:17.215 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=FIREWALL_REPORT
2017-08-02 15:36:17.215 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=FIREWALL_REPORT
2017-08-02 15:36:17.215 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=SCANREPORT,col_idx=SCANFILTER_IDX
2017-08-02 15:36:17.215 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=SCANREPORT, idx_constraint=PK_SCANREPORT
2017-08-02 15:36:17.215 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_SCANREPORT' ) ALTER TABLE SCANREPORT DROP CONSTRAINT PK_SCANREPORT
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=SCANREPORT
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=SCANREPORT
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=SCANREPORT
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=SCANREPORT, idx_del_list=[]
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=SCANREPORT
2017-08-02 15:36:17.558 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=SCANREPORT
2017-08-02 15:36:17.901 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=SCANREPORT
2017-08-02 15:36:17.901 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=SCANREPORT
2017-08-02 15:36:17.901 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: Begin... table=SYSTEM_REPORT,col_idx=SYSTEMFILTER_IDX
2017-08-02 15:36:17.901 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: Begin... table=SYSTEM_REPORT, idx_constraint=PK_SYSTEMREPORT
2017-08-02 15:36:17.901 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey, sql=IF EXISTS (SELECT object_id FROM SYSIDX WHERE index_category=1 and index_name= 'PK_SYSTEMREPORT' ) ALTER TABLE SYSTEM_REPORT DROP CONSTRAINT PK_SYSTEMREPORT
2017-08-02 15:36:18.307 THREAD 31 INFO: FilterTableUpgrader>>dropOldPrimaryKey: End. table=SYSTEM_REPORT
2017-08-02 15:36:18.307 THREAD 31 INFO: FilterTableUpgrader>>checkTable: Begin... table=SYSTEM_REPORT
2017-08-02 15:36:18.307 THREAD 31 INFO: FilterTableUpgrader>>checkTable: End. table=SYSTEM_REPORT
2017-08-02 15:36:18.322 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: Begin... table=SYSTEM_REPORT, idx_del_list=[]
2017-08-02 15:36:18.322 THREAD 31 INFO: FilterTableUpgrader>>delDuplicateFilters: End. table=SYSTEM_REPORT
2017-08-02 15:36:18.322 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: Begin... table=SYSTEM_REPORT
2017-08-02 15:36:18.322 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, update default value sql=UPDATE SYSTEM_REPORT SET SYSTEM_TYPE=0 WHERE SYSTEM_TYPE IS NULL
2017-08-02 15:36:18.322 THREAD 31 INFO: CovertEmbeddedDBNullableColumn, convert nullable column sql=ALTER TABLE SYSTEM_REPORT MODIFY SYSTEM_TYPE NOT NULL DEFAULT 0
2017-08-02 15:36:19.399 THREAD 31 INFO: FilterTableUpgrader>>createNewPrimaryKey: End. table=SYSTEM_REPORT
2017-08-02 15:36:19.399 THREAD 31 INFO: FilterTableUpgrader>>doUpgrade: End. table=SYSTEM_REPORT
2017-08-02 15:36:19.399 THREAD 31 INFO: Process SQL script file:EmbeddedLamborghiniCustomerPreviewToLamborghiniBeta.sql
2017-08-02 15:36:19.414 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@f575e95
2017-08-02 15:36:19.414 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : ALTER TABLE NOTIFICATION MODIFY DAMPER BIGINT NOT NULL DEFAULT 0
2017-08-02 15:36:19.414 THREAD 31 INFO: ALTER TABLE NOTIFICATION MODIFY DAMPER BIGINT NOT NULL DEFAULT 0
2017-08-02 15:36:19.742 THREAD 31 INFO: UPDATE UPGRADE_CONTENT_LOOKUP SET CLIENT_VERSION=14000000 WHERE CLIENT_VERSION=12200000
2017-08-02 15:36:19.742 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_UNMANAGED_MACHINES
2017-08-02 15:36:19.773 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_UNMANAGED_MACHINES( IN @userId varchar(32), IN @InputXml ntext, IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(*) as anzahl from (SELECT DISTINCT L.MAC_ADDRESS, L.IP_ADDRESS, COM.COMPUTER_NAME FROM LAN_DEVICE_DETECTED L with (NOLOCK), SEM_COMPUTER COM with (NOLOCK), V_AGENT_INCL_GROUP_ID SA with (NOLOCK) WHERE L.COMPUTER_ID = COM.COMPUTER_ID AND L.DELETED = 0 AND COM.DELETED = 0 AND COM.COMPUTER_ID = SA.COMPUTER_ID AND SA.DELETED = 0 AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR1 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR1 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR2 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR2 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR3 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR3 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR4 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR4 IS NOT NULL) AND NOT EXISTS (SELECT * FROM LAN_DEVICE_EXCLUDED E with (NOLOCK) WHERE L.HASH = E.HASH AND E.DELETED = 0 AND ( (E.EXCLUDE_MODE = 0 AND E.MAC_ADDRESS = L.MAC_ADDRESS) OR (E.EXCLUDE_MODE = 1 AND E.IP_ADDRESS = L.IP_ADDRESS) OR (E.EXCLUDE_MODE = 2 AND L.IP_ADDRESS >= E.IP_RANGE_START AND L.IP_ADDRESS <= E.IP_RANGE_END) ) ) AND EXISTS ( SELECT * FROM SEM_AGENT SA with (NOLOCK) WHERE SA.AGENT_ID = L.AGENT_ID) and SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) ) as UNMANAGED_MACHINES END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'COM.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'COM.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(*) as anzahl from (SELECT DISTINCT L.MAC_ADDRESS, L.IP_ADDRESS, COM.COMPUTER_NAME FROM LAN_DEVICE_DETECTED L with (NOLOCK), V_SEM_COMPUTER COM with (NOLOCK), V_AGENT_INCL_GROUP_ID SA with (NOLOCK) WHERE L.COMPUTER_ID = COM.COMPUTER_ID AND L.DELETED = 0 AND COM.DELETED = 0 AND COM.COMPUTER_ID = SA.COMPUTER_ID AND SA.DELETED = 0 AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR1 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR1 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR2 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR2 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR3 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR3 IS NOT NULL) AND L.MAC_ADDRESS NOT IN (SELECT MAC_ADDR4 FROM SEM_COMPUTER with (NOLOCK) WHERE MAC_ADDR4 IS NOT NULL) AND NOT EXISTS (SELECT * FROM LAN_DEVICE_EXCLUDED E with (NOLOCK) WHERE L.HASH = E.HASH AND E.DELETED = 0 AND ( (E.EXCLUDE_MODE = 0 AND E.MAC_ADDRESS = L.MAC_ADDRESS) OR (E.EXCLUDE_MODE = 1 AND E.IP_ADDRESS = L.IP_ADDRESS) OR (E.EXCLUDE_MODE = 2 AND L.IP_ADDRESS >= E.IP_RANGE_START AND L.IP_ADDRESS <= E.IP_RANGE_END) ) ) AND EXISTS ( SELECT * FROM SEM_AGENT SA with (NOLOCK) WHERE SA.AGENT_ID = L.AGENT_ID) and SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) and SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' ) as UNMANAGED_MACHINES '; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:19.836 THREAD 31 INFO: /* We are no longer supporting the sva or vsic. These calls get rid of the vsic and sva data handlers, and removes any SVA notifications that were setup. */ DELETE FROM DATA_HANDLER WHERE IDX = 'D8AC1FBB6AB4941C00E0E1C6E6752E8B'
2017-08-02 15:36:19.836 THREAD 31 INFO: DELETE FROM DATA_HANDLER WHERE IDX = 'E8AB2FCC9AB4941C00G0G1C6E6753D8A'
2017-08-02 15:36:19.836 THREAD 31 INFO: DELETE FROM NOTIFICATION WHERE TYPE = 'SVA'
2017-08-02 15:36:19.836 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_VENDOR WHERE HYPERVISOR_VENDOR_NAME = 'Unknown' and HYPERVISOR_VENDOR_ID = '0') BEGIN INSERT INTO HYPERVISOR_VENDOR (HYPERVISOR_VENDOR_ID, HYPERVISOR_VENDOR_NAME) VALUES ('0','Unknown') END
2017-08-02 15:36:19.836 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_VENDOR WHERE HYPERVISOR_VENDOR_NAME = 'VMware' and HYPERVISOR_VENDOR_ID = '1') BEGIN INSERT INTO HYPERVISOR_VENDOR (HYPERVISOR_VENDOR_ID, HYPERVISOR_VENDOR_NAME) VALUES ('1','VMware') END
2017-08-02 15:36:19.836 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_VENDOR WHERE HYPERVISOR_VENDOR_NAME = 'Microsoft' and HYPERVISOR_VENDOR_ID = '2') BEGIN INSERT INTO HYPERVISOR_VENDOR (HYPERVISOR_VENDOR_ID, HYPERVISOR_VENDOR_NAME) VALUES ('2','Microsoft') END
2017-08-02 15:36:19.851 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_VENDOR WHERE HYPERVISOR_VENDOR_NAME = 'Citrix' and HYPERVISOR_VENDOR_ID = '3') BEGIN INSERT INTO HYPERVISOR_VENDOR (HYPERVISOR_VENDOR_ID, HYPERVISOR_VENDOR_NAME) VALUES ('3','Citrix') END
2017-08-02 15:36:19.851 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_PATTERN WHERE HYPERVISOR_VENDOR_ID = '1') BEGIN INSERT INTO HYPERVISOR_PATTERN (BIOS_SERIALNUMBER_PREFIX ,MOTHERBOARD_MANUFACTURER_PREFIX ,BIOS_MANUFACTURER_PREFIX , HYPERVISOR_VENDOR_ID) VALUES ('^VMW','','', 1) END
2017-08-02 15:36:19.851 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_PATTERN WHERE HYPERVISOR_VENDOR_ID = '2') BEGIN INSERT INTO HYPERVISOR_PATTERN (BIOS_SERIALNUMBER_PREFIX ,MOTHERBOARD_MANUFACTURER_PREFIX ,BIOS_MANUFACTURER_PREFIX , HYPERVISOR_VENDOR_ID) VALUES ('','^MICROSOFT','', 2) END
2017-08-02 15:36:19.851 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM HYPERVISOR_PATTERN WHERE HYPERVISOR_VENDOR_ID = '3') BEGIN INSERT INTO HYPERVISOR_PATTERN (BIOS_SERIALNUMBER_PREFIX ,MOTHERBOARD_MANUFACTURER_PREFIX ,BIOS_MANUFACTURER_PREFIX , HYPERVISOR_VENDOR_ID) VALUES ('','','^XEN', 3) END
2017-08-02 15:36:19.851 THREAD 31 INFO: DROP VIEW V_AGENT_SECURITY_LOG
2017-08-02 15:36:19.914 THREAD 31 INFO: CREATE VIEW V_AGENT_SECURITY_LOG as SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_SECURITY_LOG_1 UNION ALL SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_SECURITY_LOG_2
2017-08-02 15:36:19.976 THREAD 31 INFO: DROP VIEW V_SECURITY_VIEW
2017-08-02 15:36:20.007 THREAD 31 INFO: CREATE VIEW V_SECURITY_VIEW as SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_SECURITY_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION = 1 FROM V_AGENT_PACKET_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_TRAFFIC_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_BEHAVIOR_LOG
2017-08-02 15:36:20.101 THREAD 31 INFO: DROP PROCEDURE SEM_GETUSN_REPLICATION
2017-08-02 15:36:20.116 THREAD 31 INFO: CREATE PROCEDURE SEM_GETUSN_REPLICATION @withTran int AS BEGIN if (@withTran = 1) BEGIN TRANSACTION SET NOCOUNT ON IF EXISTS (SELECT 1 FROM SEM_REPLICATION_STATE WHERE REPLICATION_STATE = 1) BEGIN UPDATE SE_GLOBAL SET SEQ_NUM = SEQ_NUM + 1 SELECT SEQ_NUM from SE_GLOBAL END ELSE BEGIN IF EXISTS (SELECT 1 FROM SEM_REPLICATION_STATE WHERE GETDATE() >= DATEADD(SECOND, (LAST_UPDATE_TIME + USN_LIFETIME)/1000, '19700101')) BEGIN UPDATE SE_GLOBAL SET SEQ_NUM = SEQ_NUM + 1 UPDATE SEM_REPLICATION_STATE SET LAST_UPDATE_TIME = DATEDIFF(SECOND, '19700101', GETDATE()) * CAST(1000 AS BIGINT) SELECT SEQ_NUM from SE_GLOBAL END ELSE BEGIN SELECT SEQ_NUM from SE_GLOBAL END END if (@withTran = 1) COMMIT TRANSACTION END
2017-08-02 15:36:20.148 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM VIRUSCATEGORY WHERE DYNAUBER = 2 AND DYNACAT = 15) BEGIN INSERT INTO VIRUSCATEGORY(DYNAUBER, DYNACAT, LOCALE, TRANSLATION, CATEGORY_DESC, USN, TIME_STAMP, DELETED) VALUES (2, 15, 1033, 'Cookies', 'Cookie Desc', -1, 0, 0) END
2017-08-02 15:36:20.148 THREAD 31 INFO: DROP TABLE AGENT_DEF_CACHE
2017-08-02 15:36:20.179 THREAD 31 INFO: CREATE TABLE AGENT_DEF_CACHE ( AGENT_ID CHAR(32) NOT NULL CONSTRAINT PK_AGENT_DEF_CACHE PRIMARY KEY, IPS_DEF VARCHAR(255), SONAR_DEF VARCHAR(255), MRCLEAN_DEF VARCHAR(255), AV_DEF VARCHAR(255), REFRESH_TIME DATETIME NOT NULL, REFRESH_USN bigint NOT NULL )
2017-08-02 15:36:20.241 THREAD 31 INFO: DROP PROCEDURE SEM_UPDATE_AGENT_DEF_CACHE
2017-08-02 15:36:20.304 THREAD 31 INFO: CREATE PROCEDURE SEM_UPDATE_AGENT_DEF_CACHE( @FORCE_REFRESH bit ) AS BEGIN SET NOCOUNT ON SET transaction isolation level 1 /* Check if it was ever refrshed in last 5 minutes, if it was ship it!*/ DECLARE @last_refresh_time DATETIME DECLARE @last_refresh_usn BIGINT DECLARE @refresh_time_anchor DATETIME DECLARE @current_max_usn BIGINT DECLARE @usn_content BIGINT DECLARE @usn_pattern BIGINT SET @current_max_usn = 0 SELECT TOP 1 REFRESH_TIME INTO @last_refresh_time FROM AGENT_DEF_CACHE SELECT TOP 1 REFRESH_USN INTO @last_refresh_usn FROM AGENT_DEF_CACHE SELECT @refresh_time_anchor = DATEADD(minute, -5, GETDATE()) SELECT @usn_content = MAX(USN) FROM SEM_CONTENT WITH (NOLOCK) SELECT @usn_pattern = MAX(USN) FROM PATTERN WITH (NOLOCK) /*For windows ERASER_ENGINE and some others would be updated together with SAV_DEF, and they are saved at SEM_CONTENT, so we are OK use SEM_CONTENT for windows. Considering performance factor we only check SEM_AGENT for Linux and Mac OS*/SELECT @usn_agent = (SELECT MAX(USN) FROM SEM_AGENT WITH (NOLOCK) WHERE R_OS_TYPE IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632,269093888) OR (R_OS_TYPE & 0xF0FF0000) IN (0x20000000)) if(@usn_content > @current_max_usn) BEGIN SET @current_max_usn = @usn_content END if(@usn_pattern > @current_max_usn) BEGIN SET @current_max_usn = @usn_pattern END /*For AV definition table SEM_AGENT and PATTERN are used, At AgentLastCheckInTask.java USN is not updated, so it would not be frequently executed due to online status chnages*/if(@usn_agent > @current_max_usn) BEGIN SET @current_max_usn = @usn_agent END /* Only refresh when new data is changed and last refresh time is 5 minutes ago*/ IF(@FORCE_REFRESH != 1) BEGIN IF(@refresh_time_anchor <= @last_refresh_time OR @current_max_usn <= @last_refresh_usn) BEGIN /* RAISERROR 23000 'No need refresh the cache table, skip!'*/ RETURN 0 END END DECLARE @ResourceKey VARCHAR(200) DECLARE @Lock VARCHAR(200) SET @ResourceKey = 'AgentDefCache' BEGIN TRAN SELECT @Lock = RESOURCE_KEYFROM SEMAPHORE WITH (XLOCK) WHERE RESOURCE_KEY = @ResourceKey TRUNCATE TABLE AGENT_DEF_CACHE /*Populate the table with agent ID and AV Def*/ INSERT INTO AGENT_DEF_CACHE(AGENT_ID, AV_DEF, REFRESH_TIME, REFRESH_USN) SELECT SA.AGENT_ID, PAT.VERSION, GETDATE(), @current_max_usn FROM SEM_AGENT SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT WITH (NOLOCK) ON SA.PATTERN_IDX=PAT.PATTERN_IDX /*Update IPS Def*/ UPDATE AGENT_DEF_CACHE SET IPS_DEF = ( SELECT MAX(V_IPS.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS WITH (NOLOCK) ON SC.PATTERN_IDX=V_IPS.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_IPS.DELETED IS NULL OR V_IPS.DELETED=0)) /*Update SONAR Def*/ UPDATE AGENT_DEF_CACHE SET SONAR_DEF = ( SELECT MAX(V_SONAR.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_SONAR WITH (NOLOCK) ON SC.PATTERN_IDX=V_SONAR.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_SONAR.DELETED IS NULL OR V_SONAR.DELETED=0)) /*Update MRCLEAN Def*/ UPDATE AGENT_DEF_CACHE SET MRCLEAN_DEF = ( SELECT MAX(V_MR_CLEAN.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_MR_CLEAN WITH (NOLOCK) ON SC.PATTERN_IDX=V_MR_CLEAN.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_MR_CLEAN.DELETED IS NULL OR V_MR_CLEAN.DELETED=0)) COMMIT RETURN 0 END
2017-08-02 15:36:20.366 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT
2017-08-02 15:36:20.397 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @oldestAllowedSig ntext, @oldestAllowedSonar ntext, @oldestAllowedDownloadAdvisor ntext, @avDefsEnabled BIT, @ipsSignaturesEnabled BIT, @sonarDefsEnabled BIT, @downloadAdvisorContentEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; SET NOCOUNT ON; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); /* Update AGENT_DEF_CACHE*/ CALL SEM_UPDATE_AGENT_DEF_CACHE(0); /* Query data from AGENT_DEF_CACHE*/ SET @sql = 'SELECT count(SA.AGENT_ID) AS COUNT FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) AND SA.AGENT_TYPE=105 AND ( (SA.AP_ONOFF NOT IN (2, 127) AND SA.MAJOR_VERSION != 5 AND (SAC.AV_DEF IS NULL OR SAC.AV_DEF <= ''' + @oldestAllowedDef + ''') AND (' + CAST(@avDefsEnabled AS VARCHAR(1)) + ' = 1 )) OR (((SA.MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127))) AND SA.MAJOR_VERSION>10 AND ' + CAST(@ipsSignaturesEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.IPS_DEF IS NULL OR SAC.IPS_DEF <= ''' + @oldestAllowedSig + ''')) OR (SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF NOT IN (2, 127) AND ' + CAST(@sonarDefsEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <= ''' + @oldestAllowedSonar + ''')) OR (SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.DA_ONOFF NOT IN (2, 127) AND SA.CIDS_DRV_ONOFF NOT IN (2, 127) AND ' + CAST(@downloadAdvisorContentEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.MRCLEAN_DEF IS NULL OR SAC.MRCLEAN_DEF <= ''' + @oldestAllowedDownloadAdvisor + ''')) ) '|| @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:20.444 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW
2017-08-02 15:36:20.460 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW( IN @userId varchar(32), IN @InputXml ntext, IN @tooolddef varchar(19), IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID WHERE SA.AGENT_TYPE='105' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) AND (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <=@tooOldDef ) GROUP BY SA.AGENT_ID END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) and (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) AND SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <=''' + @tooOldDef + ''') GROUP BY SA.AGENT_ID'; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:20.506 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_IPS_REDANDYELLOW
2017-08-02 15:36:20.538 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_IPS_REDANDYELLOW( IN @userId varchar(32), IN @InputXml ntext, IN @tooOldDef varchar(19), IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, 'RED' as color FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID WHERE SA.AGENT_TYPE='105' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND (( SA.MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF not in (2, 127)) OR ( SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF not in (2, 127)) OR ( MAJOR_VERSION = 12 AND SA.MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF not in (2, 127)) OR ( MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF not in (2, 127))) and SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) AND (SAC.IPS_DEF IS NULL OR SAC.IPS_DEF <=@tooolddef ) END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, ''RED'' as color FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND (( SA.MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF not in (2, 127)) OR ( SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF not in (2, 127)) OR ( MAJOR_VERSION = 12 AND SA.MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF not in (2, 127)) OR ( MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF not in (2, 127))) and SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) AND SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' AND (SAC.IPS_DEF IS NULL OR SAC.IPS_DEF <=''' + @tooOldDef + ''') '; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:20.631 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_MRCLEAN_REDANDYELLOW
2017-08-02 15:36:20.647 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_MRCLEAN_REDANDYELLOW( IN @userId varchar(32), IN @InputXml ntext, IN @tooolddef varchar(19), IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, 'RED' as color FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID WHERE SA.AGENT_TYPE='105' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.DA_ONOFF not in (2, 127) and SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) AND (SAC.MRCLEAN_DEF IS NULL OR SAC.MRCLEAN_DEF <=@tooOldDef ) END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, ''RED'' as color FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.DA_ONOFF not in (2, 127) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) AND SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' AND (SAC.MRCLEAN_DEF IS NULL OR SAC.MRCLEAN_DEF <=''' + @tooOldDef + ''') '; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:20.709 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='SEM_COMPUTER' AND COLUMN_NAME = 'TELEMETRY_MID' ) ALTER TABLE SEM_COMPUTER ADD TELEMETRY_MID VARCHAR(36) NULL
2017-08-02 15:36:20.709 THREAD 31 INFO: IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='SEM_COMPUTER' AND COLUMN_NAME = 'TELEMETRY_HWID' ) ALTER TABLE SEM_COMPUTER ADD TELEMETRY_HWID VARCHAR(36) NULL
2017-08-02 15:36:20.709 THREAD 31 INFO: DROP VIEW V_SEM_COMPUTER
2017-08-02 15:36:20.756 THREAD 31 INFO: CREATE VIEW V_SEM_COMPUTER AS SELECT *, CAST((case when DNS_SERVER1 < 0 then 0xFFFFFFFF + DNS_SERVER1 else DNS_SERVER1 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DNS_SERVER1 < 0 then 0xFFFFFFFF + DNS_SERVER1 else DNS_SERVER1 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DNS_SERVER1 < 0 then 0xFFFFFFFF + DNS_SERVER1 else DNS_SERVER1 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when DNS_SERVER1 < 0 then 0xFFFFFFFF + DNS_SERVER1 else DNS_SERVER1 end & 0xFF as VARCHAR) as DNS_SERVER1_TEXT, CAST((case when DNS_SERVER2 < 0 then 0xFFFFFFFF + DNS_SERVER2 else DNS_SERVER2 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DNS_SERVER2 < 0 then 0xFFFFFFFF + DNS_SERVER2 else DNS_SERVER2 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DNS_SERVER2 < 0 then 0xFFFFFFFF + DNS_SERVER2 else DNS_SERVER2 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when DNS_SERVER2 < 0 then 0xFFFFFFFF + DNS_SERVER2 else DNS_SERVER2 end & 0xFF as VARCHAR) as DNS_SERVER2_TEXT, CAST((case when WINS_SERVER1 < 0 then 0xFFFFFFFF + WINS_SERVER1 else WINS_SERVER1 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when WINS_SERVER1 < 0 then 0xFFFFFFFF + WINS_SERVER1 else WINS_SERVER1 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when WINS_SERVER1 < 0 then 0xFFFFFFFF + WINS_SERVER1 else WINS_SERVER1 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when WINS_SERVER1 < 0 then 0xFFFFFFFF + WINS_SERVER1 else WINS_SERVER1 end & 0xFF as VARCHAR) as WINS_SERVER1_TEXT, CAST((case when WINS_SERVER2 < 0 then 0xFFFFFFFF + WINS_SERVER2 else WINS_SERVER2 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when WINS_SERVER2 < 0 then 0xFFFFFFFF + WINS_SERVER2 else WINS_SERVER2 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when WINS_SERVER2 < 0 then 0xFFFFFFFF + WINS_SERVER2 else WINS_SERVER2 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when WINS_SERVER2 < 0 then 0xFFFFFFFF + WINS_SERVER2 else WINS_SERVER2 end & 0xFF as VARCHAR) as WINS_SERVER2_TEXT, CAST((case when DHCP_SERVER < 0 then 0xFFFFFFFF + DHCP_SERVER else DHCP_SERVER end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DHCP_SERVER < 0 then 0xFFFFFFFF + DHCP_SERVER else DHCP_SERVER end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when DHCP_SERVER < 0 then 0xFFFFFFFF + DHCP_SERVER else DHCP_SERVER end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when DHCP_SERVER < 0 then 0xFFFFFFFF + DHCP_SERVER else DHCP_SERVER end & 0xFF as VARCHAR) as DHCP_SERVER_TEXT, CAST((case when IP_ADDR1 < 0 then 0xFFFFFFFF + IP_ADDR1 else IP_ADDR1 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR1 < 0 then 0xFFFFFFFF + IP_ADDR1 else IP_ADDR1 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR1 < 0 then 0xFFFFFFFF + IP_ADDR1 else IP_ADDR1 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when IP_ADDR1 < 0 then 0xFFFFFFFF + IP_ADDR1 else IP_ADDR1 end & 0xFF as VARCHAR) as IP_ADDR1_TEXT, CAST((case when GATEWAY1 < 0 then 0xFFFFFFFF + GATEWAY1 else GATEWAY1 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY1 < 0 then 0xFFFFFFFF + GATEWAY1 else GATEWAY1 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY1 < 0 then 0xFFFFFFFF + GATEWAY1 else GATEWAY1 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when GATEWAY1 < 0 then 0xFFFFFFFF + GATEWAY1 else GATEWAY1 end & 0xFF as VARCHAR) as GATEWAY1_TEXT, CAST((case when SUBNET_MASK1 < 0 then 0xFFFFFFFF + SUBNET_MASK1 else SUBNET_MASK1 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK1 < 0 then 0xFFFFFFFF + SUBNET_MASK1 else SUBNET_MASK1 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK1 < 0 then 0xFFFFFFFF + SUBNET_MASK1 else SUBNET_MASK1 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when SUBNET_MASK1 < 0 then 0xFFFFFFFF + SUBNET_MASK1 else SUBNET_MASK1 end & 0xFF as VARCHAR) as SUBNET_MASK1_TEXT, CAST((case when IP_ADDR2 < 0 then 0xFFFFFFFF + IP_ADDR2 else IP_ADDR2 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR2 < 0 then 0xFFFFFFFF + IP_ADDR2 else IP_ADDR2 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR2 < 0 then 0xFFFFFFFF + IP_ADDR2 else IP_ADDR2 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when IP_ADDR2 < 0 then 0xFFFFFFFF + IP_ADDR2 else IP_ADDR2 end & 0xFF as VARCHAR) as IP_ADDR2_TEXT, CAST((case when GATEWAY2 < 0 then 0xFFFFFFFF + GATEWAY2 else GATEWAY2 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY2 < 0 then 0xFFFFFFFF + GATEWAY2 else GATEWAY2 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY2 < 0 then 0xFFFFFFFF + GATEWAY2 else GATEWAY2 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when GATEWAY2 < 0 then 0xFFFFFFFF + GATEWAY2 else GATEWAY2 end & 0xFF as VARCHAR) as GATEWAY2_TEXT, CAST((case when SUBNET_MASK2 < 0 then 0xFFFFFFFF + SUBNET_MASK2 else SUBNET_MASK2 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK2 < 0 then 0xFFFFFFFF + SUBNET_MASK2 else SUBNET_MASK2 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK2 < 0 then 0xFFFFFFFF + SUBNET_MASK2 else SUBNET_MASK2 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when SUBNET_MASK2 < 0 then 0xFFFFFFFF + SUBNET_MASK2 else SUBNET_MASK2 end & 0xFF as VARCHAR) as SUBNET_MASK2_TEXT, CAST((case when IP_ADDR3 < 0 then 0xFFFFFFFF + IP_ADDR3 else IP_ADDR3 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR3 < 0 then 0xFFFFFFFF + IP_ADDR3 else IP_ADDR3 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR3 < 0 then 0xFFFFFFFF + IP_ADDR3 else IP_ADDR3 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when IP_ADDR3 < 0 then 0xFFFFFFFF + IP_ADDR3 else IP_ADDR3 end & 0xFF as VARCHAR) as IP_ADDR3_TEXT, CAST((case when GATEWAY3 < 0 then 0xFFFFFFFF + GATEWAY3 else GATEWAY3 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY3 < 0 then 0xFFFFFFFF + GATEWAY3 else GATEWAY3 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY3 < 0 then 0xFFFFFFFF + GATEWAY3 else GATEWAY3 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when GATEWAY3 < 0 then 0xFFFFFFFF + GATEWAY3 else GATEWAY3 end & 0xFF as VARCHAR) as GATEWAY3_TEXT, CAST((case when SUBNET_MASK3 < 0 then 0xFFFFFFFF + SUBNET_MASK3 else SUBNET_MASK3 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK3 < 0 then 0xFFFFFFFF + SUBNET_MASK3 else SUBNET_MASK3 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK3 < 0 then 0xFFFFFFFF + SUBNET_MASK3 else SUBNET_MASK3 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when SUBNET_MASK3 < 0 then 0xFFFFFFFF + SUBNET_MASK3 else SUBNET_MASK3 end & 0xFF as VARCHAR) as SUBNET_MASK3_TEXT, CAST((case when IP_ADDR4 < 0 then 0xFFFFFFFF + IP_ADDR4 else IP_ADDR4 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR4 < 0 then 0xFFFFFFFF + IP_ADDR4 else IP_ADDR4 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when IP_ADDR4 < 0 then 0xFFFFFFFF + IP_ADDR4 else IP_ADDR4 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when IP_ADDR4 < 0 then 0xFFFFFFFF + IP_ADDR4 else IP_ADDR4 end & 0xFF as VARCHAR) as IP_ADDR4_TEXT, CAST((case when GATEWAY4 < 0 then 0xFFFFFFFF + GATEWAY4 else GATEWAY4 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY4 < 0 then 0xFFFFFFFF + GATEWAY4 else GATEWAY4 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when GATEWAY4 < 0 then 0xFFFFFFFF + GATEWAY4 else GATEWAY4 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when GATEWAY4 < 0 then 0xFFFFFFFF + GATEWAY4 else GATEWAY4 end & 0xFF as VARCHAR) as GATEWAY4_TEXT, CAST((case when SUBNET_MASK4 < 0 then 0xFFFFFFFF + SUBNET_MASK4 else SUBNET_MASK4 end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK4 < 0 then 0xFFFFFFFF + SUBNET_MASK4 else SUBNET_MASK4 end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when SUBNET_MASK4 < 0 then 0xFFFFFFFF + SUBNET_MASK4 else SUBNET_MASK4 end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when SUBNET_MASK4 < 0 then 0xFFFFFFFF + SUBNET_MASK4 else SUBNET_MASK4 end & 0xFF as VARCHAR) as SUBNET_MASK4_TEXT FROM SEM_COMPUTER WHERE DELETED=0
2017-08-02 15:36:20.818 THREAD 31 INFO: IF NOT EXISTS (SELECT C.COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='IDENTITY_MAP' AND C.COLUMN_NAME='TIME_STAMP_CHANGED') BEGIN ALTER TABLE IDENTITY_MAP ADD TIME_STAMP_CHANGED bigint NULL END
2017-08-02 15:36:20.818 THREAD 31 INFO: DROP VIEW V_GROUPS
2017-08-02 15:36:20.850 THREAD 31 INFO: CREATE VIEW V_GROUPS as select * from IDENTITY_MAP WHERE TYPE='SemClientGroup' or TYPE='LegacyGroup'
2017-08-02 15:36:20.881 THREAD 31 INFO: DROP VIEW V_SERVERS
2017-08-02 15:36:20.912 THREAD 31 INFO: CREATE VIEW V_SERVERS as select * from IDENTITY_MAP WHERE TYPE='SemServer' or TYPE='LegacyServer'
2017-08-02 15:36:20.943 THREAD 31 INFO: DROP VIEW V_DOMAINS
2017-08-02 15:36:20.974 THREAD 31 INFO: CREATE VIEW V_DOMAINS as select * from IDENTITY_MAP WHERE TYPE='SemDomain' UNION ALL select * from IDENTITY_MAP WHERE TYPE='LegacyDomain'
2017-08-02 15:36:21.021 THREAD 31 INFO: Process SQL script file:EmbeddedLamborghiniBetaToLamborghiniRC.sql
2017-08-02 15:36:21.021 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@41f02b08
2017-08-02 15:36:21.021 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12', 'OS X', '10.12', 'OS X', '', 10, 12, '10.12', 2,0,1,0, 'MACOS_10_12')
2017-08-02 15:36:21.021 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12', 'OS X', '10.12', 'OS X', '', 10, 12, '10.12', 2,0,1,0, 'MACOS_10_12')
2017-08-02 15:36:21.021 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.0') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.0', 'OS X', '10.12.0', 'OS X', '', 10, 12, '10.12.0', 2,0,1,0, 'MACOS_10_12_0')
2017-08-02 15:36:21.021 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.1') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.1', 'OS X', '10.12.1', 'OS X', '', 10, 12, '10.12.1', 2,0,1,0, 'MACOS_10_12_1')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.2') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.2', 'OS X', '10.12.2', 'OS X', '', 10, 12, '10.12.2', 2,0,1,0, 'MACOS_10_12_2')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.3') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.3', 'OS X', '10.12.3', 'OS X', '', 10, 12, '10.12.3', 2,0,1,0, 'MACOS_10_12_3')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.4') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.4', 'OS X', '10.12.4', 'OS X', '', 10, 12, '10.12.4', 2,0,1,0, 'MACOS_10_12_4')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.5') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.5', 'OS X', '10.12.5', 'OS X', '', 10, 12, '10.12.5', 2,0,1,0, 'MACOS_10_12_5')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.6') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.6', 'OS X', '10.12.6', 'OS X', '', 10, 12, '10.12.6', 2,0,1,0, 'MACOS_10_12_6')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.7') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.7', 'OS X', '10.12.7', 'OS X', '', 10, 12, '10.12.7', 2,0,1,0, 'MACOS_10_12_7')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.8') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.8', 'OS X', '10.12.8', 'OS X', '', 10, 12, '10.12.8', 2,0,1,0, 'MACOS_10_12_8')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.9') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.9', 'OS X', '10.12.9', 'OS X', '', 10, 12, '10.12.9', 2,0,1,0, 'MACOS_10_12_9')
2017-08-02 15:36:21.037 THREAD 31 INFO: IF NOT EXISTS (SELECT 1 FROM SEM_OS_INFO WHERE OPERATING_SYSTEM = 'OS X 10.12.10') INSERT INTO SEM_OS_INFO (OPERATING_SYSTEM, OS_NAME, OS_TYPE, SPC_OS_NAME, SPC_OS_TYPE, OS_MAJOR, OS_MINOR, SPC_OS_VERSION, OS_FAMILY, DELETED, USN, TIME_STAMP, I18N_KEY) VALUES ('OS X 10.12.10', 'OS X', '10.12.10', 'OS X', '', 10, 12, '10.12.10', 2,0,1,0, 'MACOS_10_12_10')
2017-08-02 15:36:21.037 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT
2017-08-02 15:36:21.068 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @oldestAllowedSig ntext, @oldestAllowedSonar ntext, @oldestAllowedDownloadAdvisor ntext, @avDefsEnabled BIT, @ipsSignaturesEnabled BIT, @sonarDefsEnabled BIT, @downloadAdvisorContentEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; SET NOCOUNT ON; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); /* Update AGENT_DEF_CACHE*/ CALL SEM_UPDATE_AGENT_DEF_CACHE(0); /* Query data from AGENT_DEF_CACHE*/ SET @sql = 'SELECT count(SA.AGENT_ID) AS COUNT FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) AND SA.AGENT_TYPE=105 AND ( (SA.AP_ONOFF NOT IN (2, 127) AND SA.MAJOR_VERSION != 5 AND (SAC.AV_DEF IS NULL OR SAC.AV_DEF <= ''' + @oldestAllowedDef + ''') AND (' + CAST(@avDefsEnabled AS VARCHAR(1)) + ' = 1 )) OR (((SA.MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION = 12 AND SA.MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127)) OR (SA.MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127))) AND SA.MAJOR_VERSION>10 AND ' + CAST(@ipsSignaturesEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.IPS_DEF IS NULL OR SAC.IPS_DEF <= ''' + @oldestAllowedSig + ''')) OR (SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF NOT IN (2, 127) AND ' + CAST(@sonarDefsEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <= ''' + @oldestAllowedSonar + ''')) OR (SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.DA_ONOFF NOT IN (2, 127) AND SA.CIDS_DRV_ONOFF NOT IN (2, 127) AND ' + CAST(@downloadAdvisorContentEnabled AS VARCHAR(1)) + ' = 1 AND (SAC.MRCLEAN_DEF IS NULL OR SAC.MRCLEAN_DEF <= ''' + @oldestAllowedDownloadAdvisor + ''')) ) '|| @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:21.099 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_MAC_EE_COUNT
2017-08-02 15:36:21.130 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_MAC_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @oldestAllowedSig ntext, @outdatedAVDef ntext, @outdatedIPSSig ntext, @avDefsEnabled BIT, @ipsSignaturesEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT count(*) AS COUNT FROM V_AGENT_INCL_GROUP_ID AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.DELETED=0 AND (SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT AS SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT ON SA.PATTERN_IDX=PAT.PATTERN_IDX WHERE SA.AP_ONOFF NOT IN (2,127) AND SA.DELETED=0 AND SA.STATUS=1 AND MAJOR_VERSION != 5 AND SA.AGENT_TYPE=105 AND PAT.PATTERN_TYPE=''VIRUS_DEFS'' AND (' || @avDefsEnabled || ' = 1 ) AND (PAT.VERSION IS NULL OR PAT.VERSION <= (CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedDef || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedAVDef || ''' END )) ) OR SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS ON SC.PATTERN_IDX=V_IPS.PATTERN_IDX INNER JOIN V_SEM_COMPUTER I WITH (NOLOCK) ON I.COMPUTER_ID=SA.COMPUTER_ID WHERE ((MAJOR_VERSION = 11 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION = 12 AND MINOR_VERSION = 0 AND SA.FIREWALL_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION = 12 AND MINOR_VERSION > 0 AND SA.CIDS_DRV_ONOFF NOT IN (2, 127)) OR (MAJOR_VERSION > 12 AND SA.CIDS_DRV_ONOFF NOT IN (2, 27))) AND SA.DELETED=0 AND SA.STATUS=1 AND (V_IPS.DELETED=0 OR V_IPS.DELETED IS NULL) AND SA.AGENT_TYPE=105 AND SA.MAJOR_VERSION>10 AND ' || @ipsSignaturesEnabled || ' = 1 GROUP BY SA.AGENT_ID, SA.R_OS_TYPE HAVING ((MAX(V_IPS.VERSION) IS NULL) OR (MAX(V_IPS.VERSION) <=(CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedSig || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedIPSSig || ''' END ))))) AND SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) ' || @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:21.162 THREAD 31 INFO: DROP PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_LINUX_EE_COUNT
2017-08-02 15:36:21.208 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_OUTOFDATE_CLIENTS_LINUX_EE_COUNT( @adminType INT, @adminId ntext, @domainId ntext, @legacyDomainNames ntext, @legacyGroupNames ntext, @oldestAllowedDef ntext, @outdatedAVDef ntext,@avDefsEnabled BIT, @computerNameXml ntext, @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @permissionFilter ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; CALL SEM_GET_PERMISSION_FILTER(@adminType, @adminId, @domainId, @legacyDomainNames, @legacyGroupNames, @permissionFilter); CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT count(*) AS COUNT FROM SEM_AGENT AS SA WITH (NOLOCK) INNER JOIN V_SEM_COMPUTER AS I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.DELETED=0 AND SA.STATUS=1 AND SA.DELETED=0 AND SA.AGENT_ID IN (SELECT SA.AGENT_ID FROM SEM_AGENT AS SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT ON SA.PATTERN_IDX=PAT.PATTERN_IDX WHERE SA.AP_ONOFF NOT IN (2, 127) AND SA.DELETED=0 AND SA.STATUS=1 AND MAJOR_VERSION != 5 AND SA.AGENT_TYPE=105 AND PAT.PATTERN_TYPE=''VIRUS_DEFS'' AND (' || @avDefsEnabled || ' = 1 ) AND (PAT.VERSION IS NULL OR PAT.VERSION <= (CASE WHEN SA.R_OS_TYPE NOT IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) AND SA.R_OS_TYPE & 0xF0FF0000 NOT IN (0x20000000) THEN ''' || @oldestAllowedDef || ''' WHEN (SA.R_OS_TYPE IN (269091840, 269092096, 269092352, 269092608, 269092864, 269093120, 269093376, 269093632, 269093888) OR SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000)) THEN ''' || @outdatedAVDef || ''' END )) ) AND SA.R_OS_TYPE & 0xF0FF0000 IN (0x20000000) ' || @permissionFilter || @computerNameFilter || @ipAddressFilter; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END
2017-08-02 15:36:21.240 THREAD 31 INFO: DROP PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW
2017-08-02 15:36:21.271 THREAD 31 INFO: CREATE PROCEDURE SEM_HOMEPAGE_SONAR_REDANDYELLOW( IN @userId varchar(32), IN @InputXml ntext, IN @tooolddef varchar(19), IN @computerNameXml ntext, IN @ipAddressXml ntext ) BEGIN DECLARE @sql ntext; DECLARE @computerNameFilter ntext; DECLARE @ipAddressFilter ntext; IF NOT EXISTS (SELECT 1 FROM ADMIN_GROUPS WHERE USER_ID=@userId) THEN BEGIN SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID WHERE SA.AGENT_TYPE='105' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) AND (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632,269093888) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(@InputXml, '/domainIds/domainId') WITH ( ID CHAR (32) './text()') ) AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <=@tooOldDef ) GROUP BY SA.AGENT_ID END ELSE BEGIN CALL SEM_GET_CLIENT_FILTER(@computerNameXml, 'I.COMPUTER_NAME', @computerNameFilter); CALL SEM_GET_CLIENT_FILTER(@ipAddressXml, 'I.IP_ADDR1_TEXT', @ipAddressFilter); SET @sql = 'SELECT COUNT(DISTINCT(SA.AGENT_ID)) as anzahl, SA.AGENT_ID FROM V_AGENT_INCL_GROUP_ID SA with (NOLOCK) LEFT OUTER JOIN AGENT_DEF_CACHE AS SAC with (NOLOCK) ON SAC.AGENT_ID = SA.AGENT_ID INNER JOIN V_SEM_COMPUTER I with (NOLOCK) ON I.COMPUTER_ID = SA.COMPUTER_ID WHERE SA.AGENT_TYPE=''105'' AND SA.DELETED=0 AND SA.STATUS=1 AND SA.MAJOR_VERSION>10 AND SA.PTP_ONOFF not in (2, 127) and (SA.R_OS_TYPE) NOT IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632, 269093888) AND SA.DOMAIN_ID IN ( SELECT * FROM openxml(''' + @InputXml + ''', ''/domainIds/domainId'') WITH ( ID CHAR (32) ''./text()'') ) AND SA.GROUP_ID IN (SELECT GROUP_ID FROM ADMIN_GROUPS WHERE USER_ID=''' + @userId + ''' UNION ALL select ID from IDENTITY_MAP with (NOLOCK) where TYPE = ''LegacyGroup'') ' + @computerNameFilter + @ipAddressFilter + ' AND (SAC.SONAR_DEF IS NULL OR SAC.SONAR_DEF <=''' + @tooOldDef + ''') GROUP BY SA.AGENT_ID'; EXECUTE IMMEDIATE WITH BATCH OFF WITH RESULT SET ON @sql; END ENDIF; END
2017-08-02 15:36:21.302 THREAD 31 INFO: DROP PROCEDURE SEM_COMPUTER_DEVICE_INFO_UPDATE
2017-08-02 15:36:21.333 THREAD 31 INFO: CREATE PROCEDURE SEM_COMPUTER_DEVICE_INFO_UPDATE @hardwareKey char(32), @domainId char(32), @atpDeviceId varchar(36), @atpDeviceInfo varchar(1024), @publicKey char(512), @usn bigint, @currentTimeStamp bigint AS BEGIN IF EXISTS( SELECT * FROM SEM_Computer WHERE SEM_Computer.hardware_key = @hardwareKey AND SEM_Computer.Domain_id = @domainId AND SEM_Computer.deleted = 0 AND SEM_Computer.PUB_KEY = @publicKey) BEGIN UPDATE SEM_COMPUTER SET ATP_DEVICE_ID = @atpDeviceId,DEVICE_INFO =@atpDeviceInfo,USN = @usn , TIME_STAMP = @currentTimeStamp WHERE HARDWARE_KEY =@hardwareKey AND DOMAIN_ID = @domainId AND PUB_KEY = @publicKey UPDATE SEM_CLIENT SET USN = @usn , TIME_STAMP = @currentTimeStamp WHERE HARDWARE_KEY = @hardwareKey AND DOMAIN_ID = @domainId AND DELETED = 0END END
2017-08-02 15:36:21.349 THREAD 31 INFO: Process SQL script file:EmbeddedLamborghiniRCToLamborghiniRC2.sql
2017-08-02 15:36:21.364 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@4242d8fa
2017-08-02 15:36:21.364 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : DROP PROCEDURE SEM_UPDATE_AGENT_DEF_CACHE
2017-08-02 15:36:21.364 THREAD 31 INFO: DROP PROCEDURE SEM_UPDATE_AGENT_DEF_CACHE
2017-08-02 15:36:21.364 THREAD 31 INFO: CREATE PROCEDURE SEM_UPDATE_AGENT_DEF_CACHE( @FORCE_REFRESH bit ) AS BEGIN SET NOCOUNT ON SET transaction isolation level 1 /* Check if it was ever refrshed in last 5 minutes, if it was ship it!*/ DECLARE @last_refresh_time DATETIME DECLARE @last_refresh_usn BIGINT DECLARE @refresh_time_anchor DATETIME DECLARE @current_max_usn BIGINT DECLARE @usn_content BIGINT DECLARE @usn_pattern BIGINT SET @current_max_usn = 0 SELECT TOP 1 REFRESH_TIME INTO @last_refresh_time FROM AGENT_DEF_CACHE SELECT TOP 1 REFRESH_USN INTO @last_refresh_usn FROM AGENT_DEF_CACHE SELECT @refresh_time_anchor = DATEADD(minute, -5, GETDATE()) SELECT @usn_content = MAX(USN) FROM SEM_CONTENT WITH (NOLOCK) SELECT @usn_pattern = MAX(USN) FROM PATTERN WITH (NOLOCK) /*For windows ERASER_ENGINE and some others would be updated together with SAV_DEF, and they are saved at SEM_CONTENT, so we are OK use SEM_CONTENT for windows. Considering performance factor we only check SEM_AGENT for Linux and Mac OS*/SELECT @usn_agent = (SELECT MAX(USN) FROM SEM_AGENT WITH (NOLOCK) WHERE R_OS_TYPE IN (269091840,269092096,269092352,269092608,269092864,269093120,269093376,269093632,269093888) OR (R_OS_TYPE & 0xF0FF0000) IN (0x20000000)) if(@usn_content > @current_max_usn) BEGIN SET @current_max_usn = @usn_content END if(@usn_pattern > @current_max_usn) BEGIN SET @current_max_usn = @usn_pattern END /*For AV definition table SEM_AGENT and PATTERN are used, At AgentLastCheckInTask.java USN is not updated, so it would not be frequently executed due to online status chnages*/if(@usn_agent > @current_max_usn) BEGIN SET @current_max_usn = @usn_agent END /* Only refresh when new data is changed and last refresh time is 5 minutes ago*/ IF(@FORCE_REFRESH != 1) BEGIN IF(@refresh_time_anchor <= @last_refresh_time OR @current_max_usn <= @last_refresh_usn) BEGIN /* RAISERROR 23000 'No need refresh the cache table, skip!'*/ RETURN 0 END END DECLARE @ResourceKey VARCHAR(200) DECLARE @Lock VARCHAR(200) SET @ResourceKey = 'AgentDefCache' BEGIN TRAN SELECT @Lock = RESOURCE_KEYFROM SEMAPHORE WITH (XLOCK) WHERE RESOURCE_KEY = @ResourceKey TRUNCATE TABLE AGENT_DEF_CACHE /*Populate the table with agent ID and AV Def*/ INSERT INTO AGENT_DEF_CACHE(AGENT_ID, AV_DEF, REFRESH_TIME, REFRESH_USN) SELECT SA.AGENT_ID, PAT.VERSION, GETDATE(), @current_max_usn FROM SEM_AGENT SA WITH (NOLOCK) LEFT OUTER JOIN PATTERN PAT WITH (NOLOCK) ON SA.PATTERN_IDX=PAT.PATTERN_IDX /*Update IPS Def*/ UPDATE AGENT_DEF_CACHE SET IPS_DEF = ( SELECT MAX(V_IPS.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_IPS WITH (NOLOCK) ON SC.PATTERN_IDX=V_IPS.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_IPS.DELETED IS NULL OR V_IPS.DELETED=0)) /*Update SONAR Def*/ UPDATE AGENT_DEF_CACHE SET SONAR_DEF = ( SELECT MAX(V_SONAR.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_SONAR WITH (NOLOCK) ON SC.PATTERN_IDX=V_SONAR.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_SONAR.DELETED IS NULL OR V_SONAR.DELETED=0)) /*Update MRCLEAN Def*/ UPDATE AGENT_DEF_CACHE SET MRCLEAN_DEF = ( SELECT MAX(V_MR_CLEAN.VERSION) FROM V_AGENT_INCL_GROUP_ID SA WITH (NOLOCK) LEFT OUTER JOIN SEM_CONTENT SC WITH (NOLOCK) ON SC.AGENT_ID=SA.AGENT_ID AND SC.DELETED=0 LEFT OUTER JOIN V_MR_CLEAN WITH (NOLOCK) ON SC.PATTERN_IDX=V_MR_CLEAN.PATTERN_IDX WHERE SA.AGENT_ID = AGENT_DEF_CACHE.AGENT_ID AND (V_MR_CLEAN.DELETED IS NULL OR V_MR_CLEAN.DELETED=0)) COMMIT RETURN 0 END
2017-08-02 15:36:21.411 THREAD 31 INFO: Process SQL script file:EmbeddedLamborghiniRC2ToLamborghiniMP1.sql
2017-08-02 15:36:21.411 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@16a81f62
2017-08-02 15:36:21.411 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : IF EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='SEM_COMPUTER' AND COLUMN_NAME = 'PUB_KEY') ALTER TABLE SEM_COMPUTER MODIFY PUB_KEY VARCHAR(512) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_1' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_SECURITY_LOG_1 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_1' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_SECURITY_LOG_1 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_2' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_SECURITY_LOG_2 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_2' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_SECURITY_LOG_2 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_1' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_TRAFFIC_LOG_1 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_1' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_TRAFFIC_LOG_1 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_2' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_TRAFFIC_LOG_2 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_2' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_TRAFFIC_LOG_2 ADD MD5 CHAR(32) NULL drop view V_AGENT_TRAFFIC_LOG
2017-08-02 15:36:21.411 THREAD 31 INFO: IF EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='SEM_COMPUTER' AND COLUMN_NAME = 'PUB_KEY') ALTER TABLE SEM_COMPUTER MODIFY PUB_KEY VARCHAR(512) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_1' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_SECURITY_LOG_1 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_1' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_SECURITY_LOG_1 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_2' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_SECURITY_LOG_2 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_SECURITY_LOG_2' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_SECURITY_LOG_2 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_1' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_TRAFFIC_LOG_1 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_1' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_TRAFFIC_LOG_1 ADD MD5 CHAR(32) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_2' AND COLUMN_NAME = 'SHA256') ALTER TABLE AGENT_TRAFFIC_LOG_2 ADD SHA256 CHAR(64) NULL IF NOT EXISTS (SELECT COLUMN_NAME FROM SYSTABLE T, SYSCOLUMN C WHERE T.TABLE_ID=C.TABLE_ID AND T.TABLE_NAME='AGENT_TRAFFIC_LOG_2' AND COLUMN_NAME = 'MD5') ALTER TABLE AGENT_TRAFFIC_LOG_2 ADD MD5 CHAR(32) NULL drop view V_AGENT_TRAFFIC_LOG
2017-08-02 15:36:22.098 THREAD 31 INFO: CREATE VIEW V_AGENT_TRAFFIC_LOG as SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_TRAFFIC_LOG_1 UNION ALL SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_TRAFFIC_LOG_2
2017-08-02 15:36:22.160 THREAD 31 INFO: drop view V_AGENT_SECURITY_LOG
2017-08-02 15:36:22.191 THREAD 31 INFO: CREATE VIEW V_AGENT_SECURITY_LOG as SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_SECURITY_LOG_1 UNION ALL SELECT *, CASE WHEN LOCAL_HOST_IPV6 IS NOT NULL AND LEN(TRIM(LOCAL_HOST_IPV6)) > 0 THEN substring(LOCAL_HOST_IPV6, 1, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 5, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 9, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 13, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 17, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 21, 4 ) + ':' + substring(LOCAL_HOST_IPV6, 25,4 ) + ':' + substring(LOCAL_HOST_IPV6, 29, 4 ) ELSE CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when LOCAL_HOST_IP < 0 then 0xFFFFFFFF + LOCAL_HOST_IP else LOCAL_HOST_IP end & 0xFF as VARCHAR) END as LOCAL_HOST_IP_TEXT , CASE WHEN REMOTE_HOST_IPV6 IS NOT NULL AND LEN(TRIM(REMOTE_HOST_IPV6)) > 0 THEN substring(REMOTE_HOST_IPV6, 1, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 5, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 9, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 13, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 17, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 21, 4 ) + ':' + substring(REMOTE_HOST_IPV6, 25,4 ) + ':' + substring(REMOTE_HOST_IPV6, 29, 4 ) ELSE CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256 / 256) & 0xFF as VARCHAR) + '.' + CAST((case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end / 256) & 0xFF as VARCHAR) + '.' + CAST( case when REMOTE_HOST_IP < 0 then 0xFFFFFFFF + REMOTE_HOST_IP else REMOTE_HOST_IP end & 0xFF as VARCHAR) END as REMOTE_HOST_IP_TEXT FROM AGENT_SECURITY_LOG_2
2017-08-02 15:36:22.269 THREAD 31 INFO: drop view V_SECURITY_VIEW
2017-08-02 15:36:22.285 THREAD 31 INFO: CREATE VIEW V_SECURITY_VIEW as SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_SECURITY_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION = 1 FROM V_AGENT_PACKET_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_TRAFFIC_LOG UNION ALL SELECT EVENT_TIME, EVENT_ID, TIME_STAMP, COMPUTER_ID, DOMAIN_ID, SERVER_ID, GROUP_ID, AGENT_ID, ALERT, REPETITION FROM V_AGENT_BEHAVIOR_LOG
2017-08-02 15:36:22.332 THREAD 31 INFO: IF(OBJECT_ID('oslist_to_tbl')>0) BEGIN DROP procedure oslist_to_tbl END
2017-08-02 15:36:22.347 THREAD 31 INFO: CREATE procedure oslist_to_tbl (@list varchar(4000)) as BEGIN SET NOCOUNT ON create table #temptable (os varchar(100) not null) DECLARE @pos int, @next varchar(100) set @pos = charindex(',', @list) WHILE @pos <> 0 BEGIN set @next = LEFT(@list, @pos-1) INSERT into #temptable VALUES (convert(varchar, @next)) set @list = stuff(@list, 1, @pos, NULL) set @pos = charindex(',', @list) END INSERT into #temptable VALUES (convert(varchar, @list)) SELECT * from #temptable RETURN END
2017-08-02 15:36:22.378 THREAD 31 INFO: /* Add New Procedure to get Computer information. */ IF(OBJECT_ID('SEM_GET_COMPUTERS')>0) BEGIN DROP procedure SEM_GET_COMPUTERS END
2017-08-02 15:36:22.441 THREAD 31 INFO: CREATE PROCEDURE SEM_GET_COMPUTERS ( @PageIndex INT=1, @PageSize INT=10, @SortBy VARCHAR(128) = 'computer_name', @SortOrder VARCHAR(4) = 'ASC', @LastUpdateTime BIGINT =NULL, @DomainId CHAR(32) = NULL, @TotalCount INT OUTPUT, @OsFilter VARCHAR(4000) ) AS BEGIN SET NOCOUNT ON DECLARE @RowStart INT DECLARE @RowEnd INT /* If Inputs are NULL or 0 init to default values */ IF(ISNULL(@SortBy,'') = '' ) SET @SortBy = 'computer_name' IF(ISNULL(@SortOrder,'') = '' ) SET @SortOrder = 'ASC' IF(ISNULL(@PageSize,0) = 0) SET @PageSize = 10 IF(ISNULL(@PageIndex,0) = 0) SET @PageIndex = 1 SET @RowStart = ((@PageIndex -1)*@PageSize + 1) SET @RowEnd = @RowStart + @PageSize -1 SELECT * FROM ( SELECT ROW_NUMBER() OVER( ORDER BY CASE WHEN @SortOrder ='DESC' THEN ( CASE @SortBy WHEN 'COMPUTER_ID' THEN VSC.COMPUTER_ID WHEN 'DOMAIN_ID' THEN VSC.DOMAIN_ID WHEN 'COMPUTER_NAME' THEN VSC.COMPUTER_NAME WHEN 'COMPUTER_DOMAIN_NAME' THEN VSC.COMPUTER_DOMAIN_NAME ELSE VSC.COMPUTER_ID END ) END DESC, CASE WHEN @SortOrder ='ASC' THEN ( CASE @SortBy WHEN 'COMPUTER_ID' THEN VSC.COMPUTER_ID WHEN 'DOMAIN_ID' THEN VSC.DOMAIN_ID WHEN 'COMPUTER_NAME' THEN VSC.COMPUTER_NAME WHEN 'COMPUTER_DOMAIN_NAME' THEN VSC.COMPUTER_DOMAIN_NAME ELSE VSC.COMPUTER_ID END ) END ASC )AS "RowNum", VSC.COMPUTER_ID, VSC.DOMAIN_ID, VDA.NAME AS DOMAIN_NAME, VG.ID AS GROUP_ID, VG.NAME AS GROUP_NAME, VSC.HARDWARE_KEY, VSC.COMPUTER_NAME, VSC.COMPUTER_DOMAIN_NAME, VSC.COMPUTER_DESCRIPTION, VSC.OPERATION_SYSTEM, COALESCE(UPPER(VSC.MAC_ADDR1),'') AS MAC_ADDR1, COALESCE(UPPER(VSC.MAC_ADDR2),'') AS MAC_ADDR2, COALESCE(UPPER(VSC.MAC_ADDR3),'') AS MAC_ADDR3, COALESCE(UPPER(VSC.MAC_ADDR4),'') AS MAC_ADDR4, IP_ADDR1, IP_ADDR2, IP_ADDR3, IP_ADDR4, CASE WHEN VSC.IP_ADDR1_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR1_TEXT = '...' THEN ''ELSE VSC.IP_ADDR1_TEXT END AS IP_ADDR1_TEXT, CASE WHEN VSC.IP_ADDR2_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR2_TEXT = '...' THEN ''ELSE VSC.IP_ADDR2_TEXT END AS IP_ADDR2_TEXT, CASE WHEN VSC.IP_ADDR3_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR3_TEXT = '...' THEN ''ELSE VSC.IP_ADDR3_TEXT END AS IP_ADDR3_TEXT, CASE WHEN VSC.IP_ADDR4_TEXT = '0.0.0.0' THEN ''WHEN VSC.IP_ADDR4_TEXT = '...' THEN ''ELSE VSC.IP_ADDR4_TEXT END AS IP_ADDR4_TEXT, VSC.DELETED, VAIG.HI_STATUS, VAIG.HI_REASONCODE,VAIG.AGENT_VERSION, VSC.BIOS_SERIALNUMBER, VSC.BIOS_VERSION, VSC.UUID,VSC.PROCESSOR_TYPE,VSC.PROCESSOR_CLOCK,VSC.PROCESSOR_NUM,VSC.MEMORY, CASE WHEN VSC.OS_FUNCTION IS NULL THEN 0 ELSE VSC.OS_FUNCTION END AS OS_FUNCTION, VAIG.R_OS_TYPE, OS.OS_NAME, OS.SPC_OS_VERSION, OS.OS_MAJOR,OS.OS_MINOR,VSC.SERVICE_PACK,VAIG.OS_BIT_TYPE, VSC.OS_LANG, VSC.CURRENT_LOGIN_USER, VSC.DISK_TOTAL, HV.HYPERVISOR_VENDOR_NAME, GL.GUP_ID, VSC.PUB_KEY, VSC.ATP_DEVICE_ID, VSC.DEVICE_INFO, SA.AGENT_ID,SA.AGENT_TYPE,SA.HI_REASONDESC,SA.PROFILE_VERSION,SA.PROFILE_SERIAL_NO,SA.PROFILE_CHECKSUM, SA.IDS_VERSION,SA.IDS_SERIAL_NO,SA.IDS_CHECKSUM,SA.CREATION_TIME,SA.STATUS,SA.LAST_UPDATE_TIME, SA.LAST_SERVER_ID,mapServer.NAME AS LAST_SERVER_NAME, SA.LAST_SITE_ID,mapSite.NAME AS LAST_SITE_NAME,SA.ATTRIBUTE_EXTENSION, SA.FULL_NAME,SA.EMAIL,SA.JOB_TITLE,SA.DEPARTMENT,SA.EMPLOYEE_NUMBER,SA.EMPLOYMENT_STATUS,SA.OFFICE_PHONE, SA.MOBILE_PHONE,SA.HOME_PHONE,SA.TIME_STAMP AS AGENT_TIME_STAMP,SA.USN AS AGENT_USN, SA.PATTERN_IDX,SA.AP_ONOFF,SA.INFECTED,SA.WORSTINFECTION_IDX,SA.LAST_SCAN_TIME,SA.LAST_VIRUS_TIME, SA.CONTENT_UPDATE,SA.AVENGINE_ONOFF,SA.TAMPER_ONOFF,SA.MAJOR_VERSION,SA.MINOR_VERSION,SA.REBOOT_REQUIRED, SA.REBOOT_REASON,SA.LICENSE_STATUS,SA.LICENSE_EXPIRY,SA.TIMEZONE,SA.FIREWALL_ONOFF,SA.FREE_MEM,SA.FREE_DISK, SA.LAST_DOWNLOAD_TIME,SA.CURRENT_CLIENT_ID,SA.LICENSE_ID,SA.IS_GRACE,SA.SNAC_LICENSE_ID,SA.PTP_ONOFF, SA.LAST_HEURISTIC_THREAT_TIME,SA.BASH_STATUS,SA.DA_ONOFF,SA.CIDS_DRV_ONOFF,SA.CIDS_SILENT_MODE, SA.CIDS_DRV_MULF_CODE,SA.CIDS_BROWSER_IE_ONOFF,SA.CIDS_BROWSER_FF_ONOFF,SA.CIDS_ENGINE_VERSION, SA.CIDS_DEFSET_VERSION,SA.DEPLOY_STATUS,SA.DEPLOY_MSG,SA.DEPLOY_PRE_VER,SA.DEPLOY_TARGET_VER, SA.DEPLOY_RUNNING_VER,SA.DEPLOY_TIMESTAMP,SA.ELAM_ONOFF,SA.OSELAM_STATUS,SA.VSIC_STATUS,SA.IS_NPVDI_CLIENT, SA.SVA_ID,VAIG.LAST_CONNECTED_IP_ADDR_TEXT,SA.INSTALL_TYPE,SA.PEP_ONOFF,SA.EDR_STATUS,SA.ATP_SERVER, VSC.GATEWAY1_TEXT,VSC.GATEWAY2_TEXT,VSC.GATEWAY3_TEXT,VSC.GATEWAY4_TEXT, VSC.SUBNET_MASK1_TEXT,VSC.SUBNET_MASK2_TEXT,VSC.SUBNET_MASK3_TEXT,VSC.SUBNET_MASK4_TEXT, VSC.CURRENT_LOGIN_DOMAIN,VSC.TPM_DEVICE,DNS_SERVER1_TEXT,VSC.DNS_SERVER2_TEXT, VSC.WINS_SERVER1_TEXT,VSC.WINS_SERVER2_TEXT,VSC.DHCP_SERVER_TEXT, VSC.TIME_STAMP AS COMPUTER_TIME_STAMP,VSC.USN AS COMPUTER_USN, VSC.DISK_DRIVE,VSC.HYPERVISOR_VENDOR_ID,VSC.KERNEL,VSC.EWF,VSC.FBWF,VSC.UWFFROM V_SEM_COMPUTER VSC INNER JOIN V_DOMAINS AS VDA ON VSC.DOMAIN_ID = VDA.ID INNER JOIN SEM_CLIENT AS SC ON VSC.HARDWARE_KEY = SC.HARDWARE_KEY AND VSC.COMPUTER_ID = SC.COMPUTER_ID INNER JOIN V_GROUPS AS VG ON SC.GROUP_ID = VG.ID INNER JOIN V_AGENT_INCL_GROUP_ID VAIG ON VAIG.COMPUTER_ID=VSC.COMPUTER_ID LEFT JOIN SEM_OS_INFO OS ON VSC.OPERATION_SYSTEM=OS.OPERATING_SYSTEM INNER JOIN HYPERVISOR_VENDOR HV ON VSC.HYPERVISOR_VENDOR_ID=HV.HYPERVISOR_VENDOR_ID LEFT JOIN GUP_LIST GL ON VSC.COMPUTER_ID=GL.COMPUTER_ID INNER JOIN SEM_AGENT SA ON VSC.COMPUTER_ID=SA.COMPUTER_ID INNER JOIN IDENTITY_MAP mapServer on SA.LAST_SERVER_ID=mapServer.ID INNER JOIN IDENTITY_MAP mapSite on SA.LAST_SITE_ID=mapSite.IDWHERE VSC.DELETED = 0 AND (OS.OS_NAME IN (SELECT * FROM oslist_to_tbl(@OsFilter)) OR @OsFilter = '') AND SA.LAST_UPDATE_TIME > COALESCE(@LastUpdateTime, 0) AND VSC.DOMAIN_ID = COALESCE(@DomainId, VSC.DOMAIN_ID) ) AS A WHERE RowNum between @RowStart AND @RowEnd /* Get TotalCount */ SELECT @TotalCount = COUNT(VSC.COMPUTER_ID) FROM V_SEM_COMPUTER VSC INNER JOIN V_DOMAINS AS VDA ON VSC.DOMAIN_ID = VDA.ID INNER JOIN SEM_CLIENT AS SC ON VSC.HARDWARE_KEY = SC.HARDWARE_KEY AND VSC.COMPUTER_ID = SC.COMPUTER_ID INNER JOIN V_GROUPS AS VG ON SC.GROUP_ID = VG.ID INNER JOIN V_AGENT_INCL_GROUP_ID VAIG ON VAIG.COMPUTER_ID=VSC.COMPUTER_ID LEFT JOIN SEM_OS_INFO OS ON VSC.OPERATION_SYSTEM=OS.OPERATING_SYSTEM INNER JOIN HYPERVISOR_VENDOR HV ON VSC.HYPERVISOR_VENDOR_ID=HV.HYPERVISOR_VENDOR_ID LEFT JOIN GUP_LIST GL ON VSC.COMPUTER_ID=GL.COMPUTER_ID INNER JOIN SEM_AGENT SA ON VSC.COMPUTER_ID=SA.COMPUTER_ID WHERE VSC.DELETED = 0 AND (OS.OS_NAME IN (SELECT * FROM oslist_to_tbl(@OsFilter)) OR @OsFilter = '') AND SA.LAST_UPDATE_TIME > COALESCE(@LastUpdateTime, 0) AND VSC.DOMAIN_ID = COALESCE(@DomainId, VSC.DOMAIN_ID) END
2017-08-02 15:36:22.503 THREAD 31 INFO: Process SQL script file:EmbeddedLamborghiniMP1ToLamborghiniMP1HotFix.sql
2017-08-02 15:36:22.503 THREAD 31 INFO: Process SQL InputStream sqlis:sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@1967252d
2017-08-02 15:36:22.503 THREAD 31 INFO: DatabaseUtilities> execCommandFromScript>> cmdSeperator : ;; , sqlStr : DROP VIEW V_POLICY_INFO
2017-08-02 15:36:22.503 THREAD 31 INFO: DROP VIEW V_POLICY_INFO
2017-08-02 15:36:22.519 THREAD 31 INFO: CREATE VIEW V_POLICY_INFO AS SELECT t.ID AS POLICY_ID, x.NAME, x.POLICY_MODE, x.AGENT_POLICY_ID FROM ( SELECT ID, CAST(m.CONTENT AS XML) AS XmlData FROM BASIC_METADATA m, WHERE TYPE = 'SemGroupPolicy' ) AS t, openxml( t.XmlData, '/SemGroupPolicy') WITH ( NAME NVARCHAR(1024) './@Name', POLICY_MODE VARCHAR(32) './Inheritance/@Mode', AGENT_POLICY_ID VARCHAR(32) './ObjReference[@TargetType="SemAgentPolicy"]/@TargetId' ) AS x
2017-08-02 15:36:22.550 THREAD 31 INFO: IF(OBJECT_ID('V_AGENT_POLICY_INFO') > 0) BEGIN DROP VIEW V_AGENT_POLICY_INFO END
2017-08-02 15:36:22.566 THREAD 31 INFO: CREATE VIEW V_AGENT_POLICY_INFO AS SELECT t.ID AS AGENT_POLICY_ID, x.DEFAULT_LOCATION_ID, x.LUCONTENT_POLICY_ID, x.COMMUNICATION_MODE FROM ( SELECT ID, CAST(m.CONTENT AS XML) AS XmlData FROM BASIC_METADATA M WHERE TYPE = 'SemAgentPolicy' AND DELETED = 1 ) AS t, openxml(t.XmlData, '/SemAgentPolicy') WITH ( DEFAULT_LOCATION_ID VARCHAR(32)'./AutoLocation/LocationArray/@DefaultLocation', LUCONTENT_POLICY_IDVARCHAR(32)'./LuContentSelection/ObjReference/@TargetId', COMMUNICATION_MODE VARCHAR(32)'./Communication/@Mode') AS x
2017-08-02 15:36:22.597 THREAD 31 INFO: IF(OBJECT_ID('SEM_GET_GROUP_BY_ID') > 0) BEGIN DROP PROCEDURE SEM_GET_GROUP_BY_ID; END
2017-08-02 15:36:22.597 THREAD 31 INFO: /* Some of the fields are not useful in the mybatis, keep them for now in case we want to change the GroupPolicyTO */ CREATE PROCEDURE SEM_GET_GROUP_BY_ID ( @DomainId CHAR(32), @GroupId CHAR(32) ) AS BEGIN SET NOCOUNT ON DECLARE @AppliedPolicyId CHAR(32) /* Ensure CLIENT_GROUPS_CACHE is up-to-date */ DECLARE @RootGroupId CHAR(32) SELECT @RootGroupId = ID FROM BASIC_METADATA WITH (NOLOCK) WHERE TYPE='SemClientGroupTree' AND DOMAIN_ID = @DomainId AND DELETED = 1 EXEC SEM_UPDATE_CLIENT_GROUPS_CACHE @DOMAIN_ID=@DomainId, @ROOT_GROUP_ID = @RootGroupId /* Get inheritated group ID if this group is inherited from its parent */ EXEC @AppliedPolicyId = GET_APPLIED_POLICY_ID @CURRENT_GROUP_ID = @GroupId SELECT C.DOMAIN_ID, VD.NAME AS DOMAINNAME, C.GROUP_ID, C.GROUP_NAME, ISNULL(C.CREATOR_ID, '00000000000000000000000000000000') AS CREATOR_ID, ISNULL(C.DESCRIPTION, '') AS DESCRIPTION, ISNULL(C.CREATE_TIME, 0) AS CREATE_TIME, ISNULL(C.MODIFY_TIME, 0) AS MODIFY_TIME, T.FULLPATH, T.LEVEL, SN.PROFILE_SERIAL_NO, SN.POLICY_LAST_MODIFIED, SN.IPS_SERIAL_NO, ISNULL(GS.COUNT_COMPUTERS,0) AS COUNT_COMPUTERS, ISNULL(GS.COUNT_USERS,0) AS COUNT_USERS, CASE WHEN P.POLICY_MODE = 'USE_LOCAL' THEN 0 ELSE 1 END AS POLICY_INHERITANCE_ENABLED, PP.DEFAULT_LOCATION_ID AS DEFAULT_LOCATION_ID FROM CLIENT_GROUPS_CACHE C INNER JOIN V_CLIENT_GROUP_TREE T ON C.GROUP_ID = T.GROUP_ID INNER JOIN V_DOMAINS VD ON VD.ID = C.DOMAIN_ID LEFT JOIN V_POLICY_INFO P ON C.POLICY_LINK = P.POLICY_ID LEFT JOIN SERIAL_NUMBERS SN on C.GROUP_ID = SN.GROUP_ID LEFT JOIN ( SELECT SC.GROUP_ID, COUNT(DISTINCT VSC.COMPUTER_ID) AS COUNT_COMPUTERS,COUNT(DISTINCT SC.USER_NAME) AS COUNT_USERS FROM SEM_CLIENT SC INNER JOIN V_SEM_COMPUTER VSC ON SC.COMPUTER_ID = VSC.COMPUTER_ID GROUP BY SC.GROUP_ID ) AS GS ON C.GROUP_ID = GS.GROUP_ID, V_AGENT_POLICY_INFO PP WHERE C.DOMAIN_ID = @DomainId AND T.GROUP_ID = @GroupId AND PP.AGENT_POLICY_ID = @AppliedPolicyId END
2017-08-02 15:36:22.628 THREAD 31 SEVERE: SQL Exception:
2017-08-02 15:36:22.628 THREAD 31 SEVERE: SQL Command: /* Some of the fields are not useful in the mybatis, keep them for now in case we want to change the GroupPolicyTO */ CREATE PROCEDURE SEM_GET_GROUP_BY_ID ( @DomainId CHAR(32), @GroupId CHAR(32) ) AS BEGIN SET NOCOUNT ON DECLARE @AppliedPolicyId CHAR(32) /* Ensure CLIENT_GROUPS_CACHE is up-to-date */ DECLARE @RootGroupId CHAR(32) SELECT @RootGroupId = ID FROM BASIC_METADATA WITH (NOLOCK) WHERE TYPE='SemClientGroupTree' AND DOMAIN_ID = @DomainId AND DELETED = 1 EXEC SEM_UPDATE_CLIENT_GROUPS_CACHE @DOMAIN_ID=@DomainId, @ROOT_GROUP_ID = @RootGroupId /* Get inheritated group ID if this group is inherited from its parent */ EXEC @AppliedPolicyId = GET_APPLIED_POLICY_ID @CURRENT_GROUP_ID = @GroupId SELECT C.DOMAIN_ID, VD.NAME AS DOMAINNAME, C.GROUP_ID, C.GROUP_NAME, ISNULL(C.CREATOR_ID, '00000000000000000000000000000000') AS CREATOR_ID, ISNULL(C.DESCRIPTION, '') AS DESCRIPTION, ISNULL(C.CREATE_TIME, 0) AS CREATE_TIME, ISNULL(C.MODIFY_TIME, 0) AS MODIFY_TIME, T.FULLPATH, T.LEVEL, SN.PROFILE_SERIAL_NO, SN.POLICY_LAST_MODIFIED, SN.IPS_SERIAL_NO, ISNULL(GS.COUNT_COMPUTERS,0) AS COUNT_COMPUTERS, ISNULL(GS.COUNT_USERS,0) AS COUNT_USERS, CASE WHEN P.POLICY_MODE = 'USE_LOCAL' THEN 0 ELSE 1 END AS POLICY_INHERITANCE_ENABLED, PP.DEFAULT_LOCATION_ID AS DEFAULT_LOCATION_ID FROM CLIENT_GROUPS_CACHE C INNER JOIN V_CLIENT_GROUP_TREE T ON C.GROUP_ID = T.GROUP_ID INNER JOIN V_DOMAINS VD ON VD.ID = C.DOMAIN_ID LEFT JOIN V_POLICY_INFO P ON C.POLICY_LINK = P.POLICY_ID LEFT JOIN SERIAL_NUMBERS SN on C.GROUP_ID = SN.GROUP_ID LEFT JOIN ( SELECT SC.GROUP_ID, COUNT(DISTINCT VSC.COMPUTER_ID) AS COUNT_COMPUTERS,COUNT(DISTINCT SC.USER_NAME) AS COUNT_USERS FROM SEM_CLIENT SC INNER JOIN V_SEM_COMPUTER VSC ON SC.COMPUTER_ID = VSC.COMPUTER_ID GROUP BY SC.GROUP_ID ) AS GS ON C.GROUP_ID = GS.GROUP_ID, V_AGENT_POLICY_INFO PP WHERE C.DOMAIN_ID = @DomainId AND T.GROUP_ID = @GroupId AND PP.AGENT_POLICY_ID = @AppliedPolicyId END
2017-08-02 15:36:22.628 THREAD 31 SEVERE: SQLState: 42S01
2017-08-02 15:36:22.628 THREAD 31 SEVERE: Message: [Sybase][JDBC Driver][SQL Anywhere]Item 'SEM_GET_GROUP_BY_ID' already exists
2017-08-02 15:36:22.628 THREAD 31 SEVERE: Vendor: -110
2017-08-02 15:36:22.644 THREAD 31 SEVERE: java.sql.SQLException: [Sybase][JDBC Driver][SQL Anywhere]Item 'SEM_GET_GROUP_BY_ID' already exists
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at sybase.jdbc4.sqlanywhere.IIStatement.execute(Native Method)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at sybase.jdbc4.sqlanywhere.IStatement.execute(IStatement.java:327)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.DatabaseUtilities.execCommandFromScript(DatabaseUtilities.java:1995)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:246)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.EmbededDbHelper.upgrade(EmbededDbHelper.java:477)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:3875)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:683)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeTask.go(UpgradeTask.java:123)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeProgressPanel$2.construct(UpgradeProgressPanel.java:251)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.util.SwingWorker$2.run(SwingWorker.java:159)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at java.lang.Thread.run(Thread.java:745)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: java.sql.SQLException: java.sql.SQLException: [Sybase][JDBC Driver][SQL Anywhere]Item 'SEM_GET_GROUP_BY_ID' already exists
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.DatabaseUtilities.execCommandFromScript(DatabaseUtilities.java:2005)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:246)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.EmbededDbHelper.upgrade(EmbededDbHelper.java:477)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:3875)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:683)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeTask.go(UpgradeTask.java:123)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeProgressPanel$2.construct(UpgradeProgressPanel.java:251)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.util.SwingWorker$2.run(SwingWorker.java:159)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at java.lang.Thread.run(Thread.java:745)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: java.sql.SQLException: Failed to upgrade schema: java.sql.SQLException: java.sql.SQLException: [Sybase][JDBC Driver][SQL Anywhere]Item 'SEM_GET_GROUP_BY_ID' already exists
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.db.util.EmbededDbHelper.upgrade(EmbededDbHelper.java:485)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:3875)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:683)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeTask.go(UpgradeTask.java:123)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.server.upgrade.ui.UpgradeProgressPanel$2.construct(UpgradeProgressPanel.java:251)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at com.sygate.scm.util.SwingWorker$2.run(SwingWorker.java:159)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: at java.lang.Thread.run(Thread.java:745)
2017-08-02 15:36:22.644 THREAD 31 SEVERE: Upgrade.doUpgrade java.sql.SQLException: Failed to upgrade schema: java.sql.SQLException: java.sql.SQLException: [Sybase][JDBC Driver][SQL Anywhere]Item 'SEM_GET_GROUP_BY_ID' already exists
2017-08-02 15:36:22.644 THREAD 31 INFO: ServerXml> deleteBackupFile>> Is backup file deleted ? true
2017-08-02 15:36:22.644 THREAD 31 INFO: ServerXml> deleteServerROOTXmlBackupFiles>> Is ROOT.xml.bak file deleted ? true
2017-08-02 15:36:22.644 THREAD 31 INFO: ServerXml> deleteBackupFile>> Is backup file deleted ? true
2017-08-02 15:36:22.644 THREAD 31 INFO: ServerXml> deleteServerROOTXmlBackupFiles>> Is Server.xml.bak file deleted ? true
2017-08-02 15:36:22.644 THREAD 31 WARNING: Upgrade> doUpgrade>> Upgrade process completed in (ms) : 39874
2017-08-02 15:36:22.706 THREAD 31 INFO: AuditUtil> auditEvent>> The Upgrading is executed by windows user: bdktech
2017-08-02 15:36:22.753 THREAD 27 INFO: MainFrame>> doInitFinalPanel> Upgrade.serviceInstallState = 0
2017-08-02 15:37:52.530 THREAD 27 INFO: Upgrade> updateVSICorSVAClientExistsOrNotStatus>> Started. started@ 1501702672530ms
2017-08-02 15:37:52.593 THREAD 27 INFO: checkQueryCount> run>> VSICCLIENT_COUNT: 0
2017-08-02 15:37:52.593 THREAD 27 INFO: checkQueryCount> run>> SVA_COUNT: 0
2017-08-02 15:37:52.593 THREAD 27 INFO: Upgrade> updateVSICorSVAClientExistsOrNotStatus>> Started. started@ 1501702672593ms
2017-08-02 15:37:52.608 THREAD 27 INFO: checkQueryCount> run>> VSICCLIENT_COUNT: 0
2017-08-02 15:37:52.608 THREAD 27 INFO: checkQueryCount> run>> SVA_COUNT: 0
2017-08-02 15:50:34.834 THREAD 27 INFO: Utility>> runScmHelper: Error-> Failed to run ScmHelper!!
2017-08-02 15:50:34.834 THREAD 27 INFO: UpgradeFinalPanel >> saveStage > Launching log file...