cancel
Showing results for 
Search instead for 
Did you mean: 

Auto start and stop of MaxDB 7.6 via scripting???

Former Member
0 Kudos

hello all,

In order to ensure a consistent 'Offline' backup we are trying to script the shut down of SAP and Max DB which runs our solution manager 4 system.

we are ok from the SAP shutdown (using stopsap.exe) but we are struggling with auto shutdown of MaxDB.

here is our none working script...

echo

e:

cd sapdb\programs\pgm

dbmcli.exe -key -n SOLMAN4 -d SDB -u andy,********

sql_execute DB_OFFLINE

exit

Any ideas on how we execute the final DB_OFFLINE command ?

the script above connects ok but doesn't run the shutdown

thanks in advance

Andy

Accepted Solutions (1)

Accepted Solutions (1)

former_member204746
Active Contributor
0 Kudos

have you considered a 1-liner command?:

dbmcli.exe -key -n SOLMAN4 -d SDB -u andy,******** db_offline

or

dbmcli.exe -key -n SOLMAN4 -d SDB -u andy,******** db_stop

Former Member
0 Kudos

Perfect....

sometimes the solution is more simple than you think...

the one line worked great....Thanks Eric

Answers (1)

Answers (1)

norbert_sieker
Explorer
0 Kudos

check stopdb or stopj2eedb scripts in /sapmnt/<SID>/exe. Those scripts are called via stopsap in case of central installations. Therein you will find the following commands for shutting down the DB:

- "dbmcli -U <userkey> db_cold"

- "dbmcli -U <userkey> db_offline"

both dbmcli calls rely on xuser keys.

hth

Norbert