Is it possible to export/import all connections within SSIS? - ssis

Does SSIS 2012 allow to export all connections of a project for a further import into another project?

In 2012 SSIS projects, you now have 2 options. The classic, pre 2012 way which is referred to as Package Deployment Model. The new, default, model is the Project Deployment Model. This answer focuses on the Project Deployment model.
Before you begin any manual edits of files, use a version control system. While you can edit XML by hand, you need to have a safe recovery point in case you pooch the files.
In SSIS 2012, you can have Connection Managers scoped to packages as you've always done or they can now be a shared, project wide connection. Project connection managers show up in every package in SSDT, whether you need them or not. They are prefaced with (project).
If you've created a package Connection Manager that you wish to make into a project resource, simply right click on the CM and select Convert to Project Connection.
One caveat if you reverse that, the Convert to Package Connection is only going to create that CM in the current package. That's not such a hassle when it's 2 or 3 packages, but when it's 20ish, that gets tedious.
A Project Connection Manager has a physical file associated with it. In your project's folder, there will be .conmgr file for each connection manager. That defines the connection all the packages share. However, packages only "know" about the connection manager because of data in the .dtproj file.
If I wanted to re-use an existing project connection manager in a new project, I'd need to copy that file into my new projects folder. After that, I'd have to edit the .dtproj file and add that file's name in between the ConnectionManagers tag
<DeploymentModelSpecificContent>
<Manifest>
...
<SSIS:ConnectionManagers>
<SSIS:ConnectionManager SSIS:Name="PackageCM.conmgr" />
</SSIS:ConnectionManagers>
Now when SSDT opens the project file up, you should have a project CM exposed.

I don't think there's import/export connections utility in SSIS. You could, however, create package configuration file and include your connection managers in it. Then you can edit the file to run your package on different environment, or use values in it to update configuration file of another package.
resource:
http://msdn.microsoft.com/en-us/library/ms141132.aspx

Right click on the connection. Copy the connection Manager and paste in required package

Related

Cannot Open DataFile SSIS Package via SSMS

Background
Created package in BIDS.
Deployed to SSMS
Package writes files to a CSV file in a network fileserver.
The default name of the package's flat file destination is $path\workcsvout.csv
Package derives filename from an expression
Issue
When I configure and run from SSMS, it fails with Error DFT -Extract to File:Error:Cannot open the datafile "........\DerivedFilename.
Troubleshooting
Verified the file exists in directory - used flat file destination temp filename, before derived filename - still failed
changed name to file it was trying to open - still failed
I am running job from my login in SSMS, via SSISDB - Projects - Package - .dtsx package - Execute
See pictures below and advise if more information is needed.
Thanks
Ensure Visual Studio isn't open after attempting to either run the package directly from the Integration Services Catalog as I have found that VS can hang onto a connection to the files you are writing to and it can throw similar errors.
Ensure the account configured for the package has sufficient permissions in all the areas it needs to write to.
After VS is closed and permissions are all set in step 2, try executing the package directly inside the Integration Services Catalog in SSMS. If this works, move to step 4. If this doesn't work, troubleshoot the errors and ensure security is all setup properly and you are executing the package with the same account.
If you are here, I will assume you want to schedule the package. Ensure that the owner is the same account used in step 2. Check the "Run As" account in Step in the job, if that account is not the same as step 2 then you either need to make it the same or give that account the same access as the account used in step 2.
I went through this troubleshooting process and it solved my issue. I also was building files on a general UNC file path like \servername\folder\folder without needing to do any local business with \servername\d$\folder\folder that other people recommend.
I would check to make sure that your SQL Server service account has full rights to the landing folder.
After experiencing the same issue as you, I finally checked the folder permissions that were created for our SQL Server service account. Come to find out that it was missing the "Full Control" and "Modify" folder permissions. Once I granted these to our service account, the issue went away.
Folder Permissions Dialog Box
Troubleshooting:
Can you try to create file on local and then move the file using File System Task.
I was trying to pump the data which is in csv file.
Closing the visual studio and closing the csv file which was opened in another machine resolved the problem

SSIS 2012 Passing Parameters / Passwords with Dont Save Sensitive

