SSIS 2012 Passing Parameters / Passwords with Dont Save Sensitive - configuration

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.

Related

Is there a way to use an MS Access DB (MDB files) on Azure Websites?

We normally use Microsoft.ACE.OLEDB.12.0 to read and write from MS Access Databases. On a normal Server you can just install office or the AccessDatabaseEngine_x64.exe and this works fine.
Now we want to move our app to Azure (Preferably the Azure Websites and not WebRole or full VM). But there we obviously can't install the Access Drivers.
Is there another way to use Access on Azure? Maybe a 3rd party driver or something that can be run/installed with user privileges.
We looked at dotConnect, but as far as I understand, this still needs OLE DB.
Switching to Azure SQL is not an option, as Access is used as a "FileType" for a 3rd Party system that we use.
Specifically for a cloud service, you can do the following:
Create a cloud service that wraps your core project/site.
Include the MDB in the project that is wrapped from (1). Many ways to do that.
Include any executables or scripts you want to be deployed as well. You can add them to a Visual Studio project and set their Build Action to Content.
In the project that is wrapped, include a WebRole.cs file and implement RoleEntryPoint and specifically implement public override bool OnStart(). This will allow you to run scripts, move files on the file system etc.
The nice thing about using WebRole.cs to run your initialization code is that when Azure reimages your cloud service, the code will always run and get the machine back to a known state.

Is it possible to export/import all connections within 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

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.

Overridding SSIS Environment variable

I have set up a Package Configuration where the Configuration Type is (Indirect XML Configuration File). Where the Environment Variable is pointing to the C:\SSIS\MasterConfig\MasterConfig.dtsConfig file.
This working great and allows easy migration from Test to UAT to Production.
The problem is in our Development environment where each developer has their own DB. I am trying to set up an Agent Job for each developer where the Agent Job would override the Master Configuration File. The agent job command line is":
/FILE "C:\SSIS\Packages\Developer1\LoadPackage.dtsx" /CONFIGFILE
"C:\SSIS\Packages\Developer1\Developer1_Config.dtsConfig" /X86
/CHECKPOINTING OFF /REPORTING E
Using 2008 R2.
I was expecting that the /CONFIGFILE
"C:\SSIS\Packages\Developer1\Developer1_Config.dtsConfig" would be
used in stead of the C:\SSIS\MasterConfig\MasterConfig.dtsConfig file.
Only the Master Config file is being used. Any ideas?
The problem you are running into is covered under Defining a Configuration Approach for Integration Services Packages Basically, the command line configuration is being applied but then overwritten by the design time value.
I'm not sure what your solution would be though. Semi-similar situation here except we had to deal with multi-instanced boxes (dev and test shared a physical host). To get around that, we skipped the environment variable bit and decided that design-time value would always point to dev. Test, UAT and PROD would only be running packages via SQL Agent so our jobs explicitly define the connection string to the configuration resource. Yours is a backwards scenario though, design-time values is fine everywhere but dev.
Here's what we do.
All variables are named the same whether it points to Production, QA or Dev (or even to local). What we change are the variable values pointing to the config files.
We create config files that have all of the appropriate connection information for each box. So we'll have at least 3 separate config files for each database. We name them DB_Prod.config, DB_QA.config, DB_Dev.config, and then DB_Joe_local.config (if you want to have one that points to your local db.
We then create .bat files that sets our variables to the right environment. I have 3 different ones, one for QA, one for dev, and one for my local environment.
the environment variables are ll named things like DB1_adonet, DB1_ole, AS400, etc. With no indication of QA, prod, etc.
It's a slight pain in the ass to set up, but once you start using it, the only issue is remembering what enviroment you've set yourself to. Also, you need to remember that you need to open and close dev studio between environment changes as the values are cached. Also, if you happen to run a package localy, it will use your environment variable values, and not the box you are running it from.
Final note, we have all of the config files checked into TFS. Makes for easy distribution of files.

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