Replicating from SQL Server to Sybase using SQL Server replication

Hi all,
I have setup a replication from SQL Server to Sybase ASE
using SQL Server transactional replication. This work via
the Sybase OLEDB driver and linked server. Connection is
working, prublication is defined on SQL Server side, the
subscription against the Sybase server and database is
working. But I got one huge problem: All character datatypes
end up as NULL in Sybase. When I enter a row in the SQL
Server table which is publicated all data that is not
character (float, numeric, datetime etc.) is replicated and
the row is available on Sybase side, but all character
columns are null. Is this something anyone here has already
heard about? The weired thing: I got this running fine in
one virtual Windows machine where ASE is running in 32 bit
under Windows. But this null problem comes up if I ran the
SQL Server in 64 Bit and the Sybase box is running in 64 Bit
Linux. Any idea what to look for?
0
WW
9/6/2010 2:57:18 PM
sybase.ase.general 8655 articles. 0 followers. Follow

5 Replies
1523 Views

Similar Articles

[PageSpeed] 20

Hi

I was thinking about code page but I cannot see how you can
end with null values. I think code page is different on your
2 servers (cp1252 on Win and cp850 for linux). But I would
have though having strange strings maybe but not nulls...

I found this in SQL Server dist agent doc for heterogeneous
rep :

Replication moves data in Unicode format regardless of the
collation/code pages used on the Publisher and Subscriber.
It is recommended that you choose a compatible
collation/code page when replicating between Publishers and
Subscribers.

cf.
http://msdn.microsoft.com/en-us/library/ms151864(v=SQL.90).aspx

You should check on MS support forums too.

Emmanuel

> Hi all,
> I have setup a replication from SQL Server to Sybase ASE
> using SQL Server transactional replication. This work via
> the Sybase OLEDB driver and linked server. Connection is
> working, prublication is defined on SQL Server side, the
> subscription against the Sybase server and database is
> working. But I got one huge problem: All character
> datatypes end up as NULL in Sybase. When I enter a row in
> the SQL Server table which is publicated all data that is
> not character (float, numeric, datetime etc.) is
> replicated and the row is available on Sybase side, but
> all character columns are null. Is this something anyone
> here has already heard about? The weired thing: I got this
> running fine in one virtual Windows machine where ASE is
> running in 32 bit under Windows. But this null problem
> comes up if I ran the SQL Server in 64 Bit and the Sybase
> box is running in 64 Bit Linux. Any idea what to look for?
0
ET
9/7/2010 6:31:26 AM
Thanks Emmanuel,
this codepage and unicode stuff etc. also came into my mind,
but I have it running and working on my virtual machine
unter Windows Server with the ASE for Windows. I use the
same codepage on Sybase there as the customer environment
has, and also my SQL Server 2008 is the same version number
as the one on customer side. So same codepage stuff, same
versions (OLEDB provider from Sybase is in both cases 15.5).
So it will be a case on 64 bit (my personal system is 32 bit
only) or it is a problem that the Sybase ASE target is
running on Linux.

regards
Wolfgang

> Hi
>
> I was thinking about code page but I cannot see how you
> can end with null values. I think code page is different
> on your 2 servers (cp1252 on Win and cp850 for linux). But
> I would have though having strange strings maybe but not
> nulls...
>
> I found this in SQL Server dist agent doc for
> heterogeneous rep :
>
> Replication moves data in Unicode format regardless of the
> collation/code pages used on the Publisher and Subscriber.
> It is recommended that you choose a compatible
> collation/code page when replicating between Publishers
> and Subscribers.
>
> cf.
>
http://msdn.microsoft.com/en-us/library/ms151864(v=SQL.90).aspx
>
> You should check on MS support forums too.
>
> Emmanuel
>
> > Hi all,
> > I have setup a replication from SQL Server to Sybase ASE
> > using SQL Server transactional replication. This work
> > via the Sybase OLEDB driver and linked server.
> > Connection is working, prublication is defined on SQL
> > Server side, the subscription against the Sybase server
> > and database is working. But I got one huge problem: All
> > character datatypes end up as NULL in Sybase. When I
> > enter a row in the SQL Server table which is publicated
> > all data that is not character (float, numeric, datetime
> > etc.) is replicated and the row is available on Sybase
> > side, but all character columns are null. Is this
> > something anyone here has already heard about? The
> > weired thing: I got this running fine in one virtual
> > Windows machine where ASE is running in 32 bit under
> > Windows. But this null problem comes up if I ran the SQL
> > Server in 64 Bit and the Sybase box is running in 64 Bit
> Linux. Any idea what to look for?
0
WW
9/7/2010 7:48:57 AM
Hi Wolfgang,

