Assign SSIS 2012 "isserverexec" process to single CPU core using Start Affinity - ssis

In SSIS 2008 we used to run the packages in parallel by assigning "DtExec" Process using Start Affinity method.
But in SSIS 2012 the packages are executed by External process "ISserverexec".
So the Question is, Is there any option for assigning each package process "ISserverexec" to specific CPU in multicore processors machine
Thanks

ISServerExec is started with catalog.start_execution in SSISDB, which invokes an internal SQLCLR stored procedure that creates the ISServerExec.exe process. Executing it with dtexec.exe /ISSERVER even executes the package with ISServerExec.exe
AFAIK, there is no way to limit the resources to the SSIS package in 2012/2014, such as CPU cores. Like e.g. resource governor in SQL Server.
There are a couple of workarounds.
If you are using Windows Server 2008R2 or before (which you probably aren't, if running SQL Server 2012), you could use Windows System Resource Manager. Note that it is deprecated in Windows Server 2012 and above.
Or you could play around with the MaxConcurrentExecutables property on the control flow or EngineThreads in the data flow. This is what I usual do, and found works the best. More info: http://msdn.microsoft.com/en-us/library/ms141031.aspx

Related

How to run dtexec remotely

On my work i have a situation that we have a three tier setup:
Database server
Application server
Clients
We work with SSIS packages which are stored in Database Server (on a share) but are called from a external scheduler in the application server. When we run the DTEXEC from the Application Server, the consumption of memory and cpu are on the Application Server. Is it possible and how to start the proces(DTEXEC) on the database server, and call it from the Application Server, so the consumption of the CPU and Memmory are on the database server>
Manny thanks
Erik
Running an SSIS package is constrained to dtexec.exe, using the ManagedDTS assemblies, running it from the SSISDB, running a SQL Agent job (which is really just using dtexec.exe).
If you've used the project deployment model, running the packages out of the SSISDB is calling a few stored procedures.
Otherwise, package deployment model means you'll want to figure out what makes sense for your environment and skill set.
I find SQL Agent jobs are the easiest but there are limitations (asynchronous nature of starting a job, concurrent execution, etc)
Remoting (PowerShell/PsExec/WMIC/.NET) seems the next logical step to launching a remote process
Earlier answer on the subject https://stackoverflow.com/a/75289585/181965

How to find out if a package is run locally in visual studio or on the server?

I have some script code in an SSIS package that would work differently when run in SSDT/Visual Studio than on the server.
Development tests are done in Visual Studio and the production runs on the SQL server (version 2017)
What's the best approach to find out where the package is running?
I could use a project/package parameter, but it's less automatic and more error prone. E.g. when forgetting to re-set the parameter to the correct value for the target environment.
While I've not tested all the ways it can be abused, my first thought would be to check the value of System::ServerExecutionID This is a system variable that is zero during design and run time in visual studio.
When executed on the server, this variable will be populated with the Operation ID that is stored in SSISDB.catalog.operations(operation_id). My packages use an audit table that explicitly logs that ServerExecutionID to the insert/update/delete metrics associated to that load.

Does SSIS Components have to be installed on all involved hosts?

TLDR; I am attempting to connect to a host and hitting "To run a SSIS package outside of SQL Server Data Tools you must install Derived Column of Integration Services or higher". Does SSIS need to be installed on all Hosts for my package to succeed? Secondary question: If so, why would a manual execution from my dev machine work while the deployed/dtexec versions fail?
Apologies if this is a basic question (I am still steeping myself in all things SSIS and trying to learn as quickly as possible). Thanks in advance for any assistance you can provide!
I have a package that runs fine on my development machine (via Visual Studio). However, when I deploy the package out I encounter errors when attempting to connect to a MySQL database on a secondary host machine on the network. Taking a step back, I decided to attempt a manual execution via DTEXEC on my dev machine to attempt troubleshooting...
When executing this package through DTEXEC however, I encounter an error stating:
"To run a SSIS package outside of SQL Server Data Tools you must install Derived Column of Integration Services or higher"
Looking at the log, it looks like the package is able to connect to Host 1 successfully and do some data manipulation (one of the 3 hosts; I know Host 1 and Host 3 have SSIS installed). However, when it attempts connection to Host 2, it fails with the aforementioned error. For the longest time, I thought this was due to the MySQL database I am trying to connect to (using .net Provider\MySQL Data Provider) but given the error above, it is possibly pointing to something else...
After doing a bit of searching I have located the following articles which may be related:
https://dba.stackexchange.com/questions/49786/error-to-run-a-ssis-package-outside-of-sql-server-data-tools-you-must-install
Getting error running SSIS package on non-SSIS Server
I know SSIS isn't installed on Host 2. The package is being executed from Host 1 and this host does have SQL Server and SSIS installed. Host 3 additionally has SQL Server and SSIS installed and I am able to successfully operate/connect on this host as well. The only host presenting a problem is Host 2 which does not have SQL Server nor SSIS installed.
Do all hosts have to have SSIS installed for connections to be made? Additionally, if SSIS does need to installed on Host 2, why would my dev machine succeed while the dtexec/deployed versions fail?
Again, thank you for any assistance you can provide!
The answer to your first question is "Yes", and that fact is the answer to your secondary question.
In short, SSIS packages are NOT self-contained executable files. They are more like .ini files that the SSIS Service reads, interprets, and executes. If the SSIS Service is not running on a host computer, then that computer cannot do anything with an SSIS package (the .dtsx file).
Your dev machine succeeds because it has Visual Studio, or BIDS, which is a developer's version of the SSIS Service engine.

SSIS executing wrong (old) package version

I have a SQL Server Agent Job executing a file-system-deployed SSIS package via CmdExec & the 32 bit DTExec. However, the most recent version of the package version is not executing.
The change I've made is within a Script Task. I've made sure to Build within the VSTA editor before closing, etc.
I've verified this is the problem by putting the expected version in the command line parameters, so the task fails: /VERIFYVERSIONID "\"{1F870663-1898-4A30-B4A8-226817D1755F}\""
Is there a cache that can be cleared?
One approach would be to change the executiontype for the SQL job to be Operating System (CMDEXE) and provide the path to the dtexec file for SSIS to use as the executable.
C:\Program Files\Microsoft SQL Server\110\DTS\Binn\dtexec.exe /FILE "c:\path\to\my\ssis\package\myssispackage.dtsx" /CHECKPOINTING OFF /REPORTING E
By calling the dtsx specifically you can point to the 32 or 64 bit version. You can also revert to a previous version of SSIS (dtexec) if you have those installed on your executing server.
I recently upgraded some of my packages to SSIS 2012 and had to use the new version for the packages to be executed by dtexec. That resolved my issue. Hope that helps.
Nothing to see here, move along..
I'm doing new child package testing on a server hosting multiple environments shared by my dev team, and we're in the process of shuffling things around. The job in question is one of a few identical ones and the path to the package got changed.
This is a 'master' package that dynamically executes child packages based on values read from a queue which is why it didn't occur to me to check the path.
Noob oversight.

Schedule SSIS package execution

How do I schedule SSIS to automatically execute a package from a file at a given time every day?
You have a few options, but I'll give you something that will allow you to get up and running quickly...
Open SQL Server Management Studio and connect to the Database Engine of the SQL Server that will run the job. This SQL Server should have SQL Server Agent installed and running.
Expand SQL Server Agent, expand Jobs.
Right-click, select New Job.
When you create your package step, for Type choose SQL Server Integration Services Package. For the Package source, choose File system. Then for the Package you can use the browse button (...) to browse for the DTSX file on the file system.
Go to Schedules and create job schedules as you normally would for any other SQL Server Agent job. In your case, set the Frequency to Daily, and set the value of Occurs once at to whatever time the job should run.
A couple of things to keep in mind...
Make sure that the SQL Server Agent service account (this is the default, you can choose an alternative security context if needed) has the permission to access the dtsx package on the filesystem.
This will only work if the server on which you're scheduling the job is also the Integration Services server. There are plenty of ways to handle remote package execution if you require it.
For additional information, please see https://msdn.microsoft.com/en-us/library/ms191439%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
I prefer the above anwser but it is also possible with the windows Task Scheduler and start your ssis package with dtexec. (Only possible on the SSIS server) Check also execution with dtexec
First choice - if possible is to to schedule the package:
1) using the SQL Server Agent for the standard jobs
2) non-standard windows task scheduling, depends on what the package is doing
3) dtexec can play nicely but it depends on what ssis tasks the package runs
4) the more the ssis package does, the more it may require of the dtexec config
and set up to play nicely with the windows scheduler