Thursday, January 22, 2015

RMAN backup or restore monitoring scripts

Backup Progress Script:

col dbsize_mbytes      for 99,999,990.00 justify right head "DBSIZE_MB"
col input_mbytes       for 99,999,990.00 justify right head "READ_MB"
col output_mbytes      for 99,999,990.00 justify right head "WRITTEN_MB"
col output_device_type for a10           justify left head "DEVICE"
col complete           for 990.00        justify right head "COMPLETE %"
col compression        for 990.00        justify right head "COMPRESS|% ORIG"
col est_complete       for a20           head "ESTIMATED COMPLETION"
col recid              for 9999999       head "ID"

select recid
     , output_device_type
     , dbsize_mbytes
     , input_bytes/1024/1024 input_mbytes
     , output_bytes/1024/1024 output_mbytes
     , (output_bytes/input_bytes*100) compression
     , (mbytes_processed/dbsize_mbytes*100) complete
     , to_char(start_time + (sysdate-start_time)/(mbytes_processed/dbsize_mbytes),'DD-MON-YYYY HH24:MI:SS') est_complete
  from v$rman_status rs
     , (select sum(bytes)/1024/1024 dbsize_mbytes from v$datafile)
 where status='RUNNING'
   and output_device_type is not null
/


Source: http://www.dba-resources.com/oracle/rman-displaying-current-backup-progress/

To see what RMAN is doing now and how much work its got left to do you can run the following SQL
select
sid,
start_time,
totalwork,
sofar,
(sofar/totalwork) * 100 pct_done
from
v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'
/

 

The following query will show you a history of your BACKUP and RESTORE operations
select to_char(start_time, 'dd-mon-yyyy@hh24:mi:ss') "Date",
status,
operation,
mbytes_processed
from v$rman_status vs
where start_time >  sysdate -1
order by start_time
/




Check status of RMAN backups:
col STATUS format a9
col hrs format 999.99
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;
 
Source: https://mdesouza.wordpress.com/2012/06/07/monitor-rman-backups/

Oracle Weblogic Blogs

https://blogs.oracle.com/WebLogicServer/

https://blogs.oracle.com/archbeat/

Monday, January 12, 2015

public and private key differences



The Public and Private key pair comprise of two uniquely related cryptographic keys (basically long random numbers). Below is an example of a Public Key:
3048 0241 00C9 18FA CF8D EB2D EFD5 FD37 89B9 E069 EA97 FC20 5E35 F577 EE31 C4FB C6E4 4811 7D86 BC8F BAFA 362F 922B F01B 2F40 C744 2654 C0DD 2881 D673 CA2B 4003 C266 E2CD CB02 0301 0001
The Public Key is what its name suggests - Public. It is made available to everyone via a publicly accessible repository or directory. On the other hand, the Private Key must remain confidential to its respective owner.
Comodo - SSL Certificate Authority

Because the key pair is mathematically related, whatever is encrypted with a Public Key may only be decrypted by its corresponding Private Key and vice versa.
For example, if Bob wants to send sensitive data to Alice, and wants to be sure that only Alice may be able to read it, he will encrypt the data with Alice's Public Key. Only Alice has access to her corresponding Private Key and as a result is the only person with the capability of decrypting the encrypted data back into its original form.
Comodo - SSL Certificate Authority

As only Alice has access to her Private Key, it is possible that only Alice can decrypt the encrypted data. Even if someone else gains access to the encrypted data, it will remain confidential as they should not have access to Alice's Private Key.
Public Key Cryptography can therefore achieve Confidentiality. However another important aspect of Public Key Cryptography is its ability to create a Digital Signature.

source: https://www.comodo.com/resources/small-business/digital-certificates2.php?key5sk1=d1e305ec97a4884240a5beb0bbf1752567484838&key5sk2=&key5sk3=1421051826000&key5sk4=&key5sk5=1421051997000&key5sk6=&key5sk7=1421056404000&key5sk8=&key5sk9=1421056410000&key5sk10=&key5sk11=1421060369000&key5sk12=&key5sk13=1421061153000&key5sk14=&key5sk15=1421061592000&key5sk16=&key5sk17=1421074159000&key5sk18=&key5sk19=1421074167000&key5sk20=&key5sk21=1421074168000&key6sk1=&key6sk2=FF330&key6sk3=7&key6sk4=en-us&key6sk5=US&key6sk6=0&key6sk7=Google&key6sk8=150-1&key6sk9=1366768&key6sk10=true&key6sk11=3a127a12f97ae13ecb45f2ba97a030ec0027da10&key6sk12=2037&key7sk1=399&key7sk2=406&key7sk3=399&key7sk4=7611&key7sk5=399&key7sk6=406&key7sk7=412&key7sk8=406&key1sk1=ors&key1sk2=Google