I am not sure I am getting it : is your linux sybase ase
64-bit running with the same codepage than your win64
machine ???

I would try using ribo utility to see how TSQL orders sent
by the mssql distribution agent arrive in ASE. Then you can
see if the nulls are already there before ASE.

You can also check what the command looks like in the sql
server distribution database (get the xact_seqno from
distribution..Msrepl_commands and run sp_browsereplcmds)...
but this is more mssql support ;-)

Emmanuel



> Thanks Emmanuel,
> this codepage and unicode stuff etc. also came into my
> mind, but I have it running and working on my virtual
> machine unter Windows Server with the ASE for Windows. I
> use the same codepage on Sybase there as the customer
> environment has, and also my SQL Server 2008 is the same
> version number as the one on customer side. So same
> codepage stuff, same versions (OLEDB provider from Sybase
> is in both cases 15.5). So it will be a case on 64 bit (my
> personal system is 32 bit only) or it is a problem that
> the Sybase ASE target is running on Linux.
>
> regards
> Wolfgang
>
> > Hi
> >
> > I was thinking about code page but I cannot see how you
> > can end with null values. I think code page is different
> > on your 2 servers (cp1252 on Win and cp850 for linux).
> > But I would have though having strange strings maybe but
> > not nulls...
> >
> > I found this in SQL Server dist agent doc for
> > heterogeneous rep :
> >
> > Replication moves data in Unicode format regardless of
> > the collation/code pages used on the Publisher and
> > Subscriber. It is recommended that you choose a
> > compatible collation/code page when replicating between
> > Publishers and Subscribers.
> >
> > cf.
> >
>
http://msdn.microsoft.com/en-us/library/ms151864(v=SQL.90).aspx
> >
> > You should check on MS support forums too.
> >
> > Emmanuel
> >
> > > Hi all,
> > > I have setup a replication from SQL Server to Sybase
> > > ASE using SQL Server transactional replication. This
> > > work via the Sybase OLEDB driver and linked server.
> > > Connection is working, prublication is defined on SQL
> > > Server side, the subscription against the Sybase
> > > server and database is working. But I got one huge
> > > problem: All character datatypes end up as NULL in
> > > Sybase. When I enter a row in the SQL Server table
> > > which is publicated all data that is not character
> > > (float, numeric, datetime etc.) is replicated and the
> > > row is available on Sybase side, but all character
> > > columns are null. Is this something anyone here has
> > > already heard about? The weired thing: I got this
> > > running fine in one virtual Windows machine where ASE
> > > is running in 32 bit under Windows. But this null
> > > problem comes up if I ran the SQL Server in 64 Bit and
> > the Sybase box is running in 64 Bit Linux. Any idea what
> to look for?
0
ET
9/7/2010 10:42:38 AM
Doesn't SQL Server use N'<string>' syntax for unicode strings?  ASE does not 
support it.

