Anda di halaman 1dari 9

Monitor CPU : sar -u -P ALL 5 2

Fc l
Tukar expired

Table Space (abaikan undo)

Monitor Session

SELECT s.inst_id,
s.sid,
s.serial#,
p.spid,
s.username,
s.program
FROM
gv$session s
JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id
WHERE s.type != 'BACKGROUND';

Nak tgk database UP ker idak ps ef |grep pmon

Nak tgk service yang jalan ps ef | sort +2

Check Cluster /usr/es/sbin/cluster/utilities/clRGinfo


Sync Cluster : smitty cl_sync (pastikan logon as root)
Upkan cluster : smitty hacmp

BACKUP
Move Media
select * from media where STGPOOL_NAME='LTODB' and
STATE='MOUNTABLEINLIB'
move media * stg=<STGPOOL> days=number of days
OVFLOcation=ArchiveLoc
checkin libv lib1 volumename status=private
update vol volumename acce=readw location=CANcel PRocess--process_number
Reclaim
select volumes.volume_name as "VOLUME_NAME",
volumes.stgpool_name as "STGPOOL_NAME", volumes.pct_reclaim as
"PCT_RECLAIM" from volumes where STGPOOL_NAME = 'COPYPOOL1'
order by pct_reclaim
select volume_name, pct_reclaim, stgpool_name from volumes where
pct_reclaim>=50 order by 3,2 asc

Check database samada in backup mode atau tidak pastikan bukan dalam
backup mode.
@backup.sql
select tablespace_name from dba_data_files where file_id in (select file# from
v$backup where status='ACTIVE');
alter database end backup; disable backup mode
check backup list :
LIST BACKUP OF DATABASE;
LIST BACKUP SUMMARY;
crosscheck
CROSSCHECK
CROSSCHECK
CROSSCHECK

:
BACKUP;
COPY;
archivelog all;

BACKUP
Backup database;
BACKUP ARCHIVELOG ALL;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';

Set default backup to tape:


CONFIGURE DEFAULT DEVICE TYPE TO sbt;
run
{
allocate channel t1 type 'sbt_tape' parms
'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
delete noprompt archivelog all completed before 'sysdate-1.5';
delete noprompt expired archivelog all;
delete noprompt obsolete;
delete noprompt expired backup;
CROSSCHECK archivelog all;
CROSSCHECK BACKUP;
CROSSCHECK copy;
release channel t1;
}

MoveData : Move Data <vol>


run {
allocate channel t1 type 'sbt_tape' parms
ENV=tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt' ;
delete noprompt archivelog all completed before 'sysdate-1.5';
delete noprompt expired archivelog all;
sql 'alter system switch logfile';
CROSSCHECK archivelog all;

CROSSCHECK BACKUP;
CROSSCHECK copy;
release channel t1;
}

run {
allocate channel t1 type 'sbt_tape' parms
'ENV=tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' ;
delete noprompt archivelog all completed before 'sysdate-1.5';
delete noprompt expired archivelog all;
sql 'alter system switch logfile';
CROSSCHECK archivelog all;
CROSSCHECK copy;
release channel t1;
}
CRON
Log : /var/adm/cron/log
Status : cron status
List cron : crontab l
Cron Name STAR : /prodtr/prodsoft/AutoBatchRun/shCronTr

KENA BUAT TAPE


1. Check False Private (sepatutnya status = scratch)
SELECT volume_name FROM libvolumes WHERE status='Private' AND last_use IS
NULL AND volume_name NOT IN (SELECT volume_name FROM volumes )

Kalau ada .. kena update label dia ..


Upd libvol 3310LIB A00098L4 status=scratch

2. Expired backu : EXPIRE INVENTORY


3. Check reclaim
select * from summary where activity='RECLAMATION'
atau (utk tempoh 48 jam)
SELECT substr(char(start_time),1,19) AS START_TIME,
substr(char(end_timestart_time),1,10) AS "ELAPTIME (D HHMMSS)",
number, entity, mediaw, successful FROM summary WHERE
activity='RECLAMATION' AND end_time>current_timestamp-48 hours

activity,

4. Check activity
SELECT activity, cast(float(sum(bytes))/1024/1024/1024 as dec(8,2))
as "GB" FROM summary WHERE activity<>'TAPE MOUNT' AND
activity<>'EXPIRATION'
AND start_time >{ts '2014-12-25 00:00:00'}
AND start_time <{ts '2014-12-26 00:00:00'} GROUP BY activity

5. Read / write error


SELECT volumes.volume_name,
volumes.stgpool_name,volumes.pct_utilized, volumes.status,
volumes.write_errors, volumes.read_errors FROM volumes, libvolumes
WHERE volumes.volume_name=libvolumes.volume_name AND
(volumes.write_errors>0 OR volumes.read_errors>0 )
Kalau ada .. run AUDIT VOLUME <colnum> FIX=YES

move data volume_name


DELETE VOL volname DISCARDDATA=YES
checkout libvol library_name volume_name

6. Cleaning drive clean drive 3310LIB DRIVE1 (ktmb ada 2 drive jer..
drive1 dan drive2)

7. Tgk status tape yang ada dalam library ..

select VOLUME_NAME, STGPOOL_NAME, STATUS, ACCESS,PCT_UTILIZED from


volumes where VOLUME_NAME in (select VOLUME_NAME from libvolumes)
8. Tgk sched
SELECT associations.domain_name, associations.node_name,
associations.schedule_name, client_schedules.description,
client_schedules.action, client_schedules.options,
client_schedules.objects, client_schedules.starttime FROM
associations associations, client_schedules client_schedules WHERE
associations.domain_name = client_schedules.domain_name
And NODE_NAME=ITDDBDEV_EE AND associations.schedule_name =
client_schedules.schedule_name ORDER BY associations.domain_name,
associations.node_name, associations.schedule_name

Send offsite and recall Copy tapes


To move tapes offsite schedule this command daily
Command: update vol * access=offsite
where access=readwrite
where stg=copy_pool location='offsite_location'
where status=full
{just send out full tapes}

To recall back onsite schedule this command weekly


Command: update vol * access=readwrite
where access=offsite
where stg='offsite_location='
where status=empty
{recall empty tapes}

How to check RMAN backup status and timings


select SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,
to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs
from V$RMAN_BACKUP_JOB_DETAILS
order by session_key;

Backup status
select to_char(start_time,'DD-MON-YY HH24:MI') "BACKUP
STARTED",sofar, totalwork from sys.v_$session_longops where
round(sofar/totalwork*100,2) < 100

for sched
define clientact <sched name> act=incr