Skip to Main Content

Oracle Database Express Edition (XE)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Heterogeneous Services from Oracle XE 21 to Postgresql 17 ORA-2063 without error message.

Maynard with XenemmFeb 5 2025 — edited Feb 5 2025

I don't get any trace files or error messages that I can use to troubleshoot this. Just trying to select from a table (dual) I created on the local postgresql database.

SQL> select * from "dual"@localdb;
select * from "dual"@localdb
                     *
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from LOCALDB


SQL>

Output when using isql to select from the table:

[oracle@Webserver-APEX admin]$ isql -v LOCALDB
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| echo [string]                         |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select * from dual;
+--+
| x|
+--+
| 1|
+--+
SQLRowCount returns 1
1 rows fetched

These are all fresh installs.

  • Oracle Linux Server release 8.10
  • Postgres 17.2
  • Oracle Database 21c Express Edition Release Version 21.3.0.0.0
  • unixODBC-2.3.12
  • postgresql-odbc 10.03.0000-3

Contents of /usr/local/etc/odbc.ini:

[LOCALDB]
Description=Local DB
Driver=/usr/lib64/psqlodbc.so
ServerName=localhost
Username=apexreps
Password=******
Port=5432
Database=postgres

Contents of $ORACLE_HOME/hs/admin/initLOCALDB.ora

HS_FDS_CONNECT_INFO = LOCALDB 
HS_FDS_TRACE_LEVEL = DEBUG 
HS_FDS_TRACE_FILE_NAME = /tmp/hsodbc_pg_debug.trc 
HS_FDS_SHAREABLE_NAME = /usr/local/lib/libodbc.so
HS_LANGUAGE=AMERICAN_AMERICA.WE8ISO8859P1 
set ODBCINI=/usr/local/etc/odbc.ini

Contents of $TNS_ADMIN/listener.ora

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = webserver-apex.internal.cloudapp.net)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

DEFAULT_SERVICE_LISTENER = XE
USE_SID_AS_SERVICE_LISTENER = on
SID_LIST_LISTENER=
  (SID_LIST=
      (SID_DESC=
         (SID_NAME=LOCALDB)
         (ORACLE_HOME=/opt/oracle/product/21c/dbhomeXE)
         (PROGRAM=dg4odbc)
      )
  )

Contents of $TNS_ADMIN/tnsnames.ora

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = webserver-apex.internal.cloudapp.net)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

LISTENER_XE =
  (ADDRESS = (PROTOCOL = TCP)(HOST = webserver-apex.internal.cloudapp.net)(PORT = 1521))

xepdb1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = webserver-apex.internal.cloudapp.net)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = xepdb1)))


LOCALDB  =
  (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
    (CONNECT_DATA=(SID=LOCALDB))
    (HS=OK)
  )

Output of tnsping:

[oracle@Webserver-APEX admin]$ tnsping localdb

TNS Ping Utility for Linux: Version 21.0.0.0.0 - Production on 05-FEB-2025 17:48:51

Copyright (c) 1997, 2021, Oracle.  All rights reserved.

Used parameter files:
/opt/oracle/homes/OraDBHome21cXE/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)) (CONNECT_DATA=(SID=LOCALDB)) (HS=OK))
OK (0 msec)

I've bounced the listener every time I've made changes to any of the configuration files.

Command to create the database link:

SQL>  create public database link "LOCALDB" connect to "apexreps" identified by "********" using 'LOCALDB';

Database link created.
This post has been answered by Maynard with Xenemm on Feb 24 2025
Jump to Answer

Comments

Post Details

Added on Feb 5 2025
1 comment
130 views