Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    1

    Unanswered: Oracle Host string

    Hi ,
    I would like to know how to find out the username, password and hoststring for Oracle.I had installed it long back and never used it.Now im trying to login , but in vain.i dont remember what i gave before.
    Is there any way to find it out.

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Database name can be found in the TNSNAMES.ORA file (should be in your ORACLE_HOME/NETWORK/ADMIN directory).

    If you know SYSTEM or SYS password, that would be enough. Default combinations are

    SYS / CHANGE_ON_INSTALL and
    SYSTEM / MANAGER

    If you changed those two and didn't create another privileged user, you're about to recreate the database from scratch. Because, any of those can change another users' passwords using

    ALTER USER scott IDENTIFIED BY lion;

    (And yes, that's another default combination: SCOTT / TIGER).

  3. #3
    Join Date
    Jul 2006
    Posts
    49
    Quote Originally Posted by sharmeeg
    Hi ,
    I would like to know how to find out the username, password and hoststring for Oracle.I had installed it long back and never used it.Now im trying to login , but in vain.i dont remember what i gave before.
    Is there any way to find it out.
    All Oracle databases must have a user named SYS. The default password is CHANGE_ON_INSTALL. However, let's assume you changed this password and then forgot it. That's no problem. The SYS user can be authenticated outside the database (this is a requirement for all Oracle databases). Open a command prompt (i.e., a DOS prompt), set oracle_sid=yoursid, and then say sqlplus "/ as sysdba"

    Once connected to the database you can get a list of all user accounts wtih the command SELECT USERNAME FROM DBA_USERS, and you can change the password of any user with the command ALTER USER username IDENTIFIED BY newpassword. Oracle will not prompt you for the old password.

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Huh, right; again something new. So I chased this "/ as sysdba" down in order to make it work (avoiding "insufficient privileges" error) and came to conclusion that:

    a) operating system user (on MS Windows) must be member of the ORA_DBA group (level of access)

    b) SQLNET.ORA must have SQLNET.AUTHENTICATION_SERVICES= (NTS) line

    So it makes sense; it would really be stupid if *any* operating system user could use this command (sqlplus "/ as sysdba").

    Thank you for the informatioin!

Posting Permissions

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