Create a dblink oracle to postgres with dg4odbc
Hi,
I'm trying to create a dblink from a database Oracle (10.2.0.3) to PostgreSQL database (8.3.11) with DG4ODBC (11.2.0.1.0).
I've installed the postgres driver 64 bit :
file /usr/lib64/psqlodbc.so
/usr/lib64/psqlodbc.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), strippedI'm configuring the /oracle/.odbc.ini :
[record]
Driver=/usr/lib64/psqlodbc.so
Description = PostgreSQL ODBC
Servername = cdxlan035
Port = 5435
Username = rec_lct
Password = rec_lct
Database = REC_TESTI'm configuring the /oracle/product/DG4ODBC/hs/admin/initrecord.ora like this :
# HS init parameters
HS_FDS_CONNECT_INFO = record
HS_FDS_TRACE_LEVEL = 4
HS_FDS_TRACE_FILE_NAME = /oracle/product/DG4ODBC/hs/log/hsodbc.trc
HS_FDS_SHAREABLE_NAME = /usr/lib64/psqlodbc.so
# ODBC specific environment variables
set ODBCINI=/oracle/.odbc.iniI'm configuring the /oracle/product/DG4ODBC/network/admin/listener.ora
LISTENER_HS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = cdxlan036.douane)(PORT = 1525))
ADR_BASE_LISTENER_HS = /oracle/product/DG4ODBC
SID_LIST_LISTENER_HS =
(SID_LIST =
(SID_DESC =
(PROGRAM = dg4odbc)
(ORACLE_HOME = /oracle/product/DG4ODBC)
(SID_NAME = record)
(ENVS=LD_LIBRARY_PATH=/usr/lib64:/oracle/product/DG4ODBC/lib:/oracle/product/10.2.0/lib)
)I'm updating my /oracle/product/10.2.0/network/admin/tnsnames.ora :
RECORD2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = cdxlan036)(PORT = 1525))
(CONNECT_DATA =
(SID = record)
(HS=OK)
)In last i'm creating the dblink :
CREATE DATABASE LINK "RECORD" CONNECT TO "rec_lct" IDENTIFIED BY "rec_lct" USING 'RECORD2';When i'm trying to select my postgres database, that doesn't work. Here the /oracle/product/DG4ODBC/hs/log/record.log :
[oracle@cdxlan036 log]$ cat record_agt_30445.trc
Oracle Corporation --- MONDAY FEB 27 2012 17:11:31.204
Heterogeneous Agent Release
11.2.0.1.0
Oracle Corporation --- MONDAY FEB 27 2012 17:11:31.204
Version 11.2.0.1.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "4"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
setting HS_IDLE_TIMEOUT to default of 0
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
setting HS_FDS_DATE_MAPPING to default of "DATE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
Default value of 64 assumed for HS_FDS_SQLLEN_INTERPRETATION
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
setting HS_FDS_DELAYED_OPEN to default of "TRUE"
setting HS_FDS_WORKAROUNDS to default of "0"
Exiting hgosdip, rc=0
ORACLE_SID is "record"
Product-Info:
Port Rls/Upd:1/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:record
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=31
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=31
HOCXU_SEM_VER=102000
Entered hgolofn at 2012/02/27-17:11:31
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/psqlodbc.so"
Entered hgolofns at 2012/02/27-17:11:31
libname=/usr/lib64/psqlodbc.so, funcname=SQLAllocHandle
peflerr=6521, libname=/usr/lib64/psqlodbc.so, funcname=SQLAllocHandle
hoaerr:28500
Exiting hgolofns at 2012/02/27-17:11:31
Failed to load ODBC library symbol: /usr/lib64/psqlodbc.so(SQLAllocHandle)
Exiting hgolofn, rc=28500 at 2012/02/27-17:11:31
Exiting hgoinit, rc=28500 with error ptr FILE:hgoinit.c LINE:337 FUNCTION:hgoinit() ID:Loading ODBC aray of function ptrs
Entered hgoexit
HS Gateway: NULL connection context at exit
Exiting hgoexit, rc=0 with error ptr FILE:hgoexit.c LINE:108 FUNCTION:hgoexit() ID:Connection contextWhat's wrong with my configuration?
thanks for your help
regards,
Mathieu
HS_FDS_SHAREABLE_NAME needs to point to the ODBC driver manager. Commonly the ODBC driver manager is a separate library (common name is libodbc.so). It can be downloaded for example from unixodbc.org. Only a few rare ODBC drivers (some ODBC drivers from MySQL and also some IBM DB2 drivers have a built in ODBC driver manager into the ODBC driver itself, all other require a stand alone ODBC driver manager).
Background info:
In general the ODBC set up consists of 2 parts, an ODBC driver manager and an ODBC driver itself. The ODBC driver manager is providing generic ODBC functions and it is also responsible to load the driver specified in the odbc.ini file. The ODBC driver itself is then dedicated for a foreign database and provides specific foreign database functions.
Similar Messages
-
Hi, i'm trying to create database link from a database Oracle 11g to PostgreSQL with DG4ODBC, and unixODBC
my configured to /etc/odbc.ini
[PostgreSQL]
Description = Test to Postgres
Driver = psqlodbc
Trace = Yes
TraceFile = /tmp/sql.log
Database = danieldb
Servername =
UserName = SA
Password = password
Port = 5432
Protocol = 6.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ShowOidColumn = No
FakeOidIndex = No
my configured to /etc/odbcinst.ini
[ODBC]
CommLog=1
Debug=1
FileUsage=1
Pooling=No
Trace=1
[psqlodbc]
Description=PostgreSQL ODBC driver
Driver=/usr/lib64/psqlodbcw.so
CommLog=1
Debug=0
FileUsage=1
my configured to /u01/app/oracle/product/11.2.0/xe/hs/admin/initPostgreSQL.ora
HS_FDS_CONNECT_INFO = PostgreSQL
HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/lib64/libodbcpsql.so
set ODBCINI=/etc/odbc.ini
my configured to /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Listener =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-poc)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC=
(SID_NAME=PostgreSQL)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe)
(PROGRAM=dg4odbc)
(ENVS="LD_LIBRARY_PATH=/usr/lib64:/u01/app/oracle/product/11.2.0/xe/lib")
my configured to /u01/app/oracle/product/11.2.0/xe/network/admin/tnsname.ora
PostgreSQL=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle-poc)(PORT = 1521))
(CONNECT_DATA =
(SID = PostgreSQL)
(HS = OK)
i'm try to created public database link :
CREATE PUBLIC DATABASE LINK "orapos" CONNECT TO "SA" IDENTIFIED BY "password" USING 'PostgreSQL';
when i used tnsping
[root@oracle-poc admin]# tnsping PostgreSQL
TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 16-MAY-2013 20:34:19
Copyright (c) 1997, 2011, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/11.2.0/xe/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle-poc)(PORT = 1521)) (CONNECT_DATA = (SID = PostgreSQL)) (HS = OK))
OK (0 msec)
and last i try to use the database link :
SQL> select * from "tabel2"@orapos
2 ;
select * from "tabel2"@orapos
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from ORAPOS
Whats wrong with my configuration??
Thank you and best regards,
DanielMike,
yes i've downloaded the ODBC driver manager..
for HS_FDS_SHAREABLE_NAME i use /usr/lib/psqlodbc.so
and i get this error when i call the db link(orpos)
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
ORA-02063: preceding line from ORAPOS
for HS_FDS_SHAREABLE_NAME = /usr/lib64/psqlodbcw.so
and i get this error when i call the db link(orpos)
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
c
and when i used isql isql to call DNS(PostgreSQL) is success
whats wrong with my config?
about PostGres ODBC did you mean postgresql-odbc-08.04.0200-1.el6.x86_64 ??
Thank you and best regards,
Daniel -
Connect Oracle to Postgres with UTF8
Hello all.
I want to connect a Oracle 10gR2 in AL32UTF8 database to a Postgres 9.2 en_US.UTF-8 database.
Everything works if I have HS_LANGUAGE = AMERICAN_AMERICA.WE8ISO8859P1 or HS_LANGUAGE = american_america.we8mswin1252. Not everything... accentuated characters of my main language (Portuguese) don't get visible.
If I set it to AMERICAN_AMERICA.AL32UTF8, i get this message:
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
c
Here are my configuration files:
odbc.ini:
[MoodlePostgres]
Description = Moodle Postgres DB
Driver = /usr/pgsql-9.2/lib/psqlodbcw.so
Server = ifbBDPGMoodle
Database = webbanca3
LogonID =
Password =
Port = 5432
Socket =
Option =
Stmt =
QuotedId = YES
CHARSET = en_US.UTF-8
[ODBC Data Sources]
MoodlePostgres = PostgreSQL
odbcinst.ini:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/pgsql-9.2/lib/psqlodbcw.so
Setup = /usr/lib64/libodbcpsqlS.so
Driver64 = /usr/pgsql-9.2/lib/psqlodbcw.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1
tnsnames.ora:
webbanca3=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=172.18.1.34)
(PORT=1521)
(CONNECT_DATA=
(SID=webbanca3)
(HS=OK)
listener.ora:
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=webbanca3)
(ORACLE_HOME=/home/moodlepostgres/product/11.2.0/tg_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/usr/pgsql-9.2/lib:/home/moodlepostgres/product/11.2.0/tg_1/lib)
#CONNECT_TIMEOUT_LISTENER = 0
initi<sid>.ora:
# HS init parameters
HS_FDS_CONNECT_INFO = MoodlePostgres
#HS_FDS_TRACE_LEVEL = 0
HS_FDS_SHAREABLE_NAME = /usr/pgsql-9.2/lib/psqlodbc.so
#HS_FDS_SHAREABLE_NAME = /usr/pgsql-9.2/lib/psqlodbcw.so
HS_FDS_SUPPORT_STATISTICS = FALSE
#HS_LANGUAGE = american_america.we8mswin1252 # WORKS ... kinda... :-)
HS_LANGUAGE = american_america.al32utf8 # DOESN'T WORK
HS_KEEP_REMOTE_COLUMN_SIZE = ALL
# ODBC specific environment variables
set ODBCINI=/usr/local/etc/odbc.ini
set ODBCINST=/usr/local/etc/odbcinst.ini
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
The result of odbcinst -j is:
unixODBC 2.3.1
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /usr/loca/etc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
I'm running on Oracle Linux 6
Thank you.The root cause of your problem is the unixODBC Driver manager.
In my environment I can select fine from the Postgres Unicode database storing your characters when I use in my odbc.ini
ConnSettings
=SET CLIENT_ENCODING to 'UNICODE'
and in my gateway init these settings:
HS_NLS_NCHAR = UCS2
HS_LANGUAGE=american_america.al32utf8
SQL> select * from "public"."unicode"@POSTGRESQL_DG4ODBC_EMGTW_1123_DB;
col1 col2 col3
1 a a
2 ä ä
3 æ æ
4 ç ç
5 ã ã
6 â â
as soon as I change in my gateway init file the HS_LANGUAGE to an 8bit character set, for example to:
HS_LANGUAGE=american_america.we8iso8859p1
and
ConnSettings
=SET CLIENT_ENCODING to 'ASCII'
I get the same corrupted content like you get:
SQL> /
col1 col2 col3
1 a a
2 ä ä
3 æ æ
4 ç ç
5 ã ã
6 â â
6 rows selected.
Your unixODBC does not accept multibyte connect strings and fails with the error 28500 and an opening bracket '[' when you set a Unicode character set.
Did you compile unixODBC from source using --with-iconv-char-enc=UTF-8 option?
Looking at the trace file shows that you're still using 11.2.0.1 gateway release and it also seems you have set in your environment a language parameter like NLS_LANG:
First of all I would like to ask you to use 11.2.0.3 as this contains some major NLS fixes. In addition, could you then please unset any NLS_LANG variable before starting the gateway listener?
- Klaus -
To create a database link from oracle to sqlserver with NT authentication
Hi ,
I need to create a database link from oracle 9i to sql server database with windows authentication.I dont have the database username and password instead the access is given to my NT ID and password.So can anyone provide me the information about creating a dblink to sql server with windows authentication.
ThanksOracle is attempting to log in to SQL Server using NT authentication.
The Oracle process, however, is running presumably with a local admin account (normal for a Windows service). SQL Server has no idea what this local account is, so it denies the login.
You could change the Oracle service to run as a known user (presumably not as your Windows ID but some other Windows ID you create explicitly for Oracle) and then grant that Windows ID in SQL Server appropriate privileges. That would mean, though, that when you queried tables over the database link, you'd be using that new Windows ID's privileges on SQL Server, not your Windows ID's privileges.
As I've said, though, this is a general architectural limitation for a multi-tier architecture. The end system (SQL Server) generally has no idea who the end user (your Windows ID) is when that user is coming through a middle tier (Oracle). So it cannot apply end-user permissions to connections created by the middle tier.
Justin -
How to create a new Oracle OSB project automaticaly with script without IDE
Hello,
I want to create automatically an "Oracle service bus project" and an "Oracle service bus configuration project" with scripts (ANT or Maven or ...) without using IDE, without using workshop or Eclipse. I want to create automatically (ANT or Maven) just a skeleton of an OSB project witch i can use after in workshop.
I want to create 1 "Oracle service bus configuration project" with many "Oracle service bus project" automatically (ANT or Maven or scripts) witch i can use after in workshop. How to create a new Oracle OSB project automaticaly with script without IDE ? How can i do this ?
I'm using Oracle service bus 10.3.1
Thank you for your help.Thank you for your response,
I do not want to just create the services (proxy services and business services) but I want to create a template for 40 OSB project with the same scripts ANT/Maven.
Template="Oracle service bus configuration project" + "Oracle service bus project" + services of 40 OSB projects
The goal is that I have more than 40 projects to create and just the name of the projects that changes (when I say the name of the project ie the name of the OSB project, the name of proxy services and the name of business services ).
So I want to give my script (ANT/Maven) the name of 40 OSB project and the script must generate the skeleton of the 40 projects at once time and after generation of skeleton of the 40 project, I will import them in the workshop to add manually mapping and routing and other things that differs from one project to another.
So i want to generate automatically a skeletons of 40 OSB projects using a script (ANT / Maven) and I give to the script juste the names of the 40 projects.
I want to create a "Oracle service bus configuration project" and "Oracle service bus project" automatically of 40 OSB projects (ANT or Maven or scripts) witch i can use after in workshop.
I want to create one 'template' of all 40 projects in the same time, with the same directory structure (Transforlation, Business services, proxy services, WSDL .....) and all 40 project have the same transport, just the names of projects and services witch changes and i can give to the script all names of projects and services and i can give also all WSDL.
Regards,
Tarik -
Unable to create ASM instance in Sol 10 with oracle 10g
Hi
I am trying to create ASM instance in oracle 10g, getting an error will try to add localconfig add command
"bash-3.00# /export/home/oracle/oracle/product/10.2.0/db_1/bin/localconfig add reset
Failure at scls_scr_create with code 1
Internal Error Information:
Category: 1234
Operation: scls_scr_create
Location: mkdir
Other: Unable to make user dir
Dep: 2
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
/etc/init.d/init.cssd: /var/opt/oracle/scls_scr/Sun/root/cssrun: cannot create
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
Giving up: Oracle CSS stack appears NOT to be running.
Oracle CSS service would not start as installed
Automatic Storage Management(ASM) cannot be used until Oracle CSS service is started "
initcssd has been installed and unable to start also getting an error
# svcs -x svc:/system/initcssd:default
svc:/system/initcssd:default (system activity reporting package)
State: maintenance since Wed Nov 16 10:39:29 2011
Reason: Start method failed repeatedly, last exited with status 2.
See: http://sun.com/msg/SMF-8000-KS
See: sar(1M)
See: /var/svc/log/system-initcssd:default.log
Impact: This service is not running.
Can some please help me to create this instance, alos need a initcssd.zip file for 10gHi thanks,
I have passed more steps, CSS is started after changing the hostname, after that I created two drive and mounted properly
when I try to create a ASM disk its failing with following error and idea
SQL> CREATE DISKGROUP DB_DATA NORMAL REDUNDANCY
2 FAILGROUP controller1 DISK '/dev/dsk/c0d1s0'
3 FAILGROUP controller2 DISK '/dev/dsk/c1d1s0';
CREATE DISKGROUP DB_DATA NORMAL REDUNDANCY
ERROR at line 1:
ORA-15018: diskgroup cannot be created
ORA-15031: disk specification '/dev/dsk/c1d1s0' matches no disks
ORA-15025: could not open disk '/dev/dsk/c1d1s0'
ORA-15056: additional error message
Intel SVR4 UNIX Error: 13: Permission denied
Additional information: 42
Additional information: 134497888
Additional information: -809278080
ORA-15031: disk specification '/dev/dsk/c0d1s0' matches no disks
ORA-15025: could not open disk '/dev/dsk/c0d1s0'
ORA-27037: unable to obtain file status
Intel SVR4 UNIX Error: 25: Inappropriate ioctl for device
Additional information: 16
Additional information: 134497888
Additional information: -809278080 -
Problem while selecting a table after creating the dblink
Hi,
We have created the dblink for oracle to sql server and it created successfully,
But while selecting the table from oracle we are getting the below issue,
select * from "sysdiagrams"@omniyat;
ERROR at line 1:
ORA-00942: table or view does not exist
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'sysdiagrams'. {42S02,NativeErr = 208}[Microsoft][ODBC SQL Server Driver][SQL
Server]Statement(s) could not be prepared. {42000,NativeErr = 8180}
ORA-02063: preceding 2 lines from OMNIYAT
Kindly provide us the solution to resolve this issue.
Regards
ShamPlease see:
Odbc Connection From Oracle To SQL*Server Fails With Errors Ora-28546 and Ora-2063 When Using Connection via Database Link. (Doc ID 1389492.1)
To BottomTo Bottom
Error 08001,NativeErr = 11 Instance Invalid or Not Running Connecting to SQL*Server Using Dg4MSQL (Doc ID 1349023.1)
How to Resolve Common Errors Encountered while using Database Gateways (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or Generic Connectivity (Doc ID 234517.1)
Thanks,
Hussein -
Listener error with dg4odbc and mysql
Hi all,
First of all, sorry for my English, I'm learning :-)
I'm trying to create a dblink from oracle to mysql, but for now this seems impossible. I have read lots of manuals and post, but no way. I can connect to remote mysql server with "isql my_portal", so, unixodbc and the mysql driver for odbc are working in the server.
The oracle database 10.2 is installed in a Red Hat 64 bits server. Due to hsodbc for 10.2 is only for 32bit i installed the gateway version for 11g without problems (no errors showed, so...) But I have always the same error: "TNS-12541: TNS:no listener dg4odbc" But my configuration seems correct. Can anyone find the error in my config? Thank you
This is the documentation that I have used:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=561033.1
After apply the modifications to the configuration files, this is what lsnrcntl start says:
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/liste ner.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/srv-bbdd1/listener/alert/lo g.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=1.0.2.42)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=cl-oracle.jferrer.es)(PO RT=1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 16-MAR-2011 10:54:38
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/list ener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/srv-bbdd1/listener/alert/ log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=1.0.2.42)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "SQLServerA3" has 1 instance(s).
Instance "SQLServerA3", status UNKNOWN, has 1 handler(s) for this service...
Service "dbjde" has 1 instance(s).
Instance "dbjde", status UNKNOWN, has 1 handler(s) for this service...
Service "my_portal" has 1 instance(s).
Instance "my_portal", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Then I try tnsping to my_portal:
tnsping:
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 16-MAR-2011 11:36:45
Copyright (c) 1997, 2009, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = my_portal)) (HS=OK))
TNS-12541: TNS:no listener
Some information:
- unixodbc driver is in /usr/lib64 (libodbc.so)
- mysql for odbc driver is in /usr/lib64 (libmyodbc.so)
This is my odbc.ini (/etc/odbc.ini):
[ODBC Data Sources]
odbcname = my_portal
[my_portal]
Description = my_portal
Driver = MySQL
SERVER = 1.0.2.98
PORT = 3306
USER = root
PASSWORD = desarrollo
Database = portal_clientes
[MySQL]
Description=ODBC for MySQL
Driver=/usr/lib64/libmyodbc.so
Setup=/usr/lib64/libodbcmyS.so
Added to listener.ora
(SID_DESC =
(SID_NAME = my_portal)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = dg4odbc)
(ENVS = LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/db_1/hs/lib:/u01/app/oracle/product/10.2.0/db_1/lib:/usr/lib64)
Added to tnsnames.ora
my_portal =
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = localhost)
(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = my_portal))
(HS=OK))
initmy_portal.ora
HS_FDS_CONNECT_INFO=my_portal
HS_FDS_SHAREABLE_NAME=/usr/lib64/libodbc.so
HS_FDS_TRACE_LEVEL=ON
UseCursorLib=0
set ODBCINI=/etc/odbc.iniThank you for the response. The problem was the solved when change the 1.2.0.40 to 42 :-)
Another issue I saw is your ORACLE_HOME - did you install DG4ODBC in your 10.2 OH?Yes, the documentation said that is certified to work with Oracle 10.2.0.4 that is our version, is this a problem? (¿...?) I had no problem to install dg4odbc with the universal installer.
But I have another problems now. I can't remember the exact error, but my first problem was solved adding this line to initmy_portal.ora:
HS_FDS_QUOTE_IDENTIFIER="'"
Now, when I try to make a select oracle returns this:
ORA-00942: la tabla o vista no existe
[MySQL][ODBC 3.51 Driver][mysqld-5.1.41-3ubuntu12.10]Table 'portal_clientes.CLIENTES' doesn't exist {42S02,NativeErr = 1146}[MySQL][ODBC 3.51 Driver][mysqld-5.1.41-3ubuntu12.10]Table 'portal_clientes.CLIENTES' doesn't exist {42S02,NativeErr = 1146}
ORA-02063: 2 lines precediendo a MY_PORTAL_DBLINK
The table exists, I'm sure, and if I change the query to other tables the result is the same: the table doesn't exist. Any idea?
Thank you for the help -
Problem with DG4ODBC and MSSQL
Oracle 11g XE, Apex 4.2.3 with DG4ODBC connecting to MSSQL Express on Windows 7.
The above configuration gives poor performance (slow or no response).
Simple queries work - "select itemname from tablea@dblink"
Minor complex queries (and above ??) do not work - "select a.itemname from tablea@dblink a, tableb@dblink b where a.id=b.id"
Important other information:
On the same machine there is a Windows 7 VM running with Oracle 10g XE, Apex 4.1.1- with HSODBC connecting to the MSSQL Express on the host.
The application has a page with multiple regions and more complex queries (join, count, in list) and it loads normally.
There are none of the issues experienced with the 11g/4.2 mix.
Is there a tweak/patch to make the 11g/4.2 function as well as the 10g/4.1 (will settle for equal performance) ?Sounds like there are lots of moving parts there.
All bits running on the same host? Hope its got plenty of memory ... using NAT or a bridging setup for the VM NIC(s)?
So in the XE guest, there is a tnsalias with an ...HS=OK... stanza? And listener running at the Express host with the dg4odbc setup?
Is there much difference in timing for a tnsping <tnsalias> and a sqlplus ... conn <user>@tnsalias with set timing on? -
Database link from Oracle to MySQL with the use of unixODBC
Hi,
I have 2 servers.
Server A:
- CentOS_5.1 x386
- MySQL 5.1
- unixODBC
- mysql-connector-odbc
Server B:
- CentOS_5.1 x86_64
- Oracle 11g
- unixODBC
- mysql-connector-odbc
I've configured ODBC, so I am able to do "isql <DSN> oracle oracle -v" sucessfully with "root" and "oracle" user on Oracle server. I've configured listener.ora and tnsnames.ora
I added below lines to listener.ora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=mysqlware)
(ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1)
(PROGRAM=dg4odbc)
(ENVS=LD_LIBRARY_PATH=/u01/app/oracle/product/11.1.0/db_1/hs/lib:/usr/lib64/:$ORACLE_HOME/lib)
and lines below to tnsnames.ora
mysqlware=
(DESCRIPTION=
(ADDRESS=
(PROTOCOL=TCP)
(HOST=<server's FQDN>)
(PORT=1521)
(CONNECT_DATA=
(SID=mysqlware))
(HS=OK))
The content of $ORACLE_HOME/hs/admin/initmysqlware.ora is
# This is a sample agent init file that contains the HS parameters that are
# needed for the Database Gateway for ODBC
# HS init parameters
HS_FDS_CONNECT_INFO = mysqlware
HS_FDS_SHAREABLE_NAME = /usr/lib64/libmyodbc3.so
# ODBC specific environment variables
set ODBCINI=/home/oracle/.odbc.ini
# Environment variables required for the non-Oracle system
set <envvar>=<value>
tnsping mysqlware returns.....
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=<server's FQDN>)) (PORT=1521)) (CONNECT_DATA= (SID=mysqlware)) (HS=OK))
OK (10 msec)
when I login to oracle and create PUBLIC DATABASE LINK with command....
create public database link link2mysqlware connect to
2 "oracle" identified by "oracle" using 'mysqlware';
Database link created.
THIS IS WHAT I GET.....
SQL> select * from "emp"@link2mysqlware;
select * from "emp"@link2mysqlware
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from LINK2MYSQLWARE
There is "emp" table in MySQL, from where I can even select with the use of isql command and from this Oracle server.
I would really appreciate some help here.
Thanks in advance.
Tomaz BracicEvening Ed,
I changed to debug and repeated the select ....... The output below is for one select that I did. (select * from "emp"@link1)
Oracle Corporation --- WEDNESDAY MAR 19 2008 21:50:51.371
Version 11.1.0.6.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "AL32UTF8"
setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
Exiting hgosdip, rc=0
ORACLE_SID is "mysqlware"
Product-Info:
Port Rls/Upd:6/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.1.0.6.0_0006, Instance:mysqlware
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=873
HOCXU_DRV_NCHAR=873
HOCXU_DB_CSET=873
HOCXU_SEM_VER=110000
Entered hgolofn at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libodbc.so"
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2082a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208330
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a208af0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a209d60
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2117d0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a211c70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a214480
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a215930
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a216130
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b50
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a217b70
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a219270
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c410
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21c7b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21e250
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21eea0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a21f1a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a220fd0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2213a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222ee0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a222d30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a227dc0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2295b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a229be0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b030
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22b8f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22d550
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22daa0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a22e2f0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a230c30
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a231770
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232190
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a232c20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233110
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233a10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a233f20
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2344c0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a234b10
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2350a0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236640
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a236380
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2374e0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Entered hgolofns at 2008/03/19-21:50:51
symbol_peflctx=0x6a2380b0
hoaerr:0
Exiting hgolofns at 2008/03/19-21:50:51
Exiting hgolofn, rc=0 at 2008/03/19-21:50:51
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
Exiting hgoinit, rc=0 at 2008/03/19-21:50:51
Entered hgolgon at 2008/03/19-21:50:51
reco:0, name:oracle, tflag:0
Entered hgosuec at 2008/03/19-21:50:51
Exiting hgosuec, rc=0 at 2008/03/19-21:50:51
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using oracle as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2008/03/19-21:50:51
HS_FDS_CONNECT_INFO = "mysqlware"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2008/03/19-21:50:51
dsn:mysqlware, name:oracle
optn:
##>Connect Parameters (len=35)<##
## DSN=mysqlware;
#! UID=oracle;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2008/03/19-21:50:51
Entered hgopoer at 2008/03/19-21:50:51
hgopoer, line 159: got native error 0 and sqlstate I; message follows...
Exiting hgopoer, rc=0 at 2008/03/19-21:50:51
hgocont, line 1903: calling SqlDriverConnect got sqlstate I
Exiting hgocont, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgocont.c LINE:1923 FUNCTION:hgocont() ID:Something other than invalid authorization
Exiting hgolgon, rc=28500 at 2008/03/19-21:50:51 with error ptr FILE:hgolgon.c LINE:612 FUNCTION:hgolgon() ID:Calling hgocont
Entered hgoexit at 2008/03/19-21:50:51
Kind regards,
Tomaz -
Heterogeneous connection between Oracle and Postgres.
Hi All,
I'm trying to make an heterogeneous connection between Oracle and Postgres since few days but i still having this error : "lost RPC connection".
First of all : I'm using Windows 7, Oracle 10g and PostgreSQL 8.4.
I have done the following operations :
1) Create a System DNS named "PG". (Test connection is OK)
2) Create the file "initPG.ora" in "$ORACLE_HOME/hs/admin" :
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = PG
HS_FDS_TRACE_LEVEL = ON
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
3) Configure the file "listener.ora" (in "$ORACLE_HOME/NETWORK/ADMIN") :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = PG)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = hsodbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = Cédric-PC)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
4) Configure the file "tnsnames.ora" (in "$ORACLE_HOME/NETWORK/ADMIN") :
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Cédric-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
PG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = Cédric-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = PG)
(HS = OK)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
5) Finally, i create my DB-Link and test it :
CREATE DATABASE LINK "CENTRALE_POSTGRES" CONNECT TO "user_login" IDENTIFIED BY "user_password" USING 'PG';
SELECT * FROM "dual"@CENTRALE_POSTGRES;
I got this error :
ORA-03135 : lost RPC connection.
As you can see, i have activated the trace level (HS_FDS_TRACE_LEVEL = ON), but the directory "$ORACLE_HOME/NETWORK/trace" still empty.
Any ideas ?
Regardsthe tnsnames.ora alias PG is wrong - you need to have 2 closing brackets after the SERVICE_NAME so that HS=OK is outside of the CONNECT_DATA like:
PG =
<space>(DESCRIPTION =
<space><space>(ADDRESS = (PROTOCOL = tcp)(HOST = Cédric-PC)(PORT = 1521))
<space><space>(CONNECT_DATA =
<space><space><space>(SERVICE_NAME = PG))
<space><space>(HS = OK)
<space>)
Please be also aware HSODBC up to release 10.2 has been desupported since March 2008 and it was replaced by its follow up product DG4ODBC V11 -
Dear,
i would like to create a dblink from one db to another with read only permission but seems could not find anything in the doc
regarding readonly dblink.
Please help if you know to create a read only dblink.
Thanks,
TomTom,
I fail to see the problem.
Ideally one doesn't specify the user at all in the connect to clause of the create database link command.
In that case Oracle will use the username and password of the current user and use it to connect to the target database.
The other alternative is to setup a specific user in the target database and to hardcode this user in the create database link command in the source database.
I fail to see why this shouldn't work in your situation.
Sybrand Bakker
Senior Oracle DBA -
I'm having a problem creating a job in oracle . I want at the end of each day to put some values from table1 in table2, empty table1, and then delete and re-create some sequences..because I have auto-increment id and each day I want to sequence to start from 0 again. So long story short I tried creating this job using toad for oracle.
if I just put the first 2 tasks(put data from table1 in table 2, then delete) in the job it works like a charm. if I also add the drop sequence, create sequence I get an error saying
Encountered the symbol "DROP" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
so this is what I want the job to do:
insert into A(a,b,c) select a2,b2,c2 from B;
delete from A;(so far it would work)
drop sequence ida_seq;
create sequence ida_seq
start with 1
increment by 1
nomaxvalue;
drop sequence idb_seq;
create sequence idb_seq
start with 1
increment by 1
nomaxvalue;
so anybody can give me a clue on why I get the error? maybe if someone can give me a link on how to do oracle jobs..cause if I google "oracle+job" I get only jobs(for work) in oracle...but I don't get stuff related to syntax and how to create jobs in oracle. 10x in advanceIf this is a PL/SQL question, then PL/SQL has no 'DROP' or 'CREATE' keywords and you would need to use dynamic SQL with EXECUTE IMMEDIATE.
btw there are various techniques around for resetting a sequence to start again at 1 using ALTER SEQUENCE, rather than dropping and recreating it. -
How many users/ schemas can we create in an oracle database?
How many users can we create in an oracle database? Or how many users can oracle handle?
Problem-
I have to store information of ontologies (I will use countries instead) in db.
I have to store information regarding countries.
I have 13 tables in all to maintain for each country.
Now there are two approaches:
1) keep only 13 tables. Have an extra column in each table to indicate that a particular
row stores information for which country.
2) create a new user/ schema for each country. So we can get rid of the extra column
needed in 1st approach.
I have used the second approach. This is because number of entries in each table for a
given country will be large.
So initially when the s/w is installed I create a central-user. Each time data for new
country has to be entered central-user creates a user/ schema, and creates tables for
this user/ schema. The central user can access the tables of all the countries by
country_name.table_name. By this approach I believe searching would be easy.
If there is any flaw in my approach kindly mention it.
Thank youThere is no (practical at least) limit to the number of users & schemas you can have in Oracle.
Your approach, however, is not going to scale nearly as well as the first option you outlined (adding a column). You are going to end up caching every possible variation of the various queries you're going to be executing because you will be referring to so many different tables, which is going to mean that you are doing a lot more work to parsing statements and generally churning through the shared pool. If you create enough users, you're liable to start hitting ORA-04030 errors because your shared pool is so fragmented.
Additionally, you're likely going to end up with a whole lot of dynamically generated SQL to accommodate new schemas getting added over time which is going to cause you even more pain. Figuring out dynamically what table to join in is a heck of a lot more difficult for the programmer to write and for the database to handle than simply passing in a different country code.
If you're concerned about having too much data, you can have your cake and eat it to by adding the country column and partitioning the tables based on country.
Justin
One other item I forgot to mention is maintainability. Having dozens or hundreds of "identical" schemas makes maintenance a huge pain because something like adding a new column now requires dozens or hundreds of separate DDL statements. You're almost guaranteed that some schema isn't going to be in sync-- it's going to miss a column or miss an index, etc.
Message was edited by:
Justin Cave -
Hi,
i am getting following error, while taking RMAN backup.
ORA-01580: error creating control backup file /backup/snapcf_TST.f
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
DB Version:10.2.0.4.0
while taking datafiles i am not getting any errors , i am using same mount points for both (data&control files)[oracle@localhost dbs]$ oerr ora 27054
27054, 00000, "NFS file system where the file is created or resides is not mounted with correct options"
// *Cause: The file was on an NFS partition and either reading the mount tab
// file failed or the partition wass not mounted with the correct
// mount option.
// *Action: Make sure mount tab file has read access for Oracle user and
// the NFS partition where the file resides is mounted correctly.
// For the list of mount options to use refer to your platform
// specific documentation.
Maybe you are looking for
-
I'm trying to redeem my iTunes gift card, and every time I type in the code, it says the code hasn't been properly activated.
-
MSI GT60 2PC Dominator-- Loads of problems trying to install Win8 onto SSD
Hi guys, I really, really hope someone can help me! I recently purchased GT60 2PC Dominator-626 which is awesome. However, it doesn't come with an SSD so I've got a Crucial M500 which I've installed. I'm trying to move over my Win8 install to this dr
-
Transfer apps song & video from iPhone 3G to a new PC
Dear All, I was using iTunes in my old PC. where I did purchased few apps and has song and video. I didn't have any back up of those. Only those are in my iPhone. Can I use a new PC (OS - Windows XP) to Sync few more songs & apps without loosing exis
-
Table count itself takes long time
Hi, Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Productio
-
JFileChooser and My network Places??
Hello all, In the Filename of JFileChooser if i type \\100.100.100.100 or even \\100.100.100.100\d$ and click on open button it should ask the username and password of that pc and on appropriate combination of username and password it should show the