Jump to content
gigabytes

KSC upgrade failed from 10.3.407 to 10.4.343 [Solved]

Recommended Posts

Just performed the KSC upgrade from 10.3.407 to the latest 10.4.343.

 

The whole process was quite normal without any error. When I first started the console, it failed to connect. Found the KSC admin server service couldn't be started with below error msg. Tried to restore to the last backup and restart the server. Still the same. Any hope to modify something to solve. I don't want to re-install the whole KSC.

 

Service 'kladminserver' has been stopped due to an error. #1950 (325) Generic db error: "325 '{42000} Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.; Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.'

 

LastStatement='CREATE PROCEDURE kltst_fill_bc_domains @nNumHosts INT AS SET NOCOUNT ON DECLARE @nHostsPerDomain INT EXEC kltst_get_hosts_per_domain @nNumHosts, @nHostsPerDomain OUTPUT DECLARE @nCurDomainId BIGINT; SELECT @nCurDomainId = MAX(nDomainId) + 10000 from bcd_host_beacons IF (@nCurDomainId IS NULL) SET @nCurDomainId = 10001 CREATE TABLE #kltst_host_domains( nId int IDENTITY (0, 1) PRIMARY KEY, nHostId BIGINT, nDomainId BIGINT ); INSERT INTO #kltst_host_domains(nHostId) SELECT #kltst_hosts.nTstHost FROM #kltst_hosts INNER JOIN Hosts ON Hosts.nId = #kltst_hosts.nTstHost LEFT OUTER JOIN bcd_host_beacons ON #kltst_hosts.nTstHost = bcd_host_beacons.nHostId WHERE bcd_host_beacons.nHostId IS NULL ORDER BY nVServer; UPDATE #kltst_host_domains SET nDomainId = @nCurDomainId + (nId / @nHostsPerDomain); INSERT INTO bcd_domains(nDomain) SELECT DISTINCT nDomainId FROM #kltst_host_domains INSERT INTO #ua_affected_bc_domains(nId) SELECT DISTINCT nDomainId FROM #kltst_host_domains INSERT INTO bcd_beacon_domains(nDomain, nBeacon) SELECT nDomainId, nHostId FROM ( SELECT nHostId, nDomainId, ROW_NUMBER() OVER (PARTITION BY #kltst_host_domains.nDomainId ORDER BY nHostId DESC) as nRow FROM #kltst_host_domains) t_beacons WHERE t_beacons.nRow <= 10 INSERT INTO bcd_host_beacons(nHostId, nDomainId, nB0, nB1, nB2, nB3, nB4, nB5, nB6, nB7, nB8, nB9) SELECT t_hosts.nHostId, t_hosts.nDomainId, t_beacons.nBc0, t_beacons.nBc1, t_beacons.nBc2, t_beacons.nBc3, t_beacons.nBc4, t_beacons.nBc5, t_beacons.nBc6, t_beacons.nBc7, t_beacons.nBc8, t_beacons.nBc9 FROM #kltst_host_domains as t_hosts INNER JOIN ( SELECT nDomainId, ISNULL([1], 0) "nBc0", ISNULL([2], 0) "nBc1", ISNULL([3], 0) "nBc2", ISNULL([4], 0) "nBc3", ISNULL([5], 0) "nBc4", ISNULL([6], 0) "nBc5", ISNULL([7], 0) "nBc6", ISNULL([8], 0) "nBc7", ISNULL([9], 0) "nBc8", ISNULL([10], 0) "nBc9" FROM ( SELECT nDomainId, nRow, nHostId FROM ( SELECT nHostId, nDomainId, ROW_NUMBER() OVER (PARTITION BY #kltst_host_domains.nDomainId ORDER BY nHostId DESC) as nRow FROM #kltst_host_domains) t_beacons WHERE t_beacons.nRow <= 10 ) beacons_t PIVOT (SUM (nHostId) FOR nRow IN ([1], [2], [3], [4], [5], [6], [7], [8], [9], [10])) piv ) as t_beacons ON t_hosts.nDomainId = t_beacons.nDomainId'"

Edited by Gigabytes

Share this post


Link to post

Searching from the knowledge base. There were similar DB problems after the KSC upgrade. The fix was replaced a DLL file which was provided from Kaspersky support.

So please take a look whether it's the same case.

