Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Error message when connecting to Sybase from SSIS on 64bit server

Posted on 2010-09-07
7
Medium Priority
?
832 Views
Last Modified: 2013-11-10
(Sorry, this is supposed to be in the SSIS forum, not XSL/XML)

I am quite new to SSIS so please bear with me if I use incorrect terminology.

I developed a SSIS package on MY PC and it works fine.  But I'm having trouble when it runs on the server.

On our SSIS server (which is a 64 bit server where we installed SQL Server 2008) we have a series of ODBC connections configured using the Adaptive Server Enterprise.  I have configured 32-bit ODBC connections and these do seem to be available to SSIS via ADO.net.

I created a data flow task and linked my sybase database to the ADO.net source connection.  The query I used as my data source was a stored procedure call, i.e.:
EXEC sfa_sp_REP182

Open in new window


When I click on Preview, generally first time in I get an error message like this:
Error at Data Flow Task ADO NET Source: System.AccessViolationException: Attempted to read or write protected memory.

Next time it seems to work OK and I get rows back.  Clicking on the 'columns' are doesn't show me any output.  If I then connect the source to a data flow transformation such as a 'Row Sampling' task it claims there are no input columns.

If I then click on the ADO.NET Source again I get a message saying, 'The component is not in a valid state.  Do you want the component to fix itself automatically?'.  If I say yes I get the error message again.  

Can anyone suggest what I'm doing wrong?  I'm sure it is something to do with these ODBC drivers.
0
Comment
Question by:Vass1
7 Comments
 
LVL 15

Accepted Solution

by:
AmmarR earned 2000 total points
ID: 33616570
Dear Vass1

i dont want to disappoint you, but i have been trying to get Sybase and SSIS work together and always failed.

i have tried ssis with oracle, and it was fine. but with sybase . always problems

sybase 12 was very straight forward with DTSs and sql 2000, but now with ssis, things changed to worse.

i dont know why Sybase specially, its just nor working fine, sometimes it works and many times it fails, i tried all available sybase drivers, 12 till 15. non worked, 32 and 64 bit. there always was a problem.

but i found a driver that worked amazing without any trouble

its from Datadirect

http://www.smart-it-consulting.com/article.htm?node=172&page=141
http://web.datadirect.com/product-downloads/connect64-ssis.html

download and use the trial version and you will see a great difference when dealing with sybase in ssis.

the problem is its a bit expensive, but for the record, its better in reading sybase then sybase drivers themselves.

Good luck
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33617853
You cannot execute any Stored Proc directly from Data Flow task unless you use FMTONLY ON command before the EXEC statement.. This sure works against SQL Database never tried against an ADO source..but you give it a try to see if it works

SET FMTONLY ON
SET NOCOUNT ON

EXEC sfa_sp_REP182

SET FMTONLY OFF
0
 

Author Comment

by:Vass1
ID: 33617982
Hi - just tried the FMTONLY idea but still get the same problem.  In fact, clicking Preview now returns NO rows rather than returning data...  Thanks anyway.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 30

Expert Comment

by:Reza Rad
ID: 33620733
why you don't use ODBC connection in SSIS?!! try it.
0
 

Author Comment

by:Vass1
ID: 33625898
I don't have ODBC connections listed in my Data Flow Sources.  So, even though I've configured ODBC connections on the server, I can't access them.


datasources.bmp
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 33627299
The advice to use SET FMTONLY ON is bad advice - it is the equivalent to running SET NOEXEC ON. The stored procedure will not actually ever execute - hence the zero rows returned.

None of your error messages are Sybase errors, or ODBC errors. Suspect your problem lies elsewhere.
0
 
LVL 16

Expert Comment

by:vdr1620
ID: 33627467
My bad.. it should be OFF instead of ON

it should actually be  SET FMTONLY OFF, without which you will not be able to see any Columns at-least in sql..  There are many ways around,this being one of them
 

>>>>>>>>>I don't have ODBC connections listed in my Data Flow Sources.  So, even though I've configured ODBC connections on the server, I can't access them <<<<<<<<<<

You will need to use a ADO.NET source to connect to a Database using ODBC connection

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

879 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