My Oracle Support Banner

Using DG4MSQL 11.2 an Insert of a Data Variable Gives Error ORA-28500 Invalid Descriptor Index (Doc ID 1362589.1)

Last updated on OCTOBER 07, 2019

Applies to:

Oracle Database Gateway for SQL Server - Version to [Release 11.2]
Information in this document applies to any platform.


An insert of a date variable that worked using 10.2 TG4MSQL now gives an error using Database Gateway for SQL*Server (DG4MSQL) 11.2.
The following code worked using TG4MSQL 10.2 but fails using DG4MSQL 11.2 -

SQL> set serveroutput on
SQL> declare
2 v_data_mod varchar2(20);
3 Begin
4 v_data_mod := to_char(sysdate, 'DD/MM/YYYY');
5 dbms_output.put_line('v_data_mod ' || v_data_mod );
6 INSERT INTO "dbo"."test_datetime"@test_2008
7 ("col1", "datetime")
8 values
9 ('test_112', to_date(v_data_mod,'DD/MM/YYYY')) ;
10 end ;
11 /

Error -

v_data_mod 28/03/2011
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Oracle][ODBC SQL Server Native Wire Protocol driver]Invalid descriptor index.
ORA-02063: preceding 2 lines from TEST_2008
ORA-06512: at line 6

A DG4MSQL debug trace shows the following -

Entered hgopars, cursor id 1 at 2011/03/28-14:31:48
SQL text from hgopars, id=1, len=76 ...
00: 494E5345 52542020 494E544F 20226462 [INSERT INTO "db]
10: 6F222E22 74657374 5F646174 6574696D [o"."test_datetim]
20: 65222028 22636F6C 31222C22 64617465 [e" ("col1","date]
30: 74696D65 22292056 414C5545 53202827 [time") VALUES (']
40: 74657374 5F313132 272C3F29 [test_112',?)]
Exiting hgopars, rc=0 at 2011/03/28-14:31:48
Entered hgophld, cursor id 1 at 2011/03/28-14:31:48
nr: 2
Entered hgopcda at 2011/03/28-14:31:48
Column:1(): dtype:93 (TIMESTAMP), prc/scl:23/3, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2011/03/28-14:31:48
Entered hgopoer at 2011/03/28-14:31:48
hgopoer, line 231: got native error 0 and sqlstate 07009; message follows...
[Oracle][ODBC SQL Server Native Wire Protocol driver]Invalid descriptor index. {07009}
Exiting hgopoer, rc=0 at 2011/03/28-14:31:48
hgophld, line 170: calling SQLDescribeParam got sqlstate 7009
Exiting hgophld, rc=28500 at 2011/03/28-14:31:48 with error ptr FILE:hgophld.c LINE:170 ID:Describe place holder in SQL
Entered hgocomm at 2011/03/28-14:31:59

The SQL*Server table is created as -

CREATE TABLE [dbo].[test_datetime](
 [col1] [char](10) NULL,
 [datetime] [datetime] NULL,
 [timestamp] [timestamp] NULL




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.