Share this post


Link to post
Searching from the knowledge base. There were similar DB problems after the KSC upgrade. The fix was replaced a DLL file which was provided from Kaspersky support.

So please take a look whether it's the same case.

 

Hello,

 

please state DBMS version.

Where did you find information about the similar DB problem ? Please give a link.

Thank you.

 

Share this post


Link to post

Thanks for your reply Dmitry. :rolleyes:

 

What is DBMS version? I didn't let the KSC to use the MS SQL for DB. The above error messages was found from the Windows Event Log > Applications and Services Logs > Kaspersky Event Log.

 

Some more event log that might help.

...upgrading Administration Server has completed with an error in script 1, batch 17178. Error: #1950 (325) Generic db error: "325 '{42000} Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.; Incorrect syntax near 'PIVOT'. You may need to set the compatibility level of the current database to a higher value to enable this feature. See help for the SET COMPATIBILITY_LEVEL option of ALTER DATABASE.' LastStatement='CREATE PROCEDURE kltst_fill_bc_domains

 

 

Below are the information that I found from the Troubleshooting topic at KSC 10 support web page.

 

- Upgrading to Kaspersky Security Center 10 results in "Database error occurred: #1950 (547) Generic db error" event registered in the log

http://support.kaspersky.com/9838

 

- Issues related to Administration Server service operation after upgrading Kaspersky Security Center 10 to SP2

http://support.kaspersky.com/13049

Edited by Gigabytes

Share this post


Link to post
Thanks for your reply Dmitry. :rolleyes:

 

What is DBMS version? I didn't let the KSC to use the MS SQL for DB.

 

Below are the information that I found from the Troubleshooting topic at KSC 10 support web page.

 

- Upgrading to Kaspersky Security Center 10 results in "Database error occurred: #1950 (547) Generic db error" event registered in the log

http://support.kaspersky.com/9838

 

- Issues related to Administration Server service operation after upgrading Kaspersky Security Center 10 to SP2

http://support.kaspersky.com/13049

 

Hello.

 

By the quotation you posted, it doesn't look like either of these issues.

Please specify what DB you are using and which version. What it does look like is a compatibility issue.

 

Thank you.

Share this post


Link to post

I don't think this KSC was installed with the external DB as I know so far. It's originally installed by a already resigned co-worker. The last current version of the KSC is 10.3.407 with patch B. The server is Windows Server 2008 R2 with all latest Windows Updates installed.

 

Is there any way to check the DB version that you mentioned.

Share this post


Link to post
I don't think this KSC was installed with the external DB as I know so far. It's originally installed by a already resigned co-worker. The last current version of the KSC is 10.3.407 with patch B. The server is Windows Server 2008 R2 with all latest Windows Updates installed.

 

Is there any way to check the DB version that you mentioned.

 

You can check which version of MS SQL is installed on Programs and Features.

 

Thank you.

Share this post


Link to post

This Windows Server 2008 R2 was installed with several MS SQL but it's for the other applications use. I couldn't find any KSC related DB from 2008 R2 SQL Management Studio. The only one really in use should be the MS SQL 2008 R2. The others seems were not in use but only installed.

As I mentioned that I don't think the KSC was installed or connected with the MS SQL.

 

Below are the MS SQL entry from the Programs and Features list of Control Panel

MS SQL Server 2005

MS SQL Server 2008 R2 (64 bit)

MS SQL Server 2012 (64 bit)

MS SQL Server Compact 3.5 SP2

 

Share this post


Link to post
This Windows Server 2008 R2 was installed with several MS SQL but it's for the other applications use. I couldn't find any KSC related DB from 2008 R2 SQL Management Studio. The only one really in use should be the MS SQL 2008 R2. The others seems were not in use but only installed.

As I mentioned that I don't think the KSC was installed or connected with the MS SQL.

 

Below are the MS SQL entry from the Programs and Features list of Control Panel

MS SQL Server 2005

MS SQL Server 2008 R2 (64 bit)

MS SQL Server 2012 (64 bit)

MS SQL Server Compact 3.5 SP2

 

KSC is always installed along with an SQL server. An MS SQL Express Edition is included in the distribution.

Depending on which KSC version was initially installed, a different version could have been used for the KAV database and could have become unsupported by the latest version (which it would be in case of MS SQL 2005, see the system requirements).

 

