Rollstat



Remote DBA Plans

Remote DBA Service

Remote DBA RAC



Process command execution
Oracle Tips by Burleson Consulting


Process command execution
To illustrate the communications between UNIX and Oracle, let’s use the example of a UNIX script that accesses Oracle to display rollback segment information. Because of the complex details and differences in UNIX dialects, this example has been deliberately over-simplified for illustration purposes.
rollstat.ksh
#!/bin/ksh
# First, we must set the environment . . . .
export ORACLE_HOME=$1
ORACLE_HOME=`cat /etc/oratab|grep ^$ORACLE_SID:|cut -f2 -d':'`
export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$PATH
export PATH
$ORACLE_HOME/bin/sqlplus system/manager<<!
select * from v$rollstat;
exit
!
echo All Done!

Note the reference to the v$rollstat view in the UNIX script as v$rollstat. In UNIX, you must place a back-slash character in from of every dollar sign in all SQL commands to tell UNIX that the dollar sign is a literal value and not a UNIX shell command.
When we execute this script in UNIX, the script performs the following UNIX system calls:
1 - fork(get_rollstat.ksh)
2 - read(/etc/oratab)
3 - fork(sqlplus)
4 - read(file#,block#)
5 - write(v$rollstat contents)
6 – write(“All Done”)
The above is an excerpt from the 'Oracle9i UNIX Administration Handbook' by Oracle press, authored by Donald K. Burleson.

BC is America's oldest and largest Remote DBA Oracle support provider. Get real Remote DBA experts, call
BC Remote DBA today.


BC Remote Oracle Support

Remote DBA Services

Oracle® is the registered trademark of Oracle Corporation.



  1. Roll Stats Dnd
  2. Roll State

Process command execution To illustrate the communications between UNIX and Oracle, let’s use the example of a UNIX script that accesses Oracle to display rollback segment information. Set echo on set pages 1000. Spool getundodetails /. —- Get DB Block size./ show parameter dbblocksize.

Rollstat

Roll Stats Dnd

StatsRollstat

Roll State

Abstract: rollstat generates a variable named `statistic´`w´varname (i.e. sd3gdp for the 3 period standard deviation of GDP) containing the rolling calculation of the specified statistic with window size defined in option w. Panacea for an Oracle Applications Database Administrator with Real Application Cluster and Data Guard.