Configure SQL*plus with InstantClient to use TNSNAMES

I got following configuration:
Database - 10.2.0.4 EE x64 running on separate server, e.g. 192.168.1.1 with SID test
Client - clean CentOS 6.3 x86 installation.
I've downloaded oracle-instantclient-basic-10.2.0.4-1.i386.rpm and oracle-instantclient-sqlplus-10.2.0.4-1.i386.rpm and made rpm -i on them to install.
Made following exports:
LD_LIBRARY_PATH="/usr/lib/oracle/10.2.0.4/client/lib"
TNS_ADMIN="/usr/lib/oracle/10.2.0.4/client/admin"
/usr/lib/oracle/10.2.0.4/client
├── admin
│   ├── sqlnet.ora
│   └── tnsnames.ora
├── bin
│   ├── genezi
│   └── sqlplus
└── lib
    ├── glogin.sql
    ├── libclntsh.so.10.1
    ├── libnnz10.so
    ├── libocci.so.10.1
    ├── libociei.so
    ├── libocijdbc10.so
    ├── libsqlplusic.so
    ├── libsqlplus.so
    └── ojdbc14.jar
cat /usr/lib/oracle/10.2.0.4/client/admin/sqlnet.ora
TRACE_LEVEL_CLIENT = OFF
names.directory_path = (TNSNAMES, HOSTNAME)
names.default_domain = world
name.default_zone = world
cat /usr/lib/oracle/10.2.0.4/client/admin/tnsnames.ora
test.world=
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))
     (CONNECT_DATA = (SID = test))
sqlplus access/[email protected]:1521/test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
sqlplus access/access@test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specifiedAdding .world change nothing.
Using direct connect string works fine:
sqlplus access/access@"(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521))(CONNECT_DATA = (SID = test)))"
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit ProductionWhere am I wrong and is it possible to make it work with TNS?
Thanks in advance.

insanepi wrote:
sqlplus access/[email protected]:1521/test
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Aug 28 14:45:18 2012
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Add EZ_CONNECT to your names.directory_path for this.
Also you may put .tnsnames.ora file into your $HOME path.
And tracing is a good starting point for troubleshooting.

