Lmnop
===========================================
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
Similar Messages
-
Find the same day in a range then find the difference between the days
Need assistnace with the following .
I have a table of ids for courses and each course class is on a day. I have to take the first day the course class is on and find the next same day then work out the difference in days.
eg. a course class is on a saturday then have to go thru the course class associated to a course and find the next saturday then work out the difference.
Anyone able to help - it would be much appreciatedcourse class id date day
abcdefa 18/12/2002 wednesday
abcdefb 19/12/2002 thursday
abcdefc 20/12/2002 friday
zxvyza 17/12/2002 monday
zxvyzb 20/12/2002 thursday
zxvyzc 21/12/2002 friday
zxvyzd 24/12/2002 monday
zxvyze 26/12/2002 wednesday
lmnopa 11/11/2002 tuesday
lmnopb 12/11/2002 wednesday
lmnopc 14/11/2002 friday
lmnopd 19/11/2002 wednesday
lmnope 21/11/2002 friday
where abcdefa, abcdefbc, abcdefc are for course id abcdef
and the other set of course class ids are for course id zxvyz.
and 3rd set relates to course id lmnop.
expectation:
the difference between days for the first set of data to be 0
the difference between days for 2nd set to be 7 days (ie. take the first day for the course class and see if can find another that is the same and then work out the difference i.e monday) then return the difference then go to next course class id.
the diff between 3rd set is calc the diff between Wednesdays, ignore the last friday and find the next course class id. the answer here will be 7 days.
I have worked out the days from the dates (although the above is only an example)but wasnt sure how to pick the same days then work out the difference and then move to the next course class id. Some course classes wont have another same day. -
I have a question. I'm writing a group of inserts for a database. In the event that one of those inserts fail due to a constraint issue, I want the whole group of inserts to roll back. How would I do that?
Example:
Begin
Insert into table1
values ('1', 'M', '12321');
Insert into table2
values ('2','12345','lmnop','data','data1','data3')
End;
commit;
Well table 2 requires a constraint on the 6th column to be either data1 or data2, but I've got data3.
How can I write this so that it will rollback on both inserts, because at least one of them failed?
Thank you,
MGIf you are running your code in a PL/SQL block you can include an exception handler to catch the error and then rollback.
Sample:
BEGIN
--insert statement
--insert statement 2
EXCEPTION
WHEN <EXCEPTION HERE> THEN
ROLLBACK;
RAISE;
END;
/The <EXCEPTION HERE> can be a named exception (like shown here: [http://www.techonthenet.com/oracle/exceptions/named_system.php]), or a custom defined exception.
However, if this code is part of a larger structure than you can let the constraint error propogate out of this block to the calling program and handle the exception and rollback there.
Hope this helps! -
Hi, I need to rename a still photograph which has been imported into a sequence. I assume that once I change the name in the finder, the clip will go off-line. Then, do I tell the program don't look for xyz.jpeg, look for lmnop.jpeg? What's the best and safest way to rename a clip?
Thanks!Yes! Read here for more information:
http://monicabriano.com/2010/04/27/how-to-reconnect-media-in-final-cut/
You'll need to uncheck the box labeled "Matched Name and Reel Only" when reconnecting. -
GR-Accounting document Enhancement
All SAP experts,
Can we do any enhancement in the accounting documents created after GR posting?
We need posting to particular GL during Intercompany replenishment. Like Vendor is supplying plant XYZ and site ABC (where Goods receipts is carried out) then Post to GL LMNOP. when we lookinto accounting doc, it shld post to GL (LMNOP).
Thanks in advance !
Rahul.hi,
No, its not possible externally....For proper posting check the assignment for the Auto Account dertermination for the G/L accounts....
Then cancel this doc and create new one....
> Pls check the settings here:
> You can Configure automatic account determination with following T.Code's :
> 1.OMSK: valuation Class with Account catagory reference,
> 2.OMWM: Active Valuation Grouping Code,
> 3.OMWN: Active Movement type with G/L account,
> 4.OMWD: Active Valuation Area,
> 5.OMWB: Active Chart of account,Valuation Grouping Code,Account Grouping Code,Valuation Class and G/L acocounts
Hope it helps...
Regards
Priyanka.P -
Hi all,
I am working oracle 11g R1.
I have data like this (more than 100,000 records). I have posted sample here.
SENDER DOCUMENTTYPE RECEIVER PROCESS CNT RPT_DATE
VPS abc RF p1 148 02/15/2012
GVP xyz lmnop p1 4 02/16/2012
GVP xyz lmnop o2 665 02/17/2012
more recordsI would like see this as
SENDER DOCUMENTTYPE RECEIVER PROCESS 02/15/2012 02/16/2012 02/17/2012 .... and more dates
VPS abc RF p1 148 0 0
GVP xyz lmnop p1 0 4 0
GVP xyz lmnop o2 0 0 665Please share your thoughts. Codes if any.
even dates can be show as day1,day2.....day7. Since its for weekly analysis
Thanks
Raj
Edited by: Rangarajan on Feb 22, 2012 2:16 AMSomething like this..?
SQL> select *
2 from test_dt;
DT VAL AMT
22-FEB-12 V1 100
21-FEB-12 V2 200
20-FEB-12 V3 300
14-FEB-12 V3 300
18-FEB-12 V3 300
15-FEB-12 V4 400
17-FEB-12 V4 400
16-FEB-12 V4 400
SQL> select *
2 from(
3 select val,'Day'||rn dy,amt
4 from test_dt a,
5 (select to_date('22022012','ddmmyyyy') - level + 1 dt1,level rn
6 from dual
7 connect by level <= 7
8 ) b
9 where a.dt = b.dt1
10 )
11 pivot (
12 sum(amt) for dy in ('Day1','Day2','Day3','Day4','Day5','Day6','Day7')
13 );
VAL 'Day1' 'Day2' 'Day3' 'Day4' 'Day5' 'Day6' 'Day7'
V3 300 300
V4 400 400
V2 200
V1 100 -
how to solve resolve this kind of error.... i am using JPA
An instance of a null PK has been incorrectly provided for this find operation.I had the identical problem on a Centro (Verizon):
Palm Desktop - Calendar (DateBook) would skip over 1 month from Jan 2009 to Mar 2009 or the application would crash with an error message: the instruction at 0x5ad71531 referenced memory at 0x00000014.
The problem would only happen in the Month view. Was ok in Day, Week, and Year views. Crashes occured most frequently when I went backwards through the months (eg: June 2009, May 2009, April 2009, crash).
SOLUTION:
Looking at all the Feb 2009 entries on the Centro (not on the Desktop), I found that there was one appointment with a LONG LOCATION - ie: look at the details for each calendar entry in the misbehaving month and see if you used a "Location" description that is long (I define long as any location that is longer than about 20 characters- especially any location that is longer than what you can see on-screen on the Centro).
SHORTEN the LOCATION (eg: change a location like: ABC-XYZ THEATRE at 4500 LMNOP STREET to something much shorter like: ABC-XYZ THEATRE). Then hotsync with your pc. That's it. Cured my problem immediately. Hope it helps others with theirs too.
Final note - I'm a Computer Systems guy and an experimenter at heart, so I tried adding a long location description to a calendar entry on a Treo 755p (Sprint) and then did a hotsync with my pc. Opened up Palm Desktop on the pc and lo & behold, that month was skipped over in the month view or the app would crash. Deleted the location on the Treo and hotsync'd again and the problem was gone.
Post relates to: Centro (Verizon) and Treo 755p (Sprint)
Post relates to: Treo 755p (Sprint)
Maybe you are looking for
-
Looking for advice on how to share pdf files with iPad from Mac. Pages seems to only recognize text. What app is recommended for pdf documents?
-
Service procurement for the free texts ( Multiple line items in PO)
In the service procurement for the free texts ( Multiple line items in PO)referring to the same Contract we are cretaing the POs thro ME59 ( Program RM06BB20) an unusual error message appears as under: "_Material/Service group STGOP2 does not exist
-
Downloaded iOS 7 and now cant sync to iTunes
I just downloaded iOS7 via wifi because I use iTunes is 10.6.3. I cannot get iTunes 11 becuase my macbook is OS X 10.5.8. Now that my phone is the current version, I can not connect it to iTunes. Any suggestions aside from getting a new computer?
-
How to connect to SQLServer from APEX?
Hi colleagues!! I know that is posible connect APEX to SQLServer with a dblink, but I want to know if it is posible without use the function since oracle database. I want to do since Application Express. Thank you Best Regards!!
-
Why does "enter time machine" crash my computer?
The title is pretty descriptive. The "crash" is that I get the spinning beach ball of death and over the course of a few seconds my machine becomes completely non-responsive to input (keystokes stop working, then the wiggling the mouse stops working)