【許可權】通過調整O7_DICTIONARY_ACCESSIBILITY引數實現SYS使用者以普通身份登入資料庫
Oracle資料庫的SYS使用者作為“God”級別的使用者可以說無所不能。預設情況下SYS使用者的登入方式只能是以“sysdba”特權方式登入到資料庫。本文給出SYS使用者以普通使用者身份方式登入到資料庫的方法。
1.預設情況下SYS使用者不能以普通使用者方式登入資料庫
1)使用sqlplus命令嘗試登入
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:26:27 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Enter user-name:
提示無法連線。
2)使用connect命令嘗試登入
sys@ora10g> connect sys/oracle
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Warning: You are no longer connected to ORACLE.
提示無法連線。
可見,預設情況下SYS使用者是不能以普通使用者方式登入資料庫的。
2.開啟這種限制的方法:修改O7_DICTIONARY_ACCESSIBILITY引數值由原值“FALSE”修改為“TRUE”
1)檢視O7_DICTIONARY_ACCESSIBILITY引數預設值
sys@ora10g> show parameter O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
---------------------------------- -------------------- -------------
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
2)調整O7_DICTIONARY_ACCESSIBILITY引數值為“TRUE”
sys@ora10g> alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;
System altered.
3)重啟資料庫使引數調整生效
sys@ora10g> startup force;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219784 bytes
Variable Size 96469816 bytes
Database Buffers 314572800 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
4)確認引數調整結果
sys@ora10g> show parameter O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
---------------------------------- -------------------- -------------
O7_DICTIONARY_ACCESSIBILITY boolean TRUE
3.測試SYS使用者是否能以普通使用者方式登入資料庫
1)使用sqlplus命令嘗試登入
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:44:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ora10g>
2)使用connect命令嘗試登入
sys@ora10g> connect sys/oracle
Connected.
sys@ora10g> show user;
USER is "SYS"
此時我們已經實現了SYS使用者以普通使用者方式登入到資料庫。
4.SYS使用者以普通使用者身份登入資料庫的許可權限制
雖然我們實現了SYS使用者以普通使用者方式登入資料庫這個功能,但是這種登入方式同時也失去了sysdba這種特權,這種登入方式不能完成資料庫的關閉;在資料庫關閉狀態下這種方式也無法連線到資料庫,從而不能啟動資料庫。因為啟動和關閉必須使用特權身份登入
1)嘗試關閉資料庫
sys@ora10g> shutdown immediate;
ORA-01031: insufficient privileges
此時提示許可權不足。
2)關閉資料庫後嘗試連線
sys@ora10g> conn / as sysdba
Connected.
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ora10g> conn sys/oracle
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Warning: You are no longer connected to ORACLE.
sys@ora10g> exit
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:50:18 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Enter user-name:
由於無法連線到資料庫,因此便不可以啟動資料庫。因為此時是以普通使用者身份登入。
5.小結
通過整個分析和探尋的過程可見,這種調整方法的必要性很小。僅作為一種功能上的實現。
Good luck.
secooler
11.06.04
-- The End --
1.預設情況下SYS使用者不能以普通使用者方式登入資料庫
1)使用sqlplus命令嘗試登入
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:26:27 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Enter user-name:
提示無法連線。
2)使用connect命令嘗試登入
sys@ora10g> connect sys/oracle
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER
Warning: You are no longer connected to ORACLE.
提示無法連線。
可見,預設情況下SYS使用者是不能以普通使用者方式登入資料庫的。
2.開啟這種限制的方法:修改O7_DICTIONARY_ACCESSIBILITY引數值由原值“FALSE”修改為“TRUE”
1)檢視O7_DICTIONARY_ACCESSIBILITY引數預設值
sys@ora10g> show parameter O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
---------------------------------- -------------------- -------------
O7_DICTIONARY_ACCESSIBILITY boolean FALSE
2)調整O7_DICTIONARY_ACCESSIBILITY引數值為“TRUE”
sys@ora10g> alter system set O7_DICTIONARY_ACCESSIBILITY=true scope=spfile;
System altered.
3)重啟資料庫使引數調整生效
sys@ora10g> startup force;
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 1219784 bytes
Variable Size 96469816 bytes
Database Buffers 314572800 bytes
Redo Buffers 7168000 bytes
Database mounted.
Database opened.
4)確認引數調整結果
sys@ora10g> show parameter O7_DICTIONARY_ACCESSIBILITY
NAME TYPE VALUE
---------------------------------- -------------------- -------------
O7_DICTIONARY_ACCESSIBILITY boolean TRUE
3.測試SYS使用者是否能以普通使用者方式登入資料庫
1)使用sqlplus命令嘗試登入
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:44:59 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
sys@ora10g>
2)使用connect命令嘗試登入
sys@ora10g> connect sys/oracle
Connected.
sys@ora10g> show user;
USER is "SYS"
此時我們已經實現了SYS使用者以普通使用者方式登入到資料庫。
4.SYS使用者以普通使用者身份登入資料庫的許可權限制
雖然我們實現了SYS使用者以普通使用者方式登入資料庫這個功能,但是這種登入方式同時也失去了sysdba這種特權,這種登入方式不能完成資料庫的關閉;在資料庫關閉狀態下這種方式也無法連線到資料庫,從而不能啟動資料庫。因為啟動和關閉必須使用特權身份登入
1)嘗試關閉資料庫
sys@ora10g> shutdown immediate;
ORA-01031: insufficient privileges
此時提示許可權不足。
2)關閉資料庫後嘗試連線
sys@ora10g> conn / as sysdba
Connected.
sys@ora10g> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
sys@ora10g> conn sys/oracle
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Warning: You are no longer connected to ORACLE.
sys@ora10g> exit
ora10g@secdb /home/oracle$ sqlplus sys/oracle
SQL*Plus: Release 10.2.0.1.0 - Production on Fri May 27 21:50:18 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Enter user-name:
由於無法連線到資料庫,因此便不可以啟動資料庫。因為此時是以普通使用者身份登入。
5.小結
通過整個分析和探尋的過程可見,這種調整方法的必要性很小。僅作為一種功能上的實現。
Good luck.
secooler
11.06.04
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-697198/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 報表如何透過引數控制資料許可權
- 通過 VirtualApp 實現免 Root 許可權 HookAPPHook
- 登入失敗,提示“資料庫目錄許可權寫入不足”,可以操作設定資料庫目錄許可權為 777。資料庫
- 後臺登入提示:”登入失敗:資料庫目錄寫入許可權不足!“資料庫
- PostgreSQL資料庫使用者許可權管理SQL資料庫
- 達夢資料庫引數調整方法資料庫
- 通過 recompose 實現 react router4 許可權React
- PbootCMS後臺登入提示:”登入失敗:資料庫目錄寫入許可權不足!“boot資料庫
- PbootCMS後臺登入提示:“登入失敗:資料庫目錄寫入許可權不足!”boot資料庫
- 授權|取消授權MYSQL資料庫使用者許可權MySql資料庫
- 普通使用者許可權執行dockerDocker
- springboot + shiro 實現登入認證和許可權控制Spring Boot
- Spring Security實現統一登入與許可權控制Spring
- PostgreSQL_通過schema控制使用者許可權SQL
- 資料庫的許可權管理資料庫
- SQLPlus無法登入資料庫提示密碼不對或許可權不足SQL資料庫密碼
- mysql 床架新資料庫並分配使用者許可權MySql資料庫
- Mysql資料庫許可權問題MySql資料庫
- 資料庫學習:許可權管理資料庫
- 01【若依框架】 登入許可權框架
- Oracle資料庫scott使用者建立view檢視許可權Oracle資料庫View
- Linux下的檔案許可權和使用者身份Linux
- jenkins--為普通使用者授予指定job許可權Jenkins
- 【USER】Oracle 一個普通使用者有多少許可權Oracle
- 如何用 Vue 實現前端許可權控制(路由許可權 + 檢視許可權 + 請求許可權)Vue前端路由
- element-admin通過後端動態路由表實現使用者許可權控制(一)後端路由
- 許可權系統:一文搞懂功能許可權、資料許可權
- 如何讓普通使用者獲取root使用者的許可權
- DBA 日常:規模使用者資料庫訪問許可權管理資料庫訪問許可權
- SpringSecurity許可權管理系統實戰—九、資料許可權的配置SpringGse
- 初識ABP vNext(4):vue使用者登入&選單許可權Vue
- MySQL資料庫Root許可權MOF方法提權研究MySql資料庫
- 入門MySQL——使用者與許可權MySql
- MySQL入門--使用者與許可權MySql
- Laravel實現許可權控制Laravel
- Spring boot 入門(四):整合 Shiro 實現登陸認證和許可權管理Spring Boot
- 七、許可權管理和資料庫備份資料庫
- Oracle 資料庫安全許可權配置標準Oracle資料庫
- Amazon 中國區配置 PingIdentity 身份整合實現 Redshift 資料庫群集單點登入IDE資料庫