dbTalk Databases Forums  

dtexec passing variable

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss dtexec passing variable in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
GE
 
Posts: n/a

Default dtexec passing variable - 06-24-2009 , 03:05 PM






I have a simple ssis (it just creates a table). It has a variable tblName.
When I give a valid variable name, the ssis works fine. In the orignial ssis
package I have tblName set up as tblTest. I saved the ssis package in the
server.

I want it to work from dtexec:

EXEC xp_cmdshell 'dtexec /sql "ssisTest"
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"'

The new variable, tblTest11111111111 is not getting used. If I drop tblTest
and run the above it creates tblTest. In other words this line does not work:
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"

I tried removing quotes from tblTest11111111111 and that does not help either.

Any help will be apreciated.
Thank you,

Reply With Quote
  #2  
Old   
Todd C
 
Posts: n/a

Default RE: dtexec passing variable - 06-26-2009 , 07:47 AM






Sounds like it is not properly using the variable in the package.

By what method is the SSIS package creating the table? Can you give us a
sample of your code or T-SQL statement?
=====
Todd C


"GE" wrote:

Quote:
I have a simple ssis (it just creates a table). It has a variable tblName.
When I give a valid variable name, the ssis works fine. In the orignial ssis
package I have tblName set up as tblTest. I saved the ssis package in the
server.

I want it to work from dtexec:

EXEC xp_cmdshell 'dtexec /sql "ssisTest"
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"'

The new variable, tblTest11111111111 is not getting used. If I drop tblTest
and run the above it creates tblTest. In other words this line does not work:
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"

I tried removing quotes from tblTest11111111111 and that does not help either.

Any help will be apreciated.
Thank you,

Reply With Quote
  #3  
Old   
GE
 
Posts: n/a

Default RE: dtexec passing variable - 07-02-2009 , 09:36 AM



it is using a stored procedure to create the table


"Todd C" wrote:

Quote:
Sounds like it is not properly using the variable in the package.

By what method is the SSIS package creating the table? Can you give us a
sample of your code or T-SQL statement?
=====
Todd C


"GE" wrote:

I have a simple ssis (it just creates a table). It has a variable tblName.
When I give a valid variable name, the ssis works fine. In the orignial ssis
package I have tblName set up as tblTest. I saved the ssis package in the
server.

I want it to work from dtexec:

EXEC xp_cmdshell 'dtexec /sql "ssisTest"
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"'

The new variable, tblTest11111111111 is not getting used. If I drop tblTest
and run the above it creates tblTest. In other words this line does not work:
/set\Package.Variables[User::tblname].Properties[Value];"tblTest11111111111"

I tried removing quotes from tblTest11111111111 and that does not help either.

Any help will be apreciated.
Thank you,

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.