Right Truncation, varchar in SQL Server, double-byte in Oracle

Hi.
We have a DB Link using DG4MSQL from Oracle 11.1.0.7.0 to a SQL Server 2005 database. The Oracle database is set up to use UTF-8 so all character fields are double-byte on the oracle side.
On the SQL Server table we have a column defined as varchar(32). When doing a select * from this table (from Oracle, over the DB link), everything works fine if that column contains values with a length of 16 characters or less. When the column contains 17 - 32 characters we get the following error:
Error report:
SQL Error: ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Driver]String data, right truncation {01004}
ORA-02063: preceding 2 lines from SQLUAT
28500. 00000 - "connection from ORACLE to a non-Oracle system returned this message:"
*Cause:    The cause is explained in the forwarded message.
*Action:   See the non-Oracle system's documentation of the forwarded
message.
It looks like Oracle (or the ODBC driver) is bringing the data back as double-byte even though it is declared as varchar. If we change the column on the SQL server side to nvarchar, everything works fine.
Is this a bug? Or is there a setting that can be specified for the gateway so that it recognizes SQL Server varchar columns as single-byte, to prevent them from coming over as double-byte and messing up the ODBC driver? Or is there anything else we should do to prevent this problem?
Thanks

Hi,
I don't think it's a problem with the hs or the dblink (but I may be wrong):
UTF-8 is double-bytes as you said. when you declare varchar2(32) it actually means you can insert up to 32 bytes --> 16 characters.
even if you do a simple insert to the table with more than 16 characters - it will fail.
In order to overcome this you should declare the table with varchar2(32 char) which will tell Oracle to allocate enough bytes to hold 32 chars - not bytes. In UTF-8 this means 64 bytes (2*n). If you'd be using AL32UTF-8 this would mean 4*n.
BTW- why are you using UTF-8 and not AL32UTF8?
Hope this helps.