I have got a package and I want to pass username, password and server name via the Project Parameters. I managed to set it, deployed to SSIS Server and it run successfully in the server.
However, as soon as I set the Protection Level to 'Dont Save Sensitive', I couldn't run the package in my development PC anymore.
After changing that, the package cannot access to the Database anymore and Project Parameters are no longer tied to the package.
In SSIS 2008, we used Package Configuration XML files and by using that XML file, we can run in both Development and Live environment at the same time.
Is there anyway to achieve the same in SSIS 2012?
Your package needs to have a Parameter for each of the Project Parameters you are trying to pass.
Then your Connection Managers need to use those Variables - usually as Expressions to form a ConnectionString property.
You need to:
Store the password in a config file (not the best idea but it does work)
Store the project parameter as sensitive. Then you've gotta use things like the GetSensitive method to decrypt that data.

SSIS: How to I specify the server for the file connection manager (specifying existing directory)?

I'm fairly new to SSIS and am having trouble figuring out something that seems like it should be straight forward:
On server A, I have 10 files in "C:\SourceFiles\Patients" (these files are PDFs). I know the names of these 10 files and they won't change. Also, there is a server B which is the DB server and is where the SSIS package will be located. My goal is to loop through a DB table containing patients, add some patient data to the 10 source files (renaming the file) and then save this new file to server A.
I have most of this running already. Currently, all of this is happening in a script task using ADO.NET for the DB access (I'm already accessing the DB table on server B) and I'm accessing the source files on my local C drive.
I am having trouble figuring out how to specify server A in the Package Configuration for the source files. I have a file connection which specifies an existing folder (C:\SourceFiles\Patients), but it only specifies the location of the folder NOT the server. How to I specify server A for this file connection? Or, how do I use this file connection with a server A connection? I'm having real difficulty grasping this for some reason!!
The technologies I'm using are:
Visual Studio 2008,
C# in the SSIS script task,
ADO.NET in the SSIS script task and
SQL Server Management Studio 2008 (SSIS package will be imported here).
Thanks for pointing me in the right direction!
I see some issues with what you are trying to do.
PDF is an image format (an image of a document) and as such is not easily manipulated by SSIS. Generally if you are acting on a file from within SSIS, it would be a flat file of some sort, like a CSV or some other text format.
Using a script task to do all of your work within SSIS is failing to use the power of SSIS properly. If all you have in your SSIS project is a script task, you should just be using C# or VB.net directly and not involving SSIS in your project at all.
That all being said, you should access your files on server A using UNC (Universal Naming Convention) paths. You will need to pay close attention to your permissions within SSIS to make this work. When an SSIS job runs, it runs under a specific user, usually the SQL Server Agent user, and that user will need permissions to access the folder on server A remotely. When all of these permissions are set correctly, you can use something akin to \\ServerA\ShareName\Patients\ as the pointer to your directory with pdf's in it.

Pull files from FTP using SSIS package and save to folder?

I have FTP location having 2-3 folders from there i need to pull some files on daily bases using SSIS package please help.
for example:
FTP Detail
Server: ftp.abc.com:21
User: user1
Pwd: pass1
then there is a folder called Mydata and file named price(Date)
now i what to pull that file on my local machine C:\
how can I do this using SSIS?
I'd start with adding an FTP Connection Manager to your package. You will most likely want to create two variables in your package, User and Password and configure the FTP connection manager's expressions tab to use them. Reason being, you may run into issues with running the package via SQL Agent and you will need to supply those values via external configuration. Example 1 of said issue but it's a common problem
Click test and verify the connection manager is working fine.
Next step is to drop an FTP task on your control flow and see if you can master pulling 1 file down. That operation will be "Receive files"
While looking for a good image, I stumbled across this article and that should more than cover everything you will need to know about Using the FTP Task in SSIS 2008

deployment to another server

How to deploy the SSIS package to another server ? What are the steps to be done for deployment in an another server ?
We use configurations (ours are in the datbase but it's simpler to start with file configurations.). I n the menu for SSIS choose configurations and set them up for dev and create a file. Test to amke sure the configurations work porperly. Then open the file and save a qa version after editing for the qa locations and a prod version after editing for the prod locations.
Then copy the config file to it's designated locatoin and the SSIS packa ge to it's designated location (again we use files for this not directly in SSMS although I think you can use SSMS if it is set up for this.)
THen schedule a job telling it to run the package.