C:\Program Files\Microsoft SQL Server for INSTALLSHAREDDIR parameter is not valid because the directory is not writable - sql-server

During the installation of MS SQL Server 2014 on a Win 7 Pro computer I get the following error:
C:\Program Files\Microsoft SQL Server for INSTALLSHAREDDIR parameter is not valid because the directory is not writable...
There is not such a directory in the C:\Program Files\ folder! And the share directory is set to be in c:\Program Files (x86) folder anyhow, and I cannot even change it? I tried to create a directory Microsoft SQL Server in the C:\Program Files folder and set all the privileges, it still does not work! How come a MS product cannot be written into MS program folder?

Related

DacFx and Custom DeploymentContributor (AgileSqlClub.DeploymentFilterContributor)

I've tried at least a dozen or so ways to get the module to load and work but still get the same error: 
Error SQL0: Required contributor with id 'AgileSqlClub.DeploymentFilterContributor' could not be loaded.
I've tried to run it with DacFax/SqlPackage 150 (x64) and 140 (Both x86 and x64).
All iterations of SqlPackage command attempted:
Full Path to DLL 150 DacFx 
"C:\Program Files\Microsoft SQL Server\150\DAC\bin\sqlpackage.exe" /a:Publish /SourceFile:C:\work\somedb.dacpac /TargetConnectionString:"Server=tcp:somedb.database.windows.net,1433;" /p:ExcludeObjectTypes="Users;Permissions;Logins;RoleMembership" /p:VerifyDeployment=False /p:AllowIncompatiblePlatform=True /p:TreatVerificationErrorsAsWarnings=True /p:AdditionalDeploymentContributorPaths="C:\Program Files\Microsoft SQL Server\150\DAC\bin\Extensions\AgileSqlClub.SqlPackageFilter.dll" /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter0=IgnoreName(.PainInTheRearFunction.)"
Full Path to Dir w DLL 150 DacFx 
"C:\Program Files\Microsoft SQL Server\150\DAC\bin\sqlpackage.exe" /a:Publish /SourceFile:C:\work\somedb.dacpac /TargetConnectionString:"Server=tcp:somedb.database.windows.net,1433;" /p:ExcludeObjectTypes="Users;Permissions;Logins;RoleMembership" /p:VerifyDeployment=False /p:AllowIncompatiblePlatform=True /p:TreatVerificationErrorsAsWarnings=True /p:AdditionalDeploymentContributorPaths="C:\Program Files\Microsoft SQL Server\150\DAC\bin\Extensions" /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter0=IgnoreName(.PainInTheRearFunction.)" 
No Path 150 DacFx   
"C:\Program Files\Microsoft SQL Server\150\DAC\bin\sqlpackage.exe" /a:Publish /SourceFile::C:\work\somedb.dacpac /TargetConnectionString:"Server=tcp:somedb.database.windows.net,1433;" /p:ExcludeObjectTypes="Users;Permissions;Logins;RoleMembership" /p:VerifyDeployment=False /p:AllowIncompatiblePlatform=True /p:TreatVerificationErrorsAsWarnings=True /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter0=IgnoreName(.PainInTheRearFunction.)"
140 DacFx x86 (Doesn't support Additional Path Argument) 
"C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\sqlpackage.exe" /a:Publish /SourceFile:C:\work\somedb.dacpac /TargetConnectionString:"tcp:somedb.database.windows.net,1433;" /p:ExcludeObjectTypes="Users;Permissions;Logins;RoleMembership" /p:VerifyDeployment=False /p:AllowIncompatiblePlatform=True /p:TreatVerificationErrorsAsWarnings=True  /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter0=IgnoreName(.PainInTheRearFunction.)"
140 DacFx x64 (Doesn't support Additional Path Argument) 
"C:\Program Files\Microsoft SQL Server\140\DAC\bin\sqlpackage.exe" /a:Publish /SourceFile:C:\work\somedb.dacpac /TargetConnectionString:" tcp:somedb.database.windows.net,1433;" /p:ExcludeObjectTypes="Users;Permissions;Logins;RoleMembership" /p:VerifyDeployment=False /p:AllowIncompatiblePlatform=True /p:TreatVerificationErrorsAsWarnings=True  /p:AdditionalDeploymentContributors=AgileSqlClub.DeploymentFilterContributor /p:AdditionalDeploymentContributorArguments="SqlPackageFilter0=IgnoreName(. PainInTheRearFunction.)"
Where I've tried to put the dll and pdb file:
C:\Program Files\Microsoft SQL Server\150\DAC\bin
C:\Program Files\Microsoft SQL Server\150\DAC\bin\Extensions
C:\Program Files\Microsoft SQL Server\150\DAC\bin\Extensions\AgileSqlClub.DeploymentFilterContributor
C:\Program Files\Microsoft SQL Server\140\DAC\bin\
C:\Program Files\Microsoft SQL Server\140\DAC\bin\Extensions
C:\Program Files\Microsoft SQL Server\140\DAC\bin\Extension\AgileSqlClub.DeploymentFilterContributor
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Extensions
C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Extension\AgileSqlClub.DeploymentFilterContributor
Same folder as dacpac (C:\work)
I am using the release version of the AgileSqlClub Deployment Contributor downloaded in zip format from here:
https://github.com/GoEddie/DeploymentContributorFilterer/releases/tag/1.4.4.1
Zip contains 2 files:
AgileSqlClub.SqlPackageFilter.dll
AgileSqlClub.SqlPackageFilter.pdb
I've read a dozen or so articles including:
SQL Server Data Tools: Error loading custom DeploymentPlanModifier: Required contributor with id could not be loaded
https://dba.stackexchange.com/questions/268707/exclude-certain-schema-along-with-unnamed-constraints-in-ssdt
https://the.agilesql.club/2015/01/howto-filter-dacpac-deployments/
I am not using SSDT just downloaded versions of DacFramework.msi (140/150)
If I remove the DeploymentFilter arguments then SqlPackage loads everything but fails at the PainInTheRearFunction I am trying to filter and Ignore on.
Any help would be greatly appreciated.
I had the same issue.
Lots of those links referred to "unblocking" the dll which I originally dismissed, thinking things had moved on since versions of windows that were referenced.
I still needed to do this. Screenshot below to illustrate.
Having the AgileSqlClub.SqlPackageFilter.dll in the same folder as SqlPackage.exe was where it worked

Executing SSIS package using command prompt

I am trying to execute an SSIS package using command prompt.
I have visual studio 2019 community edition installed and have selected 'Data storage and processing' during the installation.
Also installed SQL server integration services projects from visual studio extensions.
I looked for Dtexec.exe and found it at the below mentioned locations.
C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn
C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn
I couldn't find a 64bit Dtexec.exe under C:\Program Files
I have created an SSIS package using visual studio 2019.
I tried executing the package from command line using a batch file.
"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\dtexec.exe" /FILE "C:\Users\Ash\source\repos\DR Activity 1\DR Activity 1\Package.dtsx" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EWCDI
pause
I get an error message stating
There was an exception while loading Script Task from XML: System.Exception: The Script Task "ST_07a17c9047774ce7ad850af7a94a9ca5" uses version 15.0 script that is not supported in this release of Integration Services

SQL Server Config manager error: Cannot connect to WMI provider

I cant open my SQL server configuration manager getting this error message:
Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration Manager.
Invalid
I have searched online material and ran the mofcomp command as recommended: mofcomp “C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof”
I am now getting this error message:
MOF file has been successfully parsed
Storing data in the repository…
An error occurred while processing item 10 defined on lines 73 – 79 in file C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof:
Compiler returned error 0x80070005Error Number: 0x80070005, Facility: Win32
Description: Access is denied.
Can you please help me out, been 2 weeks sited with this problem
Run Cmd as Administrator and execute these commands:
First go to SQL Shared folder according to your sql version:
SQL 2008: C:\Program Files (x86)\Microsoft SQL Server\100\Shared\
SQL 2012: C:\Program Files (x86)\Microsoft SQL Server\110\Shared\
SQL 2014: C:\Program Files (x86)\Microsoft SQL Server\120\Shared\
SQL 2017: C:\Program Files (x86)\Microsoft SQL Server\140\Shared\ -------> My version is 2017
SQL 2019: C:\Program Files (x86)\Microsoft SQL Server\150\Shared\
Find more versions here
cd "C:\Program Files (x86)\Microsoft SQL Server\140\Shared"
Then:
mofcomp sqlmgmproviderxpsp2up.mof
Update:
The problem occurs because the Windows Management Instrumentation (WMI) provider configuration file for manage SQL Server services is missing. So the mofcomp command repairs or recreates it.
Here is more explanation:
https://learn.microsoft.com/en-us/windows/desktop/wmisdk/mofcomp
Run the #Fereydoon Barkzehy codes with Administrative Access
Sample -
cd C:\Program Files (x86)\Microsoft SQL Server\110\Shared
cd C:\Program Files (x86)\Microsoft SQL Server\140\Shared
mofcomp sqlmgmproviderxpsp2up.mof
depends on where the file "sqlmgmproviderxpsp2up.mof" is present
Youtube video
The best solution for me was to uninstall the instance and reinstall a fresh instance. This worked 100%.
What worked for me was to download the SQLEXPR_x64_Enu, run the Setup.exe and use the Repair option.
I have the same issue but it is not working at first. Second I already restarted my PC but it is not working either. What I found out is that you will run this on the folder where your SQL Server Management Studio is installed and not on the MS SQL Instance folder.
My SQL Server Management Studio which is 2016 is installed in
C:\Program Files (x86)\Microsoft SQL Server\130
But I keep on running changing folder on which I installed on my SQL Server 2012 instance:
C:\Program Files (x86)\Microsoft SQL Server\110\Shared\
After that, just run the command: mofcomp sqlmgmproviderxpsp2up.mof as everyone suggest in here.
So keep it mind the folder since that may affect your troubleshooting.
By trial and error I finally found this working solution:
I searched all sqlmgmproviderxpsp2up.mof files under C:\Program Files (x86)\Microsoft SQL Server
Running CMD as administrator I did for each result found above:
i) Change directory to go to the directory
ii) Run mofcomp sqlmgmproviderxpsp2up.mof
Reboot
Then, it works.
doing a fresh OS installation also worked for me as well. but this is a pain. Sometimes you can run the:
“C:\Program Files (x86)\Microsoft SQL Server\120\Shared\sqlmgmproviderxpsp2up.mof”
Sometimes it helps and sometimes it doesn't, all you need to do is do a fresh OS installation and then SQL installation.

