[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2010-09-07
7
Medium Priority
?
841 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
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.
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.
Suggested Courses

612 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