Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Creating Dynamic Excel File ( Executing SSIS package in Stored Procedure), Error : Must Contain one or more components of the form X=Y

$
0
0
declare @strselect varchar(8000)
declare @strlocalpath varchar(1000)
declare @strLocalFile varchar(1000)
declare @strpkgname varchar(100)
declare @strSSISRunCommand varchar(2000)
declare @strDBName varchar(4000)

set @strLocalFile= 'jaya.xls'
set @strlocalpath='C:\test\'
set @strpkgname='test'
set @strselect= 'select * from ##jaya'
set @strDBName= 'GBADW'
	            set @strSSISRunCommand = 'dtexec /SQ "' +
 				rtrim(@strPkgName) + '" ' +
 				'/SER "' + rtrim(@@servername) + 
				'" /SET "\package.Variables[User::Source].Properties[Value]";"' +
 				rtrim(@strSelect) + '"' +
				' /SET "\package.Connections[Destination File].Properties[ConnectionString]";"' +
 				rtrim(@strLocalPath) + rtrim(@strLocalFile) + '"' +
				' /SET "\package.Connections[Catalog].Properties[ServerName]";"' +
 				rtrim(@@servername) + '"' ++ ' /SET "\package.Connections[Catalog].Properties[InitialCatalog]";"' +
 				rtrim(@strDBName) + '"' 
  	print @strSSISRunCommand
EXEC  [master].[dbo].[xp_cmdshell] @strSSISRunCommand

Out Put :

Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 32-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
NULL
Started:  11:35:40 PM
Error: 2013-11-13 23:35:40.75
   Code: 0xC0024108
   Source: test Connection manager "Destination File"
   Description: The connection string format is not valid. It must consist of one or more components of the form X=Y, separated by semicolons. This error occurs when a connection string with zero components is set on database connection manager.
End Error
Warning: 2013-11-13 23:35:40.75
   Code: 0x80012028
   Source: test 
   Description: Process configuration failed to set the destination at the package path of "\package.Connections[Destination File].Properties[ConnectionString]". This occurs when attempting to set the destination property or variable fails. Check the dest
ination property or variable.
End Warning
DTExec: Could not set \package.Connections[Destination File].Properties[ConnectionString] value to C:\test\jaya.xls.
Started:  11:35:40 PM
Finished: 11:35:40 PM
Elapsed:  0.218 seconds
NULL

I am new to SSIS

Please Help!!!
Thank You!!!



Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>