Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2004
    Posts
    15

    Unanswered: Login to SQL*Plus and SQL*Plus Worksheet

    I have created two databases(A and B) in Oracle9i on my PC (XP Pro).
    I am able to login (and connect) to both databases using SQL*Plus
    Worksheet, but I am only able to login(and connect) to 'A'
    using SQL*Plus.

    When I try to login to 'B' using SQL*Plus I get an error 'ORA-01017
    Incorrect Username/Password; login denied'. How do I fix it?

    Here is tnsnames.ora and listner.ora files

    # TNSNAMES.ORA Network Configuration File: C:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.

    A =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DDnD)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = A.domain.com)
    )
    )

    B =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = DDnD)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = B.domain.com)
    )
    )

    # LISTENER.ORA Network Configuration File: C:\oracle\ora92\NETWORK\ADMIN\listener.ora
    # Generated by Oracle configuration tools.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = MYPC)(PORT = 1521))
    )
    )

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = A.domain.com)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = A)
    )
    (SID_DESC =
    (GLOBAL_DBNAME = B.domain.com)
    (ORACLE_HOME = C:\oracle\ora92)
    (SID_NAME = B)
    )
    )

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    The error that you said the database gave you was:
    Incorrect Username/Password

    Change to a valid username/password combination ...

    Try the defaults ...
    system/manager
    sys/change_on_install

    HTH
    Gregg

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    58
    I think the problem is that the env variable of oracle sid is set to database A on your machine. Just set it to the sid you desire and go for it. If you are on a windows machine you can get to them by my computer->properties->advanced

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >When I try to login to 'B' using SQL*Plus I get an error 'ORA-01017
    Exactly what/how do you "try to login to 'B' using SQL*Plus"?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    I am of a mind with Anacedent.
    We expect you to connect through sqlplus at commandline:

    sqlplus username/password@B
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  6. #6
    Join Date
    Apr 2004
    Posts
    15

    Re: Login to SQL*Plus and SQL*Plus Worksheet

    I tried 'SYSTEM' as Username, the <password> and database name
    'B' as Host String; and I got connected to the database 'B'. Still I
    am not able to use '<sysdba>' username. In other words if I use
    my sysdba username, I get the error I mentioned. I do not get any error
    if I use my sysdba username with SQL*Plus Worksheet.

  7. #7
    Join Date
    Jul 2003
    Posts
    2,296
    are you connecting remotely? from client to host?
    if so, is remote_login_passwordfile set to exclusive?

    if connecting from host, you need to change the
    $ORACLE_SID to whichever database you want to connect as SYS to.

    export ORACLE_SID=B

    sqlplus "/as sysdba"


    done
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  8. #8
    Join Date
    Apr 2004
    Posts
    15
    are you connecting remotely? from client to host?
    if so, is remote_login_passwordfile set to exclusive?

    if connecting from host, you need to change the
    $ORACLE_SID to whichever database you want to connect as SYS to.

    export ORACLE_SID=B

    sqlplus "/as sysdba"


    done
    ___________________
    I have Oracle9i on my PC. Where do I find $ORACLE_SID variable? So
    that I change its value. Thanks

  9. #9
    Join Date
    Jul 2003
    Posts
    2,296
    so you are all set and it worked?
    what did you mean by 'done'?
    did you give up?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  10. #10
    Join Date
    Apr 2004
    Posts
    15
    Originally posted by The_Duck
    so you are all set and it worked?
    what did you mean by 'done'?
    did you give up?
    ________________________
    I didn't say 'done', I believe the word got carried forward from some
    other (previous ) reply.
    I did get it to work, by means of fixing my "ignorance". I didn't
    know that in Oracle 'Schema' <==> 'User'. I came across this information when I was reading about 'How to create schema'. So,
    I created an Username 'BOB', now when I enter 'BOB' as user name,
    <password> and 'B' as Host String to SQL*Plus prompts, I get
    connected and there is an empty schema 'BOB'.

    I appreciate your help, and accept my apology that I didn't pause
    correct question for the problem.


  11. #11
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Bhargav,

    We all started somewhere - no need to feel sheepish.

    Glad you got it sorted. Sometimes, regardless of how much we read, all we need is a subtle pointer.

    Kind Regards
    Bill
    Please don't email me directly with questions. I've probably just got home from the pub and cannot guarantee the sanity of my answers. In fact, I can't believe I actually made it home.

Posting Permissions

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