Similar Messages

  • Conn problem SQl Server 64 Bit to Oracle 32 bit using SSIS packages

    Hi,
    I am facing the problem with connection SQL(64 bit) to Oracle(32 bit).
    Please give me the solution/guide in right direction.
    Environment is
    S1-----> DBServer : 64 bit Windows Server 2003 Enterprise Edition, 64 Bit SQl Server EE, 64 Bit Oracle 10g Client
    S2----->.AppServer :32 bit Windows Server 2003 Enterprise Edition, IIS, 32 Bit Oracle 10g Client & Server DB
    I have doubt like....
    1.Can i install 32 bit oracle also at (S1) 64 bit SQL Server(SSIS)
    or only 64 bit oracle?
    2.Running command line for SSIS packages at S1
    i am unable to connect S1---->S2 using SSIS packages?
    How can i solve this problem? pl give steps for going right direction.
    Thanks
    JOHN
    [email protected]

    Fabio D'Alfonso wrote:
    Hi,
    I was setting up VMware vCenter 4.1 (probably the only well known and largely used product with this lethal mix) and needed to setup an ODBC access to Oracle on the 32 bit side of Windows to setup the Update Manager server component, which is still a 32 bit application)
    The problem with Oracle configuration is that in no way I found a 32 bit ODBC registered driver after the setup (of the 32 bit client and the 64 database server). I tried some third party driver for oracle (e.g. easysoft).They registered in the 32 bit ODBC manager but they never got a successful connection.
    Also if this vCenter requirement is questionable (more questionable considering that the setup of this 32 component is not allowed on a 32 separate OS, not because it is separate but because is a 32 bit OS) I would get it working.
    Could suggest a way to get this working?
    Thanks
    Fabio D'AlfonsoWhen you install the Oracle client software on Windows (which is necessary to support ODBC, as the Oracle ODBC driver sits on top of the native client software) the ODBC driver is NOT installed by default. You have to go back and do a "custom" install and select the "Windows components".

  • Migrating from MS SQL Server 2005 database to Oracle 10g

    Hello,
    I wanted the full procedure or steps to Migrate the MS SQL Server 2005 database to Oracle 10g. Is there a known procedure to do this or is there a tool which is used?
    I have not done migration of database from MS SQL Server to Oracle. Any help is appreciated. Thanks a lot for the time.
    Regards,
    RPS

    Wrong forum, go to the database forum!
    cu
    Andreas

  • Sql Server Reporting  services with ORACLE

    We are thinking of using Sql Server Reporting servicesvwith an ORACLE DB.
    I will like to know the pros and cons.
    Any advice would be appreciated..
    Thanks alot.

    Hello,
    You'll find many doc, examples, demos ... on OTN :
    http://www.oracle.com/technology/products/reports/index.html
    http://www.oracle.com/technology/documentation/reports.html
    http://www.oracle.com/technology/products/reports/htdocs/search.html?cat=ALP&col=ALC&submit=Search
    For the Ref Cursors :
    Oracle® Reports Building Reports
    10g Release 2 (10.1.2)
    B13895-01
    40 Building a Paper Report with REF CURSORs
    Regards

  • Extract the data from SQL Server and Import into Oracle

    Hi,
    I would like to run a daily job that will export the table data from SQL server table (it will be only one or two table) and Import back into Oracle table (it might one or two table tables).
    Could you please guide me that how can i do this using either sql server or oracle?
    We have oracle 9.2 and sql server 2005.
    Normally i do from flat file which is generated by source destination nand i dump into oracle using sql*loader but this time I have to directly extract/export the data from MS Sql server and load into Oracle table, mostly it will reload so i might doing any massaging data during the load.
    If you show me the detail approach, it will be really appreciated.
    I have access to Sql server but i don't how to use sql server to do this or using oracle as a daily job even becuase have to schedule the job for this as it will be a daily job.
    Thanks,
    poratips

    Unless you can find an open source ODBC driver for SQL Server that runs on Solaris (and I wouldn't be overly hopeful there) Heterogeneous Services would require that you license something-- a third party ODBC driver, a new Oracle instance, or an Oracle Transparent Gateway.
    As I stated below, you could certainly use SQL Server's ETL tool, DTS. Oracle's ETL tools would require additional licensing since you're just on 9.2. You could also write a small application (Java or otherwise) that connected to both databases and transferred the data. If you're particularly enterprising, you could load the SQL Server Type 4 JDBC driver into Oracle's JVM and write a Java stored procedure that connected to the SQL Server database via JDBC, but that's a pretty convoluted approach.
    Justin

  • Migration from sql server 2005 tables to oracle tables.

    Hi,
    Kindly give the steps to migrate from sql server 2005 tables to oracle tables.
    Kindly advise
    Oracle database version:
    Oracle Database 10g Release 10.2.0.1.0 - Production
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE 10.2.0.1.0 Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Edited by: 873127 on Jul 18, 2011 9:46 PM

    Are you migrating or taking continual updates?
    If migrating it might be worth considering The SQLDeveloper Migration Workbench (which moves more than just data)..
    http://www.oracle.com/technetwork/database/migration/sqldevmigrationworkbench-132899.pdf
    Cheers
    David

  • Replication SQL Server 7 Database to Oracle 9i

    Hi -
    I'm new to Database Replication, what are the steps for database replication from a MS SQL Server 7 database to Oracle 9i? Eventually this SQL Server Database will be going to SQL Server 2000 are the steps different, if so what are they?
    Thanks
    Much

    I do not what you mean with Replicate between SQL Server and Oracle. Perhaps you mean migrate from SQL Server to Oracle or to stablish a transparent gateway.
    I am going to give you this reference:
    Migration Workbench Reference Guide for Microsoft SQL Server and Sybase Adaptive Server Migrations Contents / Search / Index / PDF
    Heterogeneous Connectivity Administrator's Guide Contents / Search / Index / PDF
    http://otn.oracle.com/pls/db92/db92.docindex?remark=homepage
    Joel P�rez

  • Migrating MS SQL Server 7.0 TO Oracle 8.1.5

    Hello,
    We are currently using Win NT 4.0, MS SQL Server with a PVCS Tracker 6.0 from Merant and will be upgrading to PVCS Dimension 6.0 from Merant.
    The Dimension 6.0 product runs on Win NT 4.0, uses Oracle Server 8.1.5 with Oracle 8 ODBC Driver 2.5.3.1.0
    I need to migrate MS SQL Server 7.0 To Oracle 8.1.5. Do you have a migration procedure available?
    Thanks!
    TP

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Oracle Migration Workbench Team:
    The Oracle Migration Workbench will assist you in the Migration of the SQL*Server 7 DB. It is available as a free download from this site.
    <HR></BLOCKQUOTE>
    null

  • Migrating SQL Server 7.0 to Oracle 8i in Different Operating Systems

    I am migrating SQL Server 7.0 Databases on NT to Oracle 8i on Sun 2.6. Is there is any other way other then Migration Workbench.
    If Mig Workbench is OK. What are the steps to do Migration.
    null

    Hi,
    You can perform this action with the Oracle Migration Workbench. Just install the Workbench on the same machine as your SQL Server database.
    You can then configure the workbench to point to the oracle database on your Sun machine.
    You can use the Oracle database on your Sun machine for both your destination database (the database to which you migrate your SQL Server schema and data) and workbench repository.
    In order to do this you will need to configure a tnsnames.ora entry. The tool that will do this configuration for you should be started up at the end of the workbench installation. It is a fairly straightfoward process.
    You then need to create a user in your oracle database that will store the workbench repository.
    Once you have comleted these steps you will be able to migrate SQL Server on NT to Oracle on Sun.
    It is exactly the same process as migrating to Oracle on NT except you are pointing the Workbench to Oracle on a Sun box.
    Regards
    John

  • Migration from MS SQL Server 7.0 to ORACLE 7.3

    I am unable to download WorkBench. Does it support the migration from MS SQL Server 7.0 to ORACLE 7.3 anyway.

    Actually, I have to do the conversion from MS SQL Server 7.0 to ORACLE 7.3. I am thinking to do migration firt then do the conversion by writing the packages. Is there any other way to do it......
    I am unable to download WorkBench. Does it support the migration from MS SQL Server 7.0 to ORACLE 7.3 anyway.

  • Migration from sql-server 7.0 to oracle 8i

    Hai,
    I have one huge database in sql-server 7.0.
    That database has chienese,arabic and korean data. And i have created one database in oracle 8.1.6 with character set UTF8.
    By using migration work bench i couldn't transfer sql-server data into oracle 8.1.6 database which has character set utf8.
    But i have managed to transfer sql-server 7.0 to oracle 8.1.6 database which has us7ascii character set.
    Please give me the steps to transfer from sql-server 7.0 to oracle 8.1.6 database which has the character set utf8.
    I need it very very urgetnt.
    Best Regards,
    Sudhir.

    I understand that it would not be in the best interests of Oracle, monetarily that is (at least in the visible/tangible sense), to develop such a migration tool, but since the competition hasn't, why shouldn't you? I'm sure Prabha's not the first to inquire of such a thing, and I'm sure I'd have asked a similar question if I wasn't responding to you in this way. We all know Oracle is the better db - That's why we're here talking about it - but not everyone we do business with understands that, so establishing a two way street is the best way, short of requiring it of our clients, to turn them on to Oracle. I don't really think developing such a thing would hurt your business (unless MS can keep you from doing it). If your product is that much better (which we agree is true), you shouldn't be afraid of the competition. As for being afraid of proprietary constraints, I can't blame you, because I don't know how much it constrains you.
    -Val
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by The Oracle Migration Workbench Team:
    Hi Prabha,
    My first reaction to your question would be "why would anyone want to migrate FROM Oracle and TO SQLServer ?". Oracle is easily the better database !
    ...but no, I don't really think it would be in Oracle's best interests to produce a migration tool that moved users to a propritory Microsoft product/platform..<HR></BLOCKQUOTE>
    null

  • Conversion from SQL Server 7.0 to Oracle 8 -- Urgent!!

    Hi!
    I've an urgent task of migrating data from SQL Server 7.0 to
    Oracle 8 for Oracle Financials Application. When is the
    Migration Workbench for SQL Server 7.0 is going to be released,
    please let me know?
    And the other question is -- Is there a possiblity that only few
    tables from the legacy system can be migrated into Oracle 8? and
    if yes, how -- details please?
    Thanks,
    Neeta.
    null

    Neeta Singh (guest) wrote:
    : Hi!
    : I've an urgent task of migrating data from SQL Server 7.0 to
    : Oracle 8 for Oracle Financials Application. When is the
    : Migration Workbench for SQL Server 7.0 is going to be released,
    : please let me know?
    : And the other question is -- Is there a possiblity that only
    few
    : tables from the legacy system can be migrated into Oracle 8?
    and
    : if yes, how -- details please?
    : Thanks,
    : Neeta.
    We plan on having a beta version of this capability in early
    August. Contact [email protected] if you want to register as
    a Beta tester.
    Yes, you can update the Oracle model in OMW to remove those
    tables you are not interested in, you can also select to just
    migrate tables & data and nothing else.
    Donal
    null

  • Migration from SQL Server 7.0 to Oracle 9i

    Hi,
    Where can i find whitepapers for migrating from SQL Server
    7.0 to Oracle 9i?
    Thanks in Advance

    hi,
    Download the Oracle Migration Workbench from this site. There is
    a reference guide and online help available with the SQL Server
    7.0 plugin.
    Also, there is a documentation link under the Oracle Migration
    Workbench section.
    Regards
    John

  • Migration from SQL Server 7.0 to Oracle 8.0.5

    Can we migrate from SQL Server 7.0 to Oracle 8.0.5 directly without being converted to Oracle 8i objects

    Hi,
    U can convert from sql server to Oracle 8 but u've to look after the stored procedures in mssql server. If the stored procedures contains any temporary table concepts and resultset then some manual changes are required.
    Thanx,
    Durai.
    null

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

Maybe you are looking for

  • Itunes (WinXP) Crashes OS when importing CD

    Hi all, My Sister is having a problem importing CDs into iTunes. She has tried importing the Mary J Blige The Essential collection and also the Killers Sams Town recently and its blue screened her laptop and then restarts. It manages to import around

  • Pdf Portfolio Application.........

    Hi Team, Could you please tell me hhow i can develop a Pdf Portfolio solution using Adoble Liberary. I am using .Net and C# to do the same so please tell the exact solution how i can do this. Thank You !!! Regards, Deepak Rai

  • Outlook 2007 Calendar Monitoring: track send event for recurring meetings

    Hi, I'm working on an Outlook 2007, VSTO 2010, .NET 3.5 add-in which monitors AppointmentItem objects changed on the user's calendar. Specifically I'm tracking the send event of the currently selected appointment in the calendar view. Currently my ad

  • Cant see synchronous http-calls in message monitoring

    Hi all, I 've got a synchronous http call. When the request was bad I saw the failed request and response messages in XI message monitoring with red lights. But now the call seems to work fine, because the sequenced step is showing. But I can not see

  • I cannot add updates to my Ipod TOUCH

    Hi can anyone help I keep trying to update my iPd Touch but it keeps coming up with error. I have tried turning off my firewall but still no luck. Many thanks Val