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[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8119050/viewspace-1007154/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8119050/viewspace-1007154/