SSIS Script Component File Location - ssis

I am trying to commit my SSIS package to Git and I'm running into an issue with adding the Script Component code files. I have my SSIS package within my Git repository location, but the code file is located in the AppData folder as such:
C:\Users\Jeremy\AppData\Local\Temp\Vsta\SSIS_SC110\Vstak5QLNZovpE__2Hp8ieeyROw\Vsta_luuBHnd9ka0dNruaTdUoQ\main.cs
I would like to add the entire SSIS package to Git so others can use the SSIS package on the team. Does anyone know how to add the "Script Component" files to the repository?

Hi this is the usual behavior of the Visual Studio. When you open up a script task it will be added to a temporary location. while opening it will go to a temporary location to edit.
Once you clean and build the application it will be available inside of the .dtsx package. You have to commit the entire project and for a new user who get a pull will get the code without any issue.

Related

Publish json file generated from exe to Teamcity artifacts

I am new to teamcity and I am trying to do the following:
I have an exe file in my project & I have a build step in teamcity to
run the exe.
When exe runs, it saves a json file in the same folder as the exe.
How can I publish this json to the artifacts in teamcity?
In your build configuration settings, on the General page, you are able to specify which file(s) or folder(s) to publish as artifacts. You can export the file(s)/folder(s) as is, or zip them. Refer to the documentation and the quick help dialog (mouse-over the little info-icon next to the text field) for syntax flavors.
Simply writing the name of the json file should be enough though. If your build has run once before already, you can click the folder-structure icon on the right to see an example of the contents from the previous run. In this box, you can simply click the content you want exported. Note: this does require a recent run.

SSIS file path changing to C:\windows\system32 depending on how I open the project file

I've been working with SSIS reading different files - from CSVs to XLSXs - with no problems. My paths are relative, so SSIS searches for the files from the project's folder.
Well, today my colleague tried to run a package and he got a curious error message saying that the file could not be found under the "C:\windows\system32" folder. There's no configuration that would point SSIS to that folder and with me and a third colleague it's working well.
After some investigation we discovered that the problem has nothing to do with the user itself, but with how the user opens the project. Since the beginning I've been opening the project by double clicking the ".dtproj" file. My colleague first opens the SSIS development interface then opens the project file from the menu.
Has anyone noticed that behavior? What could be the cause for that?
error message print
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: IDE Standard
This happens because the different ways of launching the IDE end up with different current directories for the IDE process. You can test this by creating a package with only a Script Task, with the one line:
MessageBox.Show(Environment.CurrentDirectory);
And then running this project after launching it both ways.
Double-clicking the project or solution file sets the folder containing that file as the current directory. (I assume this is standard Windows process launching behaviour when starting a process based on the file extension association.) SSIS packages then look in the current directory when the path to the configuration file is relative.
We use relative paths to configuration files all the time to simplify deployment, and have to always remember to open the solutions by double-clicking the SLN file.

SSIS Deployment Woes

I'm quite confused as to how to create a deployment in SSIS 2008 that I can use throughout the various sites we are going to deploy to. I'm using the deployment utility to deploy my ETL packages which are file based and executed using a SQL job.
When I rebuild my solution, the deployment files are created along with their configuration files which I bind my connection strings to. I've discovered that each of the packages are still referencing the configuration files in my project folder, rather than the configuration files in the deployment folder. I thought that when I created a deployment, the paths referencing the configuration files would be relative paths.
Ideally, what I would have liked to have been able to do would be to copy the contents of the deployment folder to a flash drive, plug it in at the site I'm deploying to and edit the configuration file per the customer site, execute the deployment manifest file in the folder and expect everything to work. But this doesn't seem to be the case.
I also notice that the SQL job has an option to specify the configuration files for the packages, but this doesn't seem to have an effect either. I must clearly be doing something wrong here, please could someone assist.
Seems like you are encountering these two issues with SSIS deployment and execution:
Configuration file references are stored with absolute paths (meaning the concrete path used in the development environment when the configuration file reference was created, and in production this is the same path that will be used).
Specifying a different configuration file at runtime in SSIS 2008 cannot override values specified at design time (see Understanding How SSIS Package Configurations Are Applied at Run Time).
To deploy your packages with a simple file copy the way you describe, you must change your packages to use a relative reference to your configuration files:
Right click the package file and select View Source to open the XML view of the package source. Search for your configuration file, which will include the path, and remove the path; keeping only the filename portion. Alternatively, change the absolute path to a relative path to the configuration file. Save and close the XML view of the package.
Now when you deploy the package and the configuration file together, ensuring they have the same relative location to each other, the package will find the config file by the relative path, and work the way you expect.
Note: from this point forward you will need to open the BIDS IDE by double-clicking on the project or solution file. If you launch Visual Studio, and then open the project or solution from within the IDE, the IDE will not be able to find the configuration file when you execute the package (the current directory will be Windows\System32, not your package folder).

Deploying SSIS package with some csv files

I am using SSIS BIDS 2008 R2. In my solution I have a Parent.dtsx package and there are a few child packages that the Parent package calls. The thing is that some of the Data Flow tasks in my packages (child or Parent) use some csv files that are kept in a folder hierarchy of the packages.
Now I want to distribute my package so I have to deploy it. I have the following quesions -
How to make the my csv files part of the deployment.
All my File Connection Managers have absolute paths. How do I convert them to relative paths? Because this will be an important concern when other consumers try to run the package.
One of the OLE DB connection strings needs to be dynamic. I mean it has to be supplied at runtime when someone will try to run the package using dtexec.
Any help/suggestions/link to resources is greatly appreciated!!
Thanks a bunch
How to make the my csv files part of the deployment.
In the Solution Explorer you'll see there's a folder labelled "Miscellaneous". To add a file to here you need to go to the uppermost node and: Right-click > Add > Existing Item...
All my File Connection Managers have absolute paths. How do I convert them to relative paths? Because this will be an important concern when other consumers try to run the package.
One of the OLE DB connection strings needs to be dynamic. I mean it has to be supplied at runtime when someone will try to run the package using dtexec.
Both of these problems can be resolved by adding a configuration file to your SSIS package.
Open a SSIS package and you'll find the option on the file menu under: SSIS > Package Configurations
You'll be able to modify almost any property of your objects within the package.

is there a way to create single set-up/installable for some 5 ssis packages?

we have multiple ssis packages that need to be deployed on server .. is there a way to install all these together, perhaps?
Yes you can create a Deployment Manifest which will let you install all the packages in a project. To create this, you need to select the project Properties (on the Project menu), then select Deployment Utility and set CreateDeploymentUtility to True. By default, the path for this will be bin\Deployment under your project path. You can then copy everything in that folder to your destination and double-click the .SSISDeploymentManifest file to begin the install.
Alternatively, if you have sufficient rights, you can deploy a project directly from BIDS by entering the relevant destination server details in the project property pages (by right-clicking on the project name in Solution Explorer), then right-click and Deploy.