special characters in username [message #206568] |
Thu, 30 November 2006 10:05  |
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 #206579 is a reply to message #206573] |
Thu, 30 November 2006 10:54  |
 |
Littlefoot
Messages: 21823 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.
|
|
|