I did an update of the version 7.3.00.18 to the new version 7.3.00.20. I
didn't have any errors.
Now I want to create a new database.
This is my error :
start communication server...
stop and drop existing KASSA...
create database KASSA...
set parameters for KASSA...
start KASSA...
initializing KASSA...
load system tables...
load system tables failed: ERR
-24964,ERR_EXECUTE: error in program execution
1792,/opt/sapdb/depend/bin/xload -S INTERNAL -n localhost.localdomain -d
KASSA -u dba,* -b /opt/sapdb/depend/env/lsystab.ins en ENG domain
Some SQL error has occured
/ S Error Summary
/ S 1 x -7500 message not
available
/ *
/ M STOP 20020204 00181559
/ *
/ M RC = 7 Some SQL error has occured
/ *
The script I used (see attachements) runs with the last version.
Somebody can help me please ?
Thanks,
Corinne
#!/bin/sh
###
# dont start script as root!
# --------------------------
#
# create example database KASSA with (only for seperated packages - sapdb-ind,
sapdb-srv, sapdb-testdb):
# - and an user test (with password test)
# - in /home2/SAPDB
###
id=`id | sed s/\(.*// | sed s/uid=//`
if [ "$id" = "0" ]; then
echo "dont start script as root"
exit 1
fi
export PATH=/opt/sapdb/indep_prog/bin:$PATH
#set -x
# name of the database
SID=KASSA
# path to database files
DATA=/home2/SAPDB/sapdb_data
LOG=/home2/SAPDB/sapdb_log
BACKUP=/home2/SAPDB/sapdb_backup
# start remote communication server
echo "start communication server..."
x_server start >/dev/null 2>&1
# stop and drop probably existing database
echo "stop and drop existing $SID..."
dbmcli -d $SID -u dbm,dbm db_offline >/dev/null 2>&1
dbmcli -d $SID -u dbm,dbm db_drop >/dev/null 2>&1
# create new database
echo "create database $SID..."
_o=`/opt/sapdb/depend/bin/dbmcli -s -R /opt/sapdb/depend db_create $SID dbm,dbm 2>&1`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "create $SID failed: $_o"
exit 1
fi
# create directory where to put the database files
mkdir -p $DATA/$SID
mkdir -p $LOG/$SID
mkdir -p $BACKUP/$SID
# setup database parameters
echo "set parameters for $SID..."
_o=`cat <<EOF | dbmcli -d $SID -u dbm,dbm 2>&1
param_rmfile
param_startsession
param_init OLTP
param_put LOG_MODE SINGLE
param_put CAT_CACHE_SUPPLY 300
param_put DATA_CACHE 2500
param_put MAXDATADEVSPACES 5
param_put MAXDATAPAGES 1024000
param_checkall
param_commitsession
param_adddevspace 1 SYS $DATA/$SID/DISKS01 F
param_adddevspace 1 DATA $DATA/$SID/DISKD0001 F 38400
param_adddevspace 1 LOG $LOG/$SID/DISKL001 F 12800
quit
EOF`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "set parameters failed: $_o"
exit 1
fi
# startup database
echo "start $SID..."
_o=`dbmcli -d $SID -u dbm,dbm db_start 2>&1`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "start $SID failed: $_o"
exit 1
fi
# initialize database files
echo "initializing $SID..."
_o=`cat <<EOF | dbmcli -d $SID -u dbm,dbm 2>&1
util_connect dbm,dbm
util_execute init config
util_activate dba,dba
quit
EOF`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "initialize $SID failed: $_o"
exit 1
fi
# load database system tables
echo "load system tables..."
_o=`dbmcli -d $SID -u dbm,dbm load_systab -u dba,dba -ud domain 2>&1`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "load system tables failed: $_o"
exit 1
fi
# backup
echo "set backup parameters..."
_o=`cat <<EOF | dbmcli -d $SID -u dbm,dbm 2>&1
backup_media_put data $BACKUP/$SID/datasave FILE DATA 0 8 YES
backup_media_put auto $BACKUP/$SID/autosave FILE AUTO
util_connect dbm,dbm
backup_save data
autosave_on
medium_put complete /tmp/backup_$SID FILE DATA 0 0 YES
quit
EOF`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "set backup parameters failed: $_o"
exit 1
fi
# restore the backup
echo "restore the backup..."
if [ -e /tmp/backup_$SID ]; then
_o=`cat <<EOF | dbmcli -d $SID -u dbm,dbm 2>&1
db_cold
util_execute init config
util_connect dbm,dbm
recover_start complete DATA
db_warm
quit
EOF`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "restoring failed: $_o"
exit 1
fi
fi
# create database
echo "create database ..."
_o=`cat <<EOF | dbmcli -d $SID -u dba,dba 2>&1
sql_connect dba,dba
sql_execute CREATE USER test PASSWORD test DBA NOT EXCLUSIVE
EOF`
_test=`echo $_o | grep OK`
if [ "$_test" = "" ]; then
echo "create db user failed: $_o"
exit 1
fi
exit 0