Monday, 12 June 2017


Missing MSI & MSP

Symptoms:
SQL Server Setup has encountered the following error:
1)   When we started to do the Installation or Up gradation on the SQL Server if MSI and MSP files missing then we encountered below errors:


2)   After getting above errors, we have to check in error log using below path to identifying the exact error
“C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\Summary.txt”.



 Resolution
Please follow the below steps for resolution if MSI & MSP files:

1)      Before fixing MSI and MSP files, need to run the VBS script to capture all missing MSI and MSP files
2)      Firstly, Create empty folder with Name as Missing_MSI_MSP in any drive which having enough space.
3)      After creating folder, Copy the text mentioned under FindSQLInstallsOnly.vbs Script content to a Notepad and renames the file to FindSQLInstallsOnly.vbs. Copy vbscript from below link
    ( https://support.microsoft.com/en-gb/help/969052/how-to-restore-the-missing-windows-installer-cache-files-and-resolve-problems-that-occur-during-a-sql-server-update)
4)      After creating folder, Copy the text

 


  


5)      Open a Command Prompt and browse to the location where this VBS script is located.

Go to Run < CMD run as Administrator<



Run the following command:

“Cscript FindSQLInstallsOnly.vbs %Server name%_sql_install_details.txt “


6) After running the above command and review the Output which have created as text document.               Find the find the error with Missing files and getting error as highlighted below:

MSI ERROR:
================================================================================
PRODUCT NAME   : Microsoft SQL Server 2008 R2 RsFx Driver
================================================================================
  Product Code: {D8C23BDE-4748-44D9-A9DD-8AB64EB18BE3}
  Version     : 10.51.2500.0
  Most Current Install Date: 20110804
  Target Install Location:
  Registry Path:
   HKEY_CLASSES_ROOT\Installer\Products\EDB32C8D84749D449ADDA86BE41BB83E\SourceList
     Package    : rsfx.msi
  Install Source: \x64\setup\
  LastUsedSource: n; 1; o:\6c4e8f5248900e41e6b64c80d1\x64\setup\

 !!!! rsfx.msi DOES NOT exist on the path in the path o:\6c4e8f5248900e41e6b64c80d1\x64\setup\ !!!!

 Action needed, re-establish the path to o:\6c4e8f5248900e41e6b64c80d1\x64\setup\

Installer Cache File: C:\Windows\Installer\6690cd2.msi

 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 !!!! C:\Windows\Installer\6690cd2.msi DOES NOT exist in the Installer cache. !!!!
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

     Action needed, recreate or re-establish path to the directory:

o:\6c4e8f5248900e41e6b64c80d1\x64\setup\then rerun this script to update installer cache and     results
    
The path on the line above must exist at the root location to resolve this problem with your msi/msp file not being found or corrupted, In some cases you may need to manually copy the missing file or manually
Replace the problem file overwriting it is exist:

 Copy "o:\6c4e8f5248900e41e6b64c80d1\x64\setup\rsfx.msi" C:\Windows\Installer\6690cd2.msi
 Replace the existing file if prompted to do so.

MSP ERROR:

---------------------------------------------------------------------------------
Microsoft SQL Server 2008 Full text search Patches Installed
---------------------------------------------------------------------------------
 Display Name:    Hotfix 2723 for SQL Server Database Services 2008 Full Text (64-bit) (KB971491)
 KB Article URL:  ;http://support.microsoft.com/?kbid=971491
 Install Date:    20100106
   Uninstall able:   1
 Patch Details:
   HKEY_CLASSES_ROOT\Installer\Patches\42BCD43AD9C6D1141A0F427744DCFCA9
   PackageName:   sql_fulltext.msp
    Patch LastUsedSource: n;1;C:\Windows\CUSTOM\InstallSource\microsoft\MSSQLServer\SQL2k8ENTx64_2723\Servers\CU\x64\setup\
   Installer Cache File Path:     C:\Windows\Installer\2b61c3.msp