"ET" wrote in message news:4c86171e.57f6.1681692777@sybase.com...
> Hi Wolfgang,
>
> I am not sure I am getting it : is your linux sybase ase
> 64-bit running with the same codepage than your win64
> machine ???
>
> I would try using ribo utility to see how TSQL orders sent
> by the mssql distribution agent arrive in ASE. Then you can
> see if the nulls are already there before ASE.
>
> You can also check what the command looks like in the sql
> server distribution database (get the xact_seqno from
> distribution..Msrepl_commands and run sp_browsereplcmds)...
> but this is more mssql support ;-)
>
> Emmanuel
>
>
>
>> Thanks Emmanuel,
>> this codepage and unicode stuff etc. also came into my
>> mind, but I have it running and working on my virtual
>> machine unter Windows Server with the ASE for Windows. I
>> use the same codepage on Sybase there as the customer
>> environment has, and also my SQL Server 2008 is the same
>> version number as the one on customer side. So same
>> codepage stuff, same versions (OLEDB provider from Sybase
>> is in both cases 15.5). So it will be a case on 64 bit (my
>> personal system is 32 bit only) or it is a problem that
>> the Sybase ASE target is running on Linux.
>>
>> regards
>> Wolfgang
>>
>> > Hi
>> >
>> > I was thinking about code page but I cannot see how you
>> > can end with null values. I think code page is different
>> > on your 2 servers (cp1252 on Win and cp850 for linux).
>> > But I would have though having strange strings maybe but
>> > not nulls...
>> >
>> > I found this in SQL Server dist agent doc for
>> > heterogeneous rep :
>> >
>> > Replication moves data in Unicode format regardless of
>> > the collation/code pages used on the Publisher and
>> > Subscriber. It is recommended that you choose a
>> > compatible collation/code page when replicating between
>> > Publishers and Subscribers.
>> >
>> > cf.
>> >
>>
> http://msdn.microsoft.com/en-us/library/ms151864(v=SQL.90).aspx
>> >
>> > You should check on MS support forums too.
>> >
>> > Emmanuel
>> >
>> > > Hi all,
>> > > I have setup a replication from SQL Server to Sybase
>> > > ASE using SQL Server transactional replication. This
>> > > work via the Sybase OLEDB driver and linked server.
>> > > Connection is working, prublication is defined on SQL
>> > > Server side, the subscription against the Sybase
>> > > server and database is working. But I got one huge
>> > > problem: All character datatypes end up as NULL in
>> > > Sybase. When I enter a row in the SQL Server table
>> > > which is publicated all data that is not character
>> > > (float, numeric, datetime etc.) is replicated and the
>> > > row is available on Sybase side, but all character
>> > > columns are null. Is this something anyone here has
>> > > already heard about? The weired thing: I got this
>> > > running fine in one virtual Windows machine where ASE
>> > > is running in 32 bit under Windows. But this null
>> > > problem comes up if I ran the SQL Server in 64 Bit and
>> > the Sybase box is running in 64 Bit Linux. Any idea what
>> to look for? 

0
Chris
9/8/2010 3:01:43 PM
Hi Wolfgang,

Is it possible you can capture TDS trace using the RIBO utility between the 
OLE DB Provider and the ASE?
I'm curious to see how the Providwer is packaging the data - if its literal 
or if parameterized.

We had some weird issue in CR 548634, but this is fixed since SDK 15.0 
ESD#17 version of the Provider - you have version 15.5 so this fix is in 
there (and I don't think it's the same issue).

If this is reproducible easily you can open a tech support case with Sybase 
and the connectivity team can investigate this and determine if it's a 
support issue with ASE (as Chris has suggested) or something else - like 
char data parameters are sent as null instead of the value.

Thank you

-Paul

