日期:2014-05-16  浏览次数:20440 次

oracle知识
spfile排错小tip
有时候我们会不小心修改了spfile的某些参些参数导致数据库不能启动,这时候改怎么让数据库重新跑起来呢,oracle针对spfile还是提供了几种方法来修复的。

1.创建pfile

SQL> alter system set processes=10000 scope=spfile;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,9960000)
SQL> create pfile from spfile;
File created.
SQL> host notepad D:/oracle/ora92/database/INITtest.ORA

修改processes=150

SQL> startup pfile=D:/oracle/ora92/database/INITtest.ORA
ORACLE instance started.
Total System Global Area  101785428 bytes
Fixed Size                   454484 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.


2.创建pfile,再从pfile创建spfile

SQL> alter system set processes=10000 scope=spfile;
System altered.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORA-00064: object is too large to allocate on this O/S (1,9960000)
SQL> create pfile from spfile;
File created.
SQL> host notepad D:/oracle/ora92/database/INITtest.ORA

修改processes=150

SQL> create spfile from pfile;
File created.
SQL> startup
ORACLE instance started.
Total System Global Area  101785428 bytes
Fixed Size                   454484 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
SQL>


3.修改pfile,覆盖参数

修改pfile

spfile=D:/oracle/ora92/database/SPFILETEST.ORA
processes=150

SQL> startup pfile=D:/oracle/ora92/database/INITtest.ORA
ORACLE instance started.
Total System Global Area  101785428 bytes
Fixed Size                   454484 bytes
Variable Size              75497472 bytes
Database Buffers           25165824 bytes
Redo Buffers                 667648 bytes
Database mounted.
Database opened.
oracle排序系列二
上一期讲了oracle在什么情况下需要排序,这次我们把注意力集中到与排序相关的几个内存组件

PGA:
The Process Global Area,它是属于私有内存段,段内的内容只对本进程可见,这不同于sga的共享内存段。
pga的内存结构不需要latch来保护,因为不会有其他进程同时访问。PGA包括两个部分,fixed pga,variable pga。
fixed pga保存一些数据结构和指向variable pga的指针。PGA也是通过freelist和bucket来分配和管理。

UGA:
User Global Area,它包含以下一些信息
The persistent and runtime areas for open cursors
State information for packages, in particular package variables
Java session state
The roles that are enabled
Any trace events that are enabled
The NLS parameters that are in effect
Any database links that are open
The session's mandatory access control (MAC) label for Trusted Oracle

和PGA一样,它也分为fixed,varia