Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-07
7
Medium Priority
?
821 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

721 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