dba:collect_dbinfo
Datenbank Informationen einsammlen
OS: Linux
DB: Oracle 8i-11g
- dbinfo.sql
CREATE pfile='/export/home/oracle/backup/ini_${ORACLE_SID}_${tag}.ora' FROM spfile; ALTER DATABASE backup controlfile TO trace AS '/export/home/oracle/backup/contolfile_${ORACLE_SID}_trace_${tag}.trc'; spool /export/home/oracle/backup/dbinfo_${ORACLE_SID}_${tag}.txt SET pagesize 200 column name format a60 column parameter format a40 column VALUE format a30 column property_value format a30 column property_name format a30 column tablespace_name format a20 column FLASHBACK_ON format a40 column LOG_MODE format a20 ---------------- version -------------------- ttitle "#########################version#########################" skip 2 SELECT * FROM v$version; SELECT * FROM v$option; SELECT ---------------- patchlevel -------------------- ttitle "#########################patchlevel#########################" skip 2 SELECT * FROM sys.registry$history; ---------------- properties -------------------- ttitle "#########################properties#########################" skip 2 SELECT property_name,property_value FROM database_properties; ---------------- charset ------------------- ttitle "#########################charset#########################" skip 2 SELECT * FROM nls_database_parameters; -------------- dbid ------------------------ ttitle "#########################dbid#########################" skip 2 SELECT name,dbid FROM v$database; -------------- datastructur --------------- ttitle "#########################datastructur#########################" skip 2 SELECT name AS datafile_name FROM v$datafile; SELECT name AS tempfile_name FROM v$tempfile; SELECT member AS logfile_name FROM v$logfile; SELECT tablespace_name,block_size FROM dba_tablespaces ORDER BY tablespace_name; ------ archive ----------------------------- ttitle "#########################archive and flashback#########################" skip 2 archive LOG list SELECT FLASHBACK_ON,LOG_MODE FROM v$database; spool off EXIT;
dba/collect_dbinfo.txt · Zuletzt geändert: 2010/09/24 17:18 von gpipperr