oracle 数据库问题解决

前端之家收集整理的这篇文章主要介绍了oracle 数据库问题解决前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ORA-12519: TNS:no appropriate service handler found 解决

有时候连得上数据库,有时候又连不上.

可能是数据库上当前的连接数目已经超过了它能够处理的最大值.

select count ( * ) from v$process -- 当前的连接数
select value from v$parameter where name = ' processes ' 数据库允许的最大连接数

修改最大连接数:
alter system set processes = 300 scope = spfile;

重启数据库:
shutdown immediate;
startup;

查看当前有哪些用户正在使用数据 SELECT osuser,a.username,cpu_time / executions / 1000000 || s ' ,sql_fulltext,machine
from v$sessiona,v$sqlareab

wherea.sql_address=b.addressorderbycpu_time/executionsdesc;


plsql数据库异常---plsql 登录后,提示数据库字符集(AL32UTF8)和客户端字符集(ZHS16GBK)不一致 .

plsql 登录提示

Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different.
Character set conversion may cause unexpected results.

Note: you can set the client character set through the NLS_LANG environment variable or the NLS_LANG registry key in
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\KEY_OraClient11g_home2.


解决办法:修改注册

打开注册表,‘开始’-‘运行’ 输入‘regedit’-确定。


找到提示中给出的路径,


找到 NLS_LANG 键,他的值原来是:SIMPLIFIED CHINESE_CHINA.ZHS16GBK


修改为:SIMPLIFIED CHINESE_CHINA.AL32UTF8


重新打开plsql登录,好了。
-------------------------------------------------------------------------------------------------------------------------------------

还有一种可能是由于安装11g的时候没选择自定义安装造成的

Database character set (AL32UTF8) and Client character set (ZHS16GBK) are different.
Character set conversion may cause unexpected results.
Note: you can set the client character set through the NLS_LANG environment variable or the NLS_LANG registry key in
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/KEY_OraDb11g_home

SIMPLIFIED CHINESE_CHINA.ZHS16GBK 包含 AMERICAN_AMERICA.AL32UTF8.
这可是个麻烦事,不是改客户端字符集的问题。要改数据库的字符集: sql> conn /as sysdba sql> shutdown immediate; sql> startup mount sql> ALTER SYSTEM ENABLE RESTRICTED SESSION; sql> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0; sql> ALTER SYSTEM SET AQ_TM_PROCESSES=0; sql> alter database open; sql> ALTER DATABASE CHARACTER SET ZHS16GBK; ORA-12712: new character set must be a superset of old character set 提示我们的字符集:新字符集必须为旧字符集的超集,这时我们可以跳过超集的检查做更改: sql> ALTER DATABASE character set INTERNAL_USE ZHS16GBK; --我们看到这个过程和之前ALTER DATABASE CHARACTER SET操作的内部过程是完全相同的,也就是说INTERNAL_USE提供的帮助就是使Oracle数据库绕过了子集与超集的校验. sql> select * from v$nls_parameters; sql> shutdown immediate; sql> startup sql> select * from v$nls_parameters; 以后安装oracle11g的时候记得选择自定义安装,把这个字符集的事情事先弄好

猜你在找的Oracle相关文章