方法Oracle用户密码含特殊字符时的登陆问题
Posted ^_^小麦苗^_^
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了方法Oracle用户密码含特殊字符时的登陆问题相关的知识,希望对你有一定的参考价值。
【方法】Oracle用户密码含特殊字符时的登陆问题
1.1 BLOG文档结构图
1.2 前言部分
1.2.1 导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① 用户密码含有特殊字符,如@、%、&、¥、#等字符,如何修改密码及登录数据库(重点)
② exp或expdp的时候使用sys用户导出
Tips:
① 本文在itpub(http://blog.itpub.net/26736162)、博客园(http://www.cnblogs.com/lhrbest)和微信公众号(xiaomaimiaolhr)上有同步更新。
② 文章中用到的所有代码、相关软件、相关资料及本文的pdf版本都请前往小麦苗的云盘下载,小麦苗的云盘地址见:http://blog.itpub.net/26736162/viewspace-1624453/。
③ 若网页文章代码格式有错乱,请下载pdf格式的文档来阅读。
④ 在本篇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 |
sqlplus连接oracle数据库--密码含特殊字符 ORACLE 用户的 密码 支持哪些特殊字符,不支持哪些字符? |