Per SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Patches\42BCD43AD9C6D1141A0F427744DCFCA9\LocalPackage

!!!! C:\Windows\Installer\2b61c3.msp package DOES NOT exist in the Installer cache. !!!!

     Action needed, recreate or re-establish path to the directory:
       C:\Windows\CUSTOM\InstallSource\microsoft\MSSQLServer\SQL2k8ENTx64_2723\Servers\CU\x64\setup\ then rerun this script to update installer cache and results
    
The path on the line above must exist at the root location to resolve this problem with your msi/msp file not being found or corrupted, In some cases you may need to manually copy missing files or manually
Replace the problem file, Copy

"C:\Windows\CUSTOM\InstallSource\microsoft\MSSQLServer\SQL2k8ENTx64_2723\Servers\CU\x64\setup\sql_fulltext.msp" C:\Windows\Installer\2b61c3.msp

 Replace the existing file if prompted to do so.



Fixing MSI Files MSP files:

Launch media go to last used path or location of the file and then copy the file to Installer cache and rename with as shown in VBS script file (Repeat this step for all missing files).

Ex: As per above details
Go to the last used path with exists (o:\6c4e8f5248900e41e6b64c80d1\x64\setup\) or If this error message was generated for rsfx.msi, sql_fulltext.msp then you need to locate this file from the setup media under the folder structure: MSI:\x64\setup\rsfx_msi\,
                                                              MSP:CU\x64\setup\sql_fulltext.msp








Rename with rsfx.msi to 6690cd2.msi, sql_fulltext.msp to 2b61c3.msp and copy in Installer cache which as shown in VBS script file (Repeat this step for all missing files).

2) Not clustered or the cluster service is up and online. Failed




a) This issue occurs because of an invalid MSCluster namespace in Windows Management Instrumentation (WMI).
Resolution:
To resolve this issue, follow these steps:
1.At an administrative command prompt, type cd %systemroot%\system32\wbem, and then press Enter.
2.Type the following command, and press Enter:
regsvr32 cluswmi.dll
3.Type the following command, and press Enter:
mofcomp.exe ClusWMI.mof
4.Rerun the Setup of the service packs or cumulative updates on the serve




In standalone we have to skip the rules using cmd:
Path of patch executable>:\Setup /SkipRules=Cluster_IsOnlineIfClustered /action=patch

b) Some cases after running mof also we will get same error in this case we have to run wmi file .it is mostly happened in 2008 .We can get wmi file in below node


3) Attributes do not match:
To work around this problem, remove the Archive attribute from the installation folder. To do this, follow these steps:
1. Open the folder that contains the folder that has the Archive attribute.
2. Right-click the folder that you want to remove the Archive attributes from, and then click Properties.
3. On the General tab, click Advanced.
4. On the Advanced Attributes tab, click to clear the Folder is ready for archiving check box.
5. Re_run the SQL install
If the installation folder does not exist, remove the Archive attribute from the closest parent folder. For example, you install SQL Server 2008 R2 into the following folder:
C:\FolderA\FolderB\FolderC
The FolderC folder does not exist. The FolderB folder has the Archive attribute set. In this situation, you must remove the Archive attribute from the FolderB folder.






4) Element not found: Patch fails with Element not found. Check the errors are listed in the event logs what are the reasons and Check the disks are presented in the failover cluster manager or not.
Please check below sample snap I found below Server disks failed state in cluster manager it’s already decommissioned so I removed failed state disks in cluster manager, then I applied patch it was successfully completed. Keep track on the whole cluster manager all services, Nodes and disks are working or not.


6) Log OR Data directory in the registry is not valid:
Resolution:
When we check on error details it’s showing the data registry is not valid. That means below registry patch is not exists on mount point
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer
Please check below snap for server all mount points.
So I have changed registry  paths from H:\MSSQL$UTR_MAIN1_UAT\MntVol-Remote-TRANLOG01\Log   to   H:\MSSQL$UTR_MAIN1_UAT\MntVol-Remote-TRANLOG02\Log
After changed patch re_run the patch