DacFx and Custom DeploymentContributor (AgileSqlClub.DeploymentFilterContributor) - dacpac

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

Related

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

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

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?

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.

SSIS 2012 Method not found: void

I recently got this error in every SSIS package (using Visual Studio 2012), when I want to open a OLE DB source component:
===================================
Method not found: 'Void Microsoft.DataTransformationServices.DataFlowUI.DataFlowConnectionPage.set_DataPreviewTimeout(Int32)'. (Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.DataFlowUI.OleDbSourceUI.SetConnectionPageDescriptions(DataFlowConnectionPage connectionPage)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowAdapterUI.AddCommonConnectionPage(DataFlowComponentForm form, String helpKeyword)
at Microsoft.DataTransformationServices.DataFlowUI.OleDbSourceUI.AddPagesToForm(DataFlowComponentForm form)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowComponentUI.EditImpl(IWin32Window parentControl)
at Microsoft.DataTransformationServices.DataFlowUI.DataFlowComponentUI.Edit(IWin32Window parentWindow, Variables variables, Connections connections)
It worked fine last week and I don't think I changed anything since then. Any suggestions?
I ran into this same issue on a computer with Visual Studio 2010 (although I'm sure VS2012 will have the same resolution). I installed Visual Studio 2015 and then started receiving this error when I tried to open an ADO NET source or an OLD DB Source in VS2010. I found that my DatatransformationServices files in the folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies had become corrupt. I copied all Microsoft.DatatransformationServices files from a computer where VS2010 was working to my local computer, folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies.
You can use a command like the following from cmd to do so:
copy /Y "\\\GoodComputerName\C$\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.*.dll" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\"
I then added the assemblies to my cache using the following commands in cmd (just change the directory with gacutil to your newest version in the folder C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin and change the folder for Visual Studio to the folder for the version in which you are receiving the error):
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DatatransformationServices.DataFlowUI.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Design.DLL"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.DTSExecUI.Controls.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Interfaces.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.VsIntegration.DLL"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Wizards.DLL"
I just fixed the same problem with CCleaner free version by fixing broken registry entries.
For me, the problem occurred in SQL Server Data Tools 2012 which uses Visual Studio 2010 after installing multiple versions of SSDT including the 2015 Preview.
Opening any OLEDB source component raised the missing DLL error for C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DatatransformationServices.DataFlowUI.dll
The solvusoft.com site linked by GoldBishop provided useful information about the problem but recommends using their dubious product to fix it. Please read this thread on the Norton community site regarding Solvusoft and how it uses RegCleanPro.
Before using a tool like CCleaner, please research it. See who has rated it as a good product. While using it, check that it has backed up your registry entries (it does).
Quick search for this topic, lead me to another site: http://www.solvusoft.com/en/files/missing-not-found-error/dll/windows/microsoft/msdn-disc-2729/microsoft-datatransformationservices-dataflowui-dll/
- This basically states the DLL/Registry is missing/corrupt
After reviewing the MSDN documentation, I assume this is from a Drag and Drop implementation? Seems anything short of an environment DLL missing/corrupt, you may need to debug run the package to see exactly where the error is persisting.
I ran into this same issue on a computer with Visual Studio 2010 (although I'm sure VS2012 will have the same resolution). I installed Visual Studio 2015 and then started receiving this error when I tried to open an ADO NET source or an OLD DB Source in VS2010. I found that my DatatransformationServices files in the folder
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
had become corrupt. I copied all Microsoft.DatatransformationServices files from a computer where VS2010 was working to my local computer, folder
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
You can use a command like the following from cmd to do so:
copy /Y "\\GoodComputerName\C$\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.*.dll" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\"
I then added the assemblies to my cache using the following commands in cmd (just change the directory with gacutil to your newest version in the folder C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin and change the folder for Visual Studio to the folder for the version in which you are receiving the error):
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DatatransformationServices.DataFlowUI.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Design.DLL"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.DTSExecUI.Controls.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Interfaces.dll"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.VsIntegration.DLL"
gacutil /if "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.DataTransformationServices.Wizards.DLL"
This resolution worked for me so I hope it works for you also :)
Works for me. Check the latest version in
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools.
Had the same using SSMS 2016. This is a known issue with July 2016 release.
I didn't have the issue initially, but was messing around with SMO.
Installing 16.5.3 fixed the issue:
https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
Sources:
https://connect.microsoft.com/SQLServer/feedback/details/2925257

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

Resources