您的位置:首页 > 其它

Pfile与Spfile文件相互之间的转化方法

2012-02-07 14:30 288 查看
C:\>sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on 星期二 2月 7 10:35:47 2012

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

连接到:

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

已连接。

SQL> show parameter processes;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 0

job_queue_processes integer 10

log_archive_max_processes integer 2

processes integer 150

SQL> alter system set processes=2000 scope=spfile;


系统已更改。

scope三个选项解释:

scope=memory,表示修改立即生效,持续到数据库关闭为止,若数据库使用pfile启动,这是唯一可选值,也是默认值。

scope=spfile ,会修改spfile参数,新设置只有在重新使用spfile启动数据库的时候生效。

另外,若是修改静态参数(不能直接生效的参数),必须指定scope=spfile,否则若指定memory或者both会报如下错误:

ORA-02095: specified initialization parameter cannot be modified

因为静态参数不能直接通过修改内存而生效,只能通过修改spfile然后重启数据库生效。

scope=both,表示修改会发生在内存上立即生效,并修改spfile保证数据库重启后也生效。

SQL> show parameter processes;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 0

job_queue_processes integer 10

log_archive_max_processes integer 2

processes integer 2000

SQL> shutdown immediate

数据库已经关闭。

已经卸载数据库。

ORACLE 例程已经关闭。

SQL> startup

ORA-00064: object is too large to allocate on this O/S (1,4004280)


将spfile文件转化为pfile

SQL>create pfile='c:\initorcl.ora' from spfile='D:\oracle\product\10.2.0\db_1\dbs\SPFILEORCL.ORA';

文件已创建。

c:\initorcl.ora文件内容:

orcl.__db_cache_size=377487360

orcl.__java_pool_size=4194304

orcl.__large_pool_size=4194304

orcl.__shared_pool_size=222298112

orcl.__streams_pool_size=0

*.audit_file_dest='D:\oracle\product\10.2.0/admin/orcl/adump'

*.background_dump_dest='D:\oracle\product\10.2.0/admin/orcl/bdump'

*.compatible='10.2.0.1.0'

*.control_files='D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL01.CTL','D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL02.CTL','D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\CONTROL03.CTL'

*.core_dump_dest='D:\oracle\product\10.2.0/admin/orcl/cdump'

*.db_block_size=8192

*.db_create_online_log_dest_1='d:\'

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='orcl'

*.db_recovery_file_dest='D:\oracle\product\10.2.0/flash_recovery_area'

*.db_recovery_file_dest_size=4294967296

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'

*.job_queue_processes=10

*.open_cursors=300

*.pga_aggregate_target=203423744

*.processes=2000

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=612368384

*.undo_management='AUTO'

*.undo_tablespace='JINLIAN_UNDO'

*.user_dump_dest='D:\oracle\product\10.2.0/admin/orcl/udump'

将processes=2000,修改为1500后保存。

将pfile文件转化为spfile

SQL> create spfile='D:\oracle\product\10.2.0\db_1\dbs\SPFILEORCL.ORA' from pfile='c:\initorcl.ora';

文件已创建。

SQL> startup

ORACLE 例程已经启动。

Total System Global Area 612368384 bytes

Fixed Size 1250452 bytes

Variable Size 230689644 bytes

Database Buffers 377487360 bytes

Redo Buffers 2940928 bytes

数据库装载完毕。

数据库已经打开。

SQL> show parameter processes;

NAME TYPE VALUE

------------------------------------ ----------- --------

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 0

job_queue_processes integer 10

log_archive_max_processes integer 2

processes integer 1500
本文出自 “oraclewhboy” 博客,请务必保留此出处http://sqlnet.blog.51cto.com/343343/774033
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: