Solved

SSIS package error while migrating to sql server 2005 64 bit

Posted on 2010-08-24
5
570 Views
Last Modified: 2013-11-10
hi,
     I am importing excel file data into sql server using SSIS package. Its working fine in SQL Server 2005 32 bit edition. Now I am planing to migrate to sql server 2005 64 bit. I have checked throughout the internet for 64bit excel drivers. But I am not able to find any 64 bit drivers.
     So I have used the 32 bit DTEXEC utiltiy from C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe. But while running the following script, I am getting the following error.

output
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The input line is too long.
NULL

If I print @cmd, I am getting the following,

""C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe"" /F "E:\SSIS\ARMDNY\ARMDNY\ARMDNY\ARMDNY_DOTNETDumpUpload.dtsx" /SET \Package.Variables[User::DB].Properties[Value];"ARMDNY" /SET \Package.Variables[User::DumpIndicator].Properties[Value];"ARMDNY_1" /SET \Package.Variables[User::DumpType].Properties[Value];"MASTER" /SET \Package.Variables[User::RecvdDt].Properties[Value];"08/23/2010" /SET \Package.Variables[User::UpldBy].Properties[Value];"SUN1849" /SET \Package.Variables[User::UpldDt].Properties[Value];"08/23/2010" /SET \Package.Variables[User::SSISPath].Properties[Value];"E:\SSIS\ARMDNY\ARMDNY\ARMDNY\ARMDNY_DOTNETDumpUpload.dtsx"

If i run this manually in cmd prompt, its working perfectly. But its not working, while trying to excute by xp_cmdshell in the above script.

I don't understand where the issue is?
SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO



DECLARE

	@DB VARCHAR(20),

	@DUMP_ID VARCHAR(50),

	@DUMP_TYPE VARCHAR(10),

	@RECEIVED_DT varchar(10),

	@UPLOAD_DATE VARCHAR(30),

	@UPDATED_BY VARCHAR(10),

	@DEBUG BIT



SET	@DB ='ADVENTNET'

SET	@DUMP_ID = 'ADVENTNET_1'

SET	@DUMP_TYPE = 'MASTER'

SET	@RECEIVED_DT = '08/23/2010'

SET	@UPLOAD_DATE = '08/25/2010'

SET	@UPDATED_BY = 'AKJ4232'

SET	@DEBUG = 0



SET NOCOUNT OFF



declare @cmd varchar(1000)

declare @ssispath varchar(1000)

declare @DTS_ExePath varchar(1000)



set @ssispath = 'E:\SSIS\ADVENTNET\ADVENTNET\ADVENTNET\ADVENTNET_DOTNETDumpUpload.dtsx'



select @cmd = '""C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\DTExec.exe"/F "' + @ssispath + '"'

select @cmd = @cmd + ' /SET \Package.Variables[User::DB].Properties[Value];"' + @DB + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::DumpIndicator].Properties[Value];"' + @DUMP_ID + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::DumpType].Properties[Value];"' + @DUMP_TYPE + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::RecvdDt].Properties[Value];"' + @RECEIVED_DT + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::UpldBy].Properties[Value];"' + @UPDATED_BY + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::UpldDt].Properties[Value];"' + @UPLOAD_DATE + '"' 

select @cmd = @cmd + ' /SET \Package.Variables[User::SSISPath].Properties[Value];"' + @SSISPATH + '"'



set @cmd = rtrim(ltrim(@cmd))

print @cmd



exec master..xp_cmdshell @cmd



SET NOCOUNT ON;



SET ANSI_NULLS OFF

GO

SET QUOTED_IDENTIFIER OFF

GO

Open in new window

0
Comment
Question by:PrakashRaoBS
5 Comments
 
LVL 11

Expert Comment

by:aelliso3
ID: 33510658
Did you check the 32 bit runtime in the Execution options tab
As you pointed out, the office import features will not work in 64bit mode  (Thx MS)
0
 
LVL 11

Expert Comment

by:aelliso3
ID: 33510680
This may help with the /86 switch for running it:
http://msdn.microsoft.com/en-us/library/ms162810.aspx 
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33510807
You don have 64 bit drivers for Excel.. You can use the 32 bit

This Might help ..Just give it a shot
change the project properties to run in 32 bit environment ?
Rt Click on Project in BIDS --->Properties--->Debugging---> In the Debug Options Change the Run64BitRunTime  To False

0
 
LVL 2

Accepted Solution

by:
rajeshprasath earned 500 total points
ID: 33511330
Can you try copying the 32-bit DTEXEC to any other location like C:\DTEXEC.exe and also remove "" from the DTEXEC.exe path.
0
 
LVL 3

Author Closing Comment

by:PrakashRaoBS
ID: 33512013
Really good catch. Thanks a lot.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SPROC to look for existing record in passed table name 7 46
SQL Select - Help with CASE 4 42
Help with Sorting Full Text results 2 14
Update data using formula 22 19
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now