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>

转载于:https://www.cnblogs.com/chinesern/p/8445064.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值