Solution 1 :

Run below script:

**Query will run for long time

If after run Solution 1 still prompted above error then proceed to solution 2:

Run below script:

After run script, fully close QNE Optimum and re-open to upgrade database

Above scenario is specific cases, Please backup before execute.

Please refer : How to Connect to Database use Microsoft SQL Server Management Studio


Please refer : How to install Microsoft SQL Management Studio