Recently I was trying to help one of my clients to install Service Pack 3 for SQL Server 2008 R2 instance. Nothing was coming up when we were hitting setup.exe. I looked into my own blog and found Installation Log Summary File Location – 2012 – 2008 R2. But there was no file getting generated. I looked around of MSDN and found: https://msdn.microsoft.com/en-us/library/ms143702.aspx. The reason was there was exit code 0x80004005.
A new feature in SQL Server 2008 is the FILESTREAM feature which allows you to store BLOBs in the NTFS file system instead of in the database. In order to use this new feature it has to be enabled. In this tip I go over four different options to enable.
It says that we should look into %TEMP% folder. So I went to Start > Run > %TEMP% and found sqlsetup.log file as below.
03/01/2016 10:04:11.954 Setup launched
03/01/2016 10:04:11.955 Attempting to determine media source
03/01/2016 10:04:11.956 Media source value not specified on command line argument.
03/01/2016 10:04:11.957 Setup is launched from media directly so default the value to the current folder.
03/01/2016 10:04:11.957 Media source: D:SOFTWARESP3
03/01/2016 10:04:11.958 Attempt to determine media layout based on file ‘ D:SOFTWARESP3mediainfo.xml’.
03/01/2016 10:04:11.981 Media layout is detected as: Core
03/01/2016 10:04:11.982 Not a slip stream media, so continuing to run setup.exe from media.
03/01/2016 10:04:11.983 /? or /HELP or /ACTION=HELP specified: false
03/01/2016 10:04:11.984 Help display: false
03/01/2016 10:04:11.985 Checking to see if we need to install .Net version 3.5
03/01/2016 10:04:11.985 Checking to see if we need to install MSI version 4.5
03/01/2016 10:04:11.986 RedistMSI::GetExpectedBuildRevision – Setup expects MSI 4.5.6001.22159 at the minimum
03/01/2016 10:04:11.987 Attempting to get Windows Installer version
03/01/2016 10:04:11.988 Windows Installer version detected: 5.0.7601.18493
03/01/2016 10:04:11.990 RedistMSI::IsVistaRTM – Not Vista RTM build
03/01/2016 10:04:11.991 Required version of Windows Installer is already installed
03/01/2016 10:04:11.992 .Net version 3.5 is already installed.
03/01/2016 10:04:11.992 Windows Installer version 4.5 is already installed.
03/01/2016 10:04:11.993 Patch related actions cannot be run from the local setup.exe, so continuing to run setup.exe from media.
03/01/2016 10:04:11.993 Attempt to initialize SQL setup code group
03/01/2016 10:04:11.994 Attempting to determine security.config file path
03/01/2016 10:04:11.995 Checking to see if policy file exists
03/01/2016 10:04:11.996 .Net security policy file does exist
03/01/2016 10:04:11.997 Attempting to load .Net security policy file
03/01/2016 10:04:12.000 Error: Cannot load .Net security policy file
03/01/2016 10:04:12.001 Error: InitializeSqlSetupCodeGroupCore(64bit) failed
03/01/2016 10:04:12.002 Error: InitializeSqlSetupCodeGroup failed: 0x80004005
03/01/2016 10:04:12.002 Setup closed with exit code: 0x80004005
All I can see is that there is something wrong with .NET security. I asked my .NET expert friend to know if there is any tool to reset the permission? He told CASPOL.EXE can be used to reset the policies.
So, we went into following directory “C:WINDOWSMicrosoft.NETFramework64v2.0.50727” and ran this command: – caspol.exe -machine -reset
C:WINDOWSMicrosoft.NETFramework64v2.0.50727>caspol.exe -machine -reset
If it would have been a 32-bit machine, we would have run the same command under “C:WINDOWSMicrosoft.NETFrameworkv2.0.50727” folder.
After doing above, the setup was able to start and finish as well.
Reference: Pinal Dave (https://blog.sqlauthority.com)
When you host a .NET application on a remote network share, you may receive a System.SecurityException exception error message or a security warning message. Nakashima htec driver reviews.
The Code Access Security Policy tool (CASPOL) enables administrators to modify security policy for the machine policy level, the user policy level, and the enterprise policy level.
Caspol is used to fully trust a remote share, since by default network shares only get LocalIntranet permissions.
The solution for the System.SecurityException exception error message is to use caspol to grant a .NET application the FullTrust right to a network share. To do this:
1. Launch a command prompt with administrative credentials
2. Change to the C:WindowsMicrosoft.NETFrameworkv2.0.50727 directory.
3. Run the following command:
Replace servershare with the path to your .NET application located on the remote network share.
Running the above command allowed me to resolve the following IIS 7.0 error:
By the way, .NET Framework 3.5 SP1 allows managed code to be launched from a network share.
References:
http://support.microsoft.com/?id=320268
http://blogs.msdn.com/shawnfa/archive/2004/12/30/344554.aspx
http://books.google.com/books?id=VJOtwMawoswC&pg=PA576&lpg=PA576&dq=iis+7.0+caspol.exe&source=bl&ots=W88GOo1Cfp&sig=U8sBtcNzbaSgPTghAp519S9O3sM&hl=en&ei=o1zSSeafEobmnQfHrbzlBQ&sa=X&oi=book_result&resnum=1&ct=result
http://www.iislogs.com/articles/23/
http://support.microsoft.com/kb/837909
http://www.sharepointblogs.com/ssa/archive/2007/09/06/using-caspol-exe-to-add-assemblies-to-full-trust-assembly-list.aspx
http://www.dotnetjunkies.ddj.com/quickstart/howto/doc/security/SecScripting.aspx