SQL Server Engine not found SP2

Source: Internet
Author: User

Original: SQL Server Engine SP2 not found

Recently, I had a client who had a very strange problem. When he installed SQL Server SP2, SP2 's installer was unable to find SQL Server. The interface is as follows:

The normal interface should look like this:

As you can see, the SQL instance sqlexpress on my machine is listed above. So why can't we list the customers ' machines?

I first consider the download is not the SP2 version of the wrong? Carefully checked, the client's SQL Server is x64 version, and the downloaded SP2 is also version 64bit. So the patch is fine.

Then I checked the version of SQL Server, have you already patched it? View errorlog:

2011-06-10 00:00:09.09 spid89 Microsoft SQL Server (RTM)-10.0.1600.22 (X64)

Jul 9 2008 14:17:44

Copyright (c) 1988-2008 Microsoft Corporation

Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600:)

Well, it's 10.0.1600.22, it's the RTM version, and it really hasn't hit any patches.

Is there a problem with the registry of SQL Server that causes SP2 to find an instance of SQL Server?

I used the Processmonitor tool to analyze the list of registrations visited by the SP2 Setup program and found no particular problem. I even exported the following SQL Server related registry:

A) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

b) Hkey_local_machine\software\microsoft\windows\currentversion\installer

c) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

I carefully compared the above registry with the normal machine registry, and did not find the problem. The registration form is good.

So where does the problem really go? Why is the customer's SP2 not find the Sqlservver instance?

It appears that a thorough study of the SP2 installation process is needed.

The general SP2 installation process is this:

1) Run Setup.exe first. It checks. NET and MSI run environments are eligible. This is because SP2 is. NET program, required. NET and MSI support.

2) then Setup100.exe run. It is used primarily to run predefined rules. such as whether the version of the OS is right, whether the WMI service can access it, etc. There are a number of such rules, such as the following:

3) Run Setup100.exe again to execute SP2 's pre-defined action. such as Initializemsiextension,rundiscoveryaction,validatefeaturesettings. The execution is finished SP2 the old installation is ready.

According to our case, SP2 was unable to find the SQL instance. The discovery action is to list all SQL Server products on the machine. The SQL Server should not be found in the Rundiscoveryaction action. Discovery Action has a log, if so where is it?

Fortunately, the result of this action is in%ProgramFiles%\Microsoft SQL server\100\setup Bootstrap\log\<yyyymmdd_hhmm>\datastore\datastore _discovery.xml inside. This is an XML file. We specifically compare this file with the normal case differences. Got it!! The following installedstate and featurestate normally have a value of 3 or 5 instead of 1:

What do these values mean:

1--> indicates that the product is in a "recommended" state and is not normal.

3--> indicates that the product is installed locally.

5--> the default state. Indicates that the product is installed.

Then the problem is now easy. Why is the State 1? Can you change it? How did SP2 get this featurestate? After debugging the trace Setup100.exe finally found out that it was called by the Msiqueryfeaturestateex () function. After careful measurement of risk I wrote a program call MsiConfigureFeature () change featurestate to 3 and then install, hey, everything's fine. SP2 successfully installed.

SQL Server Engine not found SP2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.