<WW> wrote in message news:4c85ee69.5557.1681692777@sybase.com...
> Thanks Emmanuel,
> this codepage and unicode stuff etc. also came into my mind,
> but I have it running and working on my virtual machine
> unter Windows Server with the ASE for Windows. I use the
> same codepage on Sybase there as the customer environment
> has, and also my SQL Server 2008 is the same version number
> as the one on customer side. So same codepage stuff, same
> versions (OLEDB provider from Sybase is in both cases 15.5).
> So it will be a case on 64 bit (my personal system is 32 bit
> only) or it is a problem that the Sybase ASE target is
> running on Linux.
>
> regards
> Wolfgang
>
>> Hi
>>
>> I was thinking about code page but I cannot see how you
>> can end with null values. I think code page is different
>> on your 2 servers (cp1252 on Win and cp850 for linux). But
>> I would have though having strange strings maybe but not
>> nulls...
>>
>> I found this in SQL Server dist agent doc for
>> heterogeneous rep :
>>
>> Replication moves data in Unicode format regardless of the
>> collation/code pages used on the Publisher and Subscriber.
>> It is recommended that you choose a compatible
>> collation/code page when replicating between Publishers
>> and Subscribers.
>>
>> cf.
>>
> http://msdn.microsoft.com/en-us/library/ms151864(v=SQL.90).aspx
>>
>> You should check on MS support forums too.
>>
>> Emmanuel
>>
>> > Hi all,
>> > I have setup a replication from SQL Server to Sybase ASE
>> > using SQL Server transactional replication. This work
>> > via the Sybase OLEDB driver and linked server.
>> > Connection is working, prublication is defined on SQL
>> > Server side, the subscription against the Sybase server
>> > and database is working. But I got one huge problem: All
>> > character datatypes end up as NULL in Sybase. When I
>> > enter a row in the SQL Server table which is publicated
>> > all data that is not character (float, numeric, datetime
>> > etc.) is replicated and the row is available on Sybase
>> > side, but all character columns are null. Is this
>> > something anyone here has already heard about? The
>> > weired thing: I got this running fine in one virtual
>> > Windows machine where ASE is running in 32 bit under
>> > Windows. But this null problem comes up if I ran the SQL
>> > Server in 64 Bit and the Sybase box is running in 64 Bit
>> Linux. Any idea what to look for? 


0
Paul
9/9/2010 7:09:46 PM
Reply:

Similar Artilces:

Replicate SQL Anywhere Text column to ASE using Replication Server
Hi everyone, Is it possible replicate text column in SQL anywhere 5.5.04 using Replication Agent for SQL Anywhere and Replication Server 11.5 to Adaptive Server Enterprise? TIA Virginia yes. Replication of BLOBs works fine /steve -- Stephen Rice Manager Custom Support Sybase Canada Inc. email: srice@sybase.com virginia cheung wrote in message <01bdf3e7$6ed5c420$010414ac@star>... >Hi everyone, > >Is it possible replicate text column in SQL anywhere 5.5.04 using >Replication Agent for SQL Anywhere and Replication Server 11.5 to Adaptive >Server ...

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in http://forums.asp.net/t/1324047.aspx Did anybody try this (installing 2008 express: http://www.microsoft.com/express/sql/download/)? I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

Replication
We are going to be installing AS Enterprise in home office and AS Anywhere in the field. We would like to use an autoincrement key on some tables. Is there a good way to avoid duplicate keys. Also, are there any pitfalls to using the two different servers for replication. TIA Fred. You cannot take advantage of the special IDENTITY data type when creating a replication definition with an ASA db as the subscriber. If you try this, replication of inserts from ASE to ASA will fail, because the rep server will try to issue a "set identity_insert tablename on" comman...

Creating a SQL Server linked server to Interbase using 64 bit SQL Server
Hi, I am trying to use the data direct odbc driver for interbase to create a linked server in SQL Server 2008 R2 64bit however, SQL Server reports an "Arcitechure Mismatch" between the System DSN and SQL Server. This did work under 32 bit SQL Server. Is there a 64bit specific odbc driver for interbase? I have tried using the IBProvider trial as well but this fails to work in SQL Server as well. Our Interbase client(s) and server are all 64 bit installations. Thank you Julian Dawson wrote: > Is there a 64bit specific odbc driver for interbase? I think Easy...

Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above.
Can anybody point me in the direction of how to resolve this error, Unable to use SQL Server because ASP.NET version 2.0 Session State is not installed on the SQL server. Please install ASP.NET Session State SQL Server version 2.0 or above. I am running Visusl Studio 2005, SQL Server 2005 Standard, running on WIndows XP Pro. I am trying to use SQL for session state management. I originally ran the following code from the command line prompt, aspnet_regsql.exe -E -ssadd -sstype p This created an ASPState database. I then manually added my default ASP.NET login as a user. In my web.confi...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.comhttp://www.mojoportal.com...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

