diy_os的专栏

Stay Hungry. Stay Foolish.

dbca.sh

#!/bin/sh -f
# $Header: assistants/bin/dbca.sh /main/84 2009/06/15 09:11:43 svsathe Exp $
#
# dbca.sh
#
# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 
#
#    NAME
#      dbassist - Shell script to run Database Creation Assistant
#
#
#    DESCRIPTION
#      Runs Database Creation Assistion java application
#      Run this script with -h or -help option to get the help.
#
#   MODIFIED   (MMDD/YY)
#    rpattabh    03/16/07 - bug 4395270: fix interrupt handling
#    npamnani    10/23/02 - add 1.3.1. java flag
#    npamnani    10/09/02 - run with java instead jre
#    dkapoor    07/05/2000 - Created
#


#######################################################################
# Variables set by Oracle Universal Installer for dependent components.
#######################################################################


# Define ORACLE_HOME -> OH
OH=/u01/app/oracle/product/11.2.0/dbhome_1
PLATFORM=Linux
ORACLE_HOME=$OH 
export ORACLE_HOME;
 


# Version specific JAR files
EWT_FILE=ewt3.jar
JEWT_FILE=jewt4.jar
EWT_COMP_FILE=ewtcompat-3_3_15.jar
SHARE_FILE=share.jar
HELP_FILE=help4.jar
#ICE_BROWSER_FILE=oracle_ice5.jar
ICE_BROWSER5_FILE=oracle_ice5.jar
KODIAK_FILE=kodiak.jar
XMLPARSER_FILE=xmlparserv2.jar
JDBC_FILE=ojdbc5.jar
GDK_FILE1=orai18n.jar
GDK_FILE2=orai18n-mapping.jar
GDK_FILE3=orai18n-utility.jar
GDK_FILE4=orai18n-collation.jar
NETCFG_FILE=netcfg.jar
OJMISC_FILE=ojmisc.jar
CVU_JAR=cvu.jar
PKI_FILE=oraclepki103.jar
LDAP_FILE=ldapjclnt11.jar
OPM_FILE=opm.jar
SRVM_FILE=srvm.jar
SRVMHAS_FILE=srvmhas.jar
SRVMASM_FILE=srvmasm.jar
ASSISTANTS_COMMON_FILE=assistantsCommon.jar
DBCA_FILE=dbca.jar
EMLITE_JAR=oemlt.jar
INSTALLER_FILE=OraInstaller.jar
PREREQ_JAR_FILE=OraPrereq.jar
DVCA_JAR=dvca.jar
PREREQ_CHECKS_JAR_FILE=OraPrereqChecks.jar
CHECKPOINT_JAR=OraCheckPoint.jar


# Directory Variables
SRVM_JLIB_DIR=/u01/app/oracle/product/11.2.0/dbhome_1/jlib
JRE_DIR=/u01/app/oracle/product/11.2.0/dbhome_1/jdk/jre
JLIB_DIR=$OH/jlib
DBCA_JLIB_DIR=$OH/assistants/dbca/jlib
DBCA_HELP_DIR=$OH/assistants/dbca/doc
INSTALLER_JLIB_DIR=/u01/app/oracle/product/11.2.0/dbhome_1/oui/jlib
ASSISTANTS_JLIB_DIR=$OH/assistants/jlib
# Classpath


SHARE_CLASSPATH=$JLIB_DIR/$SHARE_FILE
HELP_CLASSPATH=$JLIB_DIR/$HELP_FILE:$JLIB_DIR/$JEWT_FILE
ICE_BROWSER_CLASSPATH=$JLIB_DIR/$ICE_BROWSER5_FILE
EWT_CLASSPATH=$JLIB_DIR/$EWT_FILE:$JLIB_DIR/$EWT_COMP_FILE
KODIAK_CLASSPATH=$JLIB_DIR/$KODIAK_FILE
XMLPARSER_CLASSPATH=/u01/app/oracle/product/11.2.0/dbhome_1/lib/$XMLPARSER_FILE
JDBC_CLASSPATH=$OH/jdbc/lib/$JDBC_FILE
GDK_CLASSPATH=$JLIB_DIR/$GDK_FILE1
ASSISTANTS_COMMON_CLASSPATH=$ASSISTANTS_JLIB_DIR/$ASSISTANTS_COMMON_FILE
NETCFG_CLASSPATH=$JLIB_DIR/$LDAP_FILE:$JLIB_DIR/$NETCFG_FILE:$JLIB_DIR/$OJMISC_FILE:$JLIB_DIR/$PKI_FILE:$JLIB_DIR/$OPM_FILE
SRVM_CLASSPATH=$SRVM_JLIB_DIR/$SRVM_FILE:$SRVM_JLIB_DIR/$SRVMHAS_FILE:$SRVM_JLIB_DIR/$SRVMASM_FILE
EM_CLASSPATH=$OH/classes:$JLIB_DIR/$EMLITE_JAR:$JLIB_DIR/emca.jar:$OH/sysman/jlib/emCORE.jar:$OH/oc4j/j2ee/home/oc4j.jar:$OH/oc4j/j2ee/home/db_oc4j_deploy.jar:$JLIB_DIR/emConfigInstall.jar
DBCA_CLASSPATH=$DBCA_JLIB_DIR/$DBCA_FILE
HELPJAR_CLASSPATH=$DBCA_HELP_DIR/dbcahelp.jar:$DBCA_HELP_DIR/dbcahelp_es.jar:$DBCA_HELP_DIR/dbcahelp_de.jar:$DBCA_HELP_DIR/dbcahelp_fr.jar:$DBCA_HELP_DIR/dbcahelp_it.jar:$DBCA_HELP_DIR/dbcahelp_ja.jar:$DBCA_HELP_DIR/dbcahelp_ko.jar:$DBCA_HELP_DIR/dbcahelp_pt_BR.jar:$DBCA_HELP_DIR/dbcahelp_zh_CN.jar:$DBCA_HELP_DIR/dbcahelp_zh_TW.jar
INSTALLER_CLASSPATH=$INSTALLER_JLIB_DIR/$INSTALLER_FILE:$INSTALLER_JLIB_DIR/$PREREQ_JAR_FILE:$OH/inventory/prereqs/oui/$PREREQ_CHECKS_JAR_FILE:$INSTALLER_JLIB_DIR/$PREREQ_CHECKS_JAR_FILE:$INSTALLER_JLIB_DIR/$CHECKPOINT_JAR:$JLIB_DIR/$CVU_JAR
DVCA_CLASSPATH=$OH/dv/jlib/$DVCA_JAR


