I am trying to execute SSIS package using command line dtcexe but I am getting error.
Error I get - Description: The package path referenced an object that cannot be found: "\Package.Variables[$Project::p_cityID].Properties[Value]". This occurs when an attempt is made to resolve a package path to an object that cannot be found.
Begin
declare @p_cityId varchar(10) = '%'
declare @p_count varchar(10) = '-1'
declare @query varchar(4000) =
'dtexec /Project C:\SSIS\DUTPackages.ispac /Package pmtCity.dtsx /decrypt pass@123'
+ ' /SET \Package.Variables[$Package::p_cityID].Properties[Value];''' + @p_cityId + ''''
+ ' /SET \Package.Variables[$Package::p_count].Properties[Value];''' + @p_count + ''
exec xp_cmdshell @query
End
So far I have tried using -
Package.Variables[$Project::p_cityID].Properties[Value]
Package.Variables[User::p_cityID].Properties[Value]
But had no luck.
Can anyone point me to right direction and tell me what I am doing wrong?
From MSDN The following example of running a package from the .ispac project file and setting package and project parameters.
/Project c:\project.ispac /Package Package1.dtsx /SET \Package.Variables[$Package::Parameter];1 /SET \Package.Variables[$Project::Parameter];1