Friday, March 15, 2013

Recreate Lost Pfile With Simple Command

If you  lost all my files under $ORACLE_HOME/dbs but database is still up and running, check the below :[oracle@192 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Fri Mar 15 14:49:58 2013

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> spool newfile.ora
SQL>     select name||'='||value from v$parameter where isdefault = 'FALSE';

NAME||'='||VALUE
--------------------------------------------------------------------------------
processes=150
sga_target=285212672
control_files=/u01/app/oracle/oradata/orcl/control01.ctl, /u01/app/oracle/oradat
a/orcl/control02.ctl, /u01/app/oracle/oradata/orcl/control03.ctl

db_block_size=8192
compatible=10.2.0.1.0
db_file_multiblock_read_count=16
db_recovery_file_dest=/u01/app/oracle/flash_recovery_area
db_recovery_file_dest_size=2147483648
undo_management=AUTO

NAME||'='||VALUE
--------------------------------------------------------------------------------
undo_tablespace=UNDOTBS2
remote_login_passwordfile=EXCLUSIVE
db_domain=
dispatchers=(PROTOCOL=TCP) (SERVICE=orclXDB)
job_queue_processes=10
background_dump_dest=/u01/app/oracle/admin/orcl/bdump
user_dump_dest=/u01/app/oracle/admin/orcl/udump
core_dump_dest=/u01/app/oracle/admin/orcl/cdump
audit_file_dest=/u01/app/oracle/admin/orcl/adump
audit_trail=TRUE
db_name=orcl

NAME||'='||VALUE
--------------------------------------------------------------------------------
open_cursors=300
os_authent_prefix=
pga_aggregate_target=94371840

23 rows selected.

SQL> spool off ;

Just edit the new file and startup.

Thank you
Osama Mustafa

1 comment: