TNS Service Name selector for ODBC config on W2k shows trash w/ IC 10g

Hello!
I'm having some problems with the Instant Client 10g on a Windows 2000 Server SP4 machine. On this machine, I'm trying to setup a ODBC connection and fail, as the "TNS Service Name" list only contains "junk". Please see the screenshot at
http://server3.pictiger.com/img/613385/computer-games-and-screenshots/w2k-oracle-odbc-tns-service-name-trash.php
To get so far, I downloaded and unzipped the following files to C:\Oracle\instantclient_10_2:
* instantclient-basic-win32-10.2.0.2-20060508.zip
* instantclient-odbc-win32-10.2.0.2-20060508.zip
* instantclient-sqlplus-win32-10.2.0.2-20060508.zip
Next, I added some System environment variables:
* ORACLE_HOME=C:\Oracle\instantclient_10_2
* TNS_ADMIN=C:\Oracle\instantclient_10_2\network\admin\tnsnames.ora
To PATH, I added (at the end): C:\Oracle\instantclient_10_2. After having done so, I created the file C:\Oracle\instantclient_10_2\network\admin\tnsnames.ora, which contains exactly this (see http://vz6tml.pastebin.ca/211376):
ORABDE.EUROPE.DELPHIAUTO.NET =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.233.30.8)(PORT = 1521))
    (CONNECT_DATA =
      (SERVICE_NAME = orabde.delphi)
    )That's the only file with "tnsname" in its name on the local harddrives of this server.
After having done all of this, I ran odbc_install and had the server rebooted later in the night.
This morning, ie. after reboot, I logged on to the system and started the "Data Sources (ODBC)" configuration of Windows 2000. I clicked on "Add" and selected "Oracle in instantclient10-2". Then I expanded the list of the available TNS Service Name entries and see only junk. On a different W2k server, I am able to setup a ODBC connection using the Oracle Instant Client 10g.
What am I doing wrong, and how do I do it correctly?
Thanks a lot,
Alexander

Hi!
I found the error:
TNS_ADMIN=C:\Oracle\instantclient_10_2\network\admin\tnsnames.oraThat's wrong. The environment variable TNS_ADMIN has to point to the directory containing the tnsnames.ora file; it must not contain the complete path to the tnsnames.ora file.
After changing TNS_ADMIN to C:\Oracle\instantclient_10_2\network\admin, all is fine.
Thanks,
Alexander

