Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Executing SSIS package with parameters and 32 bit data source from SSMS


Executing SSIS package with parameters and 32 bit data source from SSMS

Author
Message
T_Peters
T_Peters
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1197 Visits: 1540
Greetings,

I have a SSIS package that imports data via a 32 bit data source. I am able to run this from the command line on the server, but am unable to execute if from SSMS. The package property Run64BitRuntime is set to False.

Here is the syntax when I run it successfully from command line from C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn

dtexec.exe /FILE "C:\Program Files\Microsoft SQL Server\100\DTS\Packages\MAS90Hybrid\MAS90Hybrid.dtsx" /CHECKPOINTING OFF /REPORTING EWCDI /set \package.variables[StartDate].Value;2013-02-01 /set \package.variables[EndDate].Value;2013-02-28 /set \package.variables[CountryCode].Value;AF /set \package.variables[ODBCConnection].Value;"AFG"



Here is the syntax I'm using in SSMS:

declare @param varchar(4000)
declare @country varchar(2)
declare @odbc varchar(10)

SET @country = 'AF'
SET @odbc = 'AFG'

SET @param = 'C:\"Program Files (x86)"\"Microsoft SQL Server"\100\DTS\Binn\DTExec.exe /F "C:\Program Files\Microsoft SQL Server\100\DTS\Packages\MAS90Hybrid\MAS90Hybrid.dtsx"'
+ ' /CHECKPOINTING OFF /REPORTING EWCDI '
+ ' /set \package.variables[StartDate].Value;2013-02-01'
+ ' /set \package.variables[EndDate].Value;2013-02-28'
+ ' /set \package.variables[CountryCode].Value;' + @country
+ ' /set \package.variables[ODBCConnection].Value;"' + @odbc + '"'

EXEC master..xp_cmdshell @param



I believe the main error "Description: System.Data.Odbc.OdbcException: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified" is cause by not being able to access the 32 bit driver. Why can I run this from the command line, but not SSMS? I'm trying to run it in SSMS because I would like to put it into a stored procedure and have it called by an end user. Any thoughts or suggestions on other methods?

Thanks,
Tim
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16522 Visits: 13210
Maybe SSMS uses the SQL Server account to run DTEXEC instead of your own account?



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search