【方法】Oracle用户密码含特殊字符时的登陆问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了【方法】Oracle用户密码含特殊字符时的登陆问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含7921字,纯文字阅读大概需要12分钟。
内容图文
![【方法】Oracle用户密码含特殊字符时的登陆问题](/upload/InfoBanner/zyjiaocheng/477/c474b2053083499289725c0907094c3a.jpg)
1.1 BLOG文档结构图
1.2.2 相关文章链接
【密码】Oracle用户密码系列:http://blog.itpub.net/26736162/viewspace-2129595/
-------------------------------------------------------------------------
第二章 实验部分
2.1 实验环境介绍
项目 | source db |
db 类型 | RAC |
db version | 11.2.0.3.0 |
db 存储 | ASM |
OS版本及kernel版本 | RHEL 6.5 |
2.2 实验目标
当用户密码含有特殊字符的时候,测试sqlplus和exp、imp及expdp、impdp的登陆及修改密码问题。
2.3 实验过程
2.3.1 sqlplus连接
普通用户连接:
[oracle@orcltest admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 24 09:25:35 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SYS@lhrdb> alter user lhr identified by "l@hr";
User altered.
SYS@lhrdb> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@orcltest ~]$ sqlplus ‘lhr/"l@hr"‘@LHRDB
SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 24 09:27:05 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
LHR@LHRDB> EXIT Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@orcltest ~]$
|
sys用户连接:
[oracle@orcltest admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 24 09:29:09 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SYS@lhrdb> alter user sys identified by "l@hr";
User altered.
SYS@lhrdb> exit [oracle@orcltest ~]$ sqlplus ‘sys/"l@hr"‘@LHRDB as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Fri Feb 24 09:29:35 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SYS@LHRDB> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@orcltest ~]$
|
2.3.2 expdp连接
密码用双引号,用户名和密码用单引号括起来,然后【用户名】+【密码】+【tn】+【as sysdba】用单引号括起来,最后的这个单引号用\进行转义
expdp \‘‘sys/"l@hr"‘@LHRDB as sysdba\‘ DIRECTORY=DATA_PUMP_DIR DUMPFILE=SCOTT%U.dmp SCHEMAS=SCOTT COMPRESSION=all metrics=y |
[oracle@orcltest admin]$ expdp \‘‘sys/"l@hr"‘@LHRDB as sysdba\‘ DIRECTORY=DATA_PUMP_DIR DUMPFILE=SCOTT%U.dmp SCHEMAS=SCOTT COMPRESSION=all metrics=y
Export: Release 11.2.0.3.0 - Production on Fri Feb 24 09:32:22 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options FLASHBACK automatically enabled to preserve database integrity. Starting "SYS"."SYS_EXPORT_SCHEMA_01": "sys/********@LHRDB AS SYSDBA" DIRECTORY=DATA_PUMP_DIR DUMPFIL Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Completed 4 TABLE_STATISTICS objects in 14 seconds . . exported "SCOTT"."DEPT" 4.976 KB 4 rows . . exported "SCOTT"."EMP" 5.617 KB 14 rows . . exported "SCOTT"."SALGRADE" 4.890 KB 5 rows . . exported "SCOTT"."BONUS" 0 KB 0 rows Master table "SYS"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for SYS.SYS_EXPORT_SCHEMA_01 is: /u02/app/oracle/admin/lhrdb/dpdump/SCOTT01.dmp Job "SYS"."SYS_EXPORT_SCHEMA_01" successfully completed at 09:33:19
|
2.3.3 修改密码中含有“@”符号
[oracle@orcltest ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 16 17:10:26 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SYS@lhrdb> alter user scott identified by "tiger&123"; Enter value for 123: old 1: alter user scott identified by "tiger&123" new 1: alter user scott identified by "tiger"
User altered.
SYS@lhrdb> SYS@lhrdb> set define off SYS@lhrdb> alter user scott identified by "tiger&123";
User altered.
SYS@lhrdb> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@orcltest ~]$ sqlplus ‘scott/"tiger&123"‘@LHRDB
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 16 17:14:00 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SCOTT@LHRDB> SCOTT@LHRDB> set define off SCOTT@LHRDB> alter user scott identified by "$tiger&123l@h\r/0%s,d$";
User altered.
SCOTT@LHRDB> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracle@orcltest ~]$ sqlplus ‘scott/"$tiger&123l@h\r/0%s,d$"‘@LHRDB
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 16 17:20:12 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SCOTT@LHRDB>
|
2.3.4 修改密码中含有双引号符号
修改scott用户的密码为:a"b
[oracle@orcltest ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 16 17:39:18 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SYS@lhrdb> password scott Changing password for scott New password: Retype new password: Password changed SYS@lhrdb> conn scott/a"b Connected. SCOTT@lhrdb> [oracle@orcltest ~]$ sqlplus scott/a\"b
SQL*Plus: Release 11.2.0.3.0 Production on Thu Mar 16 17:42:34 2017
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, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SCOTT@lhrdb>
|
注:因为一般特殊字符可以使用双引号处理,但是如果密码中含有双引号,就 本文系统来源:http://lhrbest.blog.51cto.com/2318295/1907373
内容总结
以上是互联网集市为您收集整理的【方法】Oracle用户密码含特殊字符时的登陆问题全部内容,希望文章能够帮你解决【方法】Oracle用户密码含特殊字符时的登陆问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。