Solved

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

Posted on 2010-09-07
7
800 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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 30

Expert Comment

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

Author Comment

by:Vass1
Comment Utility
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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

771 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

11 Experts available now in Live!

Get 1:1 Help Now