2014. 10. 29. 20:48
pfile을 삭제 후 원본 pfile 복사해오기  

 

login as: oracle
oracle@192.168.198.128's password:
Last login: Thu Oct 23 20:30:57 2014 from 192.168.198.1

 

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 23 21:33:23 2014

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning option

 

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

 

SQL> !

 

[oracle@localhost ~]$ cd $ORACLE_HOME/dbs

 

[oracle@localhost dbs]$ ls
hc_DBUA0.dat  hc_testdb.dat  init.ora  lkTESTDB  orapwtestdb  spfiletestdb.ora

 

[oracle@localhost dbs]$ rm -fr spfiletestdb.ora

 

[oracle@localhost dbs]$ exit
exit


SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/app/oracle/product/11g/dbs/inittestdb.ora

 

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning option

 

[oracle@localhost ~]$ ls
Desktop  afiedt.buf  disk1  disk3  disk5    test_data.sql
a.out    database    disk2  disk4  log.sql

 

[oracle@localhost ~]$ ls $ORACLE_BASE/admin/testdb/pfile
init.ora.8262014183029

 

[oracle@localhost ~]$ cd $ORACLE_HOME/dbs

 

[oracle@localhost dbs]$ cp /app/oracle/admin/testdb/pfile/init.ora.8262014183029  inittestdb.ora

 

[oracle@localhost dbs]$ ls
hc_DBUA0.dat  hc_testdb.dat  init.ora  inittestdb.ora  lkTESTDB  orapwtestdb

 

SQL> startup
ORACLE instance started.

Total System Global Area  422670336 bytes
Fixed Size                  1344616 bytes
Variable Size             260049816 bytes
Database Buffers          155189248 bytes
Redo Buffers                6086656 bytes
Database mounted.
Database opened.

 

value 의 값이 없으면 pfile

SQL> show parameter pfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string

 

SQL> show parameter spfile;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string

 

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

 

pfile만 있을 경우 pfile을 이용해서 spfile 생성하기

 

SQL> !ls $ORACLE_HOME/dbs
hc_DBUA0.dat hc_testdb.dat init.ora inittestdb.ora lkTESTDB orapwtestdb


SQL> create spfile from pfile;

File created.

 

SQL> !ls $ORACLE_HOME/dbs
hc_DBUA0.dat init.ora lkTESTDB spfiletestdb.ora
hc_testdb.dat inittestdb.ora orapwtestdb

 

SQL> !rm -fr $ORACLE_HOME/dbs/inittestdb.ora

 

SQL> !ls $ORACLE_HOME/dbs
hc_DBUA0.dat hc_testdb.dat init.ora lkTESTDB orapwtestdb spfiletestdb.ora

 

SQL> create pfile from spfile;

File created.

 

SQL> !ls $ORACLE_HOME/dbs
hc_DBUA0.dat init.ora lkTESTDB spfiletestdb.ora
hc_testdb.dat inittestdb.ora orapwtestdb


pfile과 spfile이 모두 있을 경우 spfile만 사용되므로 pfile을 사용하려면

spfile을 삭제하거나 이름을 변경해야함

 



 

 


 


 

'DB > oralce' 카테고리의 다른 글

오라클 실습시 용량부족으로 디스크 붙이는 방법  (0) 2014.10.31
backup  (0) 2014.10.30
컨트롤 파일 다중화시 ora-00205 에러  (0) 2014.10.29
oracle client 윈도우 설정  (0) 2014.10.28
dbms_job / dbms_scheduler  (0) 2014.10.27
Posted by 성장하는yw