1 Problem Description
We planed upgrade SMC2.0 from V100R002C01B025SP04 to V600R006C10SPC900 on Nov10-Nov11.Upgrade path is:V100R002C01B025SP04->V100R002C01B025SP08 --->V100R003C10SPC100 --->V600R006C10SPC900. Unfortunately. An issue occurred when we upgraded V100R003C10SPC100 --->V600R006C10SPC900 operation, SMC2.0 cannot connect to SQL database.
2 Problem Analysis
From the upgrade log, we can see that the upgrade program cannot access the SQL local database(.\sqlexpress) properly when the upgrader connects to the SQL local database.

We tried to use SQL Server Management Studio connect SQL database, but it still faile.

We checked SQL Server service,it already stoped.

We tried start SQL Server manual, but this service would stop automatically. We collected Windows system log and application log to analysis. We found SQL database component upgrade has been abnormal, resulting in the database being unable to start.


From the exception information, we can see that the problem was caused by a failure when SQL Server upgraded the master database infrastructure.
Because the upgrade process of SMC2.0 V100R003C10SPC100 - > SMC2.0 V600R006C10SPC900 involves the upgrade of database components. The database components are upgraded by SQL Server 2008 R2 - > SQL Server 2014, which is provided by Microsoft. Therefore, we need to ask Microsoft engineers for specific analysis of the problem of upgrading database components.
After analyzing the logs, Microsoft engineers found that the root cause of the problem was that the database configuration item Agent_Xp did not start, which led to the failure of upgrading the SQL Server components, and the failure of upgrading led to the master database could not be restored, so the SQL Server could not start.

1 Problem Root Cause
Because the upgrade process of SMC2.0 V100R003C10SPC100 - > SMC2.0 V600R006C10SPC900 involves the upgrade of database components. The database components are upgraded by SQL Server 2008 R2 - > SQL Server 2014, which is provided by Microsoft. Therefore, we need to ask Microsoft engineers for specific analysis of the problem of upgrading database components.
After analyzing the logs, Microsoft engineers found that the root cause of the problem was that the database configuration item Agent_Xp did not start, which led to the failure of upgrading the SQL Server components, and the failure of upgrading led to the master database could not be restored, so the SQL Server could not start.
2 Solution
As the previous rollback to the previous version failed, we reinstalled SMC2.0 V600R006C10SPC900 and then reconfigure all the settings.
We will test it in the laboratory, and if this problem must arise, we will make a clear prompt in the upgrade guide: before the subsequent upgrade involving SQL Server components, we need to check whether the database configuration item Agent_Xp is started properly.
//Check command:


If it is found that Agent_XP cannot start properly, you can try to set it up in the following ways
a. Add -T902 to the SQL boot parameter to prohibit upgrade script from running.


b. And then start SQL SERVER, when SQL should be able to boot normally. Go to SQL SERVER and run the following statement. Enable Agent XPs

c. And then close the SQL SERVER, remove - T902, and restart the SQL SERVER so that upgrade script can continue.