upgrade to MR2 failed 'cos of SQL error message
Updated: 23 May 2010 | 26 comments
I did a upgrade to MR2. After upgrade the "Management Server Upgrade Wizard" started and during initializing procedure the wizard stopped (10% done). Log file error message : (Violation of PRIMARY KEY constraint 'PK_DATA_HANDLER'. Cannot insert duplicate key in object 'dbo.DATA_HANDLER')
I use a SQL 2005 DB.
Has anybody the same error massage or the same problems with SQL DB and upgrading to MR2 ?
Thank you !
Rudolf
Discussion Filed Under:
Comments
Config schema format is upgraded from: 11.0.0.3
Launch FRame
net stop semsrv
E:\Symantec\Symantec Endpoint Protection Manager\bin\ODBCUtil.exe SQLServer null sepdbuser passwordxxxx MSSQLServer
Has valid SAV license
Info>> No SNAC license file in E:\Symantec\Symantec Endpoint Protection Manager\tomcat\etc\license
SQL Exception:
SQL Command: ALTER TABLE ANOMALYDETECTIONS ADD ID CHAR(32) NOT NULL DEFAULT upper(replace(newid(),'-',''))
SQLState: S1000
Message: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
Vendor: 2705
java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:623)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1042)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:999)
at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:152)
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:237)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: Failed to upgrade schema in execCommandFromScript: java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:163)
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:237)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: Failed to upgrade schema: java.sql.SQLException: Failed to upgrade schema in execCommandFromScript: java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:249)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
Launching log file ...
I am getting the exact same error as Burnin.Ape.
Stuck at 10%.. can anyone from Symantec advise as to how to fix this?
Thanks
Daniel
How can i check, if the update of the database scheme worked for me?
In my testlab, the upgrade to mr2 worked fine. But in production env. i'm getting the error above.
Turned back to earlier snapshot and did the update again. Same result...
Ideas...?
Thanks
did anyone had luck? or a hint what else can be tried?
Anyone lucky here?
Make sure that the server is running and your session has not timed out.
If you can reach the server but cannot log on, make sure that you provided the correct parameters.
If you are experiencing network issues, contact your system administrator. ErrorCode: 0x80020000 [Site: Symantec EndPoint Security] [Server: blackpearl]
2008-04-18 08:45:27.093 SCHWERWIEGEND: os.name = Windows 2003
2008-04-18 08:45:27.093 SCHWERWIEGEND: os.version = 5.2
2008-04-18 08:45:27.093 SCHWERWIEGEND: os.arch = x86
2008-04-18 08:45:27.093 SCHWERWIEGEND: java.version = 1.5.0_14
2008-04-18 08:45:27.093 SCHWERWIEGEND: java.vendor = Sun Microsystems Inc.
2008-04-18 08:45:27.093 SCHWERWIEGEND: java.vm.name = Java HotSpot(TM) Server VM
2008-04-18 08:45:27.093 SCHWERWIEGEND: java.vm.version = 1.5.0_14-b03
2008-04-18 08:45:27.109 SCHWERWIEGEND: java.home = C:\Program Files\Symantec\Symantec Endpoint Protection Manager\jdk\jre
2008-04-18 08:45:27.109 SCHWERWIEGEND: catalina.home = C:\Program Files\Symantec\Symantec Endpoint Protection Manager\tomcat
2008-04-18 08:45:27.109 SCHWERWIEGEND: java.user = null
2008-04-18 08:45:27.109 SCHWERWIEGEND: user.language = **
2008-04-18 08:45:27.109 SCHWERWIEGEND: user.country = **
2008-04-18 08:45:27.109 SCHWERWIEGEND: scm.server.version = 11.0.2000.1567
2008-04-18 08:45:32.468 SCHWERWIEGEND: ================== StartClientTransport ===================
2008-04-18 08:45:33.750 SCHWERWIEGEND: Schedule is started!
2008-04-18 08:45:35.062 SCHWERWIEGEND: StateCheckpointTask connect to secars failed: SERVICE NOT AVAILABLE
2008-04-18 08:45:35.578 SCHWERWIEGEND: IISCacheTask connect to secars failed: SERVICE NOT AVAILABLE
2008-04-18 08:46:33.781 SCHWERWIEGEND: Unknown Exception in: com.sygate.scm.server.task.SecurityDataTask
java.net.UnknownHostException: securityresponse.symantec.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:520)
at java.net.Socket.connect(Socket.java:470)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
at sun.net.www.http.HttpClient.New(HttpClient.java:304)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at com.sygate.scm.common.communicate.Communicator.getRequestInputStream(Communicator.java:531)
at com.sygate.scm.common.communicate.Communicator.getRequestInputStreamWithAuthProxy(Communicator.java:512)
at com.sygate.scm.server.util.securitydata.ThreatData.download(ThreatData.java:91)
at com.sygate.scm.server.util.securitydata.ThreatData.refresh(ThreatData.java:53)
at com.sygate.scm.server.task.SecurityDataTask.processThreats(SecurityDataTask.java:123)
at com.sygate.scm.server.task.SecurityDataTask.run(SecurityDataTask.java:91)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
com.sygate.scm.common.communicate.CommunicationException: Failed to connect to the server.
If you can reach the server but cannot log on, make sure that you provided the correct parameters.
If you are experiencing network issues, contact your system administrator. ErrorCode: 0x80020000
at com.sygate.scm.common.communicate.Communicator.getRequestInputStream(Communicator.java:564)
at com.sygate.scm.common.communicate.Communicator.getRequestInputStreamWithAuthProxy(Communicator.java:512)
at com.sygate.scm.server.util.securitydata.ThreatData.download(ThreatData.java:91)
at com.sygate.scm.server.util.securitydata.ThreatData.refresh(ThreatData.java:53)
at com.sygate.scm.server.task.SecurityDataTask.processThreats(SecurityDataTask.java:123)
at com.sygate.scm.server.task.SecurityDataTask.run(SecurityDataTask.java:91)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Abhishek Pradhan, PMP, MCT
Consultant | Microsoft Corp.
Blog: http://blog.abhishekpradhan.net | SIG Lead - Pune IT Pro (Microsoft Pune User Group) | http://www.puneusergroup.org
Is there a way to run the database upgrade wizard again without going through the entire installation?
I can't really uninstall and reinstall the entire SEPM.
Abhishek Pradhan, PMP, MCT
Consultant | Microsoft Corp.
Blog: http://blog.abhishekpradhan.net | SIG Lead - Pune IT Pro (Microsoft Pune User Group) | http://www.puneusergroup.org
If you can reach the server but cannot log on, make sure that you provided the correct parameters.
If you are experiencing network issues, contact your system administrator. ErrorCode: 0x80020000 [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:44:44 CEST: Management server started up successfully [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:44:34 CEST: Management server shut down gracefully [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LUALL.EXE finished running. [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LiveUpdate failed. [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LiveUpdate encountered one or more errors. Return code = 4. [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LiveUpdate will start next on Montag, 21. April 2008 14:42:57 CEST on blackpearl. [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LiveUpdate started. [Site: Symantec EndPoint Security] [Server: blackpearl]
21. April 2008 10:42:57 CEST: LUALL.EXE has been launched. [Site: Symantec EndPoint Security] [Server: blackpearl]
OK, got it. Could you try to do a fresh install of MR-2 on a test system, and then restore the old DB and check if the same error persists ?
You may follow the steps given below to do so -
ON THE OLD INSTALLATION
Copy the "Server Private Key Backup folder" from:
\\ProgramFiles\Symantec\ Symantec Endpoint Protection Manager\Server Private Key Backup
Paste it to another storage area (as it will be deleted during Symantec Endpoint protection Manager uninstall)
Copy the "Data folder" from:
\\ProgramFiles\Symantec\ Symantec Endpoint Protection Manager\Data
Paste it to another storage area.
Copy the "sem5.db" database file from:
\\ProgramFiles\Symantec\ Symantec Endpoint Protection Manager\db
Paste it to another storage area.
Make a note of the "Encryption Password" used during the install.
ON THE NEW INSTALLATION AFTER THE DISASTER RECOVERY OF OPERATING SYSTEM (OS)
Ensure that the server has the same IP Address and Host Name the Operating System has been Installed.
Install the "Symantec Endpoint Protection Manager" with the "Embedded Database."
Enter the "Encryption Password" that was used on the old "Symantec Endpoint Protection Manager" installation.
Log in to the Console
Click Admin.
Select Tasks> Servers.
Under "View Servers", expand Local Site.
Click the <computer name> that identifies the local site.
Select Tasks.
Click Manage Server Certificate.
In the "Welcome panel", click Next.
In the "Manage Server Certificate panel", select Update the Server Certificate
Click Next.
Under "Select the type of certificate to import", select JKS keystore.
Click Next.
Note: If one of the other certificate types has been implemented, select that type.
In the "JKS Keystore panel", click Browse.
Locate and select the backed up "keystore_<timestamp>.jks" keystore file.
Click OK
Open the "server_<timestamp>.xml" file
Select and copy the "keystore password."
Activate the "JKS Keystore" dialog box.
Paste the "keystore password" into the "Keystore" and "Key boxes."
Note: The only supported paste mechanism is Ctrl + V.
Click Next
Note: If you get an error message that says you have an invalid keystore file, you probably entered invalid passwords. Retry the password copy and paste. (This error message is misleading.)
In the "Complete panel", click Finish.
Stop the services for the "Symantec Embedded database" and the "Symantec Endpoint Protection Manager"
Go to:
\Program Files\Symantec Endpoint Protection Manager\
on the new "Symantec Endpoint Protection Manager" and remove the "Data folder."
Move the "old Data folder" under:
\Program Files\Symantec Endpoint Protection Manager\Data
from the old "Symantec Endpoint Protection Manager" install directory to the new "Symantec Endpoint Protection Manager" install directory.
Create a new folder named "db1" in:
\Program Files\Symantec Endpoint Protection Manager\
Move the "sem5.db" from the old "Symantec Endpoint Protection Manager" install directory.
Click Start>Run.
Type regedit
Navigate to:
HKey_Local_Machine\System\CurrentControlSet\services\ASANYs_sem5\Parameters
Open the value name Parameters and the original database:
\Program Files\Symantec Endpoint Protection Manager\db\sem5.db
Change it to:
\Program Files\Symantec Endpoint Protection Manager\db1\sem5.db
Move the "sem5.db" database:
\Program Files\Symantec Endpoint Protection Manager\db
from the old "Symantec Endpoint Protection Manager" install directory to the new "Symantec Endpoint Protection Manager" install directory.
Go to Administrative Tools> Data Sources ODBC
Ensure the database connectivity after the changing the database file location to:
\Program Files\Symantec Endpoint Protection Manager\db1\sem5.db
Run the "Migration Server Configuration Wizard."
Click Yes to replace the database after entering the password
Login to the "Symantec Endpoint Protection Manager" using the old password.
Ensure that the Domain ID is same as it was on the old clients.
If it not, follow the direction in the below document to restore the Domain ID. This will enable client communication http://service1.symantec.com/SUPPORT/ent-security.nsf/docid/2007082112135948
This is Kedar's KB - so feel free to ask him or me any questions in case you face any issues on the same.
Abhishek Pradhan, PMP, MCT
Consultant | Microsoft Corp.
Blog: http://blog.abhishekpradhan.net | SIG Lead - Pune IT Pro (Microsoft Pune User Group) | http://www.puneusergroup.org
Ok, i tried two sceanrios.
1. Uninstall MR1, install MR2 and restore the keystore.
Same effect.
2. Did a fresh install of MR2 on new empty Server (W2k3) linking to the old DB.
Again, getting "Failed to connect to the server.
Make sure that the server is running and your session has not timed out.
If you can reach the server but cannot log on, make sure that you provided the correct parameters.
If you are experiencing network issues, contact your system administrator. ErrorCode: 0x80020000 [Site: Symantec EndPoint Security] [Server: blackpearl]"
Why do i get this message? I'm already logged in. I can navigate through the console.
Everything i try ends in error. And its always the same error.
What does the table ANOMALYDETECTIONS stands for?
Just for testing reasons: I tried my very first DB Backup. On this, i had about 10 clients in the DB, only a few policies, nothing special.
But in the upgrade wizard log file, i'm getting the old error again.
****************************************************************************
SQL Exception:
SQL Command: ALTER TABLE ANOMALYDETECTIONS ADD ID CHAR(32) NOT NULL DEFAULT upper(replace(newid(),'-',''))
SQLState: S1000
Message: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
Vendor: 2705
java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:620)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:483)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:445)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:623)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1042)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:999)
at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:152)
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:237)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: Failed to upgrade schema in execCommandFromScript: java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at com.sygate.scm.server.db.util.DbHelper.execCommandFromScript(DbHelper.java:163)
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:237)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
java.sql.SQLException: Failed to upgrade schema: java.sql.SQLException: Failed to upgrade schema in execCommandFromScript: java.sql.SQLException: Column names in each table must be unique. Column name 'ID' in table 'ANOMALYDETECTIONS' is specified more than once.
at com.sygate.scm.server.db.util.SqlDbHelper.upgrade(SqlDbHelper.java:249)
at com.sygate.scm.server.upgrade.Upgrade.upgradeDatabaseSchema(Upgrade.java:708)
at com.sygate.scm.server.upgrade.Upgrade.doUpgrade(Upgrade.java:198)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$ActualTask.<init>(UpgradeTask.java:190)
at com.sygate.scm.server.upgrade.ui.UpgradeTask$1.construct(UpgradeTask.java:95)
at com.sygate.scm.server.upgrade.ui.SwingWorker$2.run(SwingWorker.java:121)
at java.lang.Thread.run(Thread.java:595)
Launching log file ...
****************************************************************************
If i try with a new fresh install, new DB, everything new. I don't get this message...
If i view the table ANOMALYDETECTIONS in the SQL Management Studio, there's no entry. No entry in the fresh DB and no entry in my original DB. It's just NULL.
resolution?
Was this ever resolved? I have the exact same problem!
Thanks!
Would you like to reply?
Login or Register to post your comment.