Similar Messages

  • SQL PLUS with GUI

    I am trying to find out where i can download the older verision of SQL PLUS with GUI interface.
    My current SQL PLUS that came with oracle 11g release one is just a console.
    thanks

    Pl see if MOS Doc 207303.1 (Client / Server / Interoperability Support Between Different Oracle Versions0 can help
    HTH
    Srini

  • SQL*Plus with Oracle 10g Express Edition

    How Can I do to log in using SQL*Plus into Oracle 10g?
    My Schema is: Banco.Global
    My Password is: 111111
    I need to write SET SERVEROUTPUT ON to get answer?
    I opened the Prompt, but i don't know to log in.
    Thanks and my english is not as well as you.

    If i write:
    SQL>connect "Banco.Global"/111111
    a error message is raised: Invalid username/password; logon denied
    but if I log in into Home Page with the same Username and Password, I get to log in.
    There is difference to connect SQL*Plus and the connect with Home Page the Oracle?
    I need to connect with SQL*Plus, because i need to make a test.

  • Why Start SQL*Plus with /nolog

    What is the difference between starting SQL*Plus as in
    sqlplus sys as sysdba
    versus
    sqlplus /nolog
    connect sys as sysdba
    I can imagine that the second method prevents some log file from being written but sometimes logs are useful. Is there more to it than that?
    Thanks,
    Gregory

    It's really interesting to see how a question like this gets answered. Some of what you've been told is true, some not, and most of it is a red herring...
    First, using /nolog (as has been correctly stated) has nothing to do with logging. It means "start sqlplus but don't log on to any database just yet"
    Second, its user or lack of has nothing to do with connecting as sys, as sysdba, or any other special connection. It means, simply and only, "start sqlplus but don't log on to any database just yet"
    It has nothing to do with the ability to run a sql script.
    It has nothing to do with your ability to supply a password.
    One reason to use it in a *nix environment is to be able to hide the userid and/or password from someone querying processes.  As was hinted at, if someone performs a 'ps -ef', they will see the full command line that started the processes.  So, if you start with
    $>sqlplus system/manager
    a ps -f will show the username and password.
    If you start with
    $>sqlplus system
    you will be prompted for password and ps -ef will show the username, because it was on the command line
    If you start with
    $>sqlplus /nolog
    Then supply the username and pswd manually (or in a script), then ps -ef will only show that sqlplus is running, but will not reveal anything about the credentials used.

  • CANNOT CONNECT SQL*PLUS WITH ORA-12547

    제품 : ORACLE SERVER
    작성날짜 : 2004-05-20
    발생)
    oracle 디렉토리를 변경하거나, 오라클 화일의 위치 또는 permission 을
    변경한 다음부터, 오라클을 사용하는 일반 OS account 들이 sql*plus
    에 접속할 때 다음과 같은 에러가 발생하면서 접속할 수 없는 현상입니다.
    sqlplus scott/tiger
    ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
    ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
    ld.so.1: <product name>:fatal:libsunmath.so.1: can't open file: errno=2
    ERROR: ORA-12547: TNS:lost contact
    make -f sqlplus.mk sqlplus 해도 에러 없이 생성된 sqlplus 가
    위와 같은 에러를 보내면서 접속되지 않습니다.
    해결 방안)
    이 문제는 Solaris 의 Oracle 7.3.3 에서 발생합니다. listener 를 통해
    접속한 process 는 LD_LIBRARY_PATH 가 설정되어 있지 않습니다.
    따라서, listener.ora 를 다음과 같이 setting 합니다.
    (SID_DESC=(SID_NAME=FNDFS)
    (ORACLE_HOME=/appltop/fnd/6.1.1)
    (PROGRAM=FNDFS)
    (ENVS='LD_LIBRARY_PATH=/usr/dt/lib:/usr/openwin/lib:$
    ORACLE_HOME/lib'))
    listener 를 거치지 않는 사용자들은 다음과 같이 작업하십시오
    즉, libsunmath.so.1 은 7.3.3 부터 $ORACLE_HOME/lib 에 포함되어 있는
    library 입니다. 따라서, LD_LIBRARY_PATH 에 $ORACLE_HOME/lib 가 포함되어
    있는지 확인하고, 만약 포함되어 있다면, 이 화일을 /usr/bin 으로 copy 하고
    chmod 755, chown/chgrp를 bin 하면 됩니다.
    "$ORACLE_HOME/lib" 에 있는 "libsunmath.so.1" 을 copy 하고 permission 을
    변경하는 절차는 다음과 같습니다.
    1. % cd /u01/app/oracle/product/7.3.3/lib/
    2. % cp libsunmath.so.1 /usr/lib
    3. % cd /usr/lib
    4. % chown bin libsunmath.so.1
    5. % chgrp bin libsunmath.so.1
    원인)
    oracle 을 설치한 후나 oracle product 에 변경이 일어난 후에 root.sh 를
    수행하여 화일들의 owner, group 등을 변경하는 작업을 합니다.
    이 작업 도중, library 에 setting 해두었던 link 가 끊어졌을 때에
    위와 같은 에러가 발생합니다.

    Brian Tkatch wrote:
    SQL*Plus inside the VM can connect to XE, but not to either remote server. It just hangs for a while and finally returns: ORA-12545: Connect failed because target host or object does not exist
    Sounds like hostname resolution failed.
    A hostname needs to be resolved into an IP address. So if you are using a hostname in the TNS connection string, you need to make sure that it can be resolved into an IP. Using the ping <hostname> command is an easy way to determine if the hostname is resolved.
    Some listeners (such as remote and RAC listeners), accepts a client connection, and in response redirect the client to a different hostname (and even port). For example, a remote listener can service 10 instances (each with a different service name). The client connects, requesting servcice5. The listener redirects the client to hostname ora-server5 on port 1521. The client now attempts to connect to ora-server5, by resolving that hostname into an IP and then initiating the connect call.
    So the listener can redirect the client to a new hostname - and the client needs to be able to resolve that hostname. The error you get therefore does not always relate to the initial listener connection. It can also result when the client driver follows the listener's redirect and attempt a new connection to a new host.

  • Is it possible to run SQL*Plus with Putty?

    Hello everybody,
    I've just installed Oracle 11g on Windows Vista. When I click on SQL*Plus it opens the program in the default windows command line. I don't really like the look and feel of cmd. I would like to know whether it is possible to run SQL*Plus in a more advanced/user friendly environment such as Putty terminal client.
    Thanks in advance,
    Dariyoosh

    Kamran Agayev A. wrote:
    user8747515 wrote:
    Windows Command Line is ace! Arrow Up & Down to retrieve commnads... you don't get that (not without a rubbishy workaround) in UNIX!You can solve this issue using rlwrap package. See my vide tutorial
    http://kamranagayev.wordpress.com/2009/07/04/using-rlwrap-to-get-command-lines-history-in-sqlplus-video-tutorial/
    Dear Kamran,
    Thank a lot for this nice presentation, I had also this problem (no command history) under linux. This package is really interesting.
    Kind Regards,
    Dariyoosh

  • How to Access SQL*Plus with DBA account

    Hi All,
    I want to know how can I access and query database through DBA account
    when I enter sys in Login filed and password in password filed it give me error
    ORA- 28009:Connection as sys should be as sysdba or sysoper
    when I enter sysdba in Login filed and password in password filed it give me error
    ORA- 01017:Invalid username/password; Login denied
    Please help me in this

    OR
    -- SYSTEM is a DBA account
    sqlplus SYSTEM/password
    --SUPER DBA with OSPER and SYSDBA role
    You need the ORA_DBA group membership for using /
    sqlplus  / as sysdba
    or
    sqlplus "/ as sysdba"
    or
    sqlplus "sys as sysdba"
    then enter password. HTH
    SS

  • Connecting Oracle using SQL Plus in command window through LDAP settings?

    Hi
    Just like to know if it is possible to connect Oracle using SQL Plus with connection type as LDAP.
    Generally we connect to Oracle in cmd window as
    username/password@DBServiceName
    Similarly is it possible to connect Oracle using SQL plus cmd window using LDAP configuration settings.
    Eg:-
    If my LDAP server is oid:123:456
    Context is: cn=OracleContext,dc=abcdefgh,dc=com
    DBService is: xyz
    Regards
    jc

    Specify the -L command line option to SQL*Plus, i.e.:
    sqlplus -L username/password@db @blah.sql
    (this will prevent the second prompt for username/password if the initial login is unsuccessful for any reason, like an invalid password).

  • Please Help with Forms and SQL Plus Connection Issues in XE

    I am not able to connect with the Forms Builder or SQL Plus with the following errors:
    When attempting to connect with the supplied website.edu:port/orcl
         ORA-06401: NETCMN: invalid driver designator
    When leaving the connection information blank and using my local login and password
    for my copy of Oracle XE
         ORA-12560: TNS:protocol adapter error
    Based on some reading, I set the TNS_ADMIN user environmental variable, trying each of the tnsnames.ora locations but I'm still receiving the same errors
    Location 1: DevSuiteHome\...\tnsnames.ora
    Location 2: oraclexe\...\tnsnames.ora

    Thanks, Vikas!
    But I did a search for 6iServer.conf and did NOT locate any such file
    Please help
    TIA
    SHANKAR
    Shankar,
    It would have helped if you had indicated what is the full version of 9iAS that you have installed. By default the portnumber that is used is 7778.
    As per the entries, they should have already been made in the config files. But check that the 6iServer.Conf file and it should contain the entries that you are being told to update. If not, then add the entries in the 6iServer.conf file and that is all you need.
    HTH.
    Vikash

  • Issue with new line when manually executing a procedure in SQL*Plus

    The below procedure works fine in SQL*Plus when the entire EXEC <procedure_name> (parameter1, parameter2, ..); is put in a single line
    SQL > exec cust_admin_util.create_schema (P_SCHEMA_NAME => 'SCOTT_01', P_SCHEMA_PWD => 'scott123', P_TBS_NAME => 'TRAG_TBS', p_temptbs_name => 'TEMP' );
    PL/SQL procedure successfully completed.I wanted to execute the same procedure with more readability. So, I put each parameters on a separate line and try to execute. But it is erroring out.
    SQL > exec cust_admin_util.create_schema
    P_SCHEMA_NAME => 'TESTUSR_01',
    P_SCHEMA_PWD => 'scott123',
    P_TBS_NAME => 'TRAG_TBS',
    p_temptbs_name => 'TEMP'
    );BEGIN cust_admin_util.create_schema; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'CREATE_SCHEMA'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    SQL >   2    3    4    5    6    7
    P_SCHEMA_NAME => 'TESTUSR_01',
    ERROR at line 2:
    ORA-00928: missing SELECT keywordAny workaround for this ?

    Hi Tom,
    At SQL Plus,
    You have to use the -(Hyphen) as the concatenation Operator.
    For Instance,
    SQL>  exec host_command( -
    p_command => 'dir');
    PL/SQL procedure successfully completed.
    Thanks,
    Shankar                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Execute a mapping deployed with OWB 9.0.4 from SQL*Plus

    Hello,
    I could execute a mapping designed with OWB 9.0.3 from SQL*Plus with the next sentence:
    SQL> exec my_mapping.main;
    But now, with OWB 9.0.4, mappings are deployed as functions (in 9.0.3 were deployed as procedures) and they need parameters.
    Somebody know how I can execute deployed mappings with OWB 9.0.4 from SQL*Plus? I don't know the parameters I need to call a mapping.
    Thanks in advance,
    Pedro.

    Well, I've solved the problem with roles but
    I've executed the script called sqlplus_exec_template.sql and it fails at Stage 2 because the next sentence
    l_audit_execution_id := wb_rt_api_exec.open(l_task_type, l_task_name, l_location_name);
    returns me NULL.
    It is not clear the value that the variable called l_location_name have to stored. The script explain that this variable store the physical name of the
    location to which the task was deployed. I understand that this variable have to store the schema where the mapping was deployed. That's right?
    So I called the script in this manner:
    SQL> @sqlplus_exec_template OWBRUN904I OJBHT PLSQL MY_MAPPING "," "," ;
    where OWBRUN904I is the name of the Runtime Repository Schema, OJBHT is the
    schema where MY_MAPPING is deployed, PLSQL is the task type and MY_MAPPING is
    the name of the mapping I've designed.
    Can you tell me why the scripts fails?
    Regards,
    Pedro

  • Official link to download sql*plus (linux)  for 10g  database

    Good Morning to all ;
    Can anyone provide official link to download sql*plus for 10g database ?
    I am using Virtual machine version 7. I want to configure SQL*Plus utility in my virtual machine ..
    Please provide any official link or torrent link. It's for our learning purpose.
    Thanks in advance ..
    OS : REDHAT5, OEL 5
    VMWARE : Version 7
    Product : 10g R2

    Hello ;
    I can't be enable SQL* Plus in my VMWARE.
    *$ unzip instantclient-sqlplus-linuxppc32-10.2.0.1-20051121.zip*
    Archive: instantclient-sqlplus-linuxppc32-10.2.0.1-20051121.zip
    inflating: instantclient_10_2/glogin.sql
    inflating: instantclient_10_2/libsqlplus.so
    inflating: instantclient_10_2/libsqlplusic.so
    inflating: instantclient_10_2/sqlplus
    *[oracle@rhel5 SHARE]$ cd instantclient_10_2/*
    [oracle@rhel5 instantclient_10_2]$ ls -l
    total 1135
    -r-xr-xr-x 1 root root 1525 Nov 12 2005 glogin.sql
    -rwxrwxrwx 1 root root 1445591 Nov 12 2005 libsqlplusic.so
    -rwxrwxrwx 1 root root 857299 Nov 12 2005 libsqlplus.so
    -rwxrwxrwx 1 root root 18391 Nov 12 2005 sqlplus
    *./sqlplus*
    bash: ./sqlplus: cannot execute binary file
    Please provide me the steps to continue ..

  • Connecting to SQL*PLUS

    Good afternoon. I have a strange issue when I try to connect to SQL*PLUS, Designer and Discoverer too, with an id other than SYSTEM or SYS. I have 10G database installed on my local PC, with the 10G client, Developer Suite with Discoverer and Designer. I connected in the command window with SYS to create the Designer repository and everything worked fine. I can CONNECT to SQL*PLUS to my local db with the SYSTEM id, but not with my own id. I can't connect to Designer repository with the REPOS_MANAGER id either. It looks as if it is trying to connect, but I get an hour glass and a NOT RESPONDING in the Windows task list. I have checked the id's by logging on to SQL*PLUS with SYSTEM id, and they are set up correctly. Any thoughts or suggestions? I can connect to my local database through GUI tools like TOAD or SQL*Tools using my own id. I would greatly appreciate any ideas you might have. Thanks. DLD

    Hi D Moran,
    You don't mention the platform and/or Oracle versions you work with, but generally speaking, did you check:
    - the tns service (windows) is started?
    - did you wait for a moment after the database service started, so that it had the time to "announce itself" to the tns service?
    - do you have only one tnsnames.ora file? if more then one: did you select the corresponding oracle home?
    etc...
    Maybe some of these checks help!
    Regards,
    Sabine

  • Problem with username/password using SQLAuthenticator

    I want to setup SQLAuthenticator but authentication is refused because wrong username/password.
    I am using JDev Studio Edition Version 11.1.2.1.0 with integrated WLS.
    As a base I take this two URLs:
    http://weblogic-wonders.com/weblogic/2010/03/11/configuring-sql-authenticator-with-weblogic-server/ and
    http://biemond.blogspot.com/2008/12/using-database-tables-as-authentication.html
    1. I create db tables (default table names for SQLAuthenticator), but don't fill users and groups - OK
    2. In WLS I create new SQLAuthenticator Authentication provider inside deafult realm myrealm - OK
    3. I put this provider to the top among all three providers
    4. In JDev I configure ADF Security - define Enterprise Roles to matching to the names in GROUPS table of SQLAuthenticator - ??
    5. I Define Application users and roles and setup Resource grants
    6. I run my application
    7. In database tables USERS, GROUPMEMBERS, GROUPS I can see users and roles from Jdev, that means, at deploy time, this tables are filled too
    8. In WLS I can see Users and Groups under myrealm which are transfered at deploy time and mirrors USERS, GROUPMEMBERS, GROUPS
    9. In USERS table I can see password is encripted by {SHA-1}
    But when try to login I am always rejected with "Invalid username or password".
    Before setting up SQLAuthenticator (only default options) the logins were successful, so application shold be OK.
    I try also with Plaintext Passwords Enabled and put into USERS table unencripted password, but without success.
    I can confirm that SQLAuthenticator mechanism actually get password from USERS table. I replaced default SQL for getting password from
    SELECT U_PASSWORD FROM USERS WHERE U_NAME = ?
    to
    select get_pwd(?) as U_PASSWORD from dual. In my get_pwd PL/SQL function I perform logging in I can see that this function was called.
    So the problem is in WLS when comparing passwords.
    Any suggestions, where to start digging?
    Ragards,
    Sašo
    Edited by: Sašo C. on 5.10.2011 7:26
    Edited by: Sašo C. on 5.10.2011 7:32

    The problem is solved! Crucial was hint from http://biemond.blogspot.com/2008/12/using-weblogic-provider-as.html:
    The Control Flag for my new SQLAuthenticator Authentication provider must be changed from Optional to Sufficient AND
    the Control Flag for existing DefaultAuthenticator must be changed from Required to Sufficient!
    It seems that before SQLAuthenticator took password from USERS table, but didn't use it in the authentication process.
    Regards,
    Sašo

  • Sql*plus in Windows Vista OS

    Hi,
    I got 'Windows Vista' OS, where 'Oracle 10G Express Edition' installed.
    To my knowledge sql*plus should be available by default with Oracle version. But here 'Run sql Command Line' is being appeared which has got the similar look as a command prompt which seems to be incovenient. Is there anyway that i can have sql*plus with tool bar in it.
    Thanks,
    Ram J

    Is there anyway that i can have sql*plus with tool bar in it.If you mean the "old" sqlplusw, then no, there isn't. You can :
    1. use SQL Workshop within XE
    2. install SQL Developer (free).

Maybe you are looking for

  • How to I transfer photos from LG phone to Macbook Pro?

    What is best way to transfer photos from LG phone to Macbook Pro?  Has a SIM card.  Has USB Cord/port.

  • RCA to USB Problems

    I am trying to put some video from my parents camcorder onto my ibook G4 to use it in imovie. However their device is a couple of years old and only has rca audio/video outputs. Just in case it matters they have a Sharp VL-AH30 camcorder.

  • Command to start the SAP Server in AIX Machine

    What is the command to start the SAP Server in Unix Environment

  • Curve Sync to Outlook - Cannot find table in system file

    I have just upgraded from a Pearl to a Curve, loaded the desktop software and tried to sync to my MS Outlook, but it gives an error message "Cannot find table in system file". I found a thread which pointed to a solution (ID KB15278), but this did no

  • Delete code in End Routine.

    Hi Experts, I have to write a delete code in end routine. I giving it below. Kindly correct for mistakes. Delete data_package where zquantity = 0 and zorder = 0. I find after putting this code it tells that Data_Package is not available. What to put