Need info on running sqlplus
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Need info on running sqlplus

Hybrid View

  1. #1
    Join Date
    Mar 2001
    Posts
    11

    Exclamation

    Hi !

    Can somebody tell me what is difference between

    1. sqlplus system/manager@DELPHI

    &

    2. sqlplus < Hit Enter > Key in Login name & Password.

    First one connect fine ! But second one gives error ORA-12545.

    Trying to connect from client unix box to oracel instance.

    What i have checked so far :

    1. Host name is correct !

    2. DNS settings are okay !

    3. ORACLE_SID & ORACLE_HOME are correct.


    Regards !
    Pankaj Jain

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Are you trying to connect from the client machine, on that case, set the following in your env it it was a n Unix system

    TWO_TASK=< service_name >

    Then try to connect it. It should go through

    Good luck.
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Feb 2001
    Posts
    123
    If you are on UNIX (not sure about other OS), then if you can make it work, the second method is more secure - other users that can list processes can see the username and password in the process listing if you specify

    sqlplus system/manager@database

    If you can't make it work, try

    sqlplus system@database

    This will allow other users to see the username in a process listing, but not the password. You will then be prompted for the password.

    HTH

    David.

  4. #4
    Join Date
    Mar 2001
    Posts
    11

    Thanks !

    Hi sambavan !

    I setted the TWO_TASK to INSTANCE_NAME it worked ! But if i set it to SERVICE_NAME , it doesn't like.

    Thanks for your help.

    Can u explain me what is TWO_TASK variable is for ? And differnece between running sqlplus and keying in password and user name on request rather then writing
    sqlplus user/password@INSTANCE on command line

    Regards
    Pankaj


    --------------------------------------------------------------------

    Hi Dave_A ,

    I appriciate your message reagarding the security. I will implement the way u said in your message .

    Regards
    Pankaj Jain

  5. #5
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    The difference is:

    You are setting your instance name locally (temporarily for that session) thru two_task parameter and connecting to SQL*Plus. So , it defaults to what you have set in TWO_TASK parameter.

    You care connecting to whatever the service_name/database you wanted by explicitly specifying @xyz.

    [url]http://www.dbasupport.com/forums/showthread.php?threadid=6208[/url]
    Reddy,Sam

  6. #6
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    One other point I would like to make using sqlplus direct connection is as follows. If you are just planning to use the sql editor to execute the sqcripts or do query form the client manchine and would only be connecting to one perticular instance, then use TWO_TASK. But again you don't have to worry that you wouldn't be able to connect to the other systems, other than TWO_TASK, you can use

    sqlplus user_name@service_name

    Try to refrain from giving the

    sqlplus sys/password@service_name

    on Unix systems because, there you would be compromising your password. (i.e, any one who does the ps -ef would be able to see your username and password :confused: )

    So one world of advice, don't use

    sqlplus sys/password@servicename
    or
    sqlplus sys/password

    Good luck,
    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width