This discussion is archived
13 Replies Latest reply: Jan 3, 2013 5:22 AM by EdStevens RSS

Add new sqlplus user

855048 Newbie
Currently Being Moderated
Hi All,

Situation:

I have an ORADB user for SQLPLUS, configured during installation, but i want to add more user other than ORADB but can still access sqlplus /nolog @ prompt, How can this be done?

Thanks all
  • 1. Re: Add new sqlplus user
    Centinul Guru
    Currently Being Moderated
    Welcome to the forums!

    You probably should have posted this in the Database General or even the Installation forums. Hopefully a moderator will move it. :)

    Your description is confusing. An OS version and Oracle version would be helpful. I see two possibilities.

    1. You have an operating system user you would like to have access to the sqlplus binary.

    If this is the case they'll need to be in the OS group that you identified when you installed the database software.

    2. You would like to create a database user.

    You need some form of the syntax:
    CREATE USER <user> IDENTIFIED BY <pwd>;
    See the documentation for details (http://tahiti.oracle.com)
  • 2. Re: Add new sqlplus user
    BluShadow Guru Moderator
    Currently Being Moderated
    moved to the database-general forum, from the sql and pl/sql forum
  • 3. Re: Add new sqlplus user
    855048 Newbie
    Currently Being Moderated
    Hi Centinul,

    Thanks for replying Oracle version is where i need to create a new user which can access sqlplus /nolog, because i have that with my oradb user but when i create another i cannot access it.
  • 4. Re: Add new sqlplus user
    Centinul Guru
    Currently Being Moderated
    852045 wrote:
    Thanks for replying Oracle version is where i need to create a new user which can access sqlplus /nolog, because i have that with my oradb user but when i create another i cannot access it.
    I'm still confused. Can you post what you are trying and how Oracle responds?
  • 5. Re: Add new sqlplus user
    JuanM Explorer
    Currently Being Moderated
    Hi,

    if you need to create a new oracle user then read this:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8003.htm

    if after your create the oracle user you need to connect to oracle with the new user, you need to grant CONNECT role or CREATE SESSION privileges to the new user.

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9013.htm

    All users are database users, not sqlplus users. sqlplus is only a tool that you can use to connect to any oracle database.

    HTH -- johnxjean --
  • 6. Re: Add new sqlplus user
    855048 Newbie
    Currently Being Moderated
    Hi,

    I will try to explain it as possible as I can,

    scenario:

    I have an ORADB user when i log in with linux, from oradb i run sqlplus /nolog so i can run sql functions. Now, I want to create a user named pab@localhost so i can also run sqlplus /nolog.

    Thanks
  • 7. Re: Add new sqlplus user
    19426 Guru
    Currently Being Moderated
    It's still speculation, but I guess oradb is an OS user and OP created another one. If this is true the other user needs a proper environment in order to find sqlplus (and the rest of the software).

    Werner
  • 8. Re: Add new sqlplus user
    855048 Newbie
    Currently Being Moderated
    Hi,

    There i fully understand now, it is an OS user...oradb@localhost i will add another user named pab@localhost where i can also run sqlplus /nolog

    Thanks
  • 9. Re: Add new sqlplus user
    sb92075 Guru
    Currently Being Moderated
    it is an OS user.
    please realize that so far you have not yet shared with us your OS name & version?
  • 10. Re: Add new sqlplus user
    855048 Newbie
    Currently Being Moderated
    Hi,

    Am very sorry if I have not given a complete detail am a newbie here please understand, my os is RHEL 4 running Oracle 10g

    Thanks
  • 11. Re: Add new sqlplus user
    982675 Newbie
    Currently Being Moderated
    The syntax you provided doent work. I want to create new user and I dont want to work in the
    default SCOTT any more. As I am working for my assignments I need to show my name as USER as a proof that
    the work is done by me.The syntax below doesnt work. I use oracle 11g SQL PLUS. I am getting error.

    CREATE USER name IDENTIFIED BY password;

    ERROR at line 1: Insufficient priveleges
  • 12. Re: Add new sqlplus user
    EdStevens Guru
    Currently Being Moderated
    .

    Edited by: EdStevens on Jan 3, 2013 7:11 AM
  • 13. Re: Add new sqlplus user
    EdStevens Guru
    Currently Being Moderated
    >

    Why are you hijacking an old thread that really isn't related to your issue?
    The syntax you provided doent work. I want to create new user and I dont want to work in the
    default SCOTT any more. As I am working for my assignments I need to show my name as USER as a proof that
    the work is done by me.The syntax below doesnt work. I use oracle 11g SQL PLUS. I am getting error.

    CREATE USER name IDENTIFIED BY password;

    ERROR at line 1: Insufficient priveleges
    What do you suppose "Insufficient priveleges" means? You need to be connected to the database as a user who has the CREATE USER system privilege. I seriously doubt that SCOTT has that privilege.


    And the fact that "privileges" is mis-spelled in the error message means you didn't just copy and paste, but transcribed. So we can't really have much faith that you report exactly what you did and what resulted. If you had properly copied and pasted the session we would have seen
    SQL> create user fubar identified by fubar;
    create user fubar identified by fubar
                                    *
    ERROR at line 1:
    ORA-01031: insufficient privileges
    Edited by: EdStevens on Jan 3, 2013 7:16 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points