الانتقال إلى المحتوى

أفتوني في أمري حول Rman


newuser

Recommended Posts

Senario
- 24 hour system (but scheduling down time is not so critical).
- Relies on Online backups only, taken every night.


Write and explain a Sql script to List and describe:
1. Completed RMAN backups for the last 24-hours
2. Datafiles Backed up during past 24 Hours.
3. Archlog Files Backed up during past 24 Hours.
4. RMAN Backups Still Running.

أرجو منكم مساعدتي لأنني لا أدري ان كان ما توصلت اليه من خلال بحثس في مراجع عدة صحيحا ولكم جزيل الشكر


جزاكم الله خيرا

رابط هذا التعليق
شارك

1. Completed RMAN backups for the last 24-hours

 select decode(BACKUP_TYPE, 'L', 'ARCH', 'D', 'DB', 'I', 'INC',

			'Unknown type='||BACKUP_TYPE) TYPE,

	 to_char(a.start_time, 'DDMON HH24:MI') start_time,

	 to_char(a.elapsed_seconds/60, '99.9')||' Min' DURATION,

	 substr(handle, -35) handle,

	 nvl(d.file#, l.sequence#) file#, nvl(d.blocks, l.blocks) blocks

 from   SYS.V_$BACKUP_SET a, SYS.V_$BACKUP_PIECE b,

	 SYS.V_$BACKUP_DATAFILE d, SYS.V_$BACKUP_REDOLOG l

 where  a.start_time between sysdate-1 and sysdate

and  a.SET_STAMP = b.SET_STAMP

and  a.SET_STAMP = d.SET_STAMP(+)

and  a.SET_STAMP = l.SET_STAMP(+)

 order  by start_time, file#

 /

 



===============================

2. Datafiles Backed up during past 24 Hours.




SELECT dbfiles||' from '||numfiles "Datafiles backed up",

	 cfiles "Control Files backed up", spfiles "SPFiles backed up"

FROM (select count(*) numfiles from sys.v_$datafile),

	 (select count(*) dbfiles

		from sys.v_$backup_datafile a, sys.v_$datafile b

	   where a.file# = b.file#

		 and a.completion_time > sysdate - 1),

	 (select count(*) cfiles from sys.v_$backup_datafile

	   where file# = 0 and completion_time > sysdate - 1),

	 (select count(*) spfiles from sys.v_$backup_spfile

	   where completion_time > sysdate - 1)

 



==================================

3. Archlog Files Backed up during past 24 Hours.

 SELECT backedup||' from '||archived "Archlog files backed up",

	 ondisk "Archlog files still on disk"

FROM (select count(*) archived

		from sys.v_$archived_log where completion_time > sysdate - 1),

	 (select count(*) backedup from sys.v_$archived_log

	   where backup_count > 0

		 and completion_time > sysdate - 1),

	 (select count(*) ondisk from sys.v_$archived_log

	   where archived = 'YES' and deleted  = 'NO')

 



===================================

4. RMAN Backups Still Running.

 SELECT to_char(start_time,'DD-MON-YY HH24:MI') "BACKUP STARTED",

	 sofar, totalwork,

	 elapsed_seconds/60 "ELAPSE (Min)",

	 round(sofar/totalwork*100,2) "Complete%"

 FROM   sys.v_$session_longops

 WHERE  opname = 'dbms_backup_restore'

  

رابط هذا التعليق
شارك

أخي جزاك الله خيرا لسرعة مساعدتي
ولكن ما أريد الحصول عليه هو تعليمات list تحقق ضمن عبارة rman
ما حصلت عليه التالي لكن لا أدري ان كان صحيحا أو لا

1-
RMAN> LIST BACKUP OF DATABASE;

2-RMAN> LIST COPY OF TABLESPACE "SYSTEM";

3-RMAN>LIST COPY OF DATABASE ARCHIVELOG ALL;

4-RMAN>LIST BACKUP SUMMARY;

هل من الممكن مساعدتي وجزاكم الله خيرا

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية