Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2003
    Location
    san jose, CA
    Posts
    68

    Unanswered: SQL*Plus worksheet connection problem

    Dear Forums members:

    I installed Oracle 9i personal edtion on my computer. I try to use SQL*Plus worksheet to execute a sample select statement

    e.g. select * from emp; or select * from scott.emp;

    I got an error message which says, "
    ERROR:
    ORA-01017: invalid username/password; logon denied
    Warning: You are no longer connected to ORACLE.
    SP2-0640: Not connected ."

    I logged in as scott/tiger. Options on login console are a) connect directly to a database; b) Connect & as normal.

    I don't know what cause the problem. Could it be installation problem, or I logged in as a wrong user? Could someone give me some suggestions? I appreciate your help!

    sjgrad03
    1-13-05

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Are you SURE that you successfully connected to your database?

    One way to do it is: at the OEM Login window choose "connect directly to a database". Enter your username, password and correct service name. If you miss any of these, your connection will fail.

    Another way is - when you already are in the SQL*Plus worksheet (which will happen even though your first attempt failed), issue this command: "CONNECT username/password@service_name" and click the "Execute" button on a toolbar. You'll receive a "Connected" message if everything is OK.

    Just wondering ... are you sure you installed scott's schema? Can you connect as "sys", for example? And execute "SELECT username FROM all_users;" It'll show you whether you have or have not user "scott" available in your database.

  3. #3
    Join Date
    Mar 2004
    Posts
    370
    Hi,
    Just a guess! Have not lock the scott user without attention during installation? Try to login using command line:
    Code:
     %ORACLEHOME%\bin\sqlplus.exe /nolog 
    connect username/password@<servicename>
    note that use the proper service naming method in connection string(Local resolution,host names,...?)
    -best wishes

  4. #4
    Join Date
    Aug 2003
    Location
    san jose, CA
    Posts
    68

    how to determin service name?

    hello littlefoot and Ach:

    Thanks for replying my post. I still have questions regarding SQL Plus worksheet. Could your guys tell me how can I determin the service name use by oracle database? Should I check the home directory to see where the database is installed or along the install process, I already chose the service name. if you guy have time, please help me out. Thanks!

    sjgrad03
    1-24-05

  5. #5
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Service name is the concatenation of instance_name/db_name and db_domain with a dot (.) in between. You can find it in TNSNAMES.ORA file (should be in your oracle_home\network\admin folder). In there you're supposed to have something like this:
    Code:
    DATA_SID =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = something)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SERVICE_NAME = your_service_name)
    )
    )

Posting Permissions

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