Home » RDBMS Server » Security » special characters in username
special characters in username [message #206568] Thu, 30 November 2006 10:05 Go to next message
dorothy_wong
Messages: 1
Registered: November 2006
Junior Member
Our DBA setup username as first.last in the database. I am trying to use the GRANT command and run into many troubles. Tried the following

grant all on whatever to first\.last;
grant all on whatever to first%last

also tried set define on/off as well as set escape \

any suggestion? Thank you!
Re: special characters in username [message #206573 is a reply to message #206568] Thu, 30 November 2006 10:20 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
>any suggestion?
Ask your DBA how to do it; since (s)he created this mess.
Re: special characters in username [message #206579 is a reply to message #206573] Thu, 30 November 2006 10:54 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Well, it *might* go this way:
C:\>sqlplus sys/pw as sysdba

SQL> create user first.last identified by abc;
create user first.last identified by abc
                 *
ERROR at line 1:
ORA-01936: cannot specify owner when creating users or roles


SQL> create user "first.last" identified by abc;

User created.

SQL> connect scott/tiger
Connected.
SQL> grant select on emp to "first.last";

Grant succeeded.

SQL>

In other words: your DBA must have created this user using double quotes. You'll have to enclose such a username into double quotes too.

However, just like Anacedent said, it promises a little nice mess in your database.
Previous Topic: Need to find the no. of users who have not logged into Oracle database since some period of time.
Next Topic: 01017 invalid user/password .
Goto Forum:
  


Current Time: Tue Dec 06 06:44:51 CST 2016

Total time taken to generate the page: 0.11184 seconds