In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Sec_P1 creates and grants roles
SQL > connect system/oracle
# create two roles
SQL > createrole usr_role
SQL > createrole mgr_role
# grant some permissions to these roles and grant usr_role to mgr_role
SQL > grantcreate session to usr_role
SQL > grantselect on sales.t1 on usr_role
SQL > grantusr_role to mgr_role with admin option
SQL > grantall on sales.t1 to mgr_role
SQL > connsystem/oracle
SQL > grantmgr_role to webapp
SQL > connwebapp/oracle
SQL > grantusr_role to accounts
SQL > insertinto sales.t1 values (sysdate)
SQL > commit
# has query permission, but does not have insert permission.
SQL > connaccounts/oracle
SQL > Select* from sales.t1
SQL > insertinto sales.t1 values (sysdate)
-- ORA-01031:insufficient privileges
# adjust the permissions of accounts so that it can log in by default, but have no other permissions.
SQL > connsystem/oracle
SQL > grantconnect to accounts
SQL > alteruser default role connect
# enable and disable the demo role
SQL > connaccounts/oracle
SQL > select* from sales.t1
-- ORA-00942:table or veiw does not exist
SQL > setrole usr_role
SQL > select* from sales.t1;-- It's OK
# View permissions for two new roles
SQL > select * from dba_role_privs
Wheregranted_role in ('USR_ROLE',' MGR_ROLE')
SQL > selectgrantee,owner, table_name,privilege,grantable
Fromdba_tab_privs where grantee in ('USR_ROLE',' MGR_ROLE')
Union all
Selectgrantee, to_char (null), to_char (null), privilege,admin_option
Fromdba_sys_privs where grantee in ('USR_ROLE',' MGR_ROLE')
Order bygrantee
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.