In any case, to fix this, KSC needs to be removed and reinstalled. The KAV database also needs to be removed (not necessary, but otherwise is will be dead weight, since it cannot be re-used). KSC should then be installed cleanly, with a new DB being created by the installer on a supported version of an SQL server, with no existing database on the server by that name. Then, the latest backup should be restored.

 

Thank you.

Share this post


Link to post

So what should I do is

 

1 - uninstall the KSC 10.4.343

2 - uninstall the MS SQL 2005

3 - reinstall the KSC (Which version? My last KSC backup is from 10.3.407)

4 - Which DB should I choose during the reinstall if prompt? (Or can let it automatically choose or automatically install MS SQL Express Edition by itself)

5 - use the klbackup.exe to restore the last 10.3.407 backup

6 - do I need to activate the KSC first with the activation code? Or no need to do anything before the restore?

7 - how about the license key? Do I need to re add the license key again?

 

Please advise.

Share this post


Link to post
So what should I do is

 

1 - uninstall the KSC 10.4.343

2 - uninstall the MS SQL 2005

3 - reinstall the KSC (Which version? My last KSC backup is from 10.3.407)

4 - Which DB should I choose during the reinstall if prompt? (Or can let it automatically choose or automatically install MS SQL Express Edition by itself)

5 - use the klbackup.exe to restore the last 10.3.407 backup

6 - do I need to activate the KSC first with the activation code? Or no need to do anything before the restore?

7 - how about the license key? Do I need to re add the license key again?

 

Please advise.

 

1. Since it is malfunctioning, yes

2. Not necessarily, only the KAV database needs to be removed, from whichever server it is located on

3. Backups are forwards compatible. You can install 10.4.343 and should be able to restore a backup from 10.3.407 fine

4. Make sure the server version is among the supported and the database name the installer is about to create is unoccupied

5. You can do so after starting the new server at least once and completing the Quick Start Wizard

6. All such data, including licenses and the server certificate, is stored in the backup

 

Thank you.

Share this post


Link to post

Well, I got a little trouble while performing the restore. It couldn't copy the files to the KasperskyData share folder(kept from last uninstall without change) with access error even I was using the local Administrator account. So I needed to grant full R/W permission for local Administrator and Domain Administrators account to this share folder.

 

The Kaspersky Admin Server service was not up after the restore process. After restarted the service, it still couldn't be connected to console. I noticed it was running busy in the background. So have to wait for a long time about 15 mins to 30 mins. And tried to reboot the Windows Server. Finally connected to console. :lol:

 

Again, thanks a lot for your quick response and advise help. :cb_punk:

 

Will monitor for a while if anything wrong.

Share this post


Link to post
Well, I got a little trouble while performing the restore. It couldn't copy the files to the KasperskyData share folder(kept from last uninstall without change) with access error even I was using the local Administrator account. So I needed to grant full R/W permission for local Administrator and Domain Administrators account to this share folder.

 

The Kaspersky Admin Server service was not up after the restore process. After restarted the service, it still couldn't be connected to console. I noticed it was running busy in the background. So have to wait for a long time about 15 mins to 30 mins. And tried to reboot the Windows Server. Finally connected to console. :lol:

 

Again, thanks a lot for your quick response and advise help. :cb_punk:

 

Will monitor for a while if anything wrong.

Thank you for information, can we mark this topic as solved?

Share this post


Link to post

Just a note is the KSC 10.4.343 are coming with the MS SQL Server 2014 Express SP1.

 

Also I think you should modify the upgrade process to check the current DB version first before to proceed. If the current DB version is not supported, it should failed with recommendation. :b_idea:

 

Yes, my case was solved. :) :bravo:

Share this post


Link to post
Just a note is the KSC 10.4.343 are coming with the MS SQL Server 2014 Express SP1.

 

Also I think you should modify the upgrade process to check the current DB version first before to proceed. If the current DB version is not supported, it should failed with recommendation. :b_idea:

 

Yes, my case was solved. :) :bravo:

 

Thank you for your feedback and your suggestion!

Share this post


Link to post

×
×
  • Create New...

Important Information

We use cookies to make your experience of our websites better. By using and further navigating this website you accept this. Detailed information about the use of cookies on this website is available by clicking on more information.