Command to check CPU info on Linux cat /proc/cpuinfo|grep processor|wc -l OR nproc –all OR getconf _NPROCESSORS_ONLN Command to check CPU info on Solaris psrinfo -v|grep “Status of processor”|wc -l Command to check CPU info on AIX lsdev -C|grep Process|wc -l Command to check CPU info on HP/UX ioscan -C processor | grep processor | […]


While performing database audits, you might need to check who logged in last into the database. The query will help you find out last user who logged in to database select username, timestamp, action_name from dba_audit_session where action_name=’LOGON’ and rownum<10 and username not in (‘SYS’,’DBSNMP’,’DUMMY’,’SYSTEM’,’RMAN’);


select decode( grouping(nm), 1, ‘total’, nm ) nm, round(sum(val/1024/1024)) mb from ( select ‘sga’ nm, sum(value) val from v$sga union all select ‘pga’, sum(a.value) from v$sesstat a, v$statname b where b.name = ‘session pga memory’ and a.statistic# = b.statistic# ) group by rollup(nm);


The below script will drop all the objects owned by a schema. This will not delete the user but only deletes the objects SET SERVEROUTPUT ON SIZE 1000000 set verify off BEGIN FOR c1 IN (SELECT OWNER,table_name, constraint_name FROM dba_constraints WHERE constraint_type = ‘R’ and owner=upper(‘&shema_name’)) LOOP EXECUTE IMMEDIATE ‘ALTER TABLE ‘||’ “‘||c1.owner||'”.”‘||c1.table_name||'” DROP CONSTRAINT […]


Sometimes when you run datapump export, it might take a lot of time. Meanwhile client might ask you for the % of export completed. Use below query to get the details of how much % export is done. SELECT SID, SERIAL#, USERNAME, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) “%_COMPLETE” FROM V$SESSION_LONGOPS WHERE TOTALWORK != 0 AND SOFAR […]


Below command will help you check Scheduler jobs which are configured inside database SELECT JOB_NAME, STATE FROM DBA_SCHEDULER_JOBS where job_name=’RMAN_BACKUP’; Query to check currently running scheduler jobs SELECT * FROM ALL_SCHEDULER_RUNNING_JOBS; All the DBA Scheduler jobs create logs. You can query below and check the details of job logs select log_id, log_date, owner, job_name from […]


set linesize 500 col BACKUP_SIZE for a20 SELECT INPUT_TYPE “BACKUP_TYPE”, –NVL(INPUT_BYTES/(1024*1024),0)”INPUT_BYTES(MB)”, –NVL(OUTPUT_BYTES/(1024*1024),0) “OUTPUT_BYTES(MB)”, STATUS, TO_CHAR(START_TIME,’MM/DD/YYYY:hh24:mi:ss’) as START_TIME, TO_CHAR(END_TIME,’MM/DD/YYYY:hh24:mi:ss’) as END_TIME, TRUNC((ELAPSED_SECONDS/60),2) “ELAPSED_TIME(Min)”, –ROUND(COMPRESSION_RATIO,3)”COMPRESSION_RATIO”, –ROUND(INPUT_BYTES_PER_SEC/(1024*1024),2) “INPUT_BYTES_PER_SEC(MB)”, –ROUND(OUTPUT_BYTES_PER_SEC/(1024*1024),2) “OUTPUT_BYTES_PER_SEC(MB)”, –INPUT_BYTES_DISPLAY “INPUT_BYTES_DISPLAY”, OUTPUT_BYTES_DISPLAY “BACKUP_SIZE”, OUTPUT_DEVICE_TYPE “OUTPUT_DEVICE” –INPUT_BYTES_PER_SEC_DISPLAY “INPUT_BYTES_PER_SEC_DIS”, –OUTPUT_BYTES_PER_SEC_DISPLAY “OUTPUT_BYTES_PER_SEC_DIS” FROM V$RMAN_BACKUP_JOB_DETAILS where start_time > SYSDATE -10 and INPUT_TYPE != ‘ARCHIVELOG’ ORDER BY END_TIME DESC /


SELECT * FROM (select SEGMENT_NAME, SEGMENT_TYPE, BYTES/1024/1024/1024 GB, TABLESPACE_NAME from dba_segments order by 3 desc ) WHERE ROWNUM <= 10


Critical Patch Updates are sets of patches containing fixes for security flaws in Oracle products. The Critical Patch Update program (CPU) was introduced in January 2005 to provide security fixes on a fixed, publicly available schedule to help customers lower their security management costs.


col VERSION for a15; col COMMENTS for a50; col ACTION for a10; set lines 500; select ACTION,VERSION,COMMENTS,BUNDLE_SERIES from registry$history;


When you issue archive backup commands via RAMN, it will backup all the archive logs. Sometimes, you might need to backup only a particular archive log sequence. Below command will help you backup archive logs between specific sequence RMAN> BACKUP ARCHIVELOG FROM SEQUENCE 355 UNTIL SEQUENCE 479 DELETE INPUT; The above command will backup archive […]


First get the sql ID and then you can use below command to generate execution plan of a query in oracle SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR(‘2t3nwk8h97vph’,0)); In case you have more IDs, use below command to supply sql id every time you run the query SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR(‘&sql_id’,0));


