SQL Server SSIS Custom assembly with licence key - sql-server

I have an SSIS package that runs fine from Visual Studio but doesn’t work on the server.
Executing under my security context produces the same results as a proxy account.
It's running a custom assembly
The server is running SQL Server 2016
The server has the shared components installed on a different drive (d:)
There is a script task that needs a licence key
Runs fine locally using Visual Studio 2013 (I edited 64 & 32 bit versions of DtsDebugHost.exe.config)
On the server I installed three dll's to the GAC & placed a copy in Program Files and (x86) \Microsoft SQL Server\130\SDK\Assemblies\
a.dll - MSIL
b.dll - MSIL
kernelx86.dll - X86
One of them wouldn't install to the GAC until I edited the GACUTILs config and put the below line in.
Then I edited the config files for running SSIS packages;
1. DTExec.exe.config - Command line execution
2. DtsDebugHost.exe.config - Visual Studio debugging
3. DtsHost.exe.config - SQL Server agent
Either one of the DLLs isn't being used or the licence key still isn't being picked up.
Any suggestions are appreciated,
Dan

Related

Cannot run ssis packages because 64-bit dtexec is not installed

I've been able to successfully create an ssis package (.dtsx) file using the SSMS 'import data' option and the VS 2017 SSIS toolbox (SQL Server 2017). The package itself works and it reads a csv file and loads it into a database table. Simple. This is on windows 10.
I'm trying to run these packages on Win Server 2012 R2 (Azure VM) command line and it won't work (it does work from VS 2017) because the dtexec.exe files are all 32 bit. For the life of me I cannot get a 64 bit dtexec.exe file installed.
I've tried
the same procedure on windows 10 and it works. I create the package and then I can run it via dtexec /f "path to .dtsx"
I've tried to set the run time to 32 bit per (
SSIS 64 bit vs 32 bit)
But this is not an option in either the SSMS import data tool or VS 2017 SSIS Toolbox settings/properties.
I've come across this page
(https://www.sqlservercentral.com/articles/how-to-execute-an-ssis-package-from-the-command-line-or-a-batch-file)
But I'm not sure that turning this package into a 'package deployment model' is the way to go.
I've tried copying the 64bit dtexec and related files to the Win 2012 R2 machine but the dll and code is not registered.
When I try to install SSMS or SQL Express on the server I don't get options for customizing the install.
I've confirmed that the server is 64-bit.
I've tried an azure logic app but I simply don't like it that way.
These are some of the errors I'm seeing
Code: 0xC001700A
Description: The version number in the package is not valid. The
version number cannot be greater than current version number.
Could not create DTS.Application because of error 0x80040154
I would like to keep things simple and create an ssis package that can then be run at the server via a command line script that is scheduled. Why in the world is this so hard to set up on an Azure VM running Windows Server 2012 R2?
Below are a couple of more resources I've stumbled upon. Looks to me that the VS 2017 SSIS toolbox way of doing this is what MS wants people to use. How could it be that they make it so easy to create the workflow and store that into a package (the dataflow works on the Win 2012 R2 server inside of VS 2017) but when it comes time to roll it out and automate it everything falls apart? I must be missing something. Any help would be useful. How the hell do I tell VS 2017 to create a 32-bit compliant version of this package?
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017
https://learn.microsoft.com/en-us/sql/integration-services/lesson-1-7-adding-and-configuring-the-ole-db-destination?view=sql-server-2017

SSIS Error "To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition (64-bit) of Integration Services "

I am using Visual studio ultimate 2012, SQL Server 2017 and Sql Server Data tools 2012. I am working with windows 10 64 bit.
My package consists of script tasks(c#) and Sql commands and it runs successfully from SSDT, but while trying to run my package from CMD i am getting
To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition (64-bit) of Integration Services.
If i make another empty package and try to run it then it runs successfully too.
Please help.
(1) Integration Services (Shared feature) installation
I think that the issue is that you have installed SQL Server Data Tools (SSDT) for Visual Studio but you didn't install the Integration Services (Shared feature) from the SQL Server Installation which is necessary to execute .dtsx packages outside of visual studio.
For more information check the following link:
SSIS Error – “To run a SSIS package outside of SQL Server Data Tools you must install…”
(2) Execute using dtexec(32-bit)
Another thing you can try is to execute package via 32-bit dtexec.
As mentioned in the following Microsoft Documentation:
On a 64-bit computer, Integration Services installs a 64-bit version of the dtexec utility (dtexec.exe). If you have to run certain packages in 32-bit mode, you will have to install the 32-bit version of the dtexec utility. To install the 32-bit version of the dtexec utility, you must select either Client Tools or Business Intelligence Development Studio during setup.
By default, a 64-bit computer that has both the 64-bit and 32-bit versions of an Integration Services command prompt utility installed will run the 32-bit version at the command prompt. The 32-bit version runs because the directory path for the 32-bit version appears in the PATH environment variable before the directory path for the 64-bit version. (Typically, the 32-bit directory path is :\Program Files(x86)\Microsoft SQL Server\100\DTS\Binn, while the 64-bit directory path is :\Program Files\Microsoft SQL Server\100\DTS\Binn.)
More info at:
How to execute a package in 32-bit mode using dtexec.exe?
Also, similar issues was mentioned in other links, you can check them for more information:
SQL Server Central Forum - Run a SSIS package outside of SQL Server Data Tools you must install of Integration
Code Project - How To run a SSIS package outside of SQL Server Data Tools ?
MSDN - To run a SSIS package outside of SQL Server Data Tools you must install Standard Edition of Integration Services or higher
To run a SSIS package outside of SQL Server Data Tools you must install Move File to Archive of Integration Services or higher
SE DBA - Error: “To run a ssis package outside of sql server data tools you must install [send successful email] of Integration Services or higher.”
Adding to Hadi's answer, the change would be to use the right version which in my case was to use
C:\Program Files\Microsoft SQL Server\130\DTS\Binn>
Instead of
C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn>
I had the same error and my integration services of 2017 was installed, so the suggested solution was not relevant.
i tried many options including uninstall and re-install, what solved finally was an upgrade to ENTERPRISE EDITION!
I found out that in a server where the dtexec ran successfully an ENTERPRISE VERSION was installed, while in the problematic server there was not an ENTERPRISE edition.
How did i find it? i ran the following in both servers:
run setup.exe file of SQL SERVER 2017 installation
on the left menu you will see "tools" - press the link
find: "installed SQL server features discovery report"
you will see in edition column an empty cell vs. "Enterprise Edition"
which is the successful one!
how did i upgrade in the problematic server?
run setup.exe file of SQL SERVER 2017 installation
on the left menu you will see "maintenance" - press the link
find: "edition upgrade"
follow the instructions, in my case since my organization had an automatic updated key i just pressed "next" a few times until a successful upgrade
good luck!

Why is my Run64BitRuntime flag ignored

I am using Visual Studio 2012 with SQL Server 2012 Data Tools installed. For some unexplained reason, my workstation will only run my SSIS code in 32 bit mode. Here is a dummy data flow I built for testing purposes:
Here are my settings:
It only runs DTSDebugHost.exe *32.
I am at my wits end trying to figure this one out. What do I do to figure out why it is not running just DTSDebugHost.exe (the 64 bit version)?
This happens because VS 2012 is checking to see if VS 2010 ULTIMATE is installed. It just looks for a registry entry.
Solution:
Open Regedit
Browse to
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\11.0\
Create a Key called premium
Create a Key called ultimate
Browse to
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\10.0\
Create a Key called premium
Create a Key called ultimate
Restart VS 2012.
Now it should work in 64-bit mode when you debug.
Ran into an almost identical problem and solution with SQL Server 2014 Enterprise, after installing SSDT-BI for VS 2013.
On a side note, I tried using the 64-bit debug host in SSDT-BI VS 2013 on two separate installs. One
where a full instance of SQL Server 2014 Enterprise was already
installed (with 64-bit debug host installed and verified) and another
where no previous SQL Server components had been installed at all. I
wanted to ensure that the "no debug with 64-bit runtime" issue was not
simply due to a missing 64-bit debug host or that the 64-bit host was
not installed as part of SSDT-BI for VS 2013 (It is not. It's part of
the full SQL Server itself, Integration Services (Shared Feature).
Per this thread on Social MSDN, adding the following registry key was what got the 64-bit debug host working for me:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\11.0\professional

Can I deploy & Use SSIS SQL server DTS DLL's onto a machine that does not have SQL server 2008 installed?

Greets.
I've developed some SSIS packages that I want to load up and execute in C# code. The C# code is deployed on our application machine.
I've referenced the SQLServer.ManagedDTS DLL in my C# project.
I tried gac'ing that DLL on our staging application box, which incidentally also seemed to require gac'ing the SQLServer.DTSRuntimeWrap DLL as well.
The code to execute the package is like so
Runtime.Package package = new Runtime.Application().LoadPackage(ssisPackageFilePath, null);
package.Variables["FilePath"].Value = sourceFilePath;
//Excute Package to insert data from source csv file into a SQL table
Runtime.DTSExecResult results = package.Execute();
When I try to run the process I get the following error
An Integration Services class cannot be found.
Make sure that Integration Services is correctly installed on the computer that is running the application.
Also, make sure that the 64-bit version of Integration Services is installed if you are running a 64-bit application
I figured I should be able to simply gac (Install) the one DLL I used to develop the code that executes an SSIS dtsx package file.
I developed the package in a Visual studio 2008 BIDS project which results in a dtsx file.
I referenced the SqlServer.ManagedDTS DLL in a visual studio 2010 project to execute the dtsx file from code.
Tested and debugged locally with success.
What do I need to do to setup my application box in order for my code to be able to execute an SSIS package?
I'm hoping I'm not limited to only being able to execute packages from code on a box that has an instance of SQL server or IntegrationServices installed; which may mean the need for another license.
Do I need to install Integration Services on my app box?
Yes, you need to install Integration Services to run the package on a server. Just deploying DLLs into GAC won't help in executing a package.
Here is the MSDN link that describes about Running an SSIS Package Programmatically on a Remote Computer.
You need to have at least one server with Integration Services installed to be able to do what the MSDN article describes.

SQL Server Compact error: Unable to load DLL 'sqlceme35.dll'. The specified module could not be found

I'm developing a Windows Forms application using Visual Studio 2008 C# that uses an SQL Server Compact 3.5 database on the client. The client will most likely be 32 bit Windows XP or Windows Vista machines. I'm using a standard Windows Installer project that creates an MSI file and setup.exe to install the application on a client machine. I'm new to SQL Server Compact, so I haven't had to distribute a client database like this before now. When I run the setup.exe (on new Windows XP 32 bit with SP2 and Internet Explorer 7) it installs fine, but when I run the application I get this error:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I spent a few hours searching for this error already, but all I could find were issues relating to installing on 64 bit Windows and none relating to normal 32 bit that I'm using.
The install application copies the all the dependent files that it found into the specified install directory, including the System.Data.SqlServerCe.dll file (assembly version 3.5.1.0). The database file is in a directory called 'data' off the application directory, and the connection string for it is
<add name="Tickets.ieOutlet.Properties.Settings.TicketsLocalConnectionString" connectionString="Data Source=|DataDirectory|\data\TicketsLocal.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" />
Some questions I have:
Should the application be able to find the DLL file if it's in the same directory, that is, local to the application, or do I need to install it in the GAC? (If so, can I use the Windows Installer to install a DLL file in the GAC?)
Is there anything else I need to distribute with the application in order to use a SQL Server Compact database?
There are other DLL files also, such as MS interop for exporting data to Excel on the client. Do these need to be installed in the GAC or will locating them in the application directory suffice?
You don't need it to be in the GAC for SQL Server Compact to run, and it will pick them up from the application directory. There are several ways to deploy an SQL Server Compact project. The two main ways are:
Deploying the SQL Server Compact redistributable installer with your project, but this way is painful and also can be unistalled by the end user, or upgraded by Windows updates and breaking your application.
Including the DLL files in your application folder. Depending on the features of SQL Server Compact you are using (replication or whatever), there is a handful of DLL files to deploy in your application folder.
If you have SQL Server Compact installed on your machine, they are most likely located at "C:\Program Files\Microsoft SQL Server Compact Edition\v3.5". They can be added to the project in Visual Studio and then set their project output type to "copy always". And the main reference to System.Data.SqlServerCe that you have in your project references should have copy local set to true.
sqlceca35.dll
sqlcecompact35.dll
sqlceer35en.dll
sqlceoledb35.dll
sqlceqp35.dll
sqlcese35.dll
If you have these all set, then in your installer project all you have to include is the project output of this project and you're good. In my opinion this is the only way to go. It is a simple deployment, of a couple of files and you are in control of what DLL versions your application uses.
I hope that helps.
I had a similar problem, a Visual Studio 2008 Windows application targeting 32-bit Windows XP and Windows Vista that used SQL Server Compact 3.5 SP1 - that then got this error when installed on 64-bit Windows 7:
Unable to load DLL 'sqlceme35.dll'. The specified module could not be found
I was embedding an MSI for SQL Server Compact into the installer for the application.
Following this rather confused discussion on MSDN revealed that I needed to use the 64-bit MSI for SQL Server Compact on 64-bit machines. D'oh! That is, from page Microsoft SQL Server Compact 3.5 Service Pack 1 and Synchronization Services for ADO.NET version 1.0 Service Pack 1 for Windows Desktop I needed SSCERuntime-ENU-x64.msi rather than SSCERuntime-ENU-x86.msi for 64-bit machines.
How to: Deploy a SQL Server Compact Edition Database with an Application should help, at least with your first two questions.
In general, I think you should not install anything in the GAC for a single application.
The following provide a solution to the problem and an explanation also.
Troubleshooting: Can’t load SQL Server Compact DLL
SqlCeException on application's first use of SQL Server Compact
Laxmi Narsimha Rao Oruganti 's blog
I hope this helps.

Resources