Create a user with dba oracle

reference:

https://blog.csdn.net/zhang195617/article/details/5857769

sqlplus user switching, handover to adm user command: conn adm / 123456, wherein adm user name, the password 123456

 1. Create a user, such as creating wstest, password wstest1

create user wstest identified by wstest1;

2, login privileges

grant connect to wstest;

3, granting the table or view the additions and deletions to change search privileges, such as granting permission to view

grant select on DEPT_DICT to wstest ;

4, because it is the current user's tables grant another user, it is necessary to add other users to view a table owner prefix, such as select * from A.DEPT_DICT;, so it is not convenient, without prefix if you want to query, so you have to create a current user of synonyms, synonym is effective for all users, which is equivalent to an alias

create public synonym DEPT_DICT for adm.DEPT_DICT;

You can use directly select * from DEPT_DICT when this inquiry;

5, delete users

DROP USER wstest;

 

Guess you like

Origin www.cnblogs.com/javabg/p/11355948.html
Recommended