Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching Informix Database Instance

Status
Not open for further replies.

cobdeng

MIS
Oct 14, 2004
19
GB
I have a script as follows which should change my database instance from our live setup to our test setup

The script is as follows:-
1
2 # Set up the Informix environment variables:
3
4 INFORMIXDIR=/usr/informix
5 ONCONFIG=onconfig.live
6 INFORMIXSERVER=ONLINELIVE
7 SERVERNUM=0
8 KAIOON=1
9
10 export INFORMIXDIR ONCONFIG INFORMIXSERVER SERVERNUM
11 export KAIOON
12
13 # Set up Comwise & CPAS path variables:
14
15 DBPROGS=/comwise343
16 TERMCAP=$DBPROGS/etc/termcap
17 HOMESQL=$HOME/sql
18 HOME4GL=$HOME/4gl
19 GLOBALSQL=$DBPROGS/sql
20 GLOBAL4GL=$DBPROGS/4gl
21 DBPATH=$DBPROGS/c2000lib/forms
22 LIBFORMS=$DBPROGS/c2000lib/forms
23 CH_FORMS=$DBPROGS/childh/bin
24 DBPATH=$DBPATH:$LIBFORMS:$CH_FORMS
25 COMWAYBIN=$DBPROGS/comm_pat/bin
26 COMBIN=$DBPROGS/comm_pat/bin
27 COM_LSRC=$DBPROGS/c2000lib
28 EDCPCDIR=/usr/ma # EDC PC Directory - Change as appropriate.
29
30 export DBPROGS TERMCAP HOMESQL HOME4GL GLOBALSQL GLOBAL4GL
31 export LIBFORMS CH_FORMS DBPATH COMWAYBIN COMBIN COM_LSRC
32 export EDCPCDIR
33
34 PATH=$PATH:$HOMESQL:$HOME4GL:$GLOBALSQL:$GLOBAL4GL
35 PATH=$PATH:$DBPROGS/etc/local:$DBPROGS/etc/stnlocal
36 PATH=$PATH:$DBPROGS/edc/bin:$DBPROGS/outp_apps:$EDCPCDIR
37 PATH=$PATH:$DBPROGS/cpas:$INFORMIXDIR/bin:/usr/local/bin/:
38
39 export PATH
40
41 # Set up the Comwise & CPAS Informix shell variables:
42
43 DBDATE=DMY4/
44 DBCENTURY=C
45 DBEDIT=vi
46 DBTEMP=/tmp
47 setpath
48
49 export DBDATE DBCENTURY DBEDIT DBTEMP
50
51

When I run this, my onstst -m command returns:-

shared memory not initialized for INFORMIXSERVER 'ONLINETEST'

I'm not sure what to do next to get this instance of the DB up and running

Can anyone help

Thanks
 
Being relatively new to scripting, I am looking for some guidance

I have the following line in my shell script:-
isql < /comwise343/sql/hclockbypg_all.arc

However, each time it fails with the error:-
/root/bin/check_locked_diaries[7]: isql: not found.

The report hclockbypg_all.arc definitely exists in the specified directory - with correct permissions.

Can someone help with a resolution please
 
Seems that the informix environment is not set when the script is launched.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top