Database performance is a major concern for a DBA. SQLs are the ones which needs proper DB management in order to execute well. At times the application team might tell you that the database is running slow. You can run below query to get the top 5 resource intensive SQL with SQL ID and then […]


Query to check the granted roles to a user SELECT * FROM DBA_ROLE_PRIVS WHERE GRANTEE = ‘&USER’; Query to check privileges granted to a user SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE = ‘USER’; Privileges granted to a role which is granted to a user SELECT * FROM DBA_TAB_PRIVS WHERE GRANTEE IN (SELECT granted_role FROM DBA_ROLE_PRIVS […]


% rman target sys/oracle@t12ccdb log recover_table5.log RMAN> RECOVER TABLE SMEDS.”RECTEST” OF PLUGGABLE DATABASE T12CPDB1 UNTIL SEQUENCE 64 thread 1 AUXILIARY DESTINATION ‘/testcases/rectbl’ REMAP TABLE ‘SMEDS’.’RECTEST’:’TEST4_RECTEST’; Starting recover at 21-JAN-13 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=16 device type=DISK RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time List of tablespaces expected to have UNDO […]


Today when I started the DB , It refused to start with error ORA-00600: internal error code, arguments: [kcratr_scan_lastbwr]. Below is the workaround … [oracle@TEST ~]$ export ORACLE_SID=ANARDB [oracle@TEST ~]$ sqlplus Copyright (c) 1982, 2013, Oracle. All rights reserved. Enter user-name: /as sysdba Connected to an idle instance. SQL> startup ORACLE instance started. Total System […]


Oracle(R) Integrated Lights Out Manager Version 3.2.10.22.a r121452 Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. Warning: HTTPS certificate is set to factory default. Hostname: exa1celadm01-ilom -> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started. To stop, type ESC ( exa1celadm01.kfsaz.local login: root Password: [root@exa1celadm01 ~]# […]


Oracle(R) Integrated Lights Out Manager Version 3.2.10.22.a r121452 Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. Warning: HTTPS certificate is set to factory default. Hostname: exa1celadm01-ilom -> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started. To stop, type ESC ( exa1celadm01.kfsaz.local login: root Password: [root@exa1celadm01 ~]# […]


Oracle(R) Integrated Lights Out Manager Version 3.2.10.22.a r121452 Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. Warning: HTTPS certificate is set to factory default. Hostname: exa1celadm01-ilom -> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started. To stop, type ESC ( exa1celadm01.kfsaz.local login: root Password: [root@exa1celadm01 ~]# […]


root@exadata02:~# cd /u01/staging/SOLARIS11.2/ root@exadata02:/u01/staging/SOLARIS11.2# ls -ltrh total 21828629 -rw-r–r– 1 root root 1.7G Aug 22 11:02 p19298012_1100_Solaris86-64_1of4.zip -rw-r–r– 1 root root 1.2G Aug 22 11:04 p21518848_1100_Solaris86-64_2of3.zip -rw-r–r– 1 root root 1.8G Aug 22 11:04 p19298012_1100_Solaris86-64_2of4.zip -rw-r–r– 1 root root 1.8G Aug 22 11:05 p19298012_1100_Solaris86-64_3of4.zip -rw-r–r– 1 root root 1.7G Aug 22 11:06 p19298012_1100_Solaris86-64_4of4.zip -rw-r–r– 1 […]


bash-3.2$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 5 11:06:43 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount ORACLE instance started. Total System Global Area 2.0583E+10 bytes Fixed Size 2168240 bytes Variable Size 5167385168 bytes Database Buffers 1.5368E+10 bytes Redo Buffers 45907968 […]


$ cd $ORACLE_HOME/rdbms/admin bash-4.1$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 25 09:20:00 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options […]


bash-4.1$ cd $ORACLE_HOME/rdbms/admin bash-4.1$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 25 09:20:00 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options […]


Dba_registry shows ‘Packages and Types’ as invalid. How it can be validated. SQL> select comp_name, version, status from dba_registry; COMP_NAME VERSION STATUS —————————————- ———- ———- Oracle XML Database 10.2.0.1.0 VALID Oracle Database Catalog Views 10.2.0.1.0 VALID Oracle Database Packages and Types 10.2.0.1.0 INVALID JServer JAVA Virtual Machine 10.2.0.1.0 VALID Oracle XDK 10.2.0.1.0 VALID Oracle Database […]


hen I checked the Exadata cell storage log Alert seen such an error : MS process is not alive. Pid is missing. Exadata Cell Storage Alert log: [root@anarexaceladm03 trace]# cat rstrc_15083_mmt.trc Trace file /opt/oracle/cell/log/diag/asm/cell/anarexaceladm03/trace/rstrc_15083_mmt.trc ORACLE_HOME = /opt/oracle/cell System name: Linux Node name: anarexaceladm03.kfsaz.local Release: 2.6.39-400.264.6.el6uek.x86_64 Version: #1 SMP Tue Dec 1 16:41:42 PST 2015 Machine: […]


Issue  ======  Getting frequent errors as below Mon Jun 20 18:58:09 2016  Errors in file /u01/app/oracle/diag/rdbms/ANARTEST/ANARTEST1/trace/ANARTEST1_ora_16361.trc:  ORA-15025: could not open disk “/dev/rdsk/emcpower2a”  ORA-27041: unable to open file  SVR4 Error: 13: Permission denied  Additional information: 3  WARNING: failed to read mirror side 1 of virtual extent 23 logical extent 0 of file 259 in group [1.443862875] […]


root@anaruatdb1:/u02/app/11.2.0/grid > su – grid Password: Oracle Corporation      SunOS 5.11      11.3    September 2015 -bash-4.1$ bash bash-4.1$ . .profile_asm bash-4.1$ srvctl stop database -d ANARTEST -o immediate root@anaruatdb1:~# su – oracle Oracle Corporation      SunOS 5.11      11.3    September 2015 You have mail. bash-4.1$ . .profile_ANARTEST bash-4.1$ cd $ORACLE_HOME/bin bash-4.1$ ls -ltr oracle -rwsr-s–x   1 oracle   asmadmin 258286384 […]


1. Login to sqlplus as sysdba and execute below script : oradba@ANARDB:~$ export ORACLE_SID=ANARDB oradba@ANARDB:~$ sqlplus SQL> select name from v$database; NAME ——— ANARDB 2. Open the set server output on to get the result from below query. SQL> set serveroutput on; 3. Execute the query to get the information of datafiles, control files and […]


PROBLEM : Connecting with sqlplus you get: bash-3.2$ sqlplus / as sysdba; SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 21 15:42:49 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> conn […]


select ‘ alter table ‘||table_name|| ‘ enable novalidate constraint ‘ ||constraint_name ||’;’ from user_constraints where table_name =’TABLE_NAME’


set pages 0 feed off veri off lines 500 accept oldname prompt “Enter user to model new user to: ” accept newname prompt “Enter new user name: ” — accept psw prompt “Enter new user’s password: ” — Create user… select ‘create user &&newname identified by values ”’||password||””|| — select ‘create user &&newname identified by […]


root@bakuabsutdb:~# cd /tmp/ root@bakuabsutdb:/tmp# ls Baku Baku.solaris hmptemp hsperfdata_root root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# ls Baku Baku.solaris hmptemp hsperfdata_root Java_Timezone root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# root@bakuabsutdb:/tmp# cd Java_Timezone/ root@bakuabsutdb:/tmp/Java_Timezone# root@bakuabsutdb:/tmp/Java_Timezone# ls azerbaycan.zip once sonra TimeZoneTest.class tzdata2016c.tar.gz tzupdater.jar verify.bat deneme1 once_anar1 sonra_anar TimeZoneTest.java tzdata2016c.tar.gz.sha512 tzupdater.jar_backup verify.sh java once_yeni sonra_anar1 tzdata2016b.tar.gz tzupdater-2_0_3-2015b.zip update.bat New_Java_Timezone once_yeni2 sonra_yeni tzdata2016b.tar.gz.sha512 tzupdater-2.0.3-2015b update.sh […]


root@anarexadatatest02:~# /u01/app/11.2.0.3/grid/bin/crsctl stat res -t ——————————————————————————– NAME TARGET STATE SERVER STATE_DETAILS ——————————————————————————– Local Resources ——————————————————————————– ora.DATAC1.dg ONLINE ONLINE anarexadatatest01 ONLINE ONLINE anarexadatatest02 ora.DBFS_DG.dg ONLINE ONLINE anarexadatatest01 ONLINE ONLINE anarexadatatest02 ora.LISTENER.lsnr ONLINE ONLINE anarexadatatest01 ONLINE ONLINE anarexadatatest02 ora.RECOC1.dg ONLINE ONLINE anarexadatatest01 ONLINE ONLINE anarexadatatest02 ora.asm ONLINE ONLINE anarexadatatest01 Started ONLINE ONLINE anarexadatatest02 Started ora.gsd OFFLINE OFFLINE […]


Receiving the following error when trying to create the materialize view oracle@bakuexa1dbadm01:~$ echo $ORACLE_SID MISUAT1 oracle@bakuexa1dbadm01:~$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 6 09:55:05 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production With the Partitioning, Real Application […]


bash-4.1$ su – oracle Password: Oracle Corporation SunOS 5.11 11.3 September 2015 -bash-4.1$ -bash-4.1$ -bash-4.1$ -bash-4.1$ . .profile_ANARTEST bash-4.1$ bash-4.1$ bash-4.1$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.4.0 Production on Tue May 31 11:46:12 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production […]


oracle@anarexadatatest01:/u01/app/oracle/product/11.2.0.3/dbhome_1/network/admin$ sqlplus “/ as sysdba”; SQL*Plus: Release 11.2.0.3.0 Production on Thu May 12 16:26:23 2016 Copyright (c) 1982, 2011, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> select name […]


TROUG / The Turkish Oracle User Group did its annual conference in the rooms of the Istanbul Technical University with local and international speakers. You can see ajanda from here I delivered my presentation “DataSecurity and Database Vault” Many thanks to the organizers  inviting us speakers to dinner. Some frames of the speakers: Thanks again […]


In this practice, I will examine the Exadata cell software processes. Tasks 1.Establish a terminal connection to qr01cel01 as the celladmin user. 2.Restart Server (RS) is used to start up and shut down the Cell Server (CELLSRV) and Management Server (MS). It also onitors these services to check whether they need to be restarted. Locate […]


ORA-39181: Only partial table data may be exported due to fine grain access control . . exported “APEX_030200″.”WWV_FLOW_CLICKTHRU_LOG_NUMBER$” 4.914 KB 1 rows . . exported “APEX_030200″.”WWV_FLOW_COMPANIES” 5.625 KB 3 rows . . exported “KOCAZER”.”CPM_PACKAGE_DEPOSIT_RATES” 5.734 KB 4 rows ORA-39181: Only partial table data may be exported due to fine grain access control on “KOCAZER”.”USERS” the […]


alter system set log_archive_dest_2=’service=”(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db5.anar.az)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=db1.anar.az)(SERVER=DEDICATED)))”‘,’LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name=”db1″ net_timeout=15, valid_for=(all_logfiles,primary_role)’ scope=both; ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-16025: parameter LOG_ARCHIVE_DEST_2 contains repeated or conflicting attributes Solution: Remove “net_timeout” alter system set log_archive_dest_2=’service=”(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db5.anar.az)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=db1.anar.az)(SERVER=DEDICATED)))”‘,’LGWR ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name=”db1″, valid_for=(all_logfiles,primary_role)’ […]


Melumatin tehlukesizliyi meqsedile gorulen lazimi isler eyni zamanda sebeke, emeliyyat sistemleri seviyyesindeki kimi verilenler bazasi seviyyesinde de nezere alinmalidir. Umumen gotursek, sirketler sadece firewall mehsulu alir ve bele dusunurler ki, tehlukesizliye aid olan problemleri artiq hell edibler. Tedqiqatcilar gosterir ki, baxmayaraq bu mehsullardan istifade etmekle xaricden gelen hucumlara qarsi qorunmaq mumkundur, daxilden gelen hucumlari def […]


select blocking_session,blocked_session,script from ( select distinct s1.username || ‘@’ || s1.machine || ‘ ( INST=’ || s1.inst_id || ‘ SID=’ || s1.sid || ‘ ET=’ || s1.last_call_et || ‘sn. STATUS=’ || s1.status || ‘ EVENT=’ || s1.event || ‘ ACTION= ‘ || s1.action || ‘ PROGRAM=’ || s1.program || ‘ MODULE=’ || s1.module || ‘)’ […]


Create a new tablespace or use existing tablespace – tablespace needs to be ASSM Specify the FBDA as the default (optional) Assign a quota for the FBDA (optional) Assign a retention period for the FBDA Retention period integer denoting days,months or years Enable flashback archive for a specific table via the CREATE TABLE or ALTER […]


FDA’nın kullanılabilmesi için önceden tanımlanan işlemler bulunmaktadır. Bunlar; 1) FDA tablespace’leri mutlaka automatic segment space management (ASSM) ile yönetilmelidir. Elle yönetilenleri FDA için kabul edilmemektedir. 2) Automatic undo management mutlaka aktif olmalıdır. Aksi halde FBDA arka plan görevi işlevlerini yerine getiremez. FDA’yı kullanmak için isterseniz yeni bir tablespace yaratabilir ya da daha önceden var olanını […]


Database Server root/welcome1 oracle/welcome1 grid/welcome1 grub/sos1Exadata Database server ILOMs root/welcome1 Exadata Storage Cell Server root/welcome1 celladmin/welcome1 cellmonitor/welcome1 Exadata Storage Cell Server ILOMs root/welcome1 InfiniBand switches root/welcome1 nm2user/changeme InfiniBand ILOMs ilom-admin/ilom-admin ilom-operator/ilom-operator Ethernet switches admin/welcome1 Power distribution units (PDUs) admin/welcome1 root/welcome1 Keyboard, video, mouse (KVM) if available admin/welcome1


bash-3.2$ cd /data/ bash-3.2$ ls Baku.solaris Java_Timezone arch anardb.ctl anardb.yed cd control datafile initANARDB.ora lost+found orapwANARDB1 patch stnd.ctl trace bash-3.2$ bash-3.2$ ls -la total 17902902 drwxr-xr-x 10 oracle oinstall 512 Mar 24 19:14 . dr-xr-xr-x 35 root bin 1024 Jul 8 2015 .. -rw-r–r– 1 root root 512 Mar 21 17:19 Baku.solaris drwxr-xr-x 4 root […]


Oracle(R) Integrated Lights Out Manager Version 3.1.2.32.b r86441 Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. -> start /SP/console Are you sure you want to start /SP/console (y/n)? y Serial console started. To stop, type ESC ( [root@bakuexa1celadm01 ~]# [root@bakuexa1celadm01 ~]# uname -a Linux bakuexa1celadm01.kfsaz.local 2.6.39-400.128.17.el5uek #1 SMP Tue May 27 13:20:24 PDT […]


Creating User Accounts To create a user account: # useradd -u 100 -g other -d /export/home/newuser1 -m -s /bin/ksh -c “Regular User Account” newuser1 # passwd newuser1 # /usr/sadm/bin/smuser add — -n newuser2 -u 500 -g other -d /export/home/newuser2 -c “Regular User Account 2” -s /bin/ksh -x autohome=N # passwd newuser2 Modifying User Accounts To […]


I am pretty sure that many of us come across of situations when a killed session by ‘alter system kill session’ command did put the session in ‘KILLED’ status and never released the session for a long time on the database. It could be due to the fact that the session would be rolling back […]


SQL> GRANT SELECT ON v$session TO scott; grant select on v$session to test * ERROR at line 1: ORA-02030: can only select from fixed tables/views SQL> SELECT owner, object_type FROM dba_objects WHERE object_name = ‘V$SESSION’; OWNER OBJECT_TYPE ———————— ——————- PUBLIC SYNONYM SQL> select table_owner, table_name FROM dba_synonyms where synonym_name = ‘V$SESSION’; TABLE_OWNER TABLE_NAME ————– —————————— […]


select decode( grouping(nm), 1, ‘total’, nm ) nm, round(sum(val/1024/1024)) mb from ( select ‘sga’ nm, sum(value) val from v$sga union all select ‘pga’, sum(a.value) from v$sesstat a, v$statname b where b.name = ‘session pga memory’ and a.statistic# = b.statistic# ) group by rollup(nm);


set linesize 500 col BACKUP_SIZE for a20 SELECT INPUT_TYPE “BACKUP_TYPE”, –NVL(INPUT_BYTES/(1024*1024),0)”INPUT_BYTES(MB)”, –NVL(OUTPUT_BYTES/(1024*1024),0) “OUTPUT_BYTES(MB)”, STATUS, TO_CHAR(START_TIME,’MM/DD/YYYY:hh24:mi:ss’) as START_TIME, TO_CHAR(END_TIME,’MM/DD/YYYY:hh24:mi:ss’) as END_TIME, TRUNC((ELAPSED_SECONDS/60),2) “ELAPSED_TIME(Min)”, –ROUND(COMPRESSION_RATIO,3)”COMPRESSION_RATIO”, –ROUND(INPUT_BYTES_PER_SEC/(1024*1024),2) “INPUT_BYTES_PER_SEC(MB)”, –ROUND(OUTPUT_BYTES_PER_SEC/(1024*1024),2) “OUTPUT_BYTES_PER_SEC(MB)”, –INPUT_BYTES_DISPLAY “INPUT_BYTES_DISPLAY”, OUTPUT_BYTES_DISPLAY “BACKUP_SIZE”, OUTPUT_DEVICE_TYPE “OUTPUT_DEVICE” –INPUT_BYTES_PER_SEC_DISPLAY “INPUT_BYTES_PER_SEC_DIS”, –OUTPUT_BYTES_PER_SEC_DISPLAY “OUTPUT_BYTES_PER_SEC_DIS” FROM V$RMAN_BACKUP_JOB_DETAILS where start_time > SYSDATE -10 and INPUT_TYPE != ‘ARCHIVELOG’ ORDER BY END_TIME DESC /