I've been using SSIS for quite a while now and it has always bugged me that if you open a SSIS package without it being in a solution, none of the debug or execute options are available in Visual Studio.
On my current project I need to edit some SSIS packages left on our server that are executed from the filesystem. The problem is that the deploy phase does not (and should not) include copying over the solution (.sln) files. If I then go and create a solution inside the default location and add the packages, they get copied over (instead of referencing t开发者_高级运维hem directly). This is a problem since some execute other packages that reside on the same directory. So I have to copy the SSIS package over, edit, test, copy it back to the original location. This can get pretty annoying at times, as you can imagine.
So I was wondering, is there any way to execute those packages without including them inside a solution?
I'm using Visual Studio 2008, making SSIS packages for SQL Server 2008.
I agree. This is a total pain. You CAN create a project that contains a simple "wrapper" package with an Execute Package Task that just jumps into to the package you want to debug. When you debug the wrapper it will open your real package and you can debug away. Not ideal but at least its something.
No, you can't do it inside VS and use SSIS debugger without project. You of course can still run it outside of VS using DTEXEC.EXE.
(technically the package has to be part of the project - .dtproj file, VS creates solution if needed, so you can skip .sln files)
You can also add the xml for the package into the .dtproj file as well. This will allow you to open and run it as a part of your package
There are serveral ways to execute the package without using SQL Server Business Intelligence Development Studio.
1. Execute SSIS package using command line utility (DTEXEC.EXE):
Use the command line utility and go to the file path your SSIS package is stored. It is possible that the DTEXEC.EXE is in another path at your computer so check this before.
For Example: C:\Program Files\Microsoft SQL Server\100\DTS\Binn>DTEXEC.EXE /F "C:\Packages\SSISPackageToRun.dtsx"
2. Execute SSIS Package using Execute Package Utility (DTEXECUI.EXE):
Run the Execute Package Utility and choose the package you want to run from the file system. Click the Execute Button to run the package.
You can also go directly to the package in the file system right click and choose open (or open with Execute Package Utility, depends on settings) and Execute Package Utility (DTEXECUI.EXE) will open automatically. Click the Execute Button to run the package.
3. Execute SSIS Package using the Microsoft SQL Management Studio:
Search your package in the Object Explorer right click and choose Run Package.
4. Execute SSIS Package using SQL Server Agent Job:
Create a SQL Job and run your package inside a job step. After that run the sql job that includes your package.
Here is a summary of good solutions: https://www.mssqltips.com/sqlservertip/1775/different-ways-to-execute-a-sql-server-ssis-package/
精彩评论