Solved

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

Posted on 2010-09-07
7
803 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
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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
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.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
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…

777 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