daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest May 31st, 2017 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh                                                                                                                                                                                                      
  2.  
  3. THISDIR=`pwd`
  4. dmpfile="`ls -1t *\.dmp* 2>/dev/null|head -n 1`"
  5. sqlfile="`ls -1t *\.sql 2>/dev/null|head -n 1`"
  6. CHARACTER_SET=CL8MSWIN1251
  7. NATIONAL_CHARACTER_SET=AL16UTF16
  8. if [ "$1" = "-q" ];then
  9.  echo -e "Detected variables:\nORACLE_HOME=${ORACLE_HOME}\nORACLE_BASE=${ORACLE_BASE}\nORACLE_SID=${ORACLE_SID}\nsys password=change_on_install\nsystem password=manager\npostcreation sql file=$sqlfile\nimport dump file=${dmpfile}\nimport type=full\nCHARACTER SET=$CHARACTER_SET\nNATIONAL CHARACTER SET=$NATIONAL_CHARACTER_SET\n------------------------------------"
  10.  [ ! -d "$ORACLE_HOME" -o ! -w "$ORACLE_BASE" -o -z "$ORACLE_SID" ] && exit 1
  11.  password=change_on_install
  12.  systempass=manager
  13. else
  14.  q=10
  15.  j=0
  16.  echo "Creating Oracle 9.2 database..."
  17.  (( j++ ))
  18.  echo -n "($j/$q) Please, enter oracle_home [$ORACLE_HOME] : "
  19.  read ORACLE_HOM
  20.  if [ -n "$ORACLE_HOM" ];then
  21.      ORACLE_HOME=$ORACLE_HOM
  22.  fi
  23.  if [ -z "$ORACLE_HOME" ];then
  24.      echo "Error: oracle_home is empty!"
  25.      exit 1
  26.  elif [ ! -d $ORACLE_HOME ];then
  27.      echo oracle_home is not valid directory
  28.      exit 1
  29.  else echo "ORACLE_HOME=$ORACLE_HOME"
  30.  fi
  31.  (( j++ ))
  32.  echo -n "($j/$q) Please, enter oracle_base [$ORACLE_BASE] : "
  33.  read ORACLE_BAS
  34.  if [ -n "$ORACLE_BAS" ];then
  35.      ORACLE_BASE=$ORACLE_BAS
  36.  fi
  37.  if [ -z "$ORACLE_BASE" ];then
  38.      echo "Error: oracle_base is empty!"
  39.      exit 1
  40.  elif [ ! -d $ORACLE_BASE ];then
  41.      echo oracle_base is not valid directory
  42.      exit 1
  43.  else echo "ORACLE_BASE=$ORACLE_BASE"
  44.  fi
  45.  (( j++ ))
  46.  echo -n "($j/$q) Please, enter oracle_sid [$ORACLE_SID] : "
  47.  read ORACLE_SI
  48.  if [ -z "$ORACLE_SI" ];then
  49.   [ -z "$ORACLE_SID" ] && exit 1
  50.  else
  51.   ORACLE_SID=$ORACLE_SI
  52.  fi
  53.  unset CHARACTER_SET NATIONAL_CHARACTER_SET ORACLE_HOM ORACLE_SI ORACLE_BAS
  54.  (( j++ ))
  55.  while [ -z "$CHARACTER_SET" ];do
  56.   echo "($j/$q) Selecting database character set"
  57.   echo "[1] CHARACTER_SET=CL8MSWIN1251"
  58.   echo "[2] CHARACTER_SET=CL8KOI8R"
  59.   echo "[3] CHARACTER_SET=CL8ISO8859P5"
  60.   echo "[4] CHARACTER_SET=AL32UTF8"
  61.   read -p "Please, select codepage or type manually [1]: " CHARACTER_SE
  62.   if [ -z "$CHARACTER_SE" -o "$CHARACTER_SE" = "1" ];then
  63.    CHARACTER_SET=CL8MSWIN1251
  64.   elif [ "$CHARACTER_SE" = "2" ];then
  65.    CHARACTER_SET=CL8KOI8R
  66.   elif [ "$CHARACTER_SE" = "3" ];then
  67.    CHARACTER_SET=CL8ISO8859P5
  68.   elif [ "$CHARACTER_SE" = "4" ];then
  69.    CHARACTER_SET=AL32UTF8
  70.   else
  71.    CHARACTER_SET=$CHARACTER_SE
  72.   fi
  73.  done
  74.  unset CHARACTER_SE
  75.  (( j++ ))
  76.  while [ -z "$password" ];do
  77.      read -p "($j/$q) Please, enter password for sys:" -s password;echo
  78.      if [ -z "$password" ];then
  79.         echo "Error: password is empty!"
  80.      else
  81.       read -p "Confirm password for sys:" -s password2;echo
  82.       [ -z "$password2" -o "$password" != "$password2" ] && echo "Error: differrent passwords!" && password=
  83.      fi
  84.  done
  85.  (( j++ ))
  86.  while [ -z "$systempass" ];do
  87.      read -p "($j/$q) Please, enter password for system:" -s systempass;echo
  88.      if [ -z "$systempass" ];then
  89.       echo "Error: system password is empty!"
  90.      else
  91.       read -p "Confirm password for system:" -s systempass2;echo
  92.       [ -z "$systempass2" -o "$systempass" != "$systempass2" ] && echo "Error: differrent passwords!" && systempass=
  93.      fi
  94.  done
  95.  (( j++ ))
  96.  echo -n "($j/$q) Please, enter path to SQL file for postcreation tuning of this database or type \"none\" [$sqlfile] : "
  97.  read sqlfil
  98.  unset sqlfile
  99.  if [ -n "$sqlfil" -a "$dmpfil" != "none" -a -f "$sqlfil" ];then
  100.   sqlfile=$sqlfil
  101.  fi
  102.  (( j++ ))
  103.  echo -n "($j/$q) Please, enter full dump filename for import to this database or type \"none\" [$dmpfile] : "
  104.  read dmpfil
  105.  unset dmpfile
  106.  if [ -n "$dmpfil" -a "$dmpfil" != "none" -a -f "$dmpfil" ];then
  107.   dmpfile=$dmpfil
  108.  fi
  109.  unset dmpfil sqlfil
  110.  (( j++ ))
  111.  if [ -n "$dmpfile" ];then
  112.   echo -n "($j/$q) Please, enter schema name for import or select full [full] : "
  113.   read shemaname
  114.  fi
  115.  export ORACLE_SID ORACLE_BASE ORACLE_HOME
  116.  echo -e -n "($j/$q) Please, select full options (Data mining, spatial, ultrasearch etc)\n or minimal (only JVM): min/full [min]: "
  117.  read mode
  118.  if [ -n "$mode" -a "$mode" != "min" ];then
  119.   mode=full
  120.  fi
  121.  (( j++ ))
  122.  echo -n -e "($j/$q) Please, enter full path for archive logs (enable mode ARCHIVELOG)\n or type \"none\" (disable mode ARCHIVELOG)\n [$ORACLE_BASE/admin/$ORACLE_SID/archivelogs] : "
  123.  read archivelogpath
  124.  if [ -n "$archivelogpath" -a "$archivelogpath" != "none" -a ! -d "$archivelogpath" ];then
  125.   mkdir -p archivelogpath || unset archivelogpath
  126.  elif [ -z "$archivelogpath" ];then
  127.   mkdir -p $ORACLE_BASE/admin/$ORACLE_SID/archivelogs && archivelogpath=$ORACLE_BASE/admin/$ORACLE_SID/archivelogs
  128.  else
  129.   unset archivelogpath
  130.  fi
  131. fi
  132. PATH=$PATH:$ORACLE_HOME/bin
  133. export PATH THISDIR
  134. LD_LIBRARY_PATH=$ORACLE_HOME/lib
  135. export LD_LIBRARY_PATH
  136. if [ ! -w $ORACLE_BASE ];then
  137.     echo "Permission denied for creating database directory and files!"
  138.     exit 1
  139. fi
  140. mkdir -p $ORACLE_BASE/admin/$ORACLE_SID 2>/dev/null
  141. cd $ORACLE_BASE/admin/$ORACLE_SID
  142. mkdir bdump 2>/dev/null;mkdir cdump 2>/dev/null;mkdir create 2>/dev/null;mkdir pfile 2>/dev/null;mkdir udump 2>/dev/null;mkdir utl_file 2>/dev/null
  143. mkdir -p $ORACLE_BASE/oradata/$ORACLE_SID 2>/dev/null
  144. rm -rf $ORACLE_HOME/dbs/orapw$ORACLE_SID 2>/dev/null
  145. orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=$password
  146. rm -rf $ORACLE_HOME/dbs/init$ORACLE_SID.ora 2>/dev/null
  147. [ "$mode" = "full" ] && xdb="dispatchers=\"\(PROTOCOL=TCP\) \(SERVICE=orclXDB\)\"" || xdb=
  148. if [ -f "$archivelogpath" ];then
  149.  archiveconfig="log_archive_dest_1='LOCATION=$archivelogpath/ OPTIONAL REOPEN=300'"
  150.  archiveconfig2="log_archive_start=true"
  151. else
  152.  archivelogpath=
  153. fi
  154. echo "db_block_size=8192
  155. db_cache_size=36870912
  156. db_file_multiblock_read_count=16
  157. open_cursors=300
  158. db_domain=\"\"
  159. db_name=$ORACLE_SID
  160. background_dump_dest=$ORACLE_BASE/admin/$ORACLE_SID/bdump
  161. core_dump_dest=$ORACLE_BASE/admin/$ORACLE_SID/cdump
  162. timed_statistics=TRUE
  163. user_dump_dest=$ORACLE_BASE/admin/$ORACLE_SID/udump
  164. utl_file_dir=$ORACLE_BASE/admin/$ORACLE_SID/utl_file
  165. control_files=("$ORACLE_BASE/oradata/$ORACLE_SID/control01.ctl", "$ORACLE_BASE/oradata/$ORACLE_SID/control02.ctl", "$ORACLE_BASE/oradata/$ORACLE_SID/control03.ctl")
  166. instance_name=$ORACLE_SID
  167. $xdb
  168. job_queue_processes=10
  169. aq_tm_processes=1
  170. compatible=9.2.0.0.0
  171. hash_join_enabled=TRUE
  172. query_rewrite_enabled=FALSE
  173. star_transformation_enabled=FALSE
  174. java_pool_size=83886080
  175. large_pool_size=8388608
  176. shared_pool_size=338860800
  177. processes=150
  178. fast_start_mttr_target=300
  179. remote_login_passwordfile=EXCLUSIVE
  180. pga_aggregate_target=25165824
  181. sort_area_size=524288
  182. undo_management=AUTO
  183. undo_retention=10800
  184. undo_tablespace=UNDOTBS1
  185. max_enabled_roles=90
  186. $archiveconfig
  187. $archiveconfig2" >$ORACLE_BASE/admin/$ORACLE_SID/pfile/init.ora
  188. ln -s $ORACLE_BASE/admin/$ORACLE_SID/pfile/init.ora $ORACLE_HOME/dbs/init$ORACLE_SID.ora
  189. cd $THISDIR
  190. if [ -L $ORACLE_HOME/dbs/init$ORACLE_SID.ora ];then
  191.     if [ -f $ORACLE_BASE/admin/$ORACLE_SID/pfile/init.ora ];then
  192.         echo -n "Creating configuration completed successfly,
  193. Press enter for starting process creating database or type exit:"
  194.         read start
  195.         case $start in
  196.             EXIT|exit) exit 0;;
  197.         esac
  198.     else
  199.         echo "File $ORACLE_BASE/admin/$ORACLE_SID/pfile/init.ora is not found!"
  200.         exit 1
  201.     fi
  202. else
  203.     echo "File $ORACLE_HOME/dbs/init$ORACLE_SID.ora is not found!"
  204.     exit 1
  205. fi
  206. $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" >/dev/null 2>/dev/null<<EOF
  207. shutdown abort
  208. shutdown abort
  209. EOF
  210. rm -rf $ORACLE_BASE/oradata/$ORACLE_SID/*
  211. [ ! -d "$ORACLE_HOME/assistants/dbca/logs" ] && mkdir -p $ORACLE_HOME/assistants/dbca/logs
  212.  
  213. date_start=`date +%s`
  214. $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  215. set echo off
  216. set termout off
  217. --file: CreateDB.sql
  218. prompt CreateDB;
  219. spool $ORACLE_BASE/admin/$ORACLE_SID/create/CreateDB.log
  220. startup nomount pfile="$ORACLE_HOME/dbs/init$ORACLE_SID.ora";
  221. CREATE DATABASE $ORACLE_SID
  222. MAXINSTANCES 1
  223. MAXLOGHISTORY 1
  224. MAXLOGFILES 3
  225. MAXLOGMEMBERS 3
  226. MAXDATAFILES 100
  227. DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/system01.dbf' SIZE 256M REUSE AUTOEXTEND ON NEXT  10240K MAXSIZE UNLIMITED
  228. EXTENT MANAGEMENT LOCAL
  229. DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '$ORACLE_BASE/oradata/$ORACLE_SID/temp01.dbf' SIZE 40M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED
  230. UNDO TABLESPACE "UNDOTBS1" DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/undotbs01.dbf' SIZE 200M REUSE AUTOEXTEND ON NEXT  5120K MAXSIZE UNLIMITED
  231. CHARACTER SET $CHARACTER_SET
  232. NATIONAL CHARACTER SET AL16UTF16
  233. LOGFILE GROUP 1 ('$ORACLE_BASE/oradata/$ORACLE_SID/redo01.log') SIZE 102400K,
  234. GROUP 2 ('$ORACLE_BASE/oradata/$ORACLE_SID/redo02.log') SIZE 102400K,
  235. GROUP 3 ('$ORACLE_BASE/oradata/$ORACLE_SID/redo03.log') SIZE 102400K;
  236. spool off
  237.  
  238. --file: CreateDBFiles.sql
  239. prompt CreateDBFiles;
  240. spool $ORACLE_BASE/admin/$ORACLE_SID/create/CreateDBFiles.log
  241. CREATE TABLESPACE "DRSYS" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/drsys01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  242. CREATE TABLESPACE "INDX" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/indx01.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  243. CREATE TABLESPACE "TOOLS" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/tools01.dbf' SIZE 10M REUSE AUTOEXTEND ON NEXT  320K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  244. CREATE TABLESPACE "USERS" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/users01.dbf' SIZE 25M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  245. spool off
  246.  
  247. --file: CreateDBCatalog.sql
  248. prompt CreateDBCatalog;
  249. spool $ORACLE_BASE/admin/$ORACLE_SID/create/CreateDBCatalog.log
  250. start ?/rdbms/admin/catalog.sql;
  251. start ?/rdbms/admin/catexp7.sql;
  252. start ?/rdbms/admin/catblock.sql;
  253. start ?/rdbms/admin/catproc.sql;
  254. start ?/rdbms/admin/catoctk.sql;
  255. start ?/rdbms/admin/owminst.plb;
  256. connect SYSTEM/$systempass
  257. start ?/sqlplus/admin/pupbld.sql;
  258. spool $ORACLE_HOME/assistants/dbca/logs/sqlPlusHelp.log
  259. start ?/sqlplus/admin/help/hlpbld.sql helpus.sql;
  260. spool off
  261. connect SYS/$password as SYSDBA
  262.  
  263. --file: JServer.sql
  264. prompt JServer;
  265. connect SYS/$password as SYSDBA
  266. set echo off
  267. spool $ORACLE_HOME/assistants/dbca/logs/JServer.log
  268. start ?/javavm/install/initjvm.sql;
  269. start ?/xdk/admin/initxml.sql;
  270. start ?/xdk/admin/xmlja.sql;
  271. start ?/rdbms/admin/catjava.sql;
  272. spool off
  273. EOF
  274. if [ "$mode" = "full" ];then
  275.  $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  276. --file: ordinst.sql
  277. prompt ordinst;
  278. connect SYS/$password as SYSDBA
  279. set echo off
  280. spool $ORACLE_HOME/assistants/dbca/logs/ordinst.log
  281. start ?/ord/admin/ordinst.sql;
  282. spool off
  283.  
  284. --text searching:
  285. --file: interMedia.sql
  286. prompt interMedia;
  287. connect SYS/$password as SYSDBA
  288. set echo off
  289. spool $ORACLE_HOME/assistants/dbca/logs/interMedia.log
  290. start ?/ord/im/admin/iminst.sql;
  291. spool off
  292.  
  293. --file: context.sql
  294. prompt context;
  295. connect SYS/$password as SYSDBA
  296. set echo off
  297. spool ?/assistants/dbca/logs/context.log
  298. start ?/ctx/admin/dr0csys $password DRSYS TEMP;
  299. connect CTXSYS/$password
  300. start ?/ctx/admin/dr0inst $ORACLE_HOME/lib/libctxx9.so;
  301. start ?/ctx/admin/defaults/dr0defin.sql RUSSIAN;
  302. spool off
  303.  
  304. --xml-web-server on :8080 :
  305. --file: xdb_protocol.sql
  306. prompt xdb_protocol;
  307. connect SYS/$password as SYSDBA
  308. set echo off
  309. CREATE TABLESPACE "XDB" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/xdb01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  310. spool $ORACLE_HOME/assistants/dbca/logs/xdb_protocol.log
  311. start ?/rdbms/admin/catqm.sql $password XDB TEMP;
  312. connect SYS/$password as SYSDBA
  313. start ?/rdbms/admin/catxdbj.sql;
  314. spool off
  315.  
  316. --searching in space
  317. prompt spatial;
  318. connect SYS/$password as SYSDBA
  319. set echo off
  320. spool $ORACLE_HOME/assistants/dbca/logs/spatial.log
  321. start ?/md/admin/mdinst.sql;
  322. spool off
  323.  
  324. --file: ultraSearch.sql
  325. prompt ultraSearch;
  326. connect SYS/$password as SYSDBA
  327. set echo off
  328. spool $ORACLE_HOME/assistants/dbca/logs/ultraSearch.log
  329. start ?/ultrasearch/admin/wk0install.sql SYS $password $password DRSYS TEMP "" PORTAL false;
  330. spool off
  331.  
  332. --
  333. --file: odm.sql
  334. prompt odm;
  335. connect SYS/$password as SYSDBA
  336. set echo off
  337. CREATE TABLESPACE "ODM" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/odm01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  338. spool $ORACLE_HOME/assistants/dbca/logs/odm.log
  339. start ?/dm/admin/dminst.sql ODM TEMP $ORACLE_HOME/assistants/dbca/logs/;
  340. connect SYS/$password as SYSDBA
  341. revoke AQ_ADMINISTRATOR_ROLE from ODM;
  342. spool off
  343.  
  344. --
  345. --file: cwmlite.sql
  346. prompt cwmlite;
  347. set echo off
  348. spool $ORACLE_HOME/assistants/dbca/logs/cwmlite.log
  349. connect SYS/$password as SYSDBA
  350. CREATE TABLESPACE "CWMLITE" LOGGING DATAFILE '$ORACLE_BASE/oradata/$ORACLE_SID/cwmlite01.dbf' SIZE 20M REUSE AUTOEXTEND ON NEXT  640K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO ;
  351. start ?/olap/admin/olap.sql orcl;
  352. connect SYS/$password as SYSDBA
  353. start ?/cwmlite/admin/oneinstl.sql CWMLITE TEMP;
  354. spool off
  355. EOF
  356. fi
  357.  
  358. $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  359. --file: postDBCreation.sql
  360. prompt postDBCreation;
  361. connect SYS/$password as SYSDBA
  362. set echo off
  363. spool $ORACLE_HOME/assistants/dbca/logs/postDBCreation.log
  364. start ?/rdbms/admin/utlrp.sql;
  365. shutdown ;
  366. connect SYS/$password as SYSDBA
  367. set echo off
  368. spool $ORACLE_HOME/assistants/dbca/logs/postDBCreation.log
  369. create spfile from pfile;
  370. EOF
  371. if [ -d "$archivelogpath" ];then
  372.  $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  373. startup mount
  374. alter database archivelog;
  375. alter database open;
  376. set echo on
  377. set term on
  378. select status from v\$instance;
  379. select dbid from v\$database;
  380. archive log list
  381. exit;
  382. EOF
  383. else
  384.  $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  385. startup
  386. set echo on
  387. set term on
  388. select status from v\$instance;
  389. select dbid from v\$database;
  390. exit;
  391. EOF
  392. fi
  393. date_stop=`date +%s`
  394. (( timing=($date_stop-$date_start)/60 ))
  395. echo "Created in $timing minuts"
  396. if [ -f "$dmpfile" ];then
  397.  echo "Unpacking:"
  398.  ext="`echo $dmpfile|sed -e 's:\.[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]*$: &:'|awk '{print $2}'|sed -e 's:\.::'`"
  399.  unpack="false"
  400.  [ "$ext" = "bz" ] && bzip2 -d $dmpfile && unpack="true"
  401.  [ "$ext" = "gz" ] && gunzip $dmpfile && unpack="true"
  402.  [ "$ext" = "zip" ] && unzip $dmpfile && unpack="true"
  403.  [ "$unpack" = "true" ] && dmpfile2=`echo $dmpfile|sed -e "s/\.$ext//"` || dmpfile2=$dmpfile
  404. fi
  405. if [ -f "$sqlfile" ];then
  406.  echo "Tuning:"
  407.  $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  408. set echo off
  409. set term off
  410. start $sqlfile
  411. EOF
  412. fi
  413. if [ -f "$dmpfile2" ];then
  414.  echo "Importing:"
  415.  [ "shemaname" = "full" ] && string="full=y" || string="fromuser=$shemaname touser=$shemaname"
  416.  imp system/$systempass file=$dmpfile2 $string log=import_$shemaname-`date +%Y.%m.%d_%H:%M:%S`.log
  417. echo "Recompiling..."
  418. $ORACLE_HOME/bin/sqlplus -S "sys/$password as sysdba" <<EOF
  419. set term off
  420. set echo off
  421. start ?/rdbms/admin/utlrp.sql
  422. set term on
  423. set echo on
  424. select 'Finding invalid objects...' from dual;
  425. select count(*),owner,object_type from all_objects where status<> 'VALID' group by owner, object_type;
  426. EOF
  427. fi
  428. echo "Oracle9i database $ORACLE_SID completed. Check for valid, please..."
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top