惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

量子位
Stack Overflow Blog
Stack Overflow Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Vercel News
Vercel News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Y
Y Combinator Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
博客园 - 司徒正美
B
Blog RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog

博客园 - 鬼画符

如何启动绿色迷你SQL2000服务 我要翻译《Think Python》- 006 第四章 学习案例:接口设计 我要翻译《Think Python》- 005 第三章 函数 我要翻译《Think Python》- 004 第二章 变量, 表达式和语句 我要翻译《Think Python》-003 第一章 编程之道 我要翻译《Think Python》-002 贡献列表 & 目录部分 我要翻译《Think Python》 - 001 序言部分 我要翻译《Think Python》 - 开篇申明 Delphi Invalidate的用法 英语邮件怎么写 读书笔记《小狗钱钱》 Words to Live by 生气的时候不要做任何决定 好的技术不一定能给你带来财富,但是好的工具一定可以让你创造财富 Enterprise Library 学习笔记-01 声明:我还活着 如何获得别人的尊重-人格塑造 企业ERP自定义报表辅助系统 V1.0.0.9 自定义报表工具下载 For Oracle9i
ORA-12514 解决方法
鬼画符 · 2018-09-29 · via 博客园 - 鬼画符

场景:修改oracle系统参数之后,数据库重启,客户端报 ORA-12514 错误,其实这只是表象,实际并非Listener的问题。

SELECT * FROM V$RESOURCE_LIMIT

根据服务器内存的实际情况,设置对应的参数

alter system set sga_max_size=8G scope=spfile;
alter system set sga_target=8G scope=spfile;
alter system set pga_aggregate_target=4G scope=spfile;
alter system set undo_retention=10080 scope=spfile;
alter system set db_files=1000 scope=spfile;
alter system set processes=2000 scope=spfile;
alter system set session_max_open_files=2000 scope=spfile;
alter system set open_cursors=2000 scope=spfile;
alter system set db_recovery_file_dest_size=100G scope=spfile;

如果修改了PGA或者SGA,则一定要有下面这两行,保证 memory_target = SGA + PGA
alter system set memory_max_target=12G scope=spfile;
alter system set memory_target=12G scope=spfile;

因为如果漏了这两个参数的设置,数据库启动会失败,并且导致客户端在连接数据库的时候报 ORA-12514,从而误引导你去检查 TNSListener 的设置,本人就深受其害!!!!!

另一个要吐槽的地方是,windows环境下的oracle服务,在系统服务里面重新启动数据库,表面上服务重启成功了,是那种很快一闪而过的启动,而且oracle.exe进程也起来了,但就是死活访问不了数据库,也看不到任何错误信息,只看到让你越查越迷惑的ORA-12514错误。


建议使用sqlplus进行数据库的重启,这样可以看到很多有价值的信息。

解决方法其实很简单:

  • 根据当前系统已经设置生效的spfile建立pfile文件

  create pfile ='d:\initora11g.ora' from spfile;

  • 修改生成的pfile中 memory_target = pga_aggregate_target + sga_max_size,然后根据修改之后的pfile生成 spfile

    create spfile from pfile = 'd:\initora11g.ora';

      startup 到此问题就解决了

查看设置之后的参数

show parameter target;

另外如果报错: ORA-00845: MEMORY_TARGET not supported on this system
则说明是内存超出服务器物理内存数量,修改之后再生成spfile即可

注:
spfile 是二进制文件,不能编辑
pfile 是文本文件,可以手动编辑
因此先生成pfile,编辑修改之后再生成系统启动时默认的spfile