Hi All,
I have created a SSIS package and deployed it on Sql server. I need to load this package from my C# code. when i am trying to execute following code it is giving error "Cannot find folder \MSDB\DevSAE\MeyyDev1" .. whereas this is already present in side stored packages of server.
pkg = app.LoadFromSqlServer(@."\MSDB\DevSAE\MeyyDev1", "BLRKEC36570D", "sa", "SAEuser123", error);
what could be the reason for this ?
Thanks,
Anshu
Have you read through the books online topic for this?Don't use MSDB in your path. I think you want: \\DevSAE\MeyyDev1
http://msdn2.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.loadfromsqlserver.aspx|||
thanks Phil,
its working file after removing MSDB. Can u please tell me its reason?
|||
Anshu nautiyal wrote:
thanks Phil,
its working file after removing MSDB. Can u please tell me its reason?
MSDB is not needed because that's the only place to store packages inside SQL Server. So why require it? In effect, you were specifying \msdb\msdb\path\package|||
Phil,
Loading package was succesful but when i m executing this package from my C# code it is giving me error . I have done package level setting in code it self like package password and protection level.
i m reading connection string from config file of my application. The connection string inside app.config is
"Data Source=servername;Initial Catalog=DevSAE ;Provider=SQLNCLI;Integrated Security=SSPI;Auto Translate=false;"
protection level for this package is EncryptSensitiveWithPassword.
The package itself has same setting for password and protection level.
when i m trying to execute this package this is returning following error :
Microsoft.SqlServer.Dts.Runtime.Package/ : Failed to decrypt protected XML node "DTSassword" 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
It seems that there is problem with connection string or user id. m not able to trace it. I m new to SSIS i may be doing some silly mistake. but i m not able to resolve it.
can u please give some idea about this?
Thanks
|||
That error is related to ProetctionLevel property of the package. It looks like you are using EncryptWithUSerKey; which means only the author of the apckage can executed. You can use package configuration as described in method 4 in this KB:
http://support.microsoft.com/kb/918760
|||No i m using EncryptWithPassword protection level. So m trying to pass password to my package before executing it. but its giving me error
Error in Microsoft.SqlServer.Dts.Runtime.Package/ : Failed to decrypt an encrypted XML node because the password was not specified or not correct. Package load will attempt to continue without the encrypted information.
it seems that it is not taking this password. .... is it not pssoible this way ?
Actually i want to execute packages deployed on sql server from my .net code. i m using package object to execute them before that i m setting the password and protection level for them. but still m getting the same error.
Can please help me out on this?
|||how are you executing the package...it should be straight forward as you just need to provide the password in the command line
No comments:
Post a Comment