oracle最简单的pfile,Oracle中的pfile和spfile

Oracle数据中spfile跟pfile各有许多不同的优缺点,pfile中的参数可以利用vi或者编辑器进行修改,但是spfile是二进制格式,修改起来就不那么容易了,那么如何修改spfile中的参数呢?下面就具体介绍一下方法讲解如何把spfile转成pfile,并修改,然后结合一个例子进行实践。

步骤:

1. create pfile from spfile.

2. update the pfile accordingly

3. shutdown the database

4. startup the database with pfile

5. create spfile from pfile and write down the spfile directory

6. shutdown the database

7. replace the pfile with the spfile directory like ‘spfile=xxxxx’

8. startup with pfile

下面是一个具体的操作步骤:

SQL> show parameter spfile;

NAME TYPE VALUE

———————————— ———– ——————————

spfile string +DG_DB/orcldb/spfileorcldb.ora

SQL> show parameter process

NAME TYPE VALUE

———————————— ———– ——————————

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 2

global_txn_processes integer 1

job_queue_processes integer 1000

log_archive_max_processes integer 4

processes integer 150

SQL>

SQL> create pfile=’c:\pfile.ora’ from spfile;

File created.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup pfile=’c:\pfile.ora’

ORACLE instance started.

Total System Global Area 857903104 bytes

Fixed Size 1336380 bytes

Variable Size 457182148 bytes

Database Buffers 394264576 bytes

Redo Buffers 5120000 bytes

Database mounted.

Database opened.

SQL> show parameter process

NAME TYPE VALUE

———————————— ———– ——————————

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 2

global_txn_processes integer 1

job_queue_processes integer 1000

log_archive_max_processes integer 4

processes integer 500

SQL> create spfile=’+DG_DB/orcldb/spfile.ora’ from pfile=’c:\pfile.ora’;

File created.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup pfile=’c:\pfile.ora’

ORACLE instance started.

Total System Global Area 857903104 bytes

Fixed Size 1336380 bytes

Variable Size 457182148 bytes

Database Buffers 394264576 bytes

Redo Buffers 5120000 bytes

Database mounted.

Database opened.

SQL> show parameter process

NAME TYPE VALUE

———————————— ———– ——————————

aq_tm_processes integer 0

db_writer_processes integer 1

gcs_server_processes integer 2

global_txn_processes integer 1

job_queue_processes integer 1000

log_archive_max_processes integer 4

processes integer 500

SQL> show parameter spfile;

NAME TYPE VALUE

———————————— ———– ——————————

spfile string +DG_DB/orcldb/spfile.ora

SQL>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值