日期:2014-05-17  浏览次数:20834 次

sqlplus命令行模式因密码带有@无法运行,怎么修改
原来脚本运行很好,但是密码改成了带@的密码之后就不能运行了,怎么办?
@sqlplus username/abc@123456@TNSname
系统报不能解析

------解决方案--------------------
SQL code

C:\>SQLPLUS "/ AS SYSDBA"

SQL*Plus: Release 9.2.0.1.0 - Production on Mon Oct 6 11:15:52 2008

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

SQL> CREATE USER TTT IDENTIFIED BY "TT@TT";

User created.

SQL> GRANT CONNECT,PUBLIC TO TTT;

Grant succeeded.

SQL> CONNECT TTT/"TT@TT"@ORCL
Connected.

------解决方案--------------------
使用密码的时候用引号""引用起来就可以了
------解决方案--------------------
只需要把密码的那部分括起来,即可。
在密码或用户名的连接串里带有自己的"@"字符,实在是有些讨苦头吃。