Actian Db - Loader configurations
vwload is the tool provided by Actian Vector for load / bulk insert task.
- Changes in
-
set DB_USER_NAME=%1
-
set TABLE_NAME=%2
-
set DATA_FILE=%3
-
set DB_NAME=db_name
-
vwload -u %DB_USER_NAME% -t %TABLE_NAME% %DB_NAME% %DATA_FILE%
OR if its shellScriptFile.sh :
- DB_USER_NAME=$1
- TABLE_NAME=$2
- DATA_FILE=$3
- DB_NAME=db_name
- vwload -u $DB_USER_NAM -t $TABLE_NAME $DB_NAME $DATA_FILE
. Contents of batchFile.bat file are: -
Where db_name must be replaced with the actual actian database name on which this loader command supposed to be execute.
CASE 2: Actian DB server and client are running on different machine:
- Changes in
Contents of batchFile.bat file are:
- set DB_USER_NAME=%1
- set DB_PASSWORD=%2
- set TABLE_NAME=%3
- set DATA_FILE=%4
- set DB_SERVER_MACHINE_NAME=Machine-1
- set DB_SERVER_COMMUNICATION_PROTOCOL=tcp_ip
- set DB_SERVER_INSTANCE_NAME=VW
- set DB_NAME=db_name
- set VNODE_STRING= "@%DB_SERVER_MACHINE_NAME%,%DB_SERVER_COMMUNICATION_PROTOCOL%,%DB_SERVER_INSTANCE_NAME%;[%DB_USER_NAME%,%DB_PASSWORD%]::%DB_NAME%"
- vwload -t %TABLE_NAME% %VNODE_STRING% %DATA_FILE%
OR if its shellScriptFile.sh
- DB_USER_NAME=$1
- DB_PASSWORD=$2
- TABLE_NAME=$3
- DATA_FILE=$4
- DB_SERVER_MACHINE_NAME=Machine-1
- DB_SERVER_COMMUNICATION_PROTOCOL=tcp_ip
- DB_SERVER_INSTANCE_NAME=VW
- DB_NAME=db_name
- VNODE_STRING= "@${DB_SERVER_MACHINE_NAME},${DB_SERVER_COMMUNICATION_PROTOCOL},${DB_SERVER_INSTANCE_NAME};[${DB_USER_NAME},${DB_PASSWORD}]::${DB_NAME}"
- vwload -t $TABLE_NAME $VNODE_STRING $DATA_FILE
.
Where db_name must be replaced with the actual actian database name on which this loader command supposed to be execute. Machine-1 is the name of machine name entry done in /etc/hosts. tcp_ip is hardcoded communication protocol. This should not change. VW is the running instance name of db server running on Machine-1. Please check and update this accordingly. Please don’t do any changes in VNODE_STRING.