Oracle12.2?????????μ????????
?????Oracle ???????[ 2017/4/17 11:26:38 ] ????????????? Oracle ???????
??????????????????У??????????????????CDB?????????????????application container?????????????PDB????????????£??????????????????????????????????????????????????????????????е?????????????????
????????
??????????????£?common user??local user???????????????????????????????????????????????????????????????????????????????????????????軹???????????
??????????????common user????????local user????????????Oracle 12c??????????????????????????????????
?????????Ч???????1???
???????????????
????1??????????????????????????к??????????container?С?
????2?????common ???????????蹫?????????????????????common?????
????3??common ?????????????common ???????common ????????????
????4????????????????????????????root ??????????????????????? CONTAINER=ALL??
????5??????????????????????????衣
????6???????common??????????????????е???????????????????????????????????????????????????????????????е??????????
????7??????????????public????
????????????????
????1???????????????????????container??????????????????root ????????????????????裬?????root???????á?
????2??common ?????local ???????????б????????
????3???????????????????container?У????????????????CONTAINER=CURRENT??
????4??common?????local??????????common??local????????????
????5???κ???????????????????????????????public????????б????????
????????????????
??????????????????PDB??????????????????磬??????A??PDB B?б???????????????????е????A?????PDB B????????Ч??
????????????????????????£??????????root?????????е???′?????PDB????Ч??
????1???????????common ????????????????common?????common???????public ?????????????public????????????????????????????????????
????2???????????????????????????????????ADMIN OPTION????
????3???????????а?????CONTAINER=ALL ????
????????????????????????????????????c##hr_admin??
????CONNECT SYSTEM
????Enter password: password Connected.
????GRANT CREATE ANY TABLE TO c##hr_admin CONTAINER=ALL;
?????????????????
????????????????????????????????????????й?????????Ч???????????????Щ?????Щ?????????????????????????????????????????????????????????????????????????????????????PDB???????′?????PDB??????
????1???????????????????????????????????????????????y????PUBLIC?????
????2?????????????????????????GRANT????
????3??GRANT??????CONTAINER = ALL???
????????????????????????c## hr_admin??????????????????????CDB?????е??κ???????????PDB?е?DBA_PDBS???????select?????
????CONNECT SYSTEM
????Enter password: password Connected.
????GRANT SELECT ON DBA_OBJECTS TO c##hr_admin
????CONTAINER=ALL;
????????????PDB????????
???????????????????????????PDB????????
?????????????????????????????GRANT??REVOKE????а???CONTAINER???
??????CONTAINER?????ALL???????????????????к??′?????????; ?????????CURRENT????????????????????? ???CONTAINER??佫????????????????? ?????root????GRANT?????????CONTAINER????????????????PDB??á?
???????????????????????蹫?????c## hr_admin??CREATE TABLE????????????????????????к??′???????????????????
????CONNECT SYSTEM
????Enter password: password Connected.
????GRANT CREATE TABLE TO c##hr_admin CONTAINER=ALL;
???????ù????????CONTAINER_DATA???????
????????????????root?е?CONTAINER_DATA????????PDB?е??????
?????????root????й?root??CDB??PDB??????
???????????????в?????????????X $???V $??GV $??CDB_ *?????????????X$?????Щ????????й???ó???root?????????ó???PDB???????????????????CDB root??????????CDB??
?????????????????PDB????????????????????????á? ??????????Oracle???????Щ???????????????????? ??????????USER_ | DBA_ | ALL_VIEWS | TABLES????????TABLE_NAME??VIEW_NAME??CONTAINER_DATA????????????????????????????????
??????????й???????????????????????CONTAINER_DATA??????????????CDB_CONTAINER_DATA????????????
???????磺
???????ù???????????PDB?????
????????????????????CONTAINER_DATA?????????ù???????????????PDB?????????(?????????????????й????PDB???????????root?з???ALTER USER???)
????????????????η???ALTER USER???????????????c##hr_admin??V $ SESSION????в???CDB $ ROOT??SALES_PDB??HRPDB????????????????????????????????????
????CONNECT SYSTEM
????Enter password: password Connected.
????ALTER USER c##hr_admin
????SET CONTAINER_DATA = (CDB$ROOT?? SALESPDB?? HRPDB)
????FOR V$SESSION CONTAINER=CURRENT;
???????????????У?
????· SET CONTAINER_DATA?г????????й?????????????????
????· FOR V$SESSION???CONTAINER_DATA???????????????c## hr_admin????????select?????
????· ???????CONTAINER = CURRENT?????????????????CONTAINER = ALL??ALTER USER????????????CONTAINER_DATA????????????????root??
???????????????c##hr_admin????????????????????CONTAINER_DATA?????е?CDB$ROOT??SALES_PDB??HR_PDB??????????????????FOR V$SESSION?? ???磺
????ALTER USER c##hr_admin
????SET CONTAINER_DATA = (CDB$ROOT?? SALESPDB?? HRPDB)
????CONTAINER=CURRENT;
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11