Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Wanted specific oracle scripts

SOLVED
Go to solution
Real_Pipol
Honored Contributor

Wanted specific oracle scripts

hello
i'm lookinf for scripts able to return the status of PMON,SMON,DBWR,LGWR.

Scripts which checks:
- the number of opened processes
-fulfilling of the data tablespace
-fullfilling of the index tablespace
-fullfilling of the rollback tablespace
-Database stop/start
-usr login/logoff

10 points for attachments, 5 for an usefull post.

thanks
6 REPLIES
Steve Steel
Honored Contributor

Re: Wanted specific oracle scripts

Hi

http://www.introcomp.co.uk/database/oracle.html

http://www.uaex.edu/srea/

http://web.singnet.com.sg/~petermag/oracle.html


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Real_Pipol
Honored Contributor

Re: Wanted specific oracle scripts

thanks for the post, but i can't find anything useful there.

P.Pollet
Yogeeraj_1
Honored Contributor
Solution

Re: Wanted specific oracle scripts

hi,

about PMON, SMON, DBWR and LGWR:

In a dedicated server mode (most common mode), there is a process per session
typically and you must count the background/slave processes (DBWR, LGWR, ARCH,
CKPT and so on). The latter processes should always be running and are visible both at the OS and database levels.

A peek at v$process will tell you how many there are and their status. (see example in attached script)

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Wanted specific oracle scripts

Hi again,

The attached script display free space on the database. This gives you the overall usage.

Well, it might be 0.01% full but it might also be autoextensible. Use the following script to see whats really there:
Max
Max pct
Tablespa KBytes Used Free Used Largest Kbytes Used
SYSTEM 201,728 200,960 768 99.6 704 33,554,416 .6

shows that my system tablespace is currently 201m and has 0.4% fre HOWEVER it can grow to 33gig and hence has only used 0.6% of its potential.


What that shows me is:

Kbytes = space allocated to the tablespace currently.
Used = space allocated within the tablespace to specific objects
Free = space NOT yet allocated to any objects
Used = % of space allocated to objects in tablespace
Largest= Largest free contigous extent available (autoextensible will overrule this however by allocating additional extents as soon as required)

Now, to find the amount of free space within the allocated space, we have 2 choices:

o analyze tables frequently. Then the "EMPTY_BLOCKS" column in user_tables will be populated

o use the dbms_space package to find the free space available.

If you really want to know the amount of space used for Indexes and Data, you will have to analyze the tables and further query the data dictionary to get the desired information.

hth
Yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Wanted specific oracle scripts

Hi,
-Database stop/start

Use the attached script to both start or stop your Oracle Database and listener.

START:
oracle.sh start

STOP:
oracle.sh stop

Assumptions: (please modify the script accordingly)
============================
Oracle OS user = oracle
Oracle Home = /u01/app/oracle/product/8.1.7
Oracle SID = yddb

hth
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: Wanted specific oracle scripts


hi again,

This script can be used to view list of connected users, in the following format:

PID SID SER# BOX USERNAME OS_USER PROGRAM Logon Time
_________ _____ _____ ______ __________ ________ _______________ ______________
10956 30 1707 cmtk25 SW gw sqlplus@cmtk250 08/04/03 15:40
10963 25 1755 L1000 SW ias MK100OC0 - Make 08/04/03 15:41


This includes the actual login time of the users.

Hope this helps!

Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)