V_$RMAN_BACKUP_JOB_DETAILS
Hi,
I was looking through the V_$RMAN_BACKUP_JOB_DETAILS view and found it to be inconsistent with the information displayed by EM under the 'backup jobs' link on the 'Scheduled backups' page.
The 'backup jobs' link shows several jobs that succeeded, yet the view shows the status as failed.
Why is this?
Thanks.
The reason I was seeing inconsistencies was that V_$RMAN_BACKUP_JOB_DETAILS shows status of all backup jobs - command prompt & EM. While the EM page only shows the status of jobs run via EM.
So, the failed jobs had been run from the command prompt and hence did not show up in EM.
V_$RMAN_BACKUP_JOB_DETAILS and EM are functioning as they should.
This thread is now closed.
Similar Messages
-
Level 0 backup coming up as DB INCR in v$rman_backup_job_details view
Version ===> 10.2.0.4.0
I've run a LEVEL 0 backup for my DB for the first time. But when i query
SQL> select status, input_type From v$rman_backup_job_details order by start_Time descIt is showing
STATUS INPUT_TYPE
COMPLETED DB INCRShouldn't input_type come up as
DB FULLwhen i do a LEVEL 0 backup?Does file name format actually matter?
I had clearly given
level 0in my command, which is
run
backup as compressed backupset incremental level 0 database tag 'full' plus archivelog delete all input;
} -
Does anyone know why I would get different results from V$Rman_Backup_job_details and V$Rman_Status on the same instance?
Image of Quries: www.hydell.com/OracleBackupDifferences.png
Dates Returned For Latest Backup
V$Rman_Status = 10/13/2011
V$Rman_Backup_job_details = 7/24/2011
Which view is the best to use for monitoring backups?
Thanks in advance for the help.
Roboracle.dba.89 wrote:
Please show the script and that might help look into this. Also the timezone of the OS shows EST. And cron shows the scheduled time at 12hrs. It should run at 12:00 EST hours and not GMT.
Also please post output for below queries. Are backups run from the same node? (If RAC)
select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
Hi,
This is the backup script
#Set Variables
ORACLE_HOME=/projects1/oramroprod/oracle/product/10.2.0/db_4
ORACLE_SID=MROPROD
PATH=$PATH:$ORACLE_HOME/bin
btype="FULL"
RMAN_BACKUP_LOC=/data1/RMAN/MROPROD
export ORACLE_HOME
export ORACLE_SID
export PATH
export btype
tag="$ORACLE_SID"_"$btype"
#Print commands and their arguments as they are executed
set -x
SDATE=`date +%m%d%y`
STIME=`date +%H%M%S`
DD=`date +%d%m%y`
#Create daily backup directories
mkdir -p $RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}
mkdir -p $RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}
mkdir -p $RMAN_BACKUP_LOC/arch_backup/bkp_${DD}
mkdir $RMAN_BACKUP_LOC/logs
#Take backup
rman target / nocatalog log=$RMAN_BACKUP_LOC/logs/rman_${btype}_backup_${SDATE}_${STIME}.log << EOF1
change archivelog all crosscheck;
run {
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
backup as compressed backupset incremental level 0 database tag '$tag' format '$RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}/%d_%s_%p';
backup as compressed backupset archivelog all not backed up 1 times FORMAT '$RMAN_BACKUP_LOC/arch_backup/bkp_${DD}/ARCH_%d_%s_%p';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}/%F';
delete noprompt obsolete;
delete noprompt archivelog all completed before 'sysdate-2';
EXIT;
EOF1
This is not RAC.
SQL> select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
VALUE
GMT -
V$rman_backup_job_details.END_TIME problem
We have daily incremental, every two hour archivelog and weekly dull backups scheduled for our production database. The database is registered with timezone 'Australia'
SQL> select sysdate from dual;
SYSDATE
09-AUG-2013 15:45
SQL> !date
Fri Aug 9 15:45:48 EST 2013
SQL> !env | grep TZ
TZ=Australia/NSW
SQL> !crontab -l | grep rman
0 12 * * 0 sh /projects1/oramroprod/dba_scripts/rman_fullbackup_mroprod.sh
0 12 * * 1-6 sh /projects1/oramroprod/dba_scripts/rman_incrbackup_mroprod.sh
0 00,02,04,06,08,10,14,16,18,20,22 * * * sh /projects1/oramroprod/dba_scripts/rman_archbackup_mroprod.sh
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for Solaris: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
SQL> !uname -a
SunOS ibs-ash-sr120 5.10 Generic_147441-12 i86pc i386 i86pc
SQL> !cat /etc/release
Oracle Solaris 10 8/11 s10x_u10wos_17b X86
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Assembled 23 August 2011
SQL>
I am finding a strange inconsistency on the data in v$rman_backup_job_details. The database is very small and backup duration will not exceed 30 minutes.However for INCRMENTAL LEVEL 1 and LEVEL 0 backups are showing DURATION as 10 hours!.
The RMAN backup jobs run by cron are scheduled to run at 12 GMT. Backup job starts as expected.But v$rman_backup_job_details.END_TIME is updated in 'Australia' timezone while start time is updated in GMT.
Another thing is for archivelog backups END_TIME is updated in GMT only.
Any clues ?
SQL> set lines 300
alter session set nls_date_format='DD-MON-YYYY HH24:MI';
select INPUT_TYPE,START_TIME,END_TIME,STATUS,ELAPSED_SECONDS/60/60 ELAPSED_HR from v$rman_backup_job_details where START_TIME > trunc(sysdate-7) order by START_TIME asc;SQL>
Session altered.
INPUT_TYPE START_TIME END_TIME STATUS ELAPSED_HR
ARCHIVELOG 07-AUG-2013 16:00 07-AUG-2013 16:01 COMPLETED .016944444
ARCHIVELOG 07-AUG-2013 18:00 07-AUG-2013 18:01 COMPLETED .013055556
ARCHIVELOG 07-AUG-2013 18:00 07-AUG-2013 18:01 COMPLETED .008333333
ARCHIVELOG 07-AUG-2013 20:00 07-AUG-2013 20:00 COMPLETED .007222222
ARCHIVELOG 08-AUG-2013 02:00 08-AUG-2013 02:01 COMPLETED .028611111
ARCHIVELOG 08-AUG-2013 08:00 08-AUG-2013 08:01 COMPLETED .015555556
ARCHIVELOG 08-AUG-2013 10:00 08-AUG-2013 10:02 COMPLETED .030833333
ARCHIVELOG 08-AUG-2013 10:00 08-AUG-2013 10:01 COMPLETED .009166667
ARCHIVELOG 08-AUG-2013 12:00 08-AUG-2013 12:01 COMPLETED .016388889
DB INCR 08-AUG-2013 12:00 08-AUG-2013 22:00 COMPLETED 10.0002778
ARCHIVELOG 08-AUG-2013 14:00 08-AUG-2013 14:01 COMPLETED .021666667
INPUT_TYPE START_TIME END_TIME STATUS ELAPSED_HR
ARCHIVELOG 08-AUG-2013 14:00 08-AUG-2013 14:00 COMPLETED .006388889
ARCHIVELOG 08-AUG-2013 16:00 08-AUG-2013 16:01 COMPLETED .022222222
ARCHIVELOG 08-AUG-2013 16:00 08-AUG-2013 16:01 COMPLETED .017222222
ARCHIVELOG 08-AUG-2013 18:00 08-AUG-2013 18:01 COMPLETED .014722222
ARCHIVELOG 08-AUG-2013 18:00 08-AUG-2013 18:00 COMPLETED .0075
ARCHIVELOG 08-AUG-2013 20:00 08-AUG-2013 20:00 COMPLETED .005833333
ARCHIVELOG 09-AUG-2013 08:00 09-AUG-2013 08:01 COMPLETED .018333333
ARCHIVELOG 09-AUG-2013 10:00 09-AUG-2013 10:01 COMPLETED .023611111
ARCHIVELOG 09-AUG-2013 12:00 09-AUG-2013 12:01 COMPLETED .018611111
ARCHIVELOG 09-AUG-2013 14:00 09-AUG-2013 14:01 COMPLETED .0175oracle.dba.89 wrote:
Please show the script and that might help look into this. Also the timezone of the OS shows EST. And cron shows the scheduled time at 12hrs. It should run at 12:00 EST hours and not GMT.
Also please post output for below queries. Are backups run from the same node? (If RAC)
select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
Hi,
This is the backup script
#Set Variables
ORACLE_HOME=/projects1/oramroprod/oracle/product/10.2.0/db_4
ORACLE_SID=MROPROD
PATH=$PATH:$ORACLE_HOME/bin
btype="FULL"
RMAN_BACKUP_LOC=/data1/RMAN/MROPROD
export ORACLE_HOME
export ORACLE_SID
export PATH
export btype
tag="$ORACLE_SID"_"$btype"
#Print commands and their arguments as they are executed
set -x
SDATE=`date +%m%d%y`
STIME=`date +%H%M%S`
DD=`date +%d%m%y`
#Create daily backup directories
mkdir -p $RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}
mkdir -p $RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}
mkdir -p $RMAN_BACKUP_LOC/arch_backup/bkp_${DD}
mkdir $RMAN_BACKUP_LOC/logs
#Take backup
rman target / nocatalog log=$RMAN_BACKUP_LOC/logs/rman_${btype}_backup_${SDATE}_${STIME}.log << EOF1
change archivelog all crosscheck;
run {
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
backup as compressed backupset incremental level 0 database tag '$tag' format '$RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}/%d_%s_%p';
backup as compressed backupset archivelog all not backed up 1 times FORMAT '$RMAN_BACKUP_LOC/arch_backup/bkp_${DD}/ARCH_%d_%s_%p';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}/%F';
delete noprompt obsolete;
delete noprompt archivelog all completed before 'sysdate-2';
EXIT;
EOF1
This is not RAC.
SQL> select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
VALUE
GMT -
V$RMAN_BACKUP_JOB_DETAILS view showing rman status running
Hi,
There is no rman session running in the database but still V$RMAN_BACKUP_JOB_DETAILS shows status as running
select SID,username, opname,to_char(START_TIME,'dd mm yyyy hh:mm:ss'),TOTALWORK, sofar, (sofar/totalwork) * 100 done,TIME_REMAINING/3600/24,
to_char(sysdate + TIME_REMAINING/3600/24,'dd mm yyyy hh:mm:ss') end_at
from v$session_longops
where totalwork > sofar
AND opname NOT LIKE '%aggregate%'
AND opname like 'RMAN%'SQL> 2 3 4 5 6
7 ;
no rows selected
SQL> select sid, CLIENT_INFO ch, seq#, event, state from v$session where program like '%rman%';
no rows selected
SQL> select SESSION_KEY,SESSION_RECID,START_TIME,END_TIME,STATUS from V$RMAN_BACKUP_JOB_DETAILS where START_TIME > sysdate-3;
SESSION_KEY SESSION_RECID START_TIM END_TIME STATUS
2853 2853 20-NOV-12 20-NOV-12 COMPLETED
2862 2862 22-NOV-12 RUNNING
2864 2864 22-NOV-12 22-NOV-12 COMPLETEDplease can anyone shed some light on it
ThanksFixed.
In my solution I grabbed the command id from the details view and then matched that with the sid in the status view
SQL> select session_key, command_id, status, time_taken_display from v$rman_backup_job_details where command_id='2012-11-27T22:30:37';
SESSION_KEY COMMAND_ID STATUS
TIME_TAKEN_DISPLAY
602 2012-11-27T22:30:37 RUNNING WITH ERRORS
16:32:53
SQL> select sid from v$rman_status where COMMAND_ID='2012-11-27T22:30:37';
SID
4
4
SQL>then I made sure I was sys, before grabbing the session info and killing the session
SQL> select user from user_users;
USER
SYS
SQL>
SQL> select sid,serial#,inst_id from gv$session where sid=4 and serial#=3;
SID SERIAL# INST_ID
4 3 2
SQL> alter system kill session '4,3,@2' immediate;
System altered.
SQL> let me know if this worked for you.
hope this helps, C -
RMAN duplicate target database from active database - performance problem
Hello. I’m running into a major performance problem when trying to duplicate a database from a target located inside our firewall to an auxiliary located outside our firewall. Both target and auxiliary are located in the same equipment room just on different subnets. Previously I had the auxiliary located on the same subnet as the target behind the firewall and duplicating a 4.5T database took 12 hours. Now with the auxiliary moved outside the firewall attempting to duplicate the same 4.5T database is estimated to exceed 35 hours. The target is a RAC instance using ASM and so is the auxiliary. Ping, tnsping, traceroutes to and from target and auxiliary all indicate no problem or latency. Any ideas on things to consider while hunting for this elusive performance decrease?
Thanks in advance.It would obviously appear network related. Have you captured any network/firewall metrics? Are all components set to full duplex? Would it be possible to take the firewall down temporarily and then test the throughput? Do you encounter any latency if you were to copy a large file across the subnets?
You may want to check V$RMAN_BACKUP_JOB_DETAILS, V$BACKUP_SYNC_IO or V$BACKUP_ASYNC_IO when the backup is running. -
V$rman_status report on : COMPLETED WITH ERRORS
Hi,
quering v$rman_status on 10204 instance shows :
select sid,recid,command_id,operation,status,start_time,end_time
from v$rman_status
where recid=16360
SID RECID COMMAND_ID OPERATION STATUS START_TIM END_TIME
0 16360 2012-05-07T15:54:18 RMAN COMPLETED WITH ERRORS 07-MAY-12 07-MAY-12What was the reason of the failure ?
I follwed : http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcviews050.htm
COMPLETED WITH ERRORS - Job completed successfully, but there were some errors which were overcome using failover features. For example, RESTORE FAILOVER or BACKUP FAILOVER was used to schedule the job on another channel.The first failure : 16360 took 4 hours to complete . rman backedup : 1.3 Tera
And then it was automatically restarted :16366 for another 4 hourse . rman backedup once again : 1.3 Tera
1)Why it didnt backuped only the fixs for errors in previous backup ?
2) What was the error in the first time ? Where i can found the reason for the failure so i can try to fix it by myself before the next backup begin ?
select
SESSION_KEY, INPUT_TYPE, STATUS,
to_char(START_TIME,'dd/mm/yy hh24:mi') start_time,
to_char(END_TIME,'dd/mm/yy hh24:mi') end_time,
round((end_time-start_time)*1440,2) "Minutes"
from V$RMAN_BACKUP_JOB_DETAILS
where input_type='DB INCR'
order by session_key desc
16366 DB INCR COMPLETED 07/05/12 20:00 08/05/12 00:06 245.82
16360 DB INCR COMPLETED WITH ERRORS 07/05/12 15:54 07/05/12 19:59 244.37-check rman log file to get complete detail on this warning message.
-if log not present then take help from v$rman_output view,its available in 10g version onwards.
select * from v$rman_output where session_recid=16360 ; -
Why does it show RMAN is still running...
I am using RMAN in Oracle 11.2.
I tried kicking off RMAN a few times to test my script, and then did a kill -9 on the process numbers.
But I found out that RMAN was still running in the database, and was using a lot of System I/O (from what I could see in OEM).
I see the session in Toad and killed them from within Toad, and the system I/O dropped off.
I could also see in OEM that my RMAN processes were killed off.
So, first, why didn't the kill -9 actually kill the processes running in the database?
Next, when I still look in V$RMAN_BACKUP_JOB_DETAILS, it shows I have some jobs still running.
How do I terminate these processes?
I need to do this as soon as possible. Please help if you can.There is nothing there any longer.
But it still shows up in V$RMAN_BACKUP_JOB_DETAILS.
SQL> select username, program, status from v$session where status = 'ACTIVE' and username is not null order by 1;
USERNAME PROGRAM STATUS
ARADMIN oracle@cassini (P003) ACTIVE
ARADMIN [email protected] (TNS V1-V3) ACTIVE
ARADMIN oracle@cassini (P002) ACTIVE
DBSNMP emagent@cassini (TNS V1-V3) ACTIVE
SYS sqlplus@cassini (TNS V1-V3) ACTIVE
SYSMAN OMS ACTIVE
6 rows selected.
SQL> select username, program, status from v$session where username = 'SYS';
USERNAME PROGRAM STATUS
SYS OMS INACTIVE
SYS sqlplus@cassini (TNS V1-V3) ACTIVE
SYS OMS INACTIVE
3 rows selected.But, yet if I query V$RMAN_BACKUP_JOB_DETAILS, you see it says it is running.
SESSION_KEY INPUT_TYPE STATUS START_TIME END_TIME HRS
4252 DB INCR COMPLETED 12/10/12 01:00 12/10/12 01:07 .13
4258 DB INCR RUNNING 12/10/12 13:53
4260 DB INCR RUNNING 12/10/12 13:57
4262 DB INCR RUNNING 12/10/12 14:03
4264 DB INCR RUNNING 12/10/12 14:06
4266 DB INCR RUNNING 12/10/12 14:08 -
Upgradation from 11..5.10 to CU2 is taking more than 30 hours
Hi All ,
WE 're upgrading our application from 11.5.10 to 11.5.10.2 by applying 3460000 patch . Our OS version is AIX 5.3 .
But our patch is running from last 30 hours and is still running . We've checked the patch log & Worker log and from that we've found that it's running succesfully . But 30 hours is a very long time and we can't arrange such downtime on PROD . And still the patch is not completed .
I want to know that if anyone here ( reading this post ) has applied this patch earlier , then how much time it 'll take to complete ??? Is this time OK . And also , is this patch depends upon the DATABASE size . As here our database size is 3 TB . Is it also creating a problem , if yes then whats the workaround for this .
Earlier revert or workaround on this would be highly appreciated . you can revert me on my id also , my id is [email protected]
regds
Rahul GuptaRahul,
30 hours does seem like a long time. How many parallel workers are you using? On a 12 CPU box, you should specify workers=36 or workers=48 unless you start swapping heavily with that many java processes during the database portion. Also, how many other instances are running on this box? Does the box seem overloaded?
After the upgrade completes, go into Oracle Applications Manager and look at the timing details for 3460000, or look at the csv timing report in $APPL_TOP/admin/<sid>/out and look for problems with the longest running tasks.
You may want to run bde_rebuild.sql on your biggest schemas to look for fragmented indexes and ensure you have done gather schema stats before the upgrade along with a gather dictionary stats as shown below:
Collecting Statistics with Oracle Apps 11i
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=368252.1
bde_rebuild.sql - Validates and rebuilds indexes occupying more space than needed
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=182699.1
!date
execute dbms_stats.unlock_schema_stats('SYS');
execute dbms_stats.unlock_schema_stats('SYSTEM');
exec dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE); exec dbms_stats.gather_schema_stats('SYS',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE); exec dbms_stats.gather_fixed_objects_stats();
commit;
exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR');
exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR');
commit;
Rman Backup is Very Slow selecting from V$RMAN_STATUS
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=375386.1
Poor performance when accessing V$RMAN_BACKUP_JOB_DETAILS
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=420200.1
Troubleshooting Oracle Applications Performance Issues
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=169935.1 -
DB Performance Issues after 10g Upgrade in EBS Instance
We have upgraded our Database from 9i to 10g as first part of EBS 11.5.9 to 11.5.10.2 upgrade. Currently our production is running on 11.5.9 apps with 10g DB.
Facing performance problems now. one of the them is, one Valueset query not using funcion based index while fired from the front end. but the same query when collected from SQL trace tkprofed file and executed from SQL Plus, it uses all proper indexes. We are not getting the cause of this.
Had anyone faced same kind of issues before. please suggest.
thanks,
Raj.Make sure you have all of the recommended performance patches for 11.5.9, and gather stats for SYS and SYSTEM in the following manner:
Oracle E-Business Suite Recommended Performance Patches
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=244040.1
Collecting Statistics with Oracle Apps 11i
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=368252.1
execute dbms_stats.unlock_schema_stats('SYS');
execute dbms_stats.unlock_schema_stats('SYSTEM');
exec dbms_stats.gather_schema_stats('SYSTEM',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_schema_stats('SYS',options=>'GATHER', estimate_percent => 100, method_opt => 'FOR ALL COLUMNS SIZE AUTO', cascade => TRUE);
exec dbms_stats.gather_fixed_objects_stats();
commit;
exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR');
exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR');
commit;
The last 3 commands resolve problems with RMAN, in case you are using it.
Rman Backup is Very Slow selecting from V$RMAN_STATUS
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=375386.1
Poor performance when accessing V$RMAN_BACKUP_JOB_DETAILS
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=420200.1
Troubleshooting Oracle Applications Performance Issues
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=169935.1
Debugging General Performance Issues with Oracle Apps
http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/18#a1548
Performance Tuning the Apps Database Layer
http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/17#a1562
Preventing Apps 11i Performance Issues in Four Steps
http://blogs.oracle.com/schan/newsItems/departments/optimizingPerformance/2007/05/21#a1566 -
isitpasrd03{icfgtst2}/apps/opt/oracle> cat text.sh
#!/bin/ksh
VALUE1=`/apps/opt/oracle/product/10.2.0/bin/sqlplus -silent / as sysdba <<END
set pagesize 0 feedback off verify off heading off echo off
col TIME_TAKEN_DISPLAY for a10
col INPUT_BYTES_DISPLAY for a10
col OUTPUT_BYTES_DISPLAY for a10
select start_time,end_time,output_device_type,input_type,status,time_taken_display,input_bytes_display,output_bytes_display from V\$RMAN_BACKUP_JOB_DETAILS where to_date(Start_time, 'DD-MON-YY')=to_date(sysdate,'DD-MON-YY');
`
echo " $VALUE1"
isitpasrd03{icfgtst2}/apps/opt/oracle> sh text.sh
select start_time,end_time,output_device_type,input_type,status,time_taken_display,input_bytes_display,output_bytes_display from V where to_date(Start_time, 'DD-MON-YY')=to_date(sysdate,'DD-MON-YY')
ERROR at line 1:
ORA-00942: table or view does not exist
I do not understand where the error is.. can anyone help me on this pls..isitpasrd03{icfgtst2}/apps/opt/oracle> cat text.sh
#!/bin/ksh
VALUE1=`/apps/opt/oracle/product/10.2.0/bin/sqlplus -silent / as sysdba <<END
set pagesize 0 feedback off verify off heading off echo off
col TIME_TAKEN_DISPLAY for a10
col INPUT_BYTES_DISPLAY for a10
col OUTPUT_BYTES_DISPLAY for a10
select start_time,end_time,output_device_type,input_type,status,time_taken_display,input_bytes_display,output_bytes_display from V\$RMAN_BACKUP_JOB_DETAILS where to_date(Start_time, 'DD-MON-YY')=to_date(sysdate,'DD-MON-YY');
`
END
echo " $VALUE1"
ITS THE SAME ERROR
isitpasrd03{icfgtst2}/apps/opt/oracle> sh text.sh
text.sh: END: not found
select start_time,end_time,output_device_type,input_type,status,time_taken_display,input_bytes_display,output_bytes_display from V where to_date(Start_time, 'DD-MON-YY')=to_date(sysdate,'DD-MON-YY')
ERROR at line 1:
ORA-00942: table or view does not exist -
Hi,
I found following activitoes on my ADDM report .. Plz advice
FINDING 2: 73% impact (13482 seconds)
SQL statements consuming significant database time were found.
RECOMMENDATION 1: SQL Tuning, 25% benefit (4640 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"8v8h41b8xypnr".
RELEVANT OBJECT: SQL statement with SQL_ID 8v8h41b8xypnr and
PLAN_HASH 3229043654
SELECT /*+ NOREWRITE */
DECODE(o310689.ORDER_NUMBER,2020090010,'Exclude',2020090011,'Exclude'
,2010090002,'Exclude',2020090012,'Exclude',2020090016,'Exclude',20100
90006,'Exclude',2010090007,'Exclude',2010090009,'Exclude',2020090032,
'Exclude',2010090015,'Exclude',2010090019,'Exclude',2020090037,'Exclu
de',2020090039,'Exclude',2020090040,'Exclude',2010090026,'Exclude',20
20090046,'Exclude',2010090027,'Exclude',2010090028,'Exclude',20200900
51,'Exclude',2020090052,'Exclude',2020090060,'Exclude',2020090062,'Ex
clude',2010090010,'Exclude',2020090036,'Exclude',2020090038,'Exclude'
,2020090045,'Exclude',2020090058,'Exclude',2010090033,'Exclude',946,'
Exclude',91650015,'Exclude',91800718,'Exclude',91800727,'Exclude',918
00728,'Exclude',91800729,'Exclude',91800733,'Exclude',94620320,'Exclu
de',94620380,'Exclude',94620393,'Exclude',94620394,'Exclude',94620395
,'Exclude',94620400,'Exclude',94620402,'Exclude',94620403,'Exclude',9
4801118,'Exclude',94801139,'Exclude',94801148,'Exclude',94801153,'Exc
lude',94801156,'Exclude',94801163,'Exclude',94801164,'Exclude',948011
74,'Exclude',94801175,'Exclude',94801177,'Exclude',94801178,'Exclude'
,94801184,'Exclude',94801185,'Exclude',94801192,'Exclude',94940009,'E
xclude',99300565,'Exclude',99920099,'Exclude',99920101,'Exclude',9992
0103,'Exclude',99920105,'Exclude','NULL') as
C_1,NVL(o310689.SHIPPED_QUANTITY,0)-NVL(o310689.RMA_RECEIVED_QUANTITY
,0) as C_2,o310689.ORDER_TYPE as E310693,o310689.ORDERED_DATE as
E310694,o310689.ORDER_NUMBER as E310695,o310689.ITEM_BRAND as
E310696,o310689.ITEM_CODE as E310701,o310689.ORDERED_QUANTITY as
E310702,o310689.SHIPPED_QUANTITY as E310703,o310689.RMA_QUANTITY as
E310704,o310689.RMA_RECEIVED_QUANTITY as E310705,o310689.UNIT_COST as
E310706,o310689.DEALER_NAME as E310707,o310689.AUTHORIZED_BY_EMPNO as
E310708,o310689.AUTHORIZED_BY_NAME as E310709,o310689.RETURN_DAYS as
E310710,o310689.REMARKS as E310711,o310689.SHIPPING_INSTRUCTIONS as
E310712,o310689.DELIVERY_ORG as E310715,o310689.ITEM_DESCRIPTION as
E310719,o310689.ORDER_LINE_STATUS as
E310884,o310689.SOURCE_DOCUMENT_REF as E333596
FROM ( select upper(xos1.ORDER_TYPE) ORDER_TYPE
,xos1.ORDERED_DATE
,xos1.ORDER_NUMBER
,xos1.ORDER_LINE_STATUS
,xos1.ITEM_BRAND
,xos1.ITEM_GROUP
,xos1.ITEM_SUB_GROUP
,xos1.ITEM_TYPE
,xos1.ITEM_SUB_TYPE
,xos1.ITEM_CODE
,xos1.ITEM_DESCRIPTION
,xos1.ORDERED_QUANTITY
, -1*(select sum(mmts.PRIMARY_QUANTITY) from
mtl_material_transactions mmts where
mmts.TRX_SOURCE_LINE_ID=xos1.LINE_ID and
mmts.TRANSACTION_TYPE_ID=33)SHIPPED_QUANTITY
,xos1.UNIT_COST
,xos1.HD_CUST_NAME dealer_name
,xos1.HD_CUST_ADDR authorized_by_empno
,(select full_name from per_all_people_f where
employee_number=xos1.HD_CUST_ADDR) authorized_by_name
,xos1.HD_CUST_MOBNO return_days
,xos1.HD_CUST_CONTACT remarks
,xos1.SHIPPING_INSTRUCTIONS
,xos1.ORGANIZATION_CODE delivery_org
,xos1.SOURCE_DOCUMENT_REF
,xos2.RMA_quantity
,xos2.RMA_received_quantity
from XXEROS_ONT_SALESORDER_V xos1,(select
xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID,sum(abs(xos3.ORDERED_
QUANTITY)) RMA_quantity
,sum(abs(xos3.SHIPPED_QUANTITY)) RMA_received_quantity from
XXEROS_ONT_SALESORDER_V xos3
where abs(nvl(xos3.SHIPPED_QUANTITY,0))>0
group by xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID) xos2
where xos1.HEADER_ID=xos2.REFERENCE_HEADER_ID (+)
and xos1.LINE_ID=xos2.REFERENCE_LINE_ID (+)
and (upper(xos1.ORDER_TYPE) like ('%ISSUE TO DEALER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SERVICE CENTER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SC%')
or upper(xos1.ORDER_TYPE) like ('%MATERIAL ISSUE%')
or upper(xos1.ORDER_TYPE) like ('%WAREHOUSE ISSUE%'))
) o310689
WHERE (TRUNC(o310689.ORDERED_DATE) <=
TO_DATE('20110321000000','YYYYMMDDHH24MISS'))
AND (o310689.ITEM_CODE LIKE '%%')
AND (o310689.ORDER_TYPE LIKE '%ISSUE TO DEALER%')
AND (NVL(o310689.SHIPPED_QUANTITY,0) <>
NVL(o310689.RMA_RECEIVED_QUANTITY,0))
ORDER BY o310689.ORDERED_DATE ASC , o310689.ORDER_NUMBER ASC ,
o310689.DELIVERY_ORG ASC
RECOMMENDATION 2: SQL Tuning, 17% benefit (3160 seconds)
ACTION: Tune the PL/SQL block with SQL_ID "d1swc9auhtxwd". Refer to the
"Tuning PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide
and Reference"
RELEVANT OBJECT: SQL statement with SQL_ID d1swc9auhtxwd
BEGIN WF_ENGINE.BACKGROUNDCONCURRENT(:errbuf,:rc,:A0,:A1,:A2,:A3,:A4,
:A5); END;
RATIONALE: SQL statement with SQL_ID "d1swc9auhtxwd" was executed 1
times and had an average elapsed time of 3166 seconds.
RECOMMENDATION 3: SQL Tuning, 17% benefit (3101 seconds)
ACTION: Tune the PL/SQL block with SQL_ID "gksvm8wmzk8w0". Refer to the
"Tuning PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide
and Reference"
RELEVANT OBJECT: SQL statement with SQL_ID gksvm8wmzk8w0
begin OE_INVOICE_WF.INVOICE_INTERFACE (:v1, :v2, :v3, :v4, :v5); end;
RATIONALE: SQL statement with SQL_ID "gksvm8wmzk8w0" was executed 461
times and had an average elapsed time of 6.7 seconds.
RECOMMENDATION 4: SQL Tuning, 15% benefit (2863 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"67uwuf6a7a657".
RELEVANT OBJECT: SQL statement with SQL_ID 67uwuf6a7a657 and
PLAN_HASH 3622377863
SELECT COUNT(1) FROM RA_CUSTOMER_TRX_LINES_ALL RCTL WHERE
RCTL.INTERFACE_LINE_CONTEXT = 'ORDER ENTRY' AND RCTL.LINE_TYPE =
'LINE' AND RCTL.INTERFACE_LINE_ATTRIBUTE6 = TO_CHAR(:B2 ) AND
RCTL.SALES_ORDER = :B1 AND RCTL.SALES_ORDER_LINE IS NOT NULL
RATIONALE: SQL statement with SQL_ID "67uwuf6a7a657" was executed 462
times and had an average elapsed time of 4.3 seconds.
RECOMMENDATION 5: SQL Tuning, 10% benefit (1867 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"9kzwsazsktuzv".
RELEVANT OBJECT: SQL statement with SQL_ID 9kzwsazsktuzv and
PLAN_HASH 3342766736
SELECT end_time, status FROM v$rman_backup_job_details WHERE end_time
= (select max(end_time) from v$rman_backup_job_details)
ACTION: Investigate the SQL statement with SQL_ID "9kzwsazsktuzv" for
possible performance improvements.
RELEVANT OBJECT: SQL statement with SQL_ID 9kzwsazsktuzv and
PLAN_HASH 3342766736
SELECT end_time, status FROM v$rman_backup_job_details WHERE end_time
= (select max(end_time) from v$rman_backup_job_details)
RATIONALE: SQL statement with SQL_ID "9kzwsazsktuzv" was executed 28
times and had an average elapsed time of 64 seconds.
ThanksFINDING 3: 38% impact (7137 seconds)
Time spent on the CPU by the instance was responsible for a substantial part
of database time.
HI,
ADDM Report-- plz advice ..
RECOMMENDATION 1: SQL Tuning, 25% benefit (4640 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"8v8h41b8xypnr".
RELEVANT OBJECT: SQL statement with SQL_ID 8v8h41b8xypnr and
PLAN_HASH 3229043654
SELECT /*+ NOREWRITE */
DECODE(o310689.ORDER_NUMBER,2020090010,'Exclude',2020090011,'Exclude'
,2010090002,'Exclude',2020090012,'Exclude',2020090016,'Exclude',20100
90006,'Exclude',2010090007,'Exclude',2010090009,'Exclude',2020090032,
'Exclude',2010090015,'Exclude',2010090019,'Exclude',2020090037,'Exclu
de',2020090039,'Exclude',2020090040,'Exclude',2010090026,'Exclude',20
20090046,'Exclude',2010090027,'Exclude',2010090028,'Exclude',20200900
51,'Exclude',2020090052,'Exclude',2020090060,'Exclude',2020090062,'Ex
clude',2010090010,'Exclude',2020090036,'Exclude',2020090038,'Exclude'
,2020090045,'Exclude',2020090058,'Exclude',2010090033,'Exclude',946,'
Exclude',91650015,'Exclude',91800718,'Exclude',91800727,'Exclude',918
00728,'Exclude',91800729,'Exclude',91800733,'Exclude',94620320,'Exclu
de',94620380,'Exclude',94620393,'Exclude',94620394,'Exclude',94620395
,'Exclude',94620400,'Exclude',94620402,'Exclude',94620403,'Exclude',9
4801118,'Exclude',94801139,'Exclude',94801148,'Exclude',94801153,'Exc
lude',94801156,'Exclude',94801163,'Exclude',94801164,'Exclude',948011
74,'Exclude',94801175,'Exclude',94801177,'Exclude',94801178,'Exclude'
,94801184,'Exclude',94801185,'Exclude',94801192,'Exclude',94940009,'E
xclude',99300565,'Exclude',99920099,'Exclude',99920101,'Exclude',9992
0103,'Exclude',99920105,'Exclude','NULL') as
C_1,NVL(o310689.SHIPPED_QUANTITY,0)-NVL(o310689.RMA_RECEIVED_QUANTITY
,0) as C_2,o310689.ORDER_TYPE as E310693,o310689.ORDERED_DATE as
E310694,o310689.ORDER_NUMBER as E310695,o310689.ITEM_BRAND as
E310696,o310689.ITEM_CODE as E310701,o310689.ORDERED_QUANTITY as
E310702,o310689.SHIPPED_QUANTITY as E310703,o310689.RMA_QUANTITY as
E310704,o310689.RMA_RECEIVED_QUANTITY as E310705,o310689.UNIT_COST as
E310706,o310689.DEALER_NAME as E310707,o310689.AUTHORIZED_BY_EMPNO as
E310708,o310689.AUTHORIZED_BY_NAME as E310709,o310689.RETURN_DAYS as
E310710,o310689.REMARKS as E310711,o310689.SHIPPING_INSTRUCTIONS as
E310712,o310689.DELIVERY_ORG as E310715,o310689.ITEM_DESCRIPTION as
E310719,o310689.ORDER_LINE_STATUS as
E310884,o310689.SOURCE_DOCUMENT_REF as E333596
FROM ( select upper(xos1.ORDER_TYPE) ORDER_TYPE
,xos1.ORDERED_DATE
,xos1.ORDER_NUMBER
,xos1.ORDER_LINE_STATUS
,xos1.ITEM_BRAND
,xos1.ITEM_GROUP
,xos1.ITEM_SUB_GROUP
,xos1.ITEM_TYPE
,xos1.ITEM_SUB_TYPE
,xos1.ITEM_CODE
,xos1.ITEM_DESCRIPTION
,xos1.ORDERED_QUANTITY
, -1*(select sum(mmts.PRIMARY_QUANTITY) from
mtl_material_transactions mmts where
mmts.TRX_SOURCE_LINE_ID=xos1.LINE_ID and
mmts.TRANSACTION_TYPE_ID=33)SHIPPED_QUANTITY
,xos1.UNIT_COST
,xos1.HD_CUST_NAME dealer_name
,xos1.HD_CUST_ADDR authorized_by_empno
,(select full_name from per_all_people_f where
employee_number=xos1.HD_CUST_ADDR) authorized_by_name
,xos1.HD_CUST_MOBNO return_days
,xos1.HD_CUST_CONTACT remarks
,xos1.SHIPPING_INSTRUCTIONS
,xos1.ORGANIZATION_CODE delivery_org
,xos1.SOURCE_DOCUMENT_REF
,xos2.RMA_quantity
,xos2.RMA_received_quantity
from XXEROS_ONT_SALESORDER_V xos1,(select
xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID,sum(abs(xos3.ORDERED_
QUANTITY)) RMA_quantity
,sum(abs(xos3.SHIPPED_QUANTITY)) RMA_received_quantity from
XXEROS_ONT_SALESORDER_V xos3
where abs(nvl(xos3.SHIPPED_QUANTITY,0))>0
group by xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID) xos2
where xos1.HEADER_ID=xos2.REFERENCE_HEADER_ID (+)
and xos1.LINE_ID=xos2.REFERENCE_LINE_ID (+)
and (upper(xos1.ORDER_TYPE) like ('%ISSUE TO DEALER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SERVICE CENTER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SC%')
or upper(xos1.ORDER_TYPE) like ('%MATERIAL ISSUE%')
or upper(xos1.ORDER_TYPE) like ('%WAREHOUSE ISSUE%'))
) o310689
WHERE (TRUNC(o310689.ORDERED_DATE) <=
TO_DATE('20110321000000','YYYYMMDDHH24MISS'))
AND (o310689.ITEM_CODE LIKE '%%')
AND (o310689.ORDER_TYPE LIKE '%ISSUE TO DEALER%')
AND (NVL(o310689.SHIPPED_QUANTITY,0) <>
NVL(o310689.RMA_RECEIVED_QUANTITY,0))
ORDER BY o310689.ORDERED_DATE ASC , o310689.ORDER_NUMBER ASC ,
o310689.DELIVERY_ORG ASC
RECOMMENDATION 2: SQL Tuning, 17% benefit (3071 seconds)
ACTION: Tune the PL/SQL block with SQL_ID "gksvm8wmzk8w0". Refer to the
"Tuning PL/SQL Applications" chapter of Oracle's "PL/SQL User's Guide
and Reference"
RELEVANT OBJECT: SQL statement with SQL_ID gksvm8wmzk8w0
begin OE_INVOICE_WF.INVOICE_INTERFACE (:v1, :v2, :v3, :v4, :v5); end;
RATIONALE: SQL statement with SQL_ID "gksvm8wmzk8w0" was executed 461
times and had an average elapsed time of 6.7 seconds.
RATIONALE: Average CPU used per execution was 6.6 seconds.
RECOMMENDATION 3: SQL Tuning, 10% benefit (1867 seconds)
ACTION: Run SQL Tuning Advisor on the SQL statement with SQL_ID
"9kzwsazsktuzv".
RELEVANT OBJECT: SQL statement with SQL_ID 9kzwsazsktuzv and
PLAN_HASH 3342766736
SELECT end_time, status FROM v$rman_backup_job_details WHERE end_time
= (select max(end_time) from v$rman_backup_job_details)
ACTION: Investigate the SQL statement with SQL_ID "9kzwsazsktuzv" for
possible performance improvements.
RELEVANT OBJECT: SQL statement with SQL_ID 9kzwsazsktuzv and
PLAN_HASH 3342766736
SELECT end_time, status FROM v$rman_backup_job_details WHERE end_time
= (select max(end_time) from v$rman_backup_job_details)
RATIONALE: SQL statement with SQL_ID "9kzwsazsktuzv" was executed 28
times and had an average elapsed time of 64 seconds.
RATIONALE: Average CPU used per execution was 23 seconds.
FINDING 4: 26% impact (4808 seconds)
Individual database segments responsible for significant user I/O wait were
found.
RECOMMENDATION 1: Segment Tuning, 9.6% benefit (1776 seconds)
ACTION: Investigate application logic involving I/O on TABLE
"ONT.OE_ORDER_LINES_ALL" with object id 41455.
RELEVANT OBJECT: database object with id 41455
RATIONALE: The I/O usage statistics for the object are: 2 full object
scans, 1348462 physical reads, 1574 physical writes and 0 direct
reads.
RATIONALE: The SQL statement with SQL_ID "avs0dw5k4jggq" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID avs0dw5k4jggq
select HLINE_ID from XXCOGNOS_SALES_ORDER_LIST_ALL
RATIONALE: The SQL statement with SQL_ID "cajftann925ju" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID cajftann925ju
INSERT INTO XXCUST.XXWSH_DELIVERY_NOTE ( RECORD_IDENTIFIER ,
ORDER_NUMBER , DELIVERY_ID , SHIP_TO_SITE_USE_ID , DELIVERY_NAME ,
HEADER_ID , DEL_DATE , SALES_CHANNEL_CODE , INVENTORY_ITEM_ID ,
ORDERED_ITEM , ITEM_DESCRIPTION , CUST_PO_NUMBER , SHIP_INS ,
ORDERED_DATE , PRINT_STATUS , DELIVER_NUMBER , PICKED_QUANTITY ,
BALANCE_QTY ) SELECT :b1 , OOH.ORDER_NUMBER , WDA.DELIVERY_ID ,
WDD.SHIP_TO_SITE_USE_ID , WND.NAME , WDD.SOURCE_HEADER_ID , TO_DATE
(WND.ATTRIBUTE12 ) DEL_DATE , OOH.SALES_CHANNEL_CODE ,
WDD.INVENTORY_ITEM_ID , OOL.ORDERED_ITEM , WDD.ITEM_DESCRIPTION ,
OOH.CUST_PO_NUMBER , ' ' || OOH.ATTRIBUTE1
|| '/ ' || OOH.ATTRIBUTE3 || '/ ' || OOH.ATTRIBUTE7 || '/ '
|| OOH.ATTRIBUTE6 || '/ ' || OOH.ATTRIBUTE2 || '/ ' ||
OOH.ATTRIBUTE5 || '/ ' || OOH.SHIPPING_INSTRUCTIONS SHIPINS ,
TRUNC (OOH.ORDERED_DATE ) ORDERED_DATE , WND.ATTRIBUTE14 ,
WND.ATTRIBUTE13 , SUM (WDD.PICKED_QUANTITY) PICKED_QUANTITY , SUM
(WDD.REQUESTED_QUANTITY - WDD.PICKED_QUANTITY ) BALANCE_QTY FROM
OE_ORDER_HEADERS_ALL OOH , OE_ORDER_LINES_ALL OOL ,
WSH_NEW_DELIVERIES WND , WSH_DELIVERY_ASSIGNMENTS WDA ,
WSH_DELIVERY_DETAILS WDD WHERE WND.DELIVERY_ID = WDA.DELIVERY_ID
AND WDA.DELIVERY_DETAIL_ID = WDD.DELIVERY_DETAIL_ID AND
OOH.HEADER_ID = WDD.SOURCE_HEADER_ID AND OOL.LINE_ID =
WDD.SOURCE_LINE_ID AND OOL.HEADER_ID = WDD.SOURCE_HEADER_ID AND
OOH.HEADER_ID = OOL.HEADER_ID AND OOH.ORG_ID = OOL.ORG_ID AND
WDD.SOURCE_CODE = 'OE' AND RELEASED_STATUS IN ( 'C' , 'I' , 'Y' )
AND NVL(OOH.SALES_CHANNEL_CODE , 'DLY_NOTE' ) = 'DLY_NOTE' AND
OOL.SHIP_FROM_ORG_ID = :b2 AND OOH.ORDER_NUMBER BETWEEN NVL(:b3 ,
OOH.ORDER_NUMBER ) AND NVL(:b4 , OOH.ORDER_NUMBER ) AND
WND.DELIVERY_ID IN (SELECT DELIVERY_ID FROM WSH_TRIP_STOPS STP ,
WSH_DELIVERY_LEGS LEG , WSH_TRIPS WT WHERE LEG.PICK_UP_STOP_ID =
STP.STOP_ID AND STP.TRIP_ID = WT.TRIP_ID AND WT.TRIP_ID = NVL(:b5
, WT.TRIP_ID ) ) AND WND.ATTRIBUTE14 IS NULL GROUP BY
OOH.ORDER_NUMBER , WDA.DELIVERY_ID , WDD.SHIP_TO_SITE_USE_ID ,
WND.NAME , WDD.SOURCE_HEADER_ID , WND.ATTRIBUTE12 ,
OOH.SALES_CHANNEL_CODE , WDD.INVENTORY_ITEM_ID , OOL.ORDERED_ITEM ,
WDD.ITEM_DESCRIPTION , OOH.CUST_PO_NUMBER , '
' || OOH.ATTRIBUTE1 || '/ ' || OOH.ATTRIBUTE3 || '/ ' ||
OOH.ATTRIBUTE7 || '/ ' || OOH.ATTRIBUTE6 || '/ ' ||
OOH.ATTRIBUTE2 || '/ ' || OOH.ATTRIBUTE5 || '/ ' ||
OOH.SHIPPING_INSTRUCTIONS , TRUNC (OOH.ORDERED_DATE ) ,
WND.ATTRIBUTE14 , WND.ATTRIBUTE13
RATIONALE: The SQL statement with SQL_ID "4m39p9a78z133" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID 4m39p9a78z133
SELECT OOD.OPERATING_UNIT ORG_ID, TRUNC (OOLV.CREATION_DATE)
CREATED_DT, TRUNC (OOLV.LAST_UPDATE_DATE) UPDATED_DT, ABS
(MMT.PRIMARY_QUANTITY) QTY, MMT.CREATED_BY CREATED_BY,
MMT.LAST_UPDATED_BY UPDATED_BY, MMT.INVENTORY_ITEM_ID ITEM_NAME,
MMT.TRANSACTION_UOM UOM, MMT.ACTUAL_COST COST1, 6717 DR_ACCOUNT_ID,
MPS.MATERIAL_ACCOUNT CR_ACCOUNT_ID , TRUNC (MMT.TRANSACTION_DATE)
TXN_DATE, MMT.SOURCE_LINE_ID LINE_ID, OOHA.ATTRIBUTE1 PRJ_NO, 'COST'
TASK1, DECODE (OOHA.ORDER_TYPE_ID, 1042, 'Equipment', 1201,
'Material', NULL ) EXP_TYPE, MMT.SOURCE_LINE_ID ORIG_TRANS_REF,
OOLV.LINE_NUMBER REQUEST_NUMBER, NULL UNMATCHED_NEGATIVE_TXN_FLAG,
MMT.DISTRIBUTION_ACCOUNT_ID, MMT.TRANSACTION_ID FROM
OE_ORDER_LINES_ALL OOLV, OE_ORDER_HEADERS_ALL OOHA,
MTL_MATERIAL_TRANSACTIONS MMT, MTL_TRANSACTION_TYPES MTT,
ORG_ORGANIZATION_DEFINITIONS OOD, MTL_PARAMETERS MPS WHERE
OOLV.LINE_ID = MMT.TRX_SOURCE_LINE_ID AND OOLV.HEADER_ID =
OOHA.HEADER_ID AND MMT.TRANSACTION_TYPE_ID = MTT.TRANSACTION_TYPE_ID
AND OOHA.CONTEXT = 'Project Transfer' AND OOHA.ATTRIBUTE1 IS NOT NULL
AND NVL (MMT.ATTRIBUTE15, 'X') <> 'TRANSFERRED_TO_PROJECT' AND
MTT.TRANSACTION_TYPE_ID = 33 AND OOD.ORGANIZATION_ID =
MPS.ORGANIZATION_ID AND MMT.ORGANIZATION_ID = OOD.ORGANIZATION_ID AND
OOHA.ORDER_TYPE_ID IN (1042, 1201) AND MMT.COSTED_FLAG IS NULL UNION
ALL SELECT OOD.OPERATING_UNIT ORG_ID, TRUNC (OOLV.CREATION_DATE)
CREATED_DT, TRUNC (OOLV.LAST_UPDATE_DATE) UPDATED_DT,
(MMT.TRANSACTION_QUANTITY * -1 ) QTY, MMT.CREATED_BY CREATED_BY,
MMT.LAST_UPDATED_BY UPDATED_BY, MMT.INVENTORY_ITEM_ID ITEM_NAME,
MMT.TRANSACTION_UOM UOM, MMT.ACTUAL_COST COST1, MPS.MATERIAL_ACCOUNT
DR_ACCOUNT_ID, 6717 CR_ACCOUNT_ID , TRUNC (MMT.TRANSACTION_DATE)
TXN_DATE, MMT.SOURCE_LINE_ID LINE_ID, OOHA.ATTRIBUTE1 PRJ_NO, 'COST'
TASK1, DECODE (OOHA.ORDER_TYPE_ID, 1042, 'Equipment', 1201,
'Material', 1239, 'Equipment', 1240, 'Material', NULL ) EXP_TYPE,
MMT.SOURCE_LINE_ID ORIG_TRANS_REF, OOLV.LINE_NUMBER REQUEST_NUMBER,
'Y' UNMATCHED_NEGATIVE_TXN_FLAG, MMT.DISTRIBUTION_ACCOUNT_ID,
MMT.TRANSACTION_ID FROM OE_ORDER_LINES_ALL OOLV, OE_ORDER_LINES_ALL
OOLR, OE_ORDER_HEADERS_ALL OOHA, MTL_MATERIAL_TRANSACTIONS MMT,
MTL_TRANSACTION_TYPES MTT, ORG_ORGANIZATION_DEFINITIONS OOD,
MTL_PARAMETERS MPS WHERE MMT.TRX_SOURCE_LINE_ID = OOLV.LINE_ID AND
OOLV.HEADER_ID = OOHA.HEADER_ID AND MMT.TRANSACTION_TYPE_ID =
MTT.TRANSACTION_TYPE_ID AND OOHA.CONTEXT = 'Project Transfer' AND
OOHA.ATTRIBUTE1 IS NOT NULL AND NVL (MMT.ATTRIBUTE15, 'X') <>
'TRANSFERRED_TO_PROJECT' AND MTT.TRANSACTION_TYPE_ID = 15 AND
OOD.ORGANIZATION_ID = MPS.ORGANIZATION_ID AND MMT.ORGANIZATION_ID =
OOD.ORGANIZATION_ID AND OOLV.REFERENCE_HEADER_ID = OOLR.HEADER_ID AND
OOLV.REFERENCE_LINE_ID = OOLR.LINE_ID AND OOHA.ORDER_TYPE_ID IN
(1239, 1240) AND MMT.COSTED_FLAG IS NULL
RATIONALE: The SQL statement with SQL_ID "8ms1bza9t8vww" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID 8ms1bza9t8vww
select TRX_LINE from XXCOGNOS_SO_INV_NEW_V
RECOMMENDATION 2: Segment Tuning, 4.9% benefit (903 seconds)
ACTION: Run "Segment Advisor" on TABLE "AR.RA_CUSTOMER_TRX_LINES_ALL"
with object id 29149.
RELEVANT OBJECT: database object with id 29149
ACTION: Investigate application logic involving I/O on TABLE
"AR.RA_CUSTOMER_TRX_LINES_ALL" with object id 29149.
RELEVANT OBJECT: database object with id 29149
RATIONALE: The I/O usage statistics for the object are: 486 full object
scans, 64008942 physical reads, 63 physical writes and 0 direct
reads.
RATIONALE: The SQL statement with SQL_ID "gksvm8wmzk8w0" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID gksvm8wmzk8w0
begin OE_INVOICE_WF.INVOICE_INTERFACE (:v1, :v2, :v3, :v4, :v5); end;
RECOMMENDATION 3: Segment Tuning, 4.5% benefit (831 seconds)
ACTION: Investigate application logic involving I/O on TABLE
"INV.MTL_MATERIAL_TRANSACTIONS" with object id 38612.
RELEVANT OBJECT: database object with id 38612
RATIONALE: The I/O usage statistics for the object are: 0 full object
scans, 71252528 physical reads, 117 physical writes and 0 direct
reads.
RATIONALE: The SQL statement with SQL_ID "8v8h41b8xypnr" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID 8v8h41b8xypnr
SELECT /*+ NOREWRITE */
DECODE(o310689.ORDER_NUMBER,2020090010,'Exclude',2020090011,'Exclude'
,2010090002,'Exclude',2020090012,'Exclude',2020090016,'Exclude',20100
90006,'Exclude',2010090007,'Exclude',2010090009,'Exclude',2020090032,
'Exclude',2010090015,'Exclude',2010090019,'Exclude',2020090037,'Exclu
de',2020090039,'Exclude',2020090040,'Exclude',2010090026,'Exclude',20
20090046,'Exclude',2010090027,'Exclude',2010090028,'Exclude',20200900
51,'Exclude',2020090052,'Exclude',2020090060,'Exclude',2020090062,'Ex
clude',2010090010,'Exclude',2020090036,'Exclude',2020090038,'Exclude'
,2020090045,'Exclude',2020090058,'Exclude',2010090033,'Exclude',946,'
Exclude',91650015,'Exclude',91800718,'Exclude',91800727,'Exclude',918
00728,'Exclude',91800729,'Exclude',91800733,'Exclude',94620320,'Exclu
de',94620380,'Exclude',94620393,'Exclude',94620394,'Exclude',94620395
,'Exclude',94620400,'Exclude',94620402,'Exclude',94620403,'Exclude',9
4801118,'Exclude',94801139,'Exclude',94801148,'Exclude',94801153,'Exc
lude',94801156,'Exclude',94801163,'Exclude',94801164,'Exclude',948011
74,'Exclude',94801175,'Exclude',94801177,'Exclude',94801178,'Exclude'
,94801184,'Exclude',94801185,'Exclude',94801192,'Exclude',94940009,'E
xclude',99300565,'Exclude',99920099,'Exclude',99920101,'Exclude',9992
0103,'Exclude',99920105,'Exclude','NULL') as
C_1,NVL(o310689.SHIPPED_QUANTITY,0)-NVL(o310689.RMA_RECEIVED_QUANTITY
,0) as C_2,o310689.ORDER_TYPE as E310693,o310689.ORDERED_DATE as
E310694,o310689.ORDER_NUMBER as E310695,o310689.ITEM_BRAND as
E310696,o310689.ITEM_CODE as E310701,o310689.ORDERED_QUANTITY as
E310702,o310689.SHIPPED_QUANTITY as E310703,o310689.RMA_QUANTITY as
E310704,o310689.RMA_RECEIVED_QUANTITY as E310705,o310689.UNIT_COST as
E310706,o310689.DEALER_NAME as E310707,o310689.AUTHORIZED_BY_EMPNO as
E310708,o310689.AUTHORIZED_BY_NAME as E310709,o310689.RETURN_DAYS as
E310710,o310689.REMARKS as E310711,o310689.SHIPPING_INSTRUCTIONS as
E310712,o310689.DELIVERY_ORG as E310715,o310689.ITEM_DESCRIPTION as
E310719,o310689.ORDER_LINE_STATUS as
E310884,o310689.SOURCE_DOCUMENT_REF as E333596
FROM ( select upper(xos1.ORDER_TYPE) ORDER_TYPE
,xos1.ORDERED_DATE
,xos1.ORDER_NUMBER
,xos1.ORDER_LINE_STATUS
,xos1.ITEM_BRAND
,xos1.ITEM_GROUP
,xos1.ITEM_SUB_GROUP
,xos1.ITEM_TYPE
,xos1.ITEM_SUB_TYPE
,xos1.ITEM_CODE
,xos1.ITEM_DESCRIPTION
,xos1.ORDERED_QUANTITY
, -1*(select sum(mmts.PRIMARY_QUANTITY) from
mtl_material_transactions mmts where
mmts.TRX_SOURCE_LINE_ID=xos1.LINE_ID and
mmts.TRANSACTION_TYPE_ID=33)SHIPPED_QUANTITY
,xos1.UNIT_COST
,xos1.HD_CUST_NAME dealer_name
,xos1.HD_CUST_ADDR authorized_by_empno
,(select full_name from per_all_people_f where
employee_number=xos1.HD_CUST_ADDR) authorized_by_name
,xos1.HD_CUST_MOBNO return_days
,xos1.HD_CUST_CONTACT remarks
,xos1.SHIPPING_INSTRUCTIONS
,xos1.ORGANIZATION_CODE delivery_org
,xos1.SOURCE_DOCUMENT_REF
,xos2.RMA_quantity
,xos2.RMA_received_quantity
from XXEROS_ONT_SALESORDER_V xos1,(select
xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID,sum(abs(xos3.ORDERED_
QUANTITY)) RMA_quantity
,sum(abs(xos3.SHIPPED_QUANTITY)) RMA_received_quantity from
XXEROS_ONT_SALESORDER_V xos3
where abs(nvl(xos3.SHIPPED_QUANTITY,0))>0
group by xos3.REFERENCE_HEADER_ID,xos3.REFERENCE_LINE_ID) xos2
where xos1.HEADER_ID=xos2.REFERENCE_HEADER_ID (+)
and xos1.LINE_ID=xos2.REFERENCE_LINE_ID (+)
and (upper(xos1.ORDER_TYPE) like ('%ISSUE TO DEALER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SERVICE CENTER%')
or upper(xos1.ORDER_TYPE) like ('%ISSUE TO SC%')
or upper(xos1.ORDER_TYPE) like ('%MATERIAL ISSUE%')
or upper(xos1.ORDER_TYPE) like ('%WAREHOUSE ISSUE%'))
) o310689
WHERE (TRUNC(o310689.ORDERED_DATE) <=
TO_DATE('20110321000000','YYYYMMDDHH24MISS'))
AND (o310689.ITEM_CODE LIKE '%%')
AND (o310689.ORDER_TYPE LIKE '%ISSUE TO DEALER%')
AND (NVL(o310689.SHIPPED_QUANTITY,0) <>
NVL(o310689.RMA_RECEIVED_QUANTITY,0))
ORDER BY o310689.ORDERED_DATE ASC , o310689.ORDER_NUMBER ASC ,
o310689.DELIVERY_ORG ASC
RECOMMENDATION 4: Segment Tuning, 4.1% benefit (768 seconds)
ACTION: Run "Segment Advisor" on TABLE "AR.RA_INTERFACE_LINES_ALL" with
object id 28266.
RELEVANT OBJECT: database object with id 28266
ACTION: Investigate application logic involving I/O on TABLE
"AR.RA_INTERFACE_LINES_ALL" with object id 28266.
RELEVANT OBJECT: database object with id 28266
RATIONALE: The I/O usage statistics for the object are: 49184 full
object scans, 78734476 physical reads, 610 physical writes and
36573343 direct reads.
RATIONALE: The SQL statement with SQL_ID "gksvm8wmzk8w0" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID gksvm8wmzk8w0
begin OE_INVOICE_WF.INVOICE_INTERFACE (:v1, :v2, :v3, :v4, :v5); end;
RECOMMENDATION 5: Segment Tuning, 2.9% benefit (530 seconds)
ACTION: Investigate application logic involving I/O on TABLE
"INV.MTL_SYSTEM_ITEMS_B" with object id 38489.
RELEVANT OBJECT: database object with id 38489
RATIONALE: The I/O usage statistics for the object are: 4 full object
scans, 1288002 physical reads, 451 physical writes and 0 direct
reads.
RATIONALE: The SQL statement with SQL_ID "abwz9n6zhfau7" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID abwz9n6zhfau7
SELECT DISTINCT /*+ NOREWRITE */
NVL(o253810.ATR,0)-NVL(o253810.UNRES_QTY,0) as C_1,o253810.WAREHOUSE
as E253811,o253810.BRAND as E253812,o253810.GROUPCODE as
E253813,o253810.SUBGROUP as E253814,o253810.TYPE as
E253815,o253810.SUBTYPE as E253816,o253810.ITEM_CODE as
E253817,o253810.ITEM_NAME as E253818,o253810.UNRES_QTY as
E253819,o253810.STOCK as E253820,o253810.ATR as
E253821,o253810.RESERVED as E253822,o253810.TOTAL as E253823
FROM APPS.XX_STOCK_V o253810
WHERE (o253810.ITEM_CODE LIKE '%%')
ORDER BY o253810.ITEM_CODE ASC
RATIONALE: The SQL statement with SQL_ID "5yvpw0g5cusff" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID 5yvpw0g5cusff
SELECT DISTINCT /*+ NOREWRITE */
NVL(o253810.ATR,0)-NVL(o253810.UNRES_QTY,0) as C_1,o253810.WAREHOUSE
as E253811,o253810.BRAND as E253812,o253810.GROUPCODE as
E253813,o253810.SUBGROUP as E253814,o253810.ITEM_CODE as
E253817,o253810.ITEM_NAME as E253818,o253810.UNRES_QTY as
E253819,o253810.STOCK as E253820,o253810.ATR as
E253821,o253810.RESERVED as E253822,o253810.TOTAL as
E253823,o255805.PRICE as E255816
FROM APPS.XX_STOCK_V o253810,
( SELECT CUSTOMER_ITEM_ID,product_attr_val_disp
ITEM_CODE,PRODUCT_UOM_CODE,PRIMARY_UOM_FLAG,BREAK_UOM_CODE,BREAK_UOM_
CONTEXT,OPERAND PRICE,START_DATE_ACTIVE,
END_DATE_ACTIVE,MODIFIER_LEVEL_CODE,PRODUCT_PRECEDENCE,COMMENTS,REVIS
ION,REVISION_DATE,REVISION_REASON_CODE,ROW_ID,PRODUCT_ATTRIBUTE_CONTE
XT,
PRODUCT_ATTRIBUTE,BREAK_UOM_ATTRIBUTE,PRODUCT_ATTR_VALUE,INCOMPATIBIL
ITY_GRP_CODE,LIST_LINE_NO,PRICING_GROUP_SEQUENCE,ACCRUAL_FLAG,PRICING
PHASEID,
AUTOMATIC_FLAG,PRICE_BY_FORMULA_ID,INVENTORY_ITEM_ID,ORGANIZATION_ID,
RELATED_ITEM_ID,RELATIONSHIP_TYPE_ID,SUBSTITUTION_CONTEXT,SUBSTITUTIO
N_ATTRIBUTE,
SUBSTITUTION_VALUE,CREATION_DATE,CREATED_BY,LAST_UPDATE_DATE,LAST_UPD
ATED_BY,LAST_UPDATE_LOGIN,PROGRAM_APPLICATION_ID,PROGRAM_ID,PROGRAM_U
PDATE_DATE,
REQUEST_ID,LIST_HEADER_ID,LIST_LINE_ID,PRICE_BREAK_TYPE_CODE,NUMBER_E
FFECTIVE_PERIODS,EFFECTIVE_PERIOD_UOM,OVERRIDE_FLAG,PRINT_ON_INVOICE_
FLAG,
REBATE_TRANSACTION_TYPE_CODE,BASE_QTY,BASE_UOM_CODE,ACCRUAL_QTY,ACCRU
AL_UOM_CODE,ESTIM_ACCRUAL_RATE,GENERATE_USING_FORMULA_ID,REPRICE_FLAG
,CONTEXT,
ATTRIBUTE1,ATTRIBUTE2,ATTRIBUTE3,ATTRIBUTE4,ATTRIBUTE5,ATTRIBUTE6,ATT
RIBUTE7,ATTRIBUTE8,ATTRIBUTE9,ATTRIBUTE10,ATTRIBUTE11,ATTRIBUTE12,ATT
RIBUTE13,
ATTRIBUTE14,ATTRIBUTE15,PRICING_ATTRIBUTE_ID,PRICING_ATTRIBUTE_CONTEX
T,PRICING_ATTRIBUTE,PRICING_ATTR_VALUE_FROM,PRICING_ATTR_VALUE_TO,PRO
DUCT_ID,
LIST_PRICE,PERCENT_PRICE,ARITHMETIC_OPERATOR,LIST_LINE_TYPE_CODE,prod
uct_attribute_datatype,pricing_attribute_datatype,comparison_operator
_code,
ATTR_CONTEXT,ATTR_ATTRIBUTE1,ATTR_ATTRIBUTE2,ATTR_ATTRIBUTE3,ATTR_ATT
RIBUTE4,ATTR_ATTRIBUTE5,ATTR_ATTRIBUTE6,ATTR_ATTRIBUTE7,ATTR_ATTRIBUT
E8,
ATTR_ATTRIBUTE9,ATTR_ATTRIBUTE10,ATTR_ATTRIBUTE11,ATTR_ATTRIBUTE12,AT
TR_ATTRIBUTE13,ATTR_ATTRIBUTE14,ATTR_ATTRIBUTE15,ATTR_CREATION_DATE,
ATTR_CREATED_BY,ATTR_LAST_UPDATE_DATE,ATTR_LAST_UPDATED_BY,ATTR_LAST_
UPDATE_LOGIN,ATTR_PROGRAM_APPLICATION_ID,ATTR_PROGRAM_ID,ATTR_PROGRAM
UPDATEDATE,
ATTR_REQUEST_ID,PA_LIST_HEADER_ID,CONTINUOUS_PRICE_BREAK_FLAG FROM
qp_list_lines_v WHERE PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
AND EXISTS (SELECT '1' FROM MTL_SYSTEM_ITEMS mtl WHERE
product_attr_value = mtl.inventory_item_id AND mtl.organization_id =
(SELECT qp_util.get_item_validation_org FROM Dual)
AND product_attribute= 'PRICING_ATTRIBUTE1' UNION SELECT '1' FROM
dual WHERE product_attribute != 'PRICING_ATTRIBUTE1')
and (LIST_HEADER_ID=6016) and (PA_LIST_HEADER_ID='6016')
) o255805
WHERE ( (o255805.ITEM_CODE = o253810.ITEM_CODE))
AND (o253810.ITEM_CODE LIKE '%%')
AND (o255805.END_DATE_ACTIVE IS NULL )
ORDER BY o253810.ITEM_CODE ASC
RATIONALE: The SQL statement with SQL_ID "8ms1bza9t8vww" spent
significant time waiting for User I/O on the hot object.
RELEVANT OBJECT: SQL statement with SQL_ID 8ms1bza9t8vww
select TRX_LINE from XXCOGNOS_SO_INV_NEW_V
SYMPTOMS THAT LED TO THE FINDING:
SYMPTOM: Wait class "User I/O" was consuming significant database time.
(43% impact [7964 seconds]) -
Monitor the online backup progress in Oracle 11g (RMAN)
Hi,
is there a simple way to see the progress of the online backp for oracle?
We are using oracle 11g and using RMAN td level-0 and level-1 backups in the SAP environment(SAP Netweaver 7.01)
Regards,
RakeshThanks Siva!
I was looking for something like a script which tells me the running backup progress.
Like the following script which tells the status of RMAN backup (completed/failed):
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;
regards,
Rakesh -
===========================================
DB-Maintenance checks
===========================================
What is the Library Cache Hit Ratio, it should be >90%
SELECT SUM (PINHITS) / SUM (PINS) * 100 FROM V$LIBRARYCACHE;
What is Library Cache Reloads Ratio, It should be <1%
SELECT SUM (PINS), SUM (RELOADS), SUM (RELOADS) / SUM (PINS) FROM V$LIBRARYCACHE;
Dictionary Cache Miss Ratio should be <15%
SELECT (SUM (GETMISSES) / SUM (GETS)) * 100 FROM V$ROWCACHE;
Hit Ratio For DB Buffer Cache should be >90%
Select (sum(GETS-GETMISSES)) / SUM(GETS)*100 "Dictionary Cache Hit Ratio" From v$rowcache;
Full Table Scans Ratio should be <5%
SELECT D.VALUE "disk", M.VALUE "mem", (D.VALUE / M.VALUE) * 100 "Ratio" FROM V$SYSSTAT M, V$SYSSTAT D WHERE M.NAME = 'sorts (memory)' AND D.NAME = 'sorts (disk)';
If Full Table Scan is more than 5% run below query to find full details:-
SELECT * FROM V$SYSSTAT WHERE NAME LIKE '%table scan%';
#echo 'ALERT - Oracle Access (HRMI - 192.168.68.212) on:' `date` `who` | mail -s "Alert: Oracle Access from `who -m | cut -d"(" -f2 | cut -d")" -f1`" [email protected]
=======================================================
RMAN Backup job details:
select to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,INPUT_TYPE,STATUS,to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs,OUTPUT_BYTES_DISPLAY from V$RMAN_BACKUP_JOB_DETAILS order by session_key ;
RMAN Backup details:
select to_char(START_TIME,'mm/dd/yy hh24:mi') start_time,INPUT_TYPE,STATUS,to_char(END_TIME,'mm/dd/yy hh24:mi') end_time,
elapsed_seconds/3600 hrs,OUTPUT_BYTES_DISPLAY from V$RMAN_BACKUP_JOB_DETAILS order by session_key ;
Waits by class:
Select wait_class, sum(time_waited), sum(time_waited)/sum(total_waits) Sum_Waits From v\$system_wait_class Group by wait_class Order by 3 desc;
waits by instance:
select event, time_waited from v\$system_event where ROWNUM <= 10 order by 1;
waits datafile level:
select f.file_name "Data File",count(*) "Wait Number",sum(h.time_waited) "Total Time Waited" from v$active_session_history h,dba_data_files f where h.sample_time between sysdate - 1/24 and sysdate
and h.current_file#=f.file_id
group by f.file_name
order by 3 desc;
waiting sessions sql:
select h.user_id,u.username,s.sql_text,sum ( h.wait_time + h.time_waited ) "Total wait time" from v$active_session_history h, v$sqlarea s,dba_users u,v$event_name e where h.sample_time between sysdate - 1/24 and sysdate and h.sql_id=s.sql_id and h.user_id = u.user_id and e.event_id = h.event_id and e.wait_class <> 'idle'
group by h.user_id,s.sql_text,u.username order by 4 desc;
what are users currently waiting on:
select s.sid,s.username,sum(h.wait_time+h.time_waited) " Total Waited Time " from v$active_session_history h,v$session s,v$event_name e where h.sample_time between sysdate - 1/24 and sysdate
and h.session_id = s.sid
and e.event_id = h.event_id
and e.wait_class <> 'idle'
and s.username is not null
group by s.sid,s.username
order by 1;
buffer busy waits:
select owner, segment_name, segment_type from dba_extents a, v$session_wait b
where b.event='buffer busy waits' and a.file_id=b.p1;
blocked sessions:
SELECT b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
v$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1, 2, 3, 4;
large objects in shared pool:
select OWNER,NAME||' - '||TYPE object,SHARABLE_MEM
from v\$db_object_cache
where SHARABLE_MEM > 10000
and type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE')
order by SHARABLE_MEM desc;
blocked sessions:
SELECT b.session_id AS sid,
NVL(b.oracle_username, '(oracle)') AS username,
a.owner AS object_owner,
a.object_name,
Decode(b.locked_mode, 0, 'None',
1, 'Null (NULL)',
2, 'Row-S (SS)',
3, 'Row-X (SX)',
4, 'Share (S)',
5, 'S/Row-X (SSX)',
6, 'Exclusive (X)',
b.locked_mode) locked_mode,
b.os_user_name
FROM dba_objects a,
v\$locked_object b
WHERE a.object_id = b.object_id
ORDER BY 1, 2, 3, 4;
Find out SGA usage:
select round(used.bytes /1024/1024 ,2) used_mb,
round(free.bytes /1024/1024 ,2) free_mb,
round(tot.bytes /1024/1024 ,2) total_mb
from
(select sum(bytes) bytes from v$sgastat where name != 'free memory') used ,
(select sum(bytes) bytes from v$sgastat where name = 'free memory') free ,
(select sum(bytes) bytes from v$sgastat) tot
==============================================
disk capacity: fdisk -l
Total memory: grep MemTotal /proc/meminfo
CPU Deatils: cat /proc/cpuinfo
OS BIt: uname -a
OS Version: cat /etc/redhat-release
Check CPU is 32/64 Bit: getconf LONG_BIT
=====================================================
Sun OS:
==========
check Total physical memory:
# prtdiag -v | grep Memory
# prtconf | grep Memory
check Free physical Memory:
# top (if available)
# sar -r 5 10
Free Memory=freemen*8 (pagesize=8k)
# vmstat 5 10
Free Memory = free
For swap:
# swap -s
# swap -l
OS BIt: isalist (sparcv9,amd64 then 64bit)
OS Version: cat /etc/release
CPU Deatils: psrinfo -v
================================================
Established sessions for specific port:
netstat -an|grep :1800|sort|wc -l
netstat -an|grep :1800|sort|grep 'ESTABLISHED'|wc -l
=====================================================answered
-
Recommeneded Auto Update Feature in 11.1 Grid Control
Hi All,
I would like inform you about New Auto Update feature in the 11.1 Grid Control Installer. This feature allows the latest recommended patches to be automatically deployed while installing a fresh 11.1 Grid control or while upgrading an existing Grid control to 11.1 version.
These auto updates ensure that any patches required by the oracle installer or for successful installation/upgrade of the product are applied before the actual installation or upgrade process. It ensures that there are no failed installations or upgrades from known issues.
Oracle highly recommends using this feature to ensure that any new or upgraded Enterprise Manager installation is successful
To know more about usage and benefits of this feature Refer to :
1. Note.1101208.1 Required Patches for Grid Control 11g (11.1.0.1.0) on Linux
2. Note.1099123.1 Overview of the "Auto Update" Feature Available with Grid Control 11g Install/Upgrade
3. Refer to this PDF
4. Use Install forum to place your queries
Note:- If you have downloaded and installed your Grid control before15th May 2010 then we recommend you to apply this Generic Agent patch 9676134 on all your target boxes. Refer to the Read-me of the patch for exact instructions. If you don't have this patch applied then you will see this patch appear in MOS recommended section for that target as well.
This patch fixes the performance issue that is caused by Grid control 11.1 running a metric query against the v$rman_backup_job_details view on target database instances for Oracle Database 10g Release 2 (10.2.0.1) or higher. In some situations, this query might expose RDBMS bug 8434467, in which the query can run for an extended period of time, resulting in high CPU utilization.If you notice this problem, it is recommended that you apply the patches listed below, which will reduce the the frequency of the query.Thank you
Maybe you are looking for
-
Searching a pdf document in order to find text parts formatted with a specific font
I have a document that I output as a pdf. Between the first and last version of this document, I've made some changes, one of those being replacing a font by another one. Alas, in the final pdf document, under "document properties", "fonts tab", I ca
-
ABAP PROXY upgrade from XI 3.0 to PI 7.1
Hi, We are planning to upgrade XI 3.0 to PI 7.1 We have couple of interfaces with ABAP proxy, the SAP version is ECC Web AS 640. What factors do we need to take into account during this upgrade specific to Proxy development? Thanks Sachin K
-
Change required input fields in XD01
Hello everyone, I am doing development to Enhance transaction XD01. I have one additional button which execute popup window. This window retrieve some data from external system. What I am going to do, is override required (for instance Address) data
-
Hi I want to create a PO to a vendor as per the below format. How can i do. The payment want to be released as per the below % as per the period specified in the PO. Scope Study - 10% Configuration - 25% Realisation - 35% Go Live - 30% Vijay
-
Using iTunes from an external harddrive?
I would like to know if it is possible to download and run itunes from an external harddrive. I have a lot of music and would not like it to be on my macbook's harddrive.