#!/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.
#######################################################################
# 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
# 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
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
###############################################################################