zoukankan      html  css  js  c++  java
  • Oracle11gR2--SEC_CASE_SENSITIVE_LOGON参数解析

    在Oracle的11g之前的版本中密码是不区分大小写的(使用双引号强制除外)。

    在Oracle的11g以及以后的版本中对此有所增强。从此密码有了大小写的区分。

    这个大小写敏感特性是通过SEC_CASE_SENSITIVE_LOGON参数来控制的。

    1.Oracle 11gR2官方文档解释:

    http://download.oracle.com/docs/cd/E11882_01/server.112/e10820/initparams218.htm#REFRN10299

    SEC_CASE_SENSITIVE_LOGON
    Property	Description
    Parameter type	Boolean
    Default value	true
    Modifiable	ALTER SYSTEM
    Range of values	true | false
    Basic	No
    
    SEC_CASE_SENSITIVE_LOGON enables or disables password case sensitivity in the database.
    Values:
    true
    Database logon passwords are case sensitive.
    false
    Database logon passwords are not case sensitive.
    

    2.测试一下

    [oracle@localhost ~]$ sqlplus / as sysdba
    
    SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 12 16:14:53 2018
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    #创建用n1 密码 ni
    SQL> create use n1  identified by n1;
    SQL> grant connect,resource to n1;
    
    #查看sec_case_sensitive_logon 参数设置 默认是 TRUE 即开启登陆大小写敏感!
    SQL> show parameter sec
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    db_securefile                        string      PERMITTED
    optimizer_secure_view_merging        boolean     TRUE
    sec_case_sensitive_logon             boolean     TRUE
    sec_max_failed_login_attempts        integer     10
    sec_protocol_error_further_action    string      CONTINUE
    sec_protocol_error_trace_action      string      TRACE
    sec_return_server_release_banner     boolean     FALSE
    sql92_security                       boolean     FALSE
    
    #使用大写的密码登陆 登陆失败
    SQL> conn  n1/N1
    ERROR:
    ORA-01017: invalid username/password; logon denied
    
    
    Warning: You are no longer connected to ORACLE.
    SQL> conn / as sysdba
    Connected.
    
    
    #动态修改系统参数 为 false 不验证大小写
    SQL> alter system set sec_case_sensitive_logon = false;
    
    System altered.
    
    #再次使用大写密码登陆 成功
    SQL> conn n1/N1
    Connected.
    

    3.延伸测试(sec_case_sensitive_logon 参数只是控制登陆时是否校验大小写,密码还是会进按照世纪的大小写进行存储的!)

    SQL> show  parameter sec_case_sensitive_logon
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    sec_case_sensitive_logon             boolean     FALSE
    
    
    #创建用户 密码包含大小写
    SQL> create user test11 identified by testAbcD ;
    
    User created.
    
    SQL> grant  connect to test11;
    
    Grant succeeded.
    
    
    #测试链接 大小写不敏感
    SQL> conn  test11/testabcd
    Connected.
    SQL> conn  / as sysdba
    Connected.
    
    #修改为大小写敏感
    SQL> alter system set sec_case_sensitive_logon = true;
    
    System altered.
    
    #用错误的密码无法登陆
    SQL> conn  test11/testabcd
    ERROR:
    ORA-01017: invalid username/password; logon denied
    
    
    Warning: You are no longer connected to ORACLE.
    
    #包含大小写的密码,登陆成功!
    SQL> conn test11/testAbcD
    Connected.
    SQL>
  • 相关阅读:
    微信第三方登录,ios第三方登录(没有进行二次封装,直接调用)
    How Do I Declare A Block in Objective-C?
    Android与JS混编(js调用java)
    React-Native做一个文本输入框组件
    如何在程序退出的时候清除activity栈
    React react-ui-tree的使用
    React-Native OpenGL体验二
    React-Native OpenGL体验一
    react-native使用react-art制作SVG动画
    Android画一个随意拖动的圆形
  • 原文地址:https://www.cnblogs.com/chinesern/p/8445064.html
Copyright © 2011-2022 走看看