<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
Oracle的引數sec_case_sensitive_logon是Oracle 11g開始被引入。這個引數主要是為了控制密碼的大小寫敏感問題。
sec_case_sensitive_logon=true表示密碼區分大小寫。
sec_case_sensitive_logon=false表示密碼不區分大小寫。
從Oracle 12c開始,引數sec_case_sensitive_logon被棄用了。但是為了向下相容,即使在Oracle 19c中,這個引數依然保留了。這個引數在Oracle 12c(確切的說是12.2以及後續版本)和19c中不能設定為false,因為它和SQLNET.ALLOWED_LOGON_VERSION_SERVER=12或者SQLNET.ALLOWED_LOGON_VERSION_SERVER=12a不相容。這是因為用於此模式的更安全的密碼版本僅支援區分大小寫的密碼檢查。簡單點來說,就是這種環境下,這種設定會衝突。官方檔案[1]的闡述如下所示:
Note the following implications of setting the value to 12 or 12a: • A value of FALSE for the SEC_CASE_SENSITIVE_LOGON Oracle instance initialization parameter must not be used because password case insensitivity requires the use of the 10G password version. If the SEC_CASE_SENSITIVE_LOGON Oracle instance initialization parameter is set to FALSE, then user accounts and secure roles become unusable because Exclusive Mode excludes the use of the 10G password version. The SEC_CASE_SENSITIVE_LOGON Oracle instance initialization parameter enables or disables password case sensitivity. However, since Exclusive mode is enabled by default in this release, disabling the password case sensitivity is not supported. Note: • The use of the Oracle instance initialization parameter SEC_CASE_SENSITIVE_LOGON is deprecated in favor of setting the SQLNET.ALLOWED_LOGON_VERSION_SERVER parameter to 12 to ensure that passwords are treated in a case-sensitive fashion. • Disabling password case sensitivity is not supported in Exclusive mode (when SQLNET.ALLOWED_LOGON_VERSION_SERVER is set to 12 or 12a.) • Releases of OCI clients earlier than Oracle Database 10g cannot authenticate to the Oracle database using password-based authentication. • If the client uses Oracle Database 10g, then the client will receive an ORA-03134: Connections to this server version are no longer supported error message. To allow the connection, set the SQLNET.ALLOWED_LOGON_VERSION_SERVER value to 8. Ensure the DBA_USERS.PASSWORD_VERSIONS value for the account contains the value 10G. It may be necessary to reset the password for that account.
下面我們來構造一個例子,看看這個引數sec_case_sensitive_logon的影響
SQL> select banner_full from v$version; BANNER_FULL ---------------------------------------------------------------------------------------------------- Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 1 row selected. SQL> show parameter sec_case_sensitive_logon; NAME TYPE VALUE -------------------------- ----------- ------------------------------ sec_case_sensitive_logon boolean TRUE SQL> alter user system identified by "system#1245"; User altered. SQL> SET LINESIZE 1080; SQL> SET PAGESIZE 36; SQL> COL USERNAME FOR A24; SQL> COL ACCOUNT_STATUS FOR A16; SQL> COL DEFAULT_TABLESPACE FOR A16; SQL> COL TEMPORARY_TABLESPACE FOR A10; SQL> COL PROFILE FOR A10; SQL> COL LOCK_DATE FOR A20; SQL> COL EXPIRY_DATE FOR A20; SQL> COL PASSWORD_VERSIONS FOR A12; SQL> SELECT USERNAME 2 , ACCOUNT_STATUS 3 , DEFAULT_TABLESPACE 4 , TEMPORARY_TABLESPACE 5 , PROFILE 6 , TO_CHAR(LOCK_DATE,'YYYY-MM-DD HH24:MI:SS') AS LOCK_DATE 7 , TO_CHAR(EXPIRY_DATE,'YYYY-MM-DD HH24:MI:SS') AS EXPIRY_DATE 8 , PASSWORD_VERSIONS 9 FROM DBA_USERS 10 WHERE USERNAME=UPPER('&USERNAME') 11 ORDER BY EXPIRY_DATE; Enter value for username: system old 10: WHERE USERNAME=UPPER('&USERNAME') new 10: WHERE USERNAME=UPPER('system') USERNAME ACCOUNT_STATUS DEFAULT_TABLESPA TEMPORARY_ PROFILE LOCK_DATE EXPIRY_DATE PASSWORD_VER ---------- ---------------- ---------------- ---------- ---------- --------------- -------------------- ------------ SYSTEM OPEN SYSTEM TEMP DEFAULT 2023-10-22 17:25:09 11G 12C SQL> alter system set sec_case_sensitive_logon=false scope=both; System altered. SQL>
然後我們在另外一個視窗使用system賬號登陸資料庫
$ sqlplus system/system#1245 SQL*Plus: Release 19.0.0.0.0 - Production on Tue Apr 25 17:16:28 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. ERROR: ORA-01017: invalid username/password; logon denied
如果我們將引數設定sec_case_sensitive_logon為true(這個引數調整後可以立即生效,不用重啟),
SQL> show user; USER is "SYS" SQL> alter system set sec_case_sensitive_logon=true scope=both; System altered. SQL>
然後驗證如下所示所示,一切正常,所以如果你遇到ORA-01017這個錯誤,而且資料庫版本為12c/19c,如果你確認你密碼是正確的,那麼檢查一下這個引數。
$sqlplus system/system#1245 SQL*Plus: Release 19.0.0.0.0 - Production on Tue Apr 25 17:20:28 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Tue Apr 25 2023 09:54:37 +08:00 Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL>
下面我們再來測試一下,在引數sec_case_sensitive_logon為false的情況,我們控制密碼版本來解決ORA-01017這個錯誤
SQL> show user; USER is "SYS" SQL> show parameter sec_case_sensitive_logon; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ sec_case_sensitive_logon boolean FALSE SQL>
修改sqlnet.ora這個引數檔案,設定下面引數:
SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 10 SQLNET.ALLOWED_LOGON_VERSION_SERVER = 10
修改sqlnet.ora引數檔案後,必須重新登陸SQLPlus後(如果使用之前的SQLPlus連線也不會生效),執行下面指令碼
SQL> alter user system identified by "system#1245"; User altered. SQL> SET LINESIZE 1080; SQL> SET PAGESIZE 36; SQL> COL USERNAME FOR A16; SQL> COL ACCOUNT_STATUS FOR A16; SQL> COL DEFAULT_TABLESPACE FOR A16; SQL> COL TEMPORARY_TABLESPACE FOR A10; SQL> COL PROFILE FOR A10; SQL> COL LOCK_DATE FOR A20; SQL> COL EXPIRY_DATE FOR A20; SQL> COL PASSWORD_VERSIONS FOR A12; SQL> SELECT USERNAME 2 , ACCOUNT_STATUS 3 , DEFAULT_TABLESPACE 4 , TEMPORARY_TABLESPACE 5 , PROFILE 6 , TO_CHAR(LOCK_DATE,'YYYY-MM-DD HH24:MI:SS') AS LOCK_DATE 7 , TO_CHAR(EXPIRY_DATE,'YYYY-MM-DD HH24:MI:SS') AS EXPIRY_DATE 8 , PASSWORD_VERSIONS 9 FROM DBA_USERS 10 WHERE USERNAME=UPPER('&USERNAME') 11 ORDER BY EXPIRY_DATE; Enter value for username: system old 10: WHERE USERNAME=UPPER('&USERNAME') new 10: WHERE USERNAME=UPPER('system') USERNAME ACCOUNT_STATUS DEFAULT_TABLESPA TEMPORARY_ PROFILE LOCK_DATE EXPIRY_DATE PASSWORD_VER ---------------- ---------------- ---------------- ---------- ---------- -------------------- -------------------- ------------ SYSTEM OPEN SYSTEM TEMP DEFAULT 2023-10-23 09:21:27 10G 11G 12C 1 row selected. SQL>
此時驗證system賬號登陸,則不會報ORA-01017這個錯誤了。
$ sqlplus system/system#1245 SQL*Plus: Release 19.0.0.0.0 - Production on Wed Apr 26 09:22:18 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. Last Successful login time: Tue Apr 25 2023 17:20:29 +08:00 Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Version 19.3.0.0.0 SQL>
注意:最好使用其他賬號驗證測試,這裡僅僅是為了偷懶,使用測試環境的system賬號測試驗證。更多相關資訊也可以參考The new Exclusive Mode default for password-based authentication in Oracle 12.2 conflicts with case-insensitive password configurations. All user login fails with ORA-1017 after upgrade to 12.2 (Doc ID 2075401.1)[2]
[1]
[2]
Doc ID 2075401.1: https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=249715360691380&id=2075401.1&_afrWindowMode=0&_adf.ctrl-state=1agoeyy4f0_80
到此這篇關於Oracle 19c的引數sec_case_sensitive_logon與ORA-01017錯誤的文章就介紹到這了,更多相關Oracle 19c sec_case_sensitive_logon與ORA-01017內容請搜尋it145.com以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援it145.com!
相關文章
<em>Mac</em>Book项目 2009年学校开始实施<em>Mac</em>Book项目,所有师生配备一本<em>Mac</em>Book,并同步更新了校园无线网络。学校每周进行电脑技术更新,每月发送技术支持资料,极大改变了教学及学习方式。因此2011
2021-06-01 09:32:01
综合看Anker超能充系列的性价比很高,并且与不仅和iPhone12/苹果<em>Mac</em>Book很配,而且适合多设备充电需求的日常使用或差旅场景,不管是安卓还是Switch同样也能用得上它,希望这次分享能给准备购入充电器的小伙伴们有所
2021-06-01 09:31:42
除了L4WUDU与吴亦凡已经多次共事,成为了明面上的厂牌成员,吴亦凡还曾带领20XXCLUB全队参加2020年的一场音乐节,这也是20XXCLUB首次全员合照,王嗣尧Turbo、陈彦希Regi、<em>Mac</em> Ova Seas、林渝植等人全部出场。然而让
2021-06-01 09:31:34
目前应用IPFS的机构:1 谷歌<em>浏览器</em>支持IPFS分布式协议 2 万维网 (历史档案博物馆)数据库 3 火狐<em>浏览器</em>支持 IPFS分布式协议 4 EOS 等数字货币数据存储 5 美国国会图书馆,历史资料永久保存在 IPFS 6 加
2021-06-01 09:31:24
开拓者的车机是兼容苹果和<em>安卓</em>,虽然我不怎么用,但确实兼顾了我家人的很多需求:副驾的门板还配有解锁开关,有的时候老婆开车,下车的时候偶尔会忘记解锁,我在副驾驶可以自己开门:第二排设计很好,不仅配置了一个很大的
2021-06-01 09:30:48
不仅是<em>安卓</em>手机,苹果手机的降价力度也是前所未有了,iPhone12也“跳水价”了,发布价是6799元,如今已经跌至5308元,降价幅度超过1400元,最新定价确认了。iPhone12是苹果首款5G手机,同时也是全球首款5nm芯片的智能机,它
2021-06-01 09:30:45