Sponsored Content
Top Forums Shell Programming and Scripting script for RAC information required Post 302529488 by click on Thursday 9th of June 2011 11:46:23 AM
Old 06-09-2011
I`m not DBA but will this be helpful

test.sql
Code:
connect myuser/mypass
select group_number, file_number, compound_index, incarnation, block_size, bytes/1024/1024/1024 GB, type, striped,
creation_date, modification_date from v$asm_file where TYPE != 'ARCHIVELOG';

select group_number, file_number, bytes/1024/1024/1024 GB, type, striped, modification_date
from v$asm_file where TYPE != 'ARCHIVELOG';

select group#, type, member, is_recovery_dest_file from v$logfile order by group#;

select name from v$datafile 
union select name from v$controlfile
union select name from v$tempfile
union select member from v$logfile;

set numwidth 10
column event format a25 tru
select inst_id, event, time_waited, total_waits, total_timeouts
from (select inst_id, event, time_waited, total_waits, total_timeouts
from gv$system_event where event not in ('rdbms ipc message','smon timer',
'pmon timer', 'SQL*Net message from client','lock manager wait for remote message',
'ges remote message', 'gcs remote message', 'gcs for action', 'client message', 
'pipe get', 'null event', 'PX Idle Wait', 'single-task message', 
'PX Deq: Execution Msg', 'KXFQ: kxfqdeq - normal deqeue', 
'listen endpoint status','slave wait','wakeup time manager')
order by time_waited desc)
where rownum < 11
order by time_waited desc;

test.sh
Code:
#!/bin/bash
sqlplus internal @test.sql
/u01/app/11.2.0/grid/bin/crs_stat -t
/u01/app/11.2.0/grid/bin/crsctl check crs

srvctl status asm -n ukedxdtmtdbs01a
srvctl status asm -n ukedxdtmtdbs01b

If you like to get it as e-mail run

test.sh | mail -s "Oracle report" john@smith.org

As I said I`m no DBA so no guarantee it would work Smilie
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script required

The line is like this +abc+def+mgh+ddsdsd+sa i.e. words seperated by +. There is a plus in the beginning. i want to conver this line to abc, def, mgh, ddsdsd, sa please provide the logic in the form of a shell script Thanks in advance (13 Replies)
Discussion started by: skyineyes
13 Replies

2. UNIX for Advanced & Expert Users

Help required in this script.

Hi Everyone, Please find below the script, I needed to understand step by step:confused:. Please If someone can help me out i will be very greatful:D. Please Guide me in a way which can help me out in figuring what this script doing on my server. ... (3 Replies)
Discussion started by: jojo123
3 Replies

3. Shell Programming and Scripting

Getting required fields from a test file in required fromat in unix

My data is something like shown below. date1 date2 aaa bbbb ccccc date3 date4 dddd eeeeeee ffffffffff ggggg hh I want the output like this date1date2 aaa eeeeee I serached in the forum but didn't find the exact matching solution. Please help. (7 Replies)
Discussion started by: rdhanek
7 Replies

4. Shell Programming and Scripting

Only the required tag information the XML file file

Hi i have a single line xml file having many account no tag, from which i need only the account no from the tag. any one can help on this. below is the xml file: ... (2 Replies)
Discussion started by: Saravanapk
2 Replies

5. Red Hat

ls: /lib/libattr.so.1: no version information available (required by /lib/libacl.so.1)

Hello, I'm experimenting a problem on my rh server. Red Hat Enterprise Linux AS release 3 (Taroon Update 8) 2.4.21-47.ELsmp #1 SMP i686 i686 i386 GNU/Linux It started with a segmentation fault on #id root To resolve it, I've installed coreutils-4.5.3-28.4.i386.rpm But, I... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

6. Solaris

How to converting rac to one rac ?

hi everyone, We have rac system which has two sun solaris M5000s and two oracle 11gR2 databases respectively. Also , we have unix codes on one rac and these unix codes extract txt files for external tables during first step of ETL. We run our unix codes using Util.RunThis java code and... (10 Replies)
Discussion started by: imtheone
10 Replies

7. AIX

Information required for AIX certification

Hello friends, I want some information on AIX certification and want to give the AIX certification exam but not getting the proper information required. Basically when I am trying to search the information about this certification getting different options like "AIX p series certification" Aix... (6 Replies)
Discussion started by: naman agarwal
6 Replies

8. UNIX for Dummies Questions & Answers

Perl Script:how to find how many parameters are required to run the script

How to find how many parameters are required to run a Perl script? (1 Reply)
Discussion started by: Lakshman_Gupta
1 Replies

9. UNIX for Dummies Questions & Answers

Not able to get the required o/p from my script

Hi Experts, I have a script as below : # cat a.sh var=`mysql -usupport -p'testing' -e "select count(1) from db_test.sampletable;"` echo $var the output of this script is : count(1) 145039 Now i want to remove header from my o/p and modify somewhat like 145039 I have... (9 Replies)
Discussion started by: mukulverma2408
9 Replies
jstest(1)						      General Commands Manual							 jstest(1)

NAME
jstest - joystick test program SYNOPSIS
jstest [--normal] [--old] [--event] [--nonblock] [--select] <device-name> DESCRIPTION
jstest can be used to test all the features of the Linux joystick API, including non-blocking and select(2) access, as well as version 0.x compatibility mode. It is also intended to serve as an example implementation for those who wish to learn how to write their own joystick using applications. OPTIONS
--normal One-line mode showing immediate status. --old Same as --normal, using 0.x interface. --event Prints events as they come in. --nonblock Same as --event, in nonblocking mode. --select Same as --event, using select(2) call. SEE ALSO
fftest(1), jscal(1). AUTHOR
jstest was written by Vojtech Pavlik. This manual page was written by Stephen Kitt <steve@sk2.org>, for the Debian GNU/Linux system (but may be used by others). jstest April 21, 2009 jstest(1)
All times are GMT -4. The time now is 11:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy