Loading

Oracle有关登录的小问题

一:密码特殊字符无法登录

[oracle@oracle11g ~]$ sqlplus dbmon/"S0!hL9.n7C@3"
-bash: !hL9.n7C@3": event not found

解决办法:

[oracle@oracle11g ~]$ sqlplus 'dbmon/"S0!hL9.n7C@3"'

SQL*Plus: Release 11.2.0.4.0 Production on Sat Nov 20 17:36:10 2021

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

SQL>

 

二:操作系统安装中文,sqlplus登录数据库出现乱码

[oracle@xxxxx ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Nov 20 17:38:07 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.


???:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>

 

解决办法:操作系统设置nls_lang,这里需要注意的是,nls_lang设置任何的字符集都可以避免乱码的出现,演示如下

[oracle@xxxx ~]$ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
[oracle@xxxx ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Nov 20 17:39:34 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>

 

[oracle@xxxx ~]$ export NLS_LANG="SIMPLIFIED CHINESE"_CHINA.AL32UTF8
[oracle@xxxx ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on 星期六 11月 20 17:41:29 2021

Copyright (c) 1982, 2016, Oracle. All rights reserved.


连接到:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>

 

posted @ 2021-11-20 17:41  李行行  阅读(69)  评论(0编辑  收藏  举报