여러 script - dd.sql, log.sql, ud.sql, df.sql, tt.sql
개발 및 관리/Oracle 9i, 10g, 11g, 12c, 19c 2013. 1. 4. 18:01
1. dd.sql
@dd
dd.sql
alter tablespace system begin backup;
!cp /u01/app/oracle/oradata/orcl/system01.dbf /data/backup/open
alter tablespace system end backup;
alter tablespace undotbs1 begin backup;
!cp /u01/app/oracle/oradata/orcl/undotbs01.dbf /data/backup/open
alter tablespace undotbs1 end backup;
alter tablespace sysaux begin backup;
!cp /u01/app/oracle/oradata/orcl/sysaux01.dbf /data/backup/open
alter tablespace sysaux end backup;
alter tablespace users begin backup;
!cp /u01/app/oracle/oradata/orcl/users01.dbf /data/backup/open
alter tablespace users end backup;
alter tablespace example begin backup;
!cp /u01/app/oracle/oradata/orcl/example01.dbf /data/backup/open
alter tablespace example end backup;
2. log.sql
@log
log.sql
set line 200
col group# for 999
col member for a50
col mb for 999
col sequence# for 999
col status for a8
select a.group#, a.member, b.bytes/1024/1024 MB, b.archived,
b.sequence#, b.status
from v$logfile a, v$log b
where a.group#=b.group#
order by 1,2
/
3. ud.sql
@ud
ud.sql
set line 200
select s.sid, s.serial#, s.username, r.name "ROLLBACK SEG"
from v$session s, v$transaction t, v$rollname r
where s.taddr=t.addr
and t.xidusn=r.usn
/
4. df.sql
@df
df.sql
set line 200
col ts_name for a10
col file_name for a50
select a.name "TS_NAME", b.name "FILE_NAME", b.bytes/1024/1024 MB, b.status
from v$tablespace a, v$datafile b
where a.ts#=b.ts#
/
5. tt.sql
@tt
tt.sql
select to_char(sysdate, 'YYYY-MM-DD:HH24:MI:SS') from dual;
'개발 및 관리 > Oracle 9i, 10g, 11g, 12c, 19c' 카테고리의 다른 글
Control File을 재생성하는 경우 (0) | 2013.01.09 |
---|---|
Oracle Database Documentation LiIbrary (0) | 2013.01.09 |
recover database until time VS recover database until time using backup controlfile; (0) | 2013.01.04 |
리눅스 한글깨짐 - 오라클 설치 시에 bash_profile을 한글로 설정하고 설치해서 발생 (0) | 2013.01.04 |
닫힌 백업(cold backup) 수행하기, 열린 백업(hot backup) 수행하기 (0) | 2012.12.30 |