在设置Oracle密码时,我们经常会将密码设置的特别复杂(一般由字母、数字和特殊符号组成),值得注意的是,在有特殊符号时,修改密码或着导入导出数据时会遇到很多不必要的麻烦,本文中将会对此情况进行详细的解释和说明:
注:本文中,将以特殊符号“/”为例。
Linux环境下,使用Oracle数据库10g
修改密码
[oracle@olivenan oracle]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Wed May 17 14:33:32 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> alter user test identified by aa/aa;
alter user test identified by aa/aa
*
ERROR at line 1:
ORA-00922: missing or invalid option
在此使用""
SQL> alter user test identified by "aa/aa";
User altered.
SQL>
[oracle@olivenan oracle]$ exp test/aa/aa file=test.dmp buffer=65536
Export: Release 10.2.0.1.0 - Production on Wed May 17 14:32:10 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
EXP-00004: invalid username or password
Username:
此处应该进行转义使用 " "处理密码,使用 ' '处理用户名和密码
[oracle@olivenan oracle]$ exp 'test/"aa/aa"' file=test.dmp buffer=65536
Export: Release 10.2.0.1.0 - Production on Wed May 17 14:32:52 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
About to export specified users ...
. exporting pre-schema procedural objects and actions
...............
导出成功。
Windows Xp下,数据库为Oracle9i
C:\Documents and Settings\w>sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on Wed May 17 14:56:34 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect sys/olivenan as sysdba
Connected.
SQL> alter user test identified by aa/aa;
alter user test identified by aa/aa
*
ERROR at line 1:
ORA-00922: missing or invalid option
此处使用""
SQL> alter user test identified by "aa/aa";
User altered.
SQL>
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\w>exp test/aa/aa file=aa.dmp buffer=65536
Export: Release 9.2.0.1.0 - Production on Wed May 17 14:58:50 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
EXP-00004: invalid username or password
Username:
Password:
EXP-00056: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon denied
Username: ^Z^Z
EXP-00030: Unexpected End-Of-File encountered while reading input
EXP-00000: Export terminated unsuccessfully
在此处将使用""" """来处理用户密码
C:\Documents and Settings\w>exp test/"""aa/aa""" file=aa.dmp buffer=65536
Export: Release 9.2.0.1.0 - Production on Wed May 17 14:59:10 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
server uses ZHS16GBK character set (possible charset conversion)
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user test
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user test
About to export test's objects ...
. exporting database links
. exporting sequence numbers
........
至此,导出成功
分享到:
相关推荐
BLOG_Oracle_lhr_Oracle用户密码含特殊字符时的登陆问题BLOG_Oracle_lhr_Oracle用户密码含特殊字符时的登陆问题
在客户端上使用sqlplus用普通用户可以登录,但是system以及sys用户均无法登录,提示ORA-12154: TNS: 无法解析指定的连接标识符,本文将提供详细的解决方法,需要了解的朋友可以参考下
oracle,按特定字符,截取字符串,直接出结果 oracle,按特定字符,截取字符串,直接出结果oracle,按特定字符,截取字符串,直接出结果
当Oracle数据库用户的密码含特殊字符如 @ 时,默认会将@后的字符解析为网络服务名而导致登陆失
Oracle JSON 字符串处理实例
Oracle 修改字符集Oracle 修改字符集Oracle 修改字符集
Oracle_Sql_中常用字符串处理函数
在实际工作中经常遇到截取两个相同字符串之间的字符的oracle问题,以下是相关语句
Oracle字符串处理函数: 1.ASCII;2.CHR;3.CONCAT;4.INITCAP;5.INSTR(C1,C2,I,J);6.LENGTH;7.LOWER; 8.UPPER;9.RPAD和LPAD(粘贴字符);10.LTRIM和RTRIM......
Oracle拆分字符串,字符串分割的函数,将返回一个表格,如果有需要的可以下载去看看。
oracle 字符集修改命令oracle 字符集修改命令oracle 字符集修改命令oracle 字符集修改命令
oracle通过sql实现字符串转数字oracle函数,可用于字符串的最终排序
Oracle常用字符串处理函数: 函数格式: LTRIM(string,[,'set']); RTRIM(string,[,'set']); 、string是数据库中类型为CHAR或VARCHAR2的列名(或常量串); 、set是要截断的字符,set必须用单引号括起,方括号表示set...
Oracle字符相似度函数。在sql语句中直接用该函数来计算2个字符串相似度。
Oracle常用的字符和字符串处理函数[整理].pdf
oracle11g 修改字符集 修改为ZHS16GBK 有时候因为数据库的字符集的问题,导致dmp文件不能正常导入到其他数据库。可以用下面的方法将数据库的字符集修改一下
select f_find('Ap@2233ll@@l@@','@') from dual 返回结果为5,代表‘@’在该字符串中出现5次。 同理 select f_find('Ap@223SWEQQQ3ll@@l@@','Q') from dual---返回3,代表Q在字符串中出现了3次, select f_find('我...
oracle字符集的查看,oracle客户端字符集的修改