Bajwa Consulting Need senior Oracle DBA help? Performance tuning, Cloud migrations, GoldenGate, backup and DR. Plus 70+ free DBA scripts.
Visit bajwaconsulting.com →

Friday, April 25, 2014

How to write the database id to its alert.log


In order to periodically write the DBID to its alert log please schedule this code.

(You might need DBID for restore/recovery purposes.)
declare
  l_dbid number;
begin
   select dbid into l_dbid from v$database;
   dbms_system.ksdwrt(2,' DBID='||l_dbid);
end;
/

No comments:

Post a Comment