Monday, February 9, 2009

Spfile & pfile lost : How to recreate this

1) show spfile will give if you started with a spfile or a init.ora file. You can't know which init.ora was used.

2) Here's a script:

Set linesize 1000
Set feedback off
Set pagesize 0
Col instance_name noprint new_value inst_
Set termout off
Select instance_name from v$instance;
Set termout on
Spool init&inst_..ora
select '
'||'######################################################################
'||'#
'||'# file : init&inst_..ora
'||'# date : '||to_char(sysdate,'DD/MM/YYYY HH24:MI:SS')||'
'||'#
'||'######################################################################
'||'
' from dual
/
Select '# '||name||': '||description||'
'||decode(update_comment,NULL,'','# '||update_comment||'
')||name||' = '||decode(sign(instr(value,' ')),
1,'("'||replace(value,', ','", "')||'")',
value)||'
'||'
'
from v$system_parameter
where isdefault = 'FALSE'
order by name
/
Spool off

Wednesday, February 4, 2009

Audit Trail

Auidt trail details from drop any table .
and
Audit table;
http://www.dbasupport.com/forums/showthread.php?t=20054