An error prevented the view from loading

I had fully working Microsoft SQL Server 2008 R2 installed and running with no errors.
Now the problem is, when I want to create a new or open an existing integration project in the Integration Service Project. I am getting the following error:
An error prevented the view from loading.
Additional information:
The specified module could not be found. (Exception from HRESULT:0x8007007E) (System.Windows.Forms)
You can trust me on this one coz I just solved mine just a while ago, but you must have a working copy or ask a colleague for the ff:
Replace all below DLL's with a working one, according to link provided below, dlls seem like they are broken/corrupted:
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddslm.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msdds.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddsf.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddslmp.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddsp.dll
After trying above suggestion, please give feedback. If it fails, let me know immediately, i'll be glad to help. Cheers! :)
Reference: http://www.sqlservercentral.com/Forums/Topic1380655-391-1.aspx
If you don't have a colleague that can help you with the .dll files but you do still have access to the sql 2008 install cd then you can retrieve the .dll files from trin_aide.cab which can be found here x86\Setup on the installation media.
Open the .cab file using an application like 7zip.
FL_msdds_dll_215_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8 => msdds.dll
FL_msddsp_dll_56133_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8
FL_msddsf_dll_214_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8
FL_msddslm_dll_217_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8
FL_msddslmp_dll_56134_x86_ln.3643236F_FC70_11D3_A536_0090278A1BB8
Rename them to replace the files below.
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddslm.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msdds.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddsf.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddslmp.dll
C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\msddsp.dll

sublime text 2 error 5 access is denied

I got this error when I try to build my C program in sublime text 2. I just updated cygwin and MinGW. Also I can't use gcc access from windows command, but g++-3 works.
[Error 5] Access is denied
[cmd: [u'g++', u'C:\\Users\\Adam\\Desktop\\s', u'-o', u'C:\\Users\\Adam\\Desktop/s']]
[dir: C:\Users\Adam\Desktop]
[path: C:\csvn\bin\;C:\csvn\Python25\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\TortoiseSVN\bin;C:\Users\Adam\AppData\Local\Smartbar\Application\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.4\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_11\bin;C:\cygwin\bin;C:\Program Files\TortoiseSVN\bin;C:\csvn\bin;C:\cygwin64\bin;C:\MinGW\bin]
[Finished]
Try to see if your environment variables are declared for all system and not only for a user. Apparently yes, but I noticed that you don't make explicity reference to the lib of packages of CygWin and MinGW. Try to declare in the environment variable path the absolute path for directory libgcc1, this is the directory that provides mechanical to compile and execute files .c, this is C runtime library, provides support the libraries that you use in you application.
The possibility also that for some reason in your Windows you don't have privileges of access to directory where you store your source code. Try give permission of execute for this directory, or anything else which the process of compilation and execute may require.

Resources