0

I'm working on an Oracle 11g database, and simply need to create a user and log in with it. I successfully create the user, but after running the second line below, I still can't log in. Is there something I'm missing?

create user "oskar" identified by "oskar_pass";
grant create session to "oskar";

select * from DBA_USERS; --oskar is there, but can't log in

(I tired "grant connect" as well, to no avail.)

1
  • 2
    What is the error ? 11g has case-sensitive passwords so make sure you are not using an upper-case password
    – Gary
    Jan 21, 2011 at 20:40

2 Answers 2

2

This worked for me (10.2.0.3)

SQL> connect dbauser/dbauser
Connected.
SQL> CREATE USER johndoe IDENTIFIED BY johndoe
  2   DEFAULT TABLESPACE "USERS"
  3   TEMPORARY TABLESPACE "TEMP";

User created.

SQL> GRANT CREATE SESSION TO johndoe;

Grant succeeded.

SQL> connect johndoe/johndoe
Connected.
2

If you used double quotes to create the user and give the password, then case becomes significant. I don't have an 11g DB here, but 10g allows me to create a user in lower case, and then I'm stuck using double quotes to log in with:

sqlplus /nolog
SQL> connect "test"@db
Enter password: 
Connected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .