擁有sysdba許可權使用者,在資料庫中和密碼檔案中的密碼關係
擁有sysdba許可權使用者,在資料庫中和密碼檔案中的密碼關係
測試系統:oracle11g 11.2.0.3
環境配置:
在sqlnet.ora中,將
SQLNET.AUTHENTICATION_SERVICES= (NTS)修改為NONE
修改後為
SQLNET.AUTHENTICATION_SERVICES= (NONE),目的是取消系統登入驗證
結論:
無論是修改orapwd檔案還是通過alter user 來修改sys使用者的密碼,密碼是一起來變化的。
連線測試
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:00:31 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
1 修改orapwd的密碼
[oracle@r11g dbs]$ rm -f orapwdb
[oracle@r11g dbs]$ orapwd file=orapwdb password=sysoracle
遠端連線:
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:04:13 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
本地連線:
[oracle@r11g dbs]$ sqlplus sys/oracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:16:18 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: ^C
[oracle@r11g dbs]$
[oracle@r11g dbs]$ sqlplus sys/sysoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:16:35 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
2 使用alter user sys identified by xxx 來修改sys使用者密碼
SQL> alter user sys identified by mssoracle;
User altered.
連線測試
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:11:02 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
C:\Users\thinkpad>
C:\Users\thinkpad>sqlplus sys/mssoracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:11:12 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
本地
[oracle@r11g dbs]$ sqlplus sys/sysoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:18:45 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: ^C
[oracle@r11g dbs]$
[oracle@r11g dbs]$ sqlplus sys/mssoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:18:56 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
3 檢視密碼檔案
[oracle@r11g dbs]$ strings orapwdb
]\[Z
ORACLE Remote Password file
INTERNAL
AB27B53EDC5FEF41
8A8F025737A9097A
SQL> alter user sys identified by moracle;
User altered.
[oracle@r11g dbs]$ strings orapwdb
]\[Z
ORACLE Remote Password file
INTERNAL
E568563E8635750E
5D7748DDCA524F13
通過這個可以看到使用alter user 來修改sys的密碼,密碼檔案中的內容也修改了。
4 刪除密碼檔案
[oracle@r11g dbs]$ rm -f orapwdb
[oracle@r11g dbs]$
[oracle@r11g dbs]$ ls
hc_db.dat initdb.ora init.ora lkDB spfiledb.ora
遠端將無法登入
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:45:52 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
參考文件:
asktom:sys password change and orapwd file
hat is a bit dated but still true.
If you create the password file with a password different than the sys password, that'll be the password you use to connect as sysdba over a network (the password in the password file is used for sysdba connections). The sys password to just connect as sys (something you wouldn't really ever have a need to do EVER) can be different.
But when you alter the SYS password, they sync that up with the password file, as demonstrated.
Since the password file is separate and distinct from the database - it does not attempt to update the database when you update the password file.
asktom:Problem to connect as SYSDBA
測試系統:oracle11g 11.2.0.3
環境配置:
在sqlnet.ora中,將
SQLNET.AUTHENTICATION_SERVICES= (NTS)修改為NONE
修改後為
SQLNET.AUTHENTICATION_SERVICES= (NONE),目的是取消系統登入驗證
結論:
無論是修改orapwd檔案還是通過alter user 來修改sys使用者的密碼,密碼是一起來變化的。
連線測試
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:00:31 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
1 修改orapwd的密碼
[oracle@r11g dbs]$ rm -f orapwdb
[oracle@r11g dbs]$ orapwd file=orapwdb password=sysoracle
遠端連線:
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:04:13 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
本地連線:
[oracle@r11g dbs]$ sqlplus sys/oracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:16:18 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: ^C
[oracle@r11g dbs]$
[oracle@r11g dbs]$ sqlplus sys/sysoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:16:35 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
2 使用alter user sys identified by xxx 來修改sys使用者密碼
SQL> alter user sys identified by mssoracle;
User altered.
連線測試
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:11:02 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name:
C:\Users\thinkpad>
C:\Users\thinkpad>sqlplus sys/mssoracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:11:12 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
本地
[oracle@r11g dbs]$ sqlplus sys/sysoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:18:45 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: ^C
[oracle@r11g dbs]$
[oracle@r11g dbs]$ sqlplus sys/mssoracle as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Dec 25 16:18:56 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
3 檢視密碼檔案
[oracle@r11g dbs]$ strings orapwdb
]\[Z
ORACLE Remote Password file
INTERNAL
AB27B53EDC5FEF41
8A8F025737A9097A
SQL> alter user sys identified by moracle;
User altered.
[oracle@r11g dbs]$ strings orapwdb
]\[Z
ORACLE Remote Password file
INTERNAL
E568563E8635750E
5D7748DDCA524F13
通過這個可以看到使用alter user 來修改sys的密碼,密碼檔案中的內容也修改了。
4 刪除密碼檔案
[oracle@r11g dbs]$ rm -f orapwdb
[oracle@r11g dbs]$
[oracle@r11g dbs]$ ls
hc_db.dat initdb.ora init.ora lkDB spfiledb.ora
遠端將無法登入
C:\Users\thinkpad>sqlplus sys/oracle@db as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 25 16:45:52 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
參考文件:
asktom:sys password change and orapwd file
hat is a bit dated but still true.
If you create the password file with a password different than the sys password, that'll be the password you use to connect as sysdba over a network (the password in the password file is used for sysdba connections). The sys password to just connect as sys (something you wouldn't really ever have a need to do EVER) can be different.
But when you alter the SYS password, they sync that up with the password file, as demonstrated.
Since the password file is separate and distinct from the database - it does not attempt to update the database when you update the password file.
asktom:Problem to connect as SYSDBA
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-1064362/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 資料庫管理員許可權認證&&密碼檔案的建立和管理資料庫密碼
- 關於ORACLE作業系統認證和ORAPWD密碼檔案認證SYSDBA許可權Oracle作業系統密碼
- MySQL建立使用者,配置許可權、密碼策略MySql密碼
- 關於密碼檔案,SYS密碼密碼
- 5. 建立使用者、授權以及修改密碼等許可權操作密碼
- MongoDB使用者許可權管理,設定密碼並連線MongoDB密碼
- 1.7.8. 刪除資料庫密碼檔案資料庫密碼
- rac中的密碼檔案密碼
- 客戶端使用sysdba許可權登入資料庫客戶端資料庫
- SQLPlus無法登入資料庫提示密碼不對或許可權不足SQL資料庫密碼
- oracle 資料庫密碼中包括@Oracle資料庫密碼
- oracle 關於--密碼檔案Oracle密碼
- 關於oracle 密碼檔案Oracle密碼
- 透過shell得到資料庫中許可權的指令碼資料庫指令碼
- 通過shell得到資料庫中許可權的指令碼資料庫指令碼
- 1.7.3. 禁用和共享資料庫密碼檔案資料庫密碼
- 1.7.2. 使用ORAPWD建立資料庫密碼檔案資料庫密碼
- 如何在Oracle VM下更改root許可權密碼Oracle密碼
- dede 忘記密碼在資料庫中修改方法密碼資料庫
- discuz資料庫遷移,改密碼後,相關配置檔案修改資料庫密碼
- Oracle資料庫密碼檔案的使用和維護(轉)Oracle資料庫密碼
- 1.7. 建立和維護資料庫密碼檔案資料庫密碼
- 巧用DSRM密碼同步將域控許可權持久化密碼持久化
- 提取使用者許可權或是不同資料庫使用者許可權的同步資料庫
- expdp/impdp使用sysdba許可權遷移資料
- 許可權管理中角色間的繼承關係有沒有必要?繼承
- 批量修改資料夾及檔案使用者許可權和使用者組許可權 centosCentOS
- 擁有GRANT ANY OBJECT PRIVILEGE許可權時的許可權回收Object
- 關於訪問資料庫的使用者名稱和密碼資料庫密碼
- RAC環境中的密碼檔案密碼
- 關於SQL Server資料庫中的使用者許可權和角色管理SQLServer資料庫
- 自動輸入密碼使用root許可權開啟shell指令碼密碼指令碼
- 修改檔案、資料夾許可權
- 為什麼空密碼能夠取得你的ROOT許可權?密碼
- Oracle 密碼檔案Oracle密碼
- 查詢沒有許可權但資料字典中顯示有許可權
- 1.7.5. 將使用者新增到密碼檔案中密碼
- 新建資料庫使用者,授權以及設定密碼有效期資料庫密碼