07年3月25日廣州DBA課程筆記

bomei發表於2007-04-05

cat /etc/oratab
ps -ef|grep ora
grep ORA- alert_ds1.log|tail -10
mv alert_ds1.log alert_ds1.log.0325


show parameter background

select * from dba_tables;

select * from dba_objects where owner='SCOTT';

select * from dba_indexes where owner='SCOTT';

select * from user_tables;

select TABLE_NAME from dict where table_name like 'USER%';

select TABLE_NAME from dict where table_name like '%TABLE%';

select * from v$fixed_table;

select * from v$sga;
select * from v$pgastat;

select machine,program from v$session;

select * from v$process;

select paddr,machine,username,program from v$session where username='SCOTT';
select * from v$sgastat;

select spid from v$process where addr='...'

select * from v$version;

select * from v$option;

select * from v$parameter;

select * from v$database;

select * from v$controlfile;

select * from v$datafile;

select * from v$tempfile;

select * from v$log;

select * from v$logfile;
show parameter control_files

select * from v$controlfile;

alter system set control_files=
'D:ORACLEPRODUCT10.2.0ORADATAORACLECONTROL01.CTL',
'D:ORACLEPRODUCT10.2.0ORADATAORACLECONTROL02.CTL'
scope=spfile;

select * from v$log;

alter system switch logfile;

select * from v$log_history;

alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

alter system checkpoint;

ALTER DATABASE ADD LOGFILE GROUP 4 ( 'D:ORACLEPRODUCT10.2.0ORADATAORACLEredo4.log', 'D:ORACLEPRODUCT10.2.0ORADATAORACLEredo14.log') SIZE 51200K;

ALTER DATABASE DROP LOGFILE GROUP 3;

ALTER DATABASE ADD LOGFILE MEMBER 'D:ORACLEPRODUCT10.2.0ORADATAORACLEREDO11.LOG' TO GROUP 1;

SHUTDOWN ABORT

STARTUP MOUNT

SELECT MEMBER FROM V$LOGFILE;

ALTER DATABASE RENAME FILE 'D:ORACLEPRODUCT10.2.0ORADATAORACLEREDO4.LOG'
TO 'D:ORACLEPRODUCT10.2.0ORADATAORACLEREDO04.LOG';

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7272495/viewspace-908800/,如需轉載,請註明出處,否則將追究法律責任。

相關文章