Is it somhow possible to set the ProtectionLevel of SSIS package to DontSaveSensitive and to use connection string with password from configuration file during package development in Visual Studio?
I have package e.g. Package1 with ProtectionLevel = DontSaveSensitive. This package is using connection from connection manager e.g. Connection1.
Package1 has configuration enabled using configuration file file1.dtsConfig with connection string specified. This connection string has the password in it:
<DTSConfiguration>
<DTSConfigurationHeading>
<DTSConfigurationFileInfo GeneratedBy="..." GeneratedFromPackageName="..." GeneratedFromPackageID="..." GeneratedDate="20.3.2013 12:08:27"/>
</DTSConfigurationHeading>
<Configuration ConfiguredType="Property" Path="\Package.Connections[Destination].Properties[ConnectionString]" ValueType="String">
<ConfiguredValue>Data Source=.;Password=Password123;User ID=MyUser;Initial Catalog=Catalog;Provider=SQLNCLI10.1;Persist Security Info=True;Auto Translate=False;</ConfiguredValue>
</Configuration>
</DTSConfiguration>
Now when opening the connection from connection manager in Visual Studio, the text field for Password is left blank and the package doen't execute. Why wasn't used the password specified within the connection string in configuration file file1.dtsConfig?
Finally we found a way how to do it:
Change ProtectionLevel to DontSaveSensitive
Create configuraton file with connection string
Manually edit this configuration file: add the password to the connection string in case you connect with SQL Server authentication
Then SSIS package will load the connection string inclusive password from the configuration file even in Visual Studio. In connection manager-connection dialog the password will not be shown, but the package runs using connection string from configuration.
SSIS will take the connection string from the Config File only during the runtime.Even if you mark the checkbox Save my Password , SSIS won't save the password value.This option is vald only during the BIDS session. So the next time when you open the package using BIDS ,again you need to enter the credentials in Visual Studio else the package won't compile ,But the package will always execute properly during run time if you have specified the connection string in config file.
As per MSDN it clearly states that
Do not save sensitive : prevents properties that are marked sensitive
from being saved with the package and therefore makes the sensitive
data unavailable to other users.
This is the case also when package has been set at first to use EncryptSensitiveWithUserKey, then changed to DontSaveSensitive -protection level. You must manually edit .conmgr-file and remove DTS:Password element and put the password into connection string, as user dee has wisely written above.
Related
I create a package through BIML.
Source - MS SQL. (Native OLE DB\SQL Source Native Client 11.0 )
Connection to the source is only possible using "Application Intent=ReadOnly".
Connection string example in BIML:
<Connection Name="servername.dbname.user" ConnectionString="Data Source=servername;User ID=user;Password='pass'; Initial Catalog=dbname;Provider=SQLNCLI11.1;Persist Security Info=True;Auto Translate=False;Application Intent=readonly;" />
</Connections>
When generating, I get the following error:
1/1 Emitting Project ORD.dtproj.
1/3 Emitting Package Upload sad_pda.
Error 0 FlowFramework, Version=5.0.64108.0, Culture=neutral, PublicKeyToken=015f370a62f9a1a3. Node OLE DB Source: Could not execute Query on Connection servername.dbname.user:
**** TEXT MY QUERY
The target database ('dbname') is in an availability group and is currently accessible for connections when the application intent is set to read only. For more information about application intent, see SQL Server Books Online. -1 -1
P.S.
If you make the package manually in Visual Studio, it works.
Let's convert this package to BIML. Trying to create an SSIS package from BIML - attract this same error.
I am taking over the development of an SSIS package and the original author is no longer around. I need to make some edits to the package, but I get some errors:
Error loading Package.dtsx: Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
Upon some pages in the interwebs, I found that you can change the ProtectionLevel property to 'Don't Save Sensitive'. According to MS documentation, it just doesn't save the sensitive info. From looking at the package code, the error is throwing because of one of the HTTPConnection stores a password.
DTS:ServerURL="https://servicewebaddress/ExportService.asmx">
<DTS:Property
DTS:Name="ServerPassword"
Sensitive="1"
Encrypted="1">sdfsdfsdf</DTS:Property>
<DTS:Property
DTS:Name="ProxyPassword"
Sensitive="1"
Encrypted="1">kldkjlkjlkjl</DTS:Property>
</DTS:HttpConnection>
What are my options? If I change ProtectionLevel property to 'Don't Save Sensitive', what would I need? What is ServerPassword/ProxyPassword? Can someone explain what those properties mean?
UPDATE: I am running Integration Services 11 on the server I am running. I will deploy by package.
You need to refresh the Package Encryption by doing the following:
Change the ProtectionLevel property of the offending package to 'Don't Save Sensitive'.
Save & Close the Package.
Reopen the package and verify that the error has disappeared.
Now restore the package ProtectionLevel property to 'EncryptSensitiveWithUserKey'. (This will restore the encryption of the sensitive data using your User Key).
Repeat Steps 2 and 3.
In SSIS 2008 I am trying to configure a package to execute another package using the Execute Package Task. In the Execute Package Task Connection expression I am using a variable that contains the absolute path to the folder where the package I want to execute is located because as we all now relative paths don't work in SSIS. The expression evaluates to what looks to be the right path as can be seen in the screenshot below.
However when I try to execute the package I get the following error that it can't find the package:
I am very confused by this because the package path is correct. Any ideas?
I think you are setting the connection in the wrong place.
You need to set the connection string in the connection manager.
Example that I want to change the Package1.dtsx to execute Package2t.dtsx ..
Created Connection Manager "Package1.dtsx" that references a package in a folder called Package1.dtsx
Properties of Connection of Package1.dtsx in Connection Manager
Change ConnectionString in Connection Manager to execute Package2t.dtsx.
Try including double quotes since your file path string has spaces in it
"\"" + #[User::RootFolder] + "\\" + "ImportSessionAndSubsessions.dtsx\""
Im trying to connect to a web service using Web Service task. I have used the WsdlFile property to dynamically set the path of WSDL file.
The package executes fine on my local system. When I try to execute the same package on my TEST server ( via Active Batch scheduler), it fails with the following exception :
-1073548540,0x,An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The input Web Services Description Language (WSDL) file is not valid.
I have placed the WSDL file in my TEST server location ( which is equal to the path set in WsdlFile property) and also have Delay Validation = True on WebService task in the package.
Kindly help on how can I resolve this issue.
In my experience this will only occur if the WSDL file is invalid (obviously!) or the SSIS package can't find the WSDL file. Ensure that your configuration exposes the WsdlFile property.
To do so, select SSIS > Package Configurations, and create or edit an existing configuration. Tick the WsdlFile property to expose it:
This will add a property to a configuration file. Ensure that the value of that is set to a full file path e.g. "D:\SSIS\WebService.wsdl"
Finally, once deployed, ensure that your SSIS package references the configuration file you've created.
I'm trying to run an SSIS package from the SQL Server Management Studio, and am having trouble overriding a configuration setting. In my case, it's the location of a flat file. The command I'm using is:
declare #returncode INT
exec #returncode = xp_cmdshell 'dtexec
/SQL "\ImportData"
/SERVER "myserver"
/CONNECTION "ImportData flatfile connection";"C:\files\ballot.dat"
/MAXCONCURRENT " -1 "
/CHECKPOINTING OFF /REPORTING E'
As you can see above, I'm trying to run this using c:\files\ballot.dat as the flat file in question. When doing so however, SSIS reverts to using the setting stored in its configuration file, which points to a different location (and ballot.dat file) on the hard drive.
Is there a way to override that when calling the package from the command line? Thanks for your suggestions.
What you can do is to add an SSIS Package configuration XML file. In this configuration you can specify all connection managers (just include the connection string). save this file as c:\otherconfig.xml or something like that. Edit the file, you should see your connection listed, and you can edit the connection string.
When running the package with dtexec you should be able to run it with that config file using /configuration.
Note also that there are lot of changes from 2005 to 2008 in how connections and package configurations are handled. See http://msdn.microsoft.com/en-us/library/bb500430.aspx for more details.
You need to set the *full" connection string, not just the file name...
/CONNECTION "ImportData flatfile connection";"Provider=...;Data Source=C:\files\ballot.dat"