# Check if user is non-root
if [ "$USER" = "root" ]; then
        echo "DBCA cannot be run as root."
        exit 1;
fi




# Check for silent or help
SILENT="false"
for i in $*
do
   if [ $i = "-silent"  ] || [ $i = "-deinstall"  ] || [ $i = "-help"  ] || [ $i = "-h"  ]; then
      SILENT="true"
      break
   fi
done


# Check for DISPLAY
if [ $SILENT = "false"  ]; then
   case $DISPLAY in
      "")
      echo "DISPLAY not set."
      echo "Set DISPLAY environment variable, then re-run."
      exit;
   esac
fi    


#call platform_common script
. $ORACLE_HOME/bin/platform_common




# make sure others can not read/write any files created
umask 27


# The environment variable $TWO_TASK cannot be set during the installation
unset TWO_TASK


# The environment variable $JAVA_HOME cannot be set during the installation
unset JAVA_HOME


# Basic error checking
case $OH in
    "") echo "*** ORACLE_HOME Not Set!"
        echo "    Set and export ORACLE_HOME, then re-run"
        echo "    ORACLE_HOME points to the main directory that"
        echo "    contains all Oracle products."
        exit 1;;
esac




# Set Classpath for Database Creation Assistant
CLASSPATH=$DBCA_CLASSPATH:$ASSISTANTS_COMMON_CLASSPATH:$EWT_CLASSPATH:$SHARE_CLASSPATH:$HELP_CLASSPATH:$ICE_BROWSER_CLASSPATH:$KODIAK_CLASSPATH:$XMLPARSER_CLASSPATH:$GDK_CLASSPATH:$NETCFG_CLASSPATH:$JDBC_CLASSPATH:$SRVM_CLASSPATH:$EM_CLASSPATH:$INSTALLER_CLASSPATH:$DVCA_CLASSPATH


ARGUMENTS=""
NUMBER_OF_ARGUMENTS=$#
if [ $NUMBER_OF_ARGUMENTS -gt 0 ]; then
        ARGUMENTS=$*
fi




JRE_OPTIONS="${JRE_OPTIONS} -DSET_LAF=${SET_LAF} -Dsun.java2d.font.DisableAlgorithmicStyles=true -Dice.pilots.html4.ignoreNonGenericFonts=true  -DDISPLAY=${DISPLAY} -DJDBC_PROTOCOL=thin -mx128m"




###################################Remote debugging############################
#To enable Remote debugging
# setenv DEBUG_ASSISTANTS true
# setenv DEBUG_PORT <desired port>


DEFAULT_DEBUG_PORT=8000


if [ "$DEBUG_ASSISTANTS" = "true" ]; then
        if [ "$DEBUG_PORT" = "" ]; then
                #If port not specified then assign default port
                DEBUG_PORT=$DEFAULT_DEBUG_PORT
        fi
        DEBUG_STRING="-Xdebug -Xrunjdwp:transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=n -client"
         echo "Remote Debugging is enabled in port $DEBUG_PORT"
else
        DEBUG_STRING=""
fi
###############################################################################




# Run DBCA
exec $JRE_DIR/bin/java  $JRE_OPTIONS  $DEBUG_STRING -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
阅读更多
版权声明:本文为博主原创文章,转载请标注链接。 https://blog.csdn.net/BAT_os/article/details/46539169
个人分类: 【ORACLE/MYSQL】
上一篇resetlogs noresetlogs
下一篇os认证
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