Similar Messages

  • TNS Service Names

    I am unable to get the ODBC Driver version 8.1.6.4.0 to get a list of TNS Service names from a shared TNSNAMES.ORA file. If I type in the service name and test the connection the test is successfull so I know that the shared file is being used. Is there a way to get the TNS services from a shared tnsnames.ora file to be listed in the pulldown?

    Can future versions of the ODBC driver get the location of the TNS names file from the registry if the TNS_ADMIN value exists for the ORACLE HOME corresponding to the ODBC driver you are using?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Justin Cave ([email protected]):
    If I remember correctly, when I implemented the TNS name dropdown, I blindly grab the tnsnames.ora file in the local Oracle home. If the shared file isn't there, I wouldn't expect this to work.
    Justin<HR></BLOCKQUOTE>
    null

  • 48 character limit on TNS Service Name

    In the Oracle ODBC Driver Configuration Dialogue Box there is a 48 character limit in the TNS Service name file. In my case, I need 56 characters if I use the //HOST:PORT/service_name format. The service_name is the format SID.host. The full TNS service name can get quite long since the host is repeated twice.
    For me a workable workarounds is to use the IP address in the HOST field (but not the service_name). I didn't test, but another workaround I presume is to use a TNS_NAMES.ora file, but that adds complexity to a tool that's supposed to be simple.
    Better yet, Oracle developers need to make the TNS service name field a bit longer (96 chars?).
    Now that it is working I am happy with the concept and usability of the Instant Client.
    Trenton

    Hi!
    I found the error:
    TNS_ADMIN=C:\Oracle\instantclient_10_2\network\admin\tnsnames.oraThat's wrong. The environment variable TNS_ADMIN has to point to the directory containing the tnsnames.ora file; it must not contain the complete path to the tnsnames.ora file.
    After changing TNS_ADMIN to C:\Oracle\instantclient_10_2\network\admin, all is fine.
    Thanks,
    Alexander

  • Resolving a Server Name from a TNS Service Name

    A computer client has an Oracle ODBC connection that is attached to a TNS Service Name "X". The TNS Service Name is running in Server "Y".
    Does anybody know a quick way to resolve the Server Name "Y" from the TNS Service Name "X" ???
    Our current solution is based on opening the file tnsnames.ora, which is normally located in $ORAHOME\network\ADMIN\TNSNAMES.ORA, and by parsing the file resolve the server name. However, we were wondering if there would be a more reliable way to do this. Is there an Oracle API that we can execute? Something like "GetHostName(TNSServiceName)"?
    Many Thanks

    tring TNSPING <service>
    the outputline contents the HOSTname

  • Resolving the Server Name from a TNS Service name

    A computer client has an Oracle ODBC connection that is attached to a TNS Service Name "X". The TNS Service Name is running in Server "Y".
    Does anybody know a quick way to resolve the Server Name "Y" from the TNS Service Name "X" ???
    Our current solution is based on opening the file tnsnames.ora, which is normally located in $ORAHOME\network\ADMIN\TNSNAMES.ORA, and by parsing the file resolve the server name. However, we were wondering if there would be a more reliable way to do this. Is there an Oracle API that we can execute? Something like "GetHostName(TNSServiceName)"?
    Many Thanks

    Not that I'm aware of.
    If you were using an Oracle Names server to resolve tnsnames, rather than a tnsnames.ora file, this would be a lot easier. You'd just update the Oracle Names server and all the clients would start pointing at the right machine.
    Justin

  • Oracle8i Start problem - TNS:Service Name Incorrect

    Hi Folks
    My installation of Oracle8i was working fine. I installed webDB today and that was worked fine too.
    But before shutting down the machine I forgot to shutdown the database.
    When I reboot and try to start the database as root thus: ./oracle8i start, I get the following error -
    ORA-12162 TNS:Service name is incorrectly specified.
    Looks like something is wrong with SID or TNSNAMES.
    Could somebody suggest a solution please.
    Thanks.

    For information sake, if someone else comes across the same situation, here is the cause and solution:
    When webDB2.2 is installed it seems to make an entry in the /etc/oratab file for the service name that is provided during installation. Cosequently my 'oratab' file went from:
    ora8i:/../oracle/product/8.1.6:Y
    To:
    *:/../oracle/product/8.1.6:Y
    ora8i:/../oracle/product/webdb22:N
    Hence the problem when 'oratab' is invoked.
    I don't know if webDB is supposed to make this kind of a change.
    I replaced the '*' with 'ora8i' and everything works fine including webDB

  • TNS Service Name

    While I am configuring DNS for Oracle 10g at that time i come to the TNS Service Name
    but as i dnt know what TNS Service means ?? I wanted to know what does it stand for ?
    And also I am seeing three options to select named as below
    EXTPROC_CONNECTION_DATA
    ORACLR_CONNECTION_DATA
    XE
    I also wanted to know the purpose of each above attributes. So please Guide me..!! and know me what it means ?? Thanks in advance

    You can refer this http://www.ispirer.com/wiki/sqlways/users-guide/setting-up-database-connection/oracle/tns-service-name
    TNS service name is used to connect to a database remotely.
    PROD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = <HOSTNAME>)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = prim)
    In the above example, PROD is the NET ORACLE SERVICE NAME(alias name). This is used while connecting to the database from the remote server.
    Host is the hostname where the database resides.
    SERVICE_NAME is the db_unique_name of the database that you are connecting.
    So when connecting to the database remotely, you use
    sqlplus username/<password>@<connection string>
    sqlplus username/<password>@<prod>

  • TNS service name gives preference to connect instance which is in a mount

    OS:HPUX
    Oracle version: 11.1.0.7
    why TNS service name give preference to connect instance which is in a mount mode and dsiaply 'ORA-01033' as mentioned below.
    I wanted to connect only instance which are OPEN(not MOUNT) using connect string and want to know status of all instances using SQL query "select instance_name,status from gv$instance". How can I achive this?
    I have four node rac cluster and four instance, one instance on each node and status of instances are as shown below
    SQL> select instance_name,status from gv$instance;
    INSTANCE_NAME STATUS
    dtrac1 OPEN
    dtrac4 STARTED
    dtrac3 OPEN
    dtrac2 MOUNTED
    I have tried to connect using "dtrac" service name ( details of tnsnames gives below) from any node it gives priority to instance which is mount and shows following error messages
    SQL> conn system/vcs@dtrac
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress Process ID: 0 Session ID: 834 Serial number: 139
    Warning: You are no longer connected to ORACLE.
    SQL> conn system/vcs@dtrac
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress Process ID: 0 Session ID: 834 Serial number: 139
    SQL> conn system/vcs@dtrac
    ERROR:
    ORA-01033: ORACLE initialization or shutdown in progress Process ID: 0 Session ID: 834 Serial number: 139
    SQL>
    when I changes dtrac2 instance to either NOMOUNT or OPEN state then connection properly goes to instances which are OPEN state.
    tnsname.ora file:
    ==================
    # tnsnames.ora Network Configuration File: /oracle/db11g/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    DTRAC =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal05-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal06-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal07-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal08-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dtrac)
    DTRAC4 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal08-vip)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dtrac)
    (INSTANCE_NAME = dtrac4)
    DTRAC3 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal07-vip)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dtrac)
    (INSTANCE_NAME = dtrac3)
    DTRAC2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal06-vip)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dtrac)
    (INSTANCE_NAME = dtrac2)
    DTRAC1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal05-vip)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dtrac)
    (INSTANCE_NAME = dtrac1)
    LISTENERS_DTRAC =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal05-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal06-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal07-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal08-vip)(PORT = 1521))
    LISTENER_DTRAC4 =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal08-vip)(PORT = 1521))
    LISTENER_DTRAC3 =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal07-vip)(PORT = 1521))
    LISTENER_DTRAC2 =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal06-vip)(PORT = 1521))
    LISTENER_DTRAC1 =
    (ADDRESS = (PROTOCOL = TCP)(HOST = slpal05-vip)(PORT = 1521))

    Hi Bjoern
    Thanks again for your input.
    I have some commnet on your input.
    I have started instance in mount mode using sqlplus. But it doesn't make diffrence if I stated using srvctl since service get ready as we started instance either OPEN/MOUNT mode using srvctl or sqlplus.
    As you are saying diffrent way of configuration of service by mentioning preferred and available attributes for instances but its not useful to know instances which are open. Its useful for segregate work to specific nodes by creating diffrent services for diffrent application.
    'crs_stat -t' shows resources online even instance is either nomount/mount/open state. I want to exact state of instance so its not useful for me.
    Below example showing service get READY status even I start instanc with mount option using SRVCTL
    (oracle@slpal06)[~/db11g/network/admin] srvctl stop instance -d dtrac -i dtrac2
    (oracle@slpal06)[~/db11g/network/admin] lsnrctl stat
    LSNRCTL for HPUX: Version 11.1.0.7.0 - Production on 17-JUN-2009 18:10:03
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER_SLPAL06
    Version TNSLSNR for HPUX: Version 11.1.0.7.0 - Production
    Start Date 03-JUN-2009 20:38:19
    Uptime 13 days 21 hr. 31 min. 45 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /oracle/db11g/network/admin/listener.ora
    Listener Log File /oracle/db11g/diag/tnslsnr/slpal06/listener_slpal06/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.209.138.26)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.209.137.145)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
    Services Summary...
    Service "dtrac" has 3 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    Service "dtracXDB" has 3 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    Service "dtrac_XPT" has 3 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    The command completed successfully
    (oracle@slpal06)[~/db11g/network/admin] srvctl start instance -d dtrac -i dtrac2 -o mount (oracle@slpal06)[~/db11g/network/admin] lsnrctl stat
    LSNRCTL for HPUX: Version 11.1.0.7.0 - Production on 17-JUN-2009 18:11:19
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
    STATUS of the LISTENER
    Alias LISTENER_SLPAL06
    Version TNSLSNR for HPUX: Version 11.1.0.7.0 - Production
    Start Date 03-JUN-2009 20:38:19
    Uptime 13 days 21 hr. 33 min. 2 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /oracle/db11g/network/admin/listener.ora
    Listener Log File /oracle/db11g/diag/tnslsnr/slpal06/listener_slpal06/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.209.138.26)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.209.137.145)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
    Services Summary...
    Service "dtrac" has 4 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac2", status READY, has 2 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    Service "dtracXDB" has 3 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    Service "dtrac_XPT" has 4 instance(s).
    Instance "dtrac1", status READY, has 1 handler(s) for this service...
    Instance "dtrac2", status READY, has 2 handler(s) for this service...
    Instance "dtrac3", status READY, has 1 handler(s) for this service...
    Instance "dtrac4", status READY, has 1 handler(s) for this service...
    The command completed successfully
    (oracle@slpal06)[~/db11g/network/admin]

  • TNS Service Name is : OracleORACLE_HOMETNSListener and is failing to start

    I think one of my guys has been messing with the configuration of my Oracle 10g server and not being an expert in this I am somewhat bermused !!
    Can anyone tell me where the TNS Service is picking up its name from....as you can see it contains ORACLE_HOME instead of the name of the oracle instance.
    Please help me if you can
    Many Thanks in advance,
    Andy

    I have copied just some of the lines from the entries from yesterday (no entries for today) I hope this will give you enough information :
    24-NOV-2010 09:00:02 * (CONNECT_DATA=(SID=BOBJCMS)(CID=(PROGRAM=C:\oracle\product\10g\perl\5.8.3\bin\MSWin32-x64-multi-thread\perl.exe)(HOST=QCI)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.223)(PORT=62821)) * establish * BOBJCMS * 0
    24-NOV-2010 09:00:06 * service_update * bobjcms * 0
    24-NOV-2010 09:00:43 * ping * 0
    24-NOV-2010 09:00:43 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS=(PROTOCOL=TCP)(HOST=QCI.euroking.com)(PORT=1521)))(VERSION=169870336)) * status * 0
    24-NOV-2010 09:00:52 * (CONNECT_DATA=(SID=BOBJCMS)(CID=(PROGRAM=C:\oracle\product\10g\perl\5.8.3\bin\MSWin32-x64-multi-thread\perl.exe)(HOST=QCI)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.223)(PORT=62908)) * establish * BOBJCMS * 0
    24-NOV-2010 09:02:19 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=services)(ARGUMENTS=64)(SERVICE=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=QCI.euroking.com)(PORT=1521))))(VERSION=169870336)) * services * 0
    24-NOV-2010 09:02:20 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS=(PROTOCOL=TCP)(HOST=QCI.euroking.com)(PORT=1521)))(VERSION=169870336)) * status * 0
    24-NOV-2010 09:04:43 * service_update * qci * 0
    24-NOV-2010 09:04:46 * service_update * bobjcms * 0
    24-NOV-2010 09:04:58 * service_update * qci * 0
    24-NOV-2010 09:05:20 * service_update * bobjcms * 0
    24-NOV-2010 09:05:31 * service_update * qci * 0
    24-NOV-2010 09:05:43 * ping * 0
    24-NOV-2010 09:05:43 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=SYSTEM))(COMMAND=status)(ARGUMENTS=64)(SERVICE=(ADDRESS=(PROTOCOL=TCP)(HOST=QCI.euroking.com)(PORT=1521)))(VERSION=169870336)) * status * 0
    24-NOV-2010 09:05:52 * (CONNECT_DATA=(SID=BOBJCMS)(CID=(PROGRAM=C:\oracle\product\10g\perl\5.8.3\bin\MSWin32-x64-multi-thread\perl.exe)(HOST=QCI)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.223)(PORT=63355)) * establish * BOBJCMS * 0
    24-NOV-2010 09:05:59 * service_update * bobjcms * 0
    24-NOV-2010 09:06:01 * service_died * bobjcms * 12547
    TNS-12547: TNS:lost contact
    24-NOV-2010 09:06:01 * service_died * qci * 12547
    TNS-12547: TNS:lost contact
    24-NOV-2010 09:06:03 * (CONNECT_DATA=(SID=BOBJCMS)(CID=(PROGRAM=C:\oracle\product\10g\bin\emagent.exe)(HOST=QCI)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.223)(PORT=63673)) * establish * BOBJCMS * 12505
    TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
    and these are from the sqlnet.log :
    Fatal NI connect error 12541, connecting to:
    (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=qci.euroking.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=BOBJ_CMS)(SERVER=DEDICATED)(CID=(PROGRAM=C:\oracle\product\10g\jdk\jre\bin\java.exe)(HOST=QCI)(USER=Administrator))))
    VERSION INFORMATION:
         TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
         Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 10.2.0.4.0 - Production
    Time: 25-NOV-2010 10:09:24
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12541
    TNS-12541: TNS:no listener
    ns secondary err code: 12560
    nt main err code: 511
    TNS-00511: No listener
    nt secondary err code: 61
    nt OS err code: 0

  • Oracle optimizer and heterogeneous services (Transparent Gateway for ODBC)

    Hi everyone!
    We have the following configuration:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production.
    Oracle Database Gateway for ODBC 11.2.0.2.0 on the same machine as Oracle DB.
    Non-Oracle DB installed on a different hardware accessed through Oracle Gateway for ODBC via dblink.
    Now, we have to query the remote non-Oracle system and retrieve some data. For the sake of brevity let's suppose we have the following table in our non-Oracle DB:
    create table test (
         ip_address varchar(15),
         start_time datetime,
         end_time datetime
    And we run the following SQL query against the remote table on our Oracle DB:
    SELECT start_time,end_time,ip_address
    FROM remote_table@db_link
    WHERE
    end_time >= to_date('2011-10-11 00:00:00','rrrr-mm-dd hh24:mi:ss')
    OR (
    end_time IS NULL AND start_time >= to_date('2011-10-11 00:00:00','rrrr-mm-dd hh24:mi:ss')
    AND start_time <= to_date('2011-10-12 00:00:00','rrrr-mm-dd hh24:mi:ss')
    AND ip_address = '127.0.0.1';
    But, having query monitoring on the remote DB enabled, we see that the actual query on the remote site looks like this:
    SELECT "START_TIME","END_TIME","IP_ADDRESS"
    FROM "REMOTE_TABLE"
    WHERE "IP_ADDRESS"='127.0.0.1' AND "START_TIME"<=?
    All references to END_TIME column are gone from WHERE clause for whatever reason.
    However, Oracle execution plan shows us the following:
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Inst |IN-OUT|
    | 0 | SELECT STATEMENT | | 1 | 27 | 200 (0)| 00:00:03 | | |
    |* 1 | FILTER | | 1 | 27 | 200 (0)| 00:00:03 | | |
    | 2 | REMOTE | REMOTE_TABLE | | | | | DB_LINK | R->S |
    Predicate Information (identified by operation id):
    1 - filter("END_TIME">=TO_DATE('2011-10-11 00:00:00','rrrr-mm-dd hh24:mi:ss') OR
    "END_TIME" IS NULL AND "START_TIME">=TO_DATE('2011-10-11 00:00:00','rrrr-mm-dd hh24:mi:ss'))
    Remote SQL Information (identified by operation id):
    2 - SELECT "END_TIME","IP_ADDRESS","START_TIME" FROM "REMOTE_TABLE" WHERE
    "IP_ADDRESS"='127.0.0.1' AND "START_TIME"<=:1 (accessing 'DB_LINK' )
    This actually means that Oracle CBO decided that it will apply filter on END_TIME column after having retrieved the data from the remote site. We don't want this behaviour but have no idea how to affect execution plan in this case.
    So, the question is: How can we force Oracle CBO to not change the initial query and pass it to the remote site "as is"? Is there any way we can achieve this goal?
    Edited by: user12024904 on 28-Oct-2011 04:05

    Hi,
    Our Oracle DB and Gateway are running on the following system:
    HP-UX B.11.31 U ia64
    The following SQL code is executed in SQLPlus:
    SELECT start_time,end_time,ip_address
    FROM ip_acc_complete@gr_link
    WHERE
    END_TIME >= to_date('2010-10-21 00:00:00','rrrr-mm-dd hh24:mi:ss')
    OR (
    END_TIME is null AND START_TIME >= to_date('2010-10-21 00:00:00','rrrr-mm-dd hh24:mi:ss')
    AND START_TIME <= to_date('2010-10-22 00:00:00','rrrr-mm-dd hh24:mi:ss')
    AND IP_ADDRESS = '127.0.0.1';
    Gateway debug trace shows the following:
    Oracle Corporation --- TUESDAY NOV 01 2011 14:59:15.254
    Heterogeneous Agent Release
    11.2.0.2.0
    Oracle Corporation --- TUESDAY NOV 01 2011 14:59:15.254
    Version 11.2.0.2.0
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "ON"
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/local/greenwich64/lib/libodbc.so.1"
    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 ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using query as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    SQL text from hgopars, id=1, len=117 ...
    00: 53454C45 43542022 454E445F 54494D45 [SELECT "END_TIME]
    10: 222C2249 505F4144 44524553 53222C22 [","IP_ADDRESS","]
    20: 53544152 545F5449 4D452220 46524F4D [START_TIME" FROM]
    30: 20224950 5F414343 5F434F4D 504C4554 [ "IP_ACC_COMPLET]
    40: 45222057 48455245 20224950 5F414444 [E" WHERE "IP_ADD]
    50: 52455353 223D2731 32372E30 2E302E31 [RESS"='127.0.0.1]
    60: 2720414E 44202253 54415254 5F54494D [' AND "START_TIM]
    70: 45223C3D 3F [E"<=?]
    Deferred open until first fetch.
    Performing delayed open.
    The non-Oracle DB is CopperEye Retrieval Server with its own custom ODBC driver.
    CopperEye query log shows that the following query is received from Oracle Gateway:
    01/11/2011 14:26:31 - NEW QUERY :
    SELECT "END_TIME","IP_ADDRESS","START_TIME" FROM "IP_ACC_COMPLETE" WHERE "IP_ADDRESS"='127.0.0.1' AND "START_TIME"<=?
    which complies with the information in Oracle Gateway trace file.
    So, it seems that it's Oracle DB decision to split the original WHERE clause into two parts, delegate one part to the remote site, retrieve the data and then apply the remaining filter locally.

  • Wrt54gs no service name available for pppoe

    my isp requires that i put a service name. i had a dlink router that worked fine with my connection, but now i cannot find the service name field in the linksys router for my connection to work.
    can anyone help me solve the problem. maybe a firmware is available that adds the service name field.
    i have the wrt54gs v5.1 firmware version 1.50.9

    I guess the Service Name provided by the ISP has to be type in the Host Name box under Setup Page.

  • TNS service name error

    Hi. I faced some problems when I try to create a linkage between 2 DB on 2 different machine. Initially there is a linkage between these DBs, which connect DB A to DB B.
    I can get DB B's data when I logon to DB A.
    Then I want to create another linkage which connect DB B to DB A but failed.
    The sql statement I used to create the linkage is:
    create public database link L_TEST
    connect to DB_B_USER
    using 'DB_B';
    but this error occured:
    ORA-12154: TNS:could not resolve service name
    Please advise. Thank you

    It could be a db_domain problem. Ensure that it is defined the same on both machines. If it is not (and you can't change it) change you db link to include the db_domain in the connect string i.e 'DB_B.world' vice 'DB_B'.

  • ODBC TNS Service drop down filled with garbage records.

    We have Oracle installed on our network. I am trying to install the Oracle ODBC drivers onto my Windows XP machine to create a connection to use in Crystal Reports XI.
    I do not have any oracle products installed on my machine so I downloaded the basic client and the client odbc zip files and installed them into a local directory and then ran the install odbc exe and added the windows PATH which installed the odbc source. When I add a new Windows ODBC Data Source on the configuration screen the list of TNS Service names is filled with dozens of garbage records. I would guess this is not correct so how do I resolve this? I assume this is suppose to be a list of connections to oracle databases read from a tnsnames.ora file but I could be wrong. I find no tnsnames.ora file on my computer but I assume there is this file in the oracle directories on the server somewhere. I am not sure where to go from here. Can anyone advise on how to get the connections I need and clean up the garbage? Thanks.
    Rick

    Hi,
    I am having the same issue, did you ever resolve this issue ?
    I do have a reg setting and enviroment variable for this setting that both point to the same place and I can actually use odbc to create connections but when I use the drop down list I just get garbage.
    Simular setup to your , xp sp3 , instant client , odbc client , sql client.
    I also have an nls_lang as well as adding the path of the isntall to the path var.

  • Installing minimal windows client for ODBC

    Does anybody know how to install an oracle ODBC driver to access oracle databases with the following:
    - keep oracle client as small as possible (jdbc needs less than 1.5 MB!)
    - not to use tnsnames.ora (jdbc does not need this and works fine)
    - connecting to databases from workstation as user and not administrator (8.x works but 10.....)
    - not to change registry nls_lang entry for connecting to different databases with different settings!
    I did never before encounter problems like this with other databases. As we have to user oracle (with ODBC) we have to configure our clients.
    btw: odbc driver version is 10g

    Thanks a lot for your help,
    I got a step further. The mistake was to set the path on the main directory which in my case was C:\Instantclient
    instead of the directory created unzipping the installation files: C:\Instantclient\instantclient_10_2
    But now I'm in defining the datasouce:
    As stated in the help file:
    Before you configure the data source, you must configure network database services so there is an entry for each TNS Service Name. To do this, start the Oracle Net Manager by one of the following methods:
    From the start menu, select Programs, select Oracle for Windows NT, and select the Oracle Net Manager.
    Using the Oracle Net Manager, you can create an entry in the tnsnames.ora file for each TNS Service Name. The Oracle Net Manager is installed when you install Oracle Net Services.
    But I don't have any entry in the program group. Does the instant client create an entry as well?
    Do I have do install the Oracle Net Services additionally to the Instant client?
    In the releasenotes above from legatti they are talking about an TNS_ADMIN entry which has to point to the ora files?
    Do I have to define this as systemparameter pointing to the C:\Instantclient\instantclient_10_2 directory as well.
    Thanks a lot for every hint
    Axel

  • Service-name meaning in the service instance command

    Hi,
    in the Cisco 7600 we have the following command to configure a service instance:
    service instance id ethernet  [service-name]
    Searching information for the meaning of the service-name option I didn't find nothing..
    Do you know what service-name do and when (or why) it might be configured?
    Often the service instance configuration is
    service instance 100 ethernet without any service-name
    thx
    Riccardo

    Hi,
    Router(config-if-srv)#service instance id {Ethernet [service-name]}
    Creates an service instance (instantiation of an EVC) on an interface. It sets the device into the config-if-srv sub-mode.
    http://www.cisco.com/en/US/products/hw/routers/ps368/products_configuration_guide_chapter09186a00807f3f7e.html

Maybe you are looking for