using sql server session, does it ALWAYS go to sql server?
Testing a simple web app that's configured to save session in SQL SERVER. I have an array of 250000 ints. Session gets saved in 1 page, and retrieved correctly in another, but I only see 1 transaction in profiler. Also have a large complex object size 250KB, and it get's restored instantly, implying it's not coming from the database. From SQL Profiler, I see one transaction to aspstate db when I leave a page that saves session. Shouldn't I see a gaggle of msgs spew by when I save a large object to session??? All comments appreciated! The short answer is yes. The sessi...

ASP.Net application developed using SQL Server 2000 can't use SQL Server 2005
Hi,If an application written in ASP.Net that uses SQL Server 2000 can have certain features that will not work on SQL Server 2005?There is an application written in ASP.Net with SQL Server 2000 which I need to convert to SQL Server 2005 but the original developer says it uses certain SQL Server 2000 specific features and won't work directly on SQL Server 2005 without modifying code. Are there any such features? Thanks  According to the official "Discontinued Database Engine Functionality In SQL Server 2005"-document on MSDN, the only Transact-SQL statement that has ...

GENERAL SQL SERVER: Question about the Script that setups the SQL Server Database.
This is the first time I have created a script for Sql Server 2000, and I have run into a few syntax ereas that I am not familar with. Bellow is a section of the script from the Portal server packages. At the end of the sample, is "ON [PRIMARY], Can anyone explain to me what this does and why the primary key isnt setup inside the code itself? I am basically trying to take parts of the script and incorrporate it into my own script and hate added syntax that I dont understand, makes debugging a real pain in the future. CREATE TABLE [dbo].[Portal_Announcements] ( [ItemID] [in...

sql server and sql server express
ok i am puzzled right now....i have a web application connecting to a sql server database....i uninstalled sql server express and installed sql server 2005 full version...i changed the connection string in my application to be Data Source=SKYBANDR62;Initial Catalog=aspnetdb;Integrated Security=True and through the explorer bar i can access my database freely but when i run my application i get this error Server Error in '/' Application. -------------------------------------------------------------------------------- An error has occurred while establishing a...

SQL Server instance Error
Hi Guys, I created a default website in VS2008 & dragged in a webpartmanager into the div section (i was going to have a play with creating web parts). I tried to preview the default page to seeif it runs but i get the following error: Server Error in '/WebSite1' Application. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - E...

connecting to SQL Server 7 using ole db provider for Sql Server
I had problems trying to do this with a grid so I am now trying to add a new connection in the Server Explorer. I added all the neccessary info and when I hit "Test Connection" it is successful but when I ckick on "OK" I get an error "Object reference not set to an instance of an object". Anybody know what is wrong? Thanks....

Exporting data from sql server to excel from sql server using asp.net
Hi, I am new to ASP.net. I have worked on a VB.net code to export data from sql server to excel. The code is simple and works well. Now I am placing this code in a button click event in a asp.net web project. The code has bugs now and I am not sure how to solve those. Any help is appreciated. Thanks. CODE: Protected Sub btnDumpMaterial_Click(ByVal sender As Object, ByVal e As System.EventArgs) 'ErrorMsg.Show("Not Implemented Yet1") 'lblName.Text = txtLast.Text & ", " & txtFirst.Text Dim DBConnection As String = "Provider=SQLOLEDB.1;uid=sa;password=tes...

How to connect to Remote SQL Server database using SQL Server 2005 Express
Hi,I've an account with a hosting service provider online for SQL Server database. I've downloaded SQL Server 2005 Express from ASP.Net. How can I use it to connect to my SQL Server Database which is sitting on remote server? The hosting provider gave me following things to connect to the remote database.Server NameDatabase NameUser NamePasswordRegards,A.K.R    Anyone? I don't want to ask the obvious, but is there not a Read Me file included with the download of SQL Express which would explain how to connect? Sorry I can't be more helpful, but I've only ever briefly ...