BOLDOFF=`tput sgr0`
export PS1=$BOLDON${LOGNAME}@$(hostname)'$PWD>'$BOLDOFF

orademo@data/home/orademo>set
ADJREOPTS='-Xms128M -Xmx512M'
ADJVAPRG=/u01/oracle/demodb/9.2.0/jdk/bin/java
ADPERLPRG=/u01/oracle/demodb/9.2.0/Apache/perl/bin/perl
BOLDOFF=''
BOLDON=''
CONTEXT_FILE=/u01/oracle/demodb/9.2.0/appsutil/DEMO_data.xml
CONTEXT_NAME=DEMO_data
DISPLAY=192.168.1.17:1.0
ERRNO=2
FCEDIT=/bin/ed
HOME=/home/orademo
HZ=100
IFS='
'
LC_COLLATE=en_US.ISO8859-1
LC_CTYPE=en_US.ISO8859-1
LC_MESSAGES=C
LC_MONETARY=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1
LD_LIBRARY_PATH=/u01/oracle/demodb/9.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/u01/o
racle/demodb/9.2.0/ctx/lib
LIBPATH=/u01/oracle/demodb/9.2.0/lib:/usr/dt/lib:/usr/openwin/lib:/u01/oracle/de
modb/9.2.0/ctx/lib
LINENO=1
LINK_CNTRL=''
LOGNAME=orademo
MAIL=/usr/mail/orademo
MAILCHECK=600
NLS_DATE_FORMAT=DD-MON-RR
NLS_LANG=American_America.AR8MSWIN1256
NLS_NUMERIC_CHARACTERS=.,
NLS_SORT=binary
OPTIND=1
ORACLE_HOME=/u01/oracle/demodb/9.2.0
ORACLE_SID=DEMO
ORA_TZFILE=/u01/oracle/demodb/9.2.0/oracore/zoneinfo/timezlrg.dat
PATH=/u01/oracle/demodb/9.2.0/Apache/perl/bin:/u01/oracle/demodb/9.2.0/bin:/usr/
ccs/bin:/usr/sbin:/u01/oracle/demodb/9.2.0/jdk/bin:/usr/sbin:/usr/bin:/usr/ucb:/
usr/openwin/bin:/usr/ccs/bin/:.
PERL5LIB=/u01/oracle/demodb/9.2.0/Apache/perl/lib/5.00503:/u01/oracle/demodb/9.2
.0/Apache/perl/lib/site_perl/5.005:/u01/oracle/demodb/9.2.0/appsutil/perl
PERLBIN=/u01/oracle/demodb/9.2.0/Apache/perl/bin
PPID=11518
PS1='orademo@data$PWD>'
PS2='> '
PS3='#? '
PS4='+ '
PWD=/home/orademo
RANDOM=17140
SCRIPTS_TOP=/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data
SECONDS=69
SHELL=/bin/ksh
SHLIB_PATH=/u01/oracle/demodb/9.2.0/lib:/usr/lib:/u01/oracle/demodb/9.2.0/ctx/li
b
TERM=ansi
TMOUT=0
TNS_ADMIN=/u01/oracle/demodb/9.2.0/network/admin/DEMO_data
TZ=Asia/Kuwait
_=.profile
customfile=/u01/oracle/demodb/9.2.0/customDEMO_data.env
os=SunOS
orademo@data/home/orademo>cd $SCRIPTS_TOP
orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>ls -l
total 82
-rwx------   1 orademo  dba          976 May 14 15:08 adautocfg.sh
-rwx------   1 orademo  dba         4489 May 14 15:08 adchknls.pl
-rwx------   1 orademo  dba         3129 May 14 15:08 addbctl.sh
-rwx------   1 orademo  dba         4043 May 14 15:08 addlnctl.sh
-rwx------   1 orademo  dba         6955 May 14 15:08 adexecsql.pl
-rwx------   1 orademo  dba         3036 May 14 15:08 adlsnodes.sh
-rwx------   1 orademo  dba        14290 May 14 15:08 adpreclone.pl
-rw-------   1 orademo  dba          848 May 14 15:08 adstopdb.sql
-rw-------   1 orademo  dba         1249 May 14 15:08 adstrtdb.sql
orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>more  addbctl.sh [Show the shutdown script file content]
#!/bin/sh
# $Header: addbctl.sh 115.10 2006/04/26 05:13:41 mmanku ship $
# *===========================================================================+
# |  Copyright (c) 1996 Oracle Corporation, Redwood Shores, California, USA   |
# |                        All rights reserved                                |
# |                       Applications  Division                              |
# +===========================================================================+
# |
# | FILENAME
# |   addbctl.sh
# |
# | DESCRIPTION
# |   Start / Stop database DEMO
# |
# | USAGE
# |   addbctl.sh [start|stop] {immediate|abort|normal}
# |
# | PLATFORM
# |   Unix Generic
# |
# | NOTES
# |
# | HISTORY
# |
# +===========================================================================+

header_string="$Header: addbctl.sh 115.10 2006/04/26 05:13:41 mmanku ship $"
prog_version=`echo "$header_string" | awk '{print $3}'`
program=`basename $0`
usage="\t$program [start|stop] {normal|immediate|abort}"

printf "\nYou are running $program version $prog_version\n\n"

if [ $# -lt 1 ];
then
   printf "\n$program: too few arguments specified.\n\n"
   printf "\n$usage\n\n"
   exit 1;
fi

control_code="$1"

if test "$control_code" != "start" -a "$control_code" != "stop" ; then
   printf "\n$program: You must either specify 'start' or 'stop'\n\n"
   exit 1;
fi

shutdown_mode="normal"

DB_VERSION="db920"

#
# We can't change "internal" to "/ as sysdba" for 817 - see bug 2683817.
#

if [ "$DB_VERSION" = "db817" ]
then
  priv_connect="internal"
else
  priv_connect="/ as sysdba"
fi

if test "$control_code" = "stop"; then
  if test $# -gt 1; then
    shutdown_mode="$2";

    if test "$shutdown_mode" != "normal" -a \
            "$shutdown_mode" != "immediate" -a \
            "$shutdown_mode" != "abort" ; then
      printf "\n$program: invalid mode specified for shutdown\n"
      printf "\tThe mode must be one of 'normal', 'immediate', or 'abort'\n\n"
      exit 1;
    fi
  fi
fi

ORA_ENVFILE="/u01/oracle/demodb/9.2.0/DEMO_data.env"
DB_NAME="DEMO"

#
# setup the environment for Oracle and Applications
#

if [ ! -f $ORA_ENVFILE ]; then
   printf "Oracle environment file for database $DB_NAME is not found\n"
   exit 1;
else
   . $ORA_ENVFILE
fi

[Setting up environment file before shutdown]

orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>export ORA_ENVFI
LE="/u01/oracle/demodb/9.2.0/DEMO_data.env"
orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>echo $ORA_ENVFILE
/u01/oracle/demodb/9.2.0/DEMO_data.env

orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>export DB_NAME=DEMO
orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>echo $DB_NAME
DEMO
orademo@data/u01/oracle/demodb/9.2.0/appsutil/scripts/DEMO_data>sqlplus /nolog

SQL*Plus: Release 9.2.0.6.0 - Production on Mon May 14 21:32:29 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> shutdown immediate [Normal shutdown command without script files]
ORA-01122: database file 3 failed verification check
ORA-01110: data file 3: '/u01/oracle/demodata/system03.dbf'
ORA-01251: Unknown File Header Version read for file number 3
SQL> host ps -ef
     UID   PID  PPID   C    STIME TTY         TIME CMD
    root     0     0   0   May 11 ?           0:15 sched
    root     1     0   0   May 11 ?           0:01 /sbin/init
    root     2     0   0   May 11 ?           0:00 pageout
    root     3     0   0   May 11 ?           9:25 fsflush
    root   777   722   0   May 11 ?           0:00 /usr/dt/bin/dtexec -open 0 -t
tprocid 1.16H99L 01 721 1289637086 1 1 0 192.168.1
    root     7     1   0   May 11 ?           0:10 /lib/svc/bin/svc.startd
    root     9     1   0   May 11 ?           0:24 /lib/svc/bin/svc.configd
  daemon   219     1   0   May 11 ?           0:00 /usr/lib/nfs/statd
    root   212     1   0   May 11 ?           0:00 /usr/sbin/cron
    root   331     1   0   May 11 ?           0:00 /usr/lib/autofs/automountd
    root   227     7   0   May 11 ?           0:00 /usr/lib/saf/sac -t 300
  daemon   216     1   0   May 11 ?           0:00 /usr/sbin/rpcbind
 orademo 11551 11532   0 21:30:40 pts/4       0:00 ksh
    root   333   331   0   May 11 ?           0:02 /usr/lib/autofs/automountd
    root   239     1   0   May 11 ?           0:10 /usr/lib/inet/inetd start
    root   104     1   0   May 11 ?           0:00 /usr/lib/picl/picld
  daemon   127     1   0   May 11 ?           0:01 /usr/lib/crypto/kcfd
    root   234     7   0   May 11 console     0:00 /usr/lib/saf/ttymon -g -d /de
v/console -l console -T sun -m ldterm,ttcompat -h
  daemon   223     1   0   May 11 ?           0:00 /usr/lib/nfs/lockd
    root   110     1   0   May 11 ?           0:00 /usr/lib/sysevent/syseventd
    root   129     1   0   May 11 ?           0:18 /usr/sbin/nscd
    root   254   227   0   May 11 ?           0:00 /usr/lib/saf/ttymon
    root   238     1   0   May 11 ?           0:01 /usr/lib/utmpd
    root   372     1   0   May 11 ?           0:00 /usr/lib/ssh/sshd
    root   330     1   0   May 11 ?           0:00 /usr/sbin/vold -f /etc/vold.c
onf
   smmsp   393     1   0   May 11 ?           0:01 /usr/lib/sendmail -Ac -q15m
    root   574     1   0   May 11 ?           0:01 /usr/dt/bin/dtlogin -daemon
    root   735   722   0   May 11 ?           2:24 /usr/dt/bin/sdtperfmeter -f -
H -t cpu -t disk -s 1 -name fpperfmeter
    root   375     1   0   May 11 ?           0:07 /usr/lib/fm/fmd/fmd
    root   392     1   0   May 11 ?           0:11 /usr/lib/sendmail -bd -q15m
 orademo 11552 11551   0 21:32:29 pts/4       0:00 sqlplus /nolog
    root   778   777   0   May 11 ?           0:10 /usr/dt/bin/dtscreen -mode bl
ank
    root   352     1   0   May 11 ?           0:01 /usr/sbin/syslogd
    root   575   574   0   May 11 ??          0:00 /usr/openwin/bin/fbconsole -n
 -d :0
    root   601   574   0   May 11 ?           0:00 /usr/dt/bin/dtlogin -daemon
    root   577   574   0   May 11 ?           5:30 /usr/openwin/bin/Xsun :0 -def
depth 24 -nobanner -auth /var/dt/A:0-geaWhb
    root 11515   239   0 21:25:12 ?           0:00 /usr/sbin/in.telnetd
    root   763   737   0   May 11 ?           0:00 /bin/cat /tmp/.removable/noti
fy737
    root   617   601   0   May 11 ?           0:00 /bin/ksh /usr/dt/bin/Xsession
    root   699   697   0   May 11 pts/2       0:00 -sh -c      unset DT;     DIS
PLAY=:0;       /usr/dt/bin/dtsession_res -merge
    root   723   239   0   May 11 ?           0:00 /bin/sh /lib/svc/method/rpc-t
tdbserverd
    root   697   617   0   May 11 pts/2       0:00 /usr/dt/bin/sdt_shell -c
 unset DT;     DISPLAY=:0;       /usr/dt/bin/dt
    root   696     1   0   May 11 ?           0:00 /usr/dt/bin/dsdm
    root   721     1   0   May 11 pts/2       0:00 /usr/dt/bin/ttsession
    root   722   699   0   May 11 pts/2       1:24 /usr/dt/bin/dtsession
    root   728   723   0   May 11 ?           0:00 /usr/openwin/bin/rpc.ttdbserv
erd
    root   734   722   0   May 11 ?           0:13 dtwm
    root   737     1   0   May 11 ?           0:00 /bin/ksh /usr/dt/bin/sdtvolch
eck -d -z 5 cdrom,zip,jaz,dvdrom,rmdisk
    root   774     1   0   May 11 ?           0:00 devfsadmd
    root   744   734   0   May 11 ?           0:00 /usr/dt/bin/dtexec -open 0 -t
tprocid 2.16H99L 01 721 1289637086 1 1 0 192.168.1
    root   743   239   0   May 11 ?           3:16 /usr/lib/netsvc/rstat/rpc.rst
atd
    root   745   744   0   May 11 ??          0:01 /usr/dt/bin/dtterm
    root   751   745   0   May 11 pts/3       0:00 /sbin/sh
 orademo 11554 11552   0 21:33:12 pts/4       0:00 ps -ef
 orademo 11553 11552   0 21:32:34 ?           0:00 oracleDEMO (DESCRIPTION=(LOCA
L=YES)(ADDRESS=(PROTOCOL=beq)))
    root  1589     1   0 12:26:13 ?           1:41 /usr/java/bin/java -Dviper.fi
fo.path=/var/run/smc898/boot.fifo -Xmx128m -Dsun.s
[Oracle instance found running after fail shutdown]

 orademo 10804     1   0 15:07:05 ?           0:05 ora_dbw0_DEMO
 orademo 10810     1   0 15:07:06 ?           0:10 ora_smon_DEMO
 orademo 10816     1   0 15:07:06 ?           2:24 ora_qmn0_DEMO
 orademo 10685     1   0 15:04:55 ?           0:00 /u01/oracle/demodb/9.2.0/bin/
tnslsnr DEMO -inherit
 orademo 11532 11518   0 21:25:32 pts/4       0:00 -ksh
 orademo 10806     1   0 15:07:06 ?           1:02 ora_lgwr_DEMO
 orademo 10802     1   0 15:07:05 ?           0:14 ora_pmon_DEMO
 orademo 10814     1   0 15:07:06 ?           0:06 ora_cjq0_DEMO
    root 11518 11515   0 21:25:13 pts/4       0:00 -sh
 orademo 10812     1   0 15:07:06 ?           0:00 ora_reco_DEMO
 orademo 10808     1   0 15:07:06 ?           0:17 ora_ckpt_DEMO

SQL> 

DEMO instance:

orademo@data/u01/oracle/demodb/9.2.0/admin/DEMO_data/bdump>sqlplus /nolog

SQL*Plus: Release 9.2.0.6.0 - Production on Mon May 14 21:50:31 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> select count(*) from dba_objects;
select count(*) from dba_objects
                     *
ERROR at line 1:
[Block corruption on system datafile and block number changes to diffrent number when running other SQL]
ORA-01578: ORACLE data block corrupted (file # 3, block # 71905)
ORA-01110: data file 3: '/u01/oracle/demodata/system03.dbf'

SQL>