cancel
Showing results for 
Search instead for 
Did you mean: 

Stop/start sap ASE command line (part of S/4HANA trial )

vilius_mockunas2
Explorer
0 Kudos

We are testing S/4HANA trial and it contains sap ASE(which is running now).
I need to do some configurations on os level and before that I always write application start/stop scripts, standard sap stuff like like abap, hana and etc stop fine but I don't know how to stop sap ASE (sybase) - some google posts suggested launch isql and enter password but I don't want to include plain password in my stop script.

How do I stop sap ASE on S/4HANA using command line having linux root authority ?

Thanks
Vilius M.

Accepted Solutions (0)

Answers (4)

Answers (4)

Log in as SAP administrator (<sid>adm ) and use sybctrl to strat and stop ASE in an SAP ABAP system:

sybctrl --help usage: sybctrl [<options>] The following options are possible:
start : start database.
stop : stop database.
...

HTH
Tilman

aloezcan
Explorer
0 Kudos

Hi Vilius,

In case of shared libraries and the s-bit is set you may get a connection error with sybctrl. Please check SAP Note

https://launchpad.support.sap.com/#/notes/2719763

you should use sybxctrl instead of sybctrl which it is described in the SAP Note

su - <sid>adm

sybxctrl stop

sybxctrl start

This should work fine and should only stop the SAP ASE database

hope this helps.

Kind Regards

Ali Özcan

jong-un_seo
Participant
0 Kudos

Hi Vilius,

Please try to use environment variables.
For examples,
1.for environment variable

export pwd=sybase

isql -Usa -P$pwd -SASE1 -X <<END

shutdown
go

END

If you can use SecureStore of SAP at the environment, isql uses secure store key with -k option too.

Regards,

Jongun

sladebe
Active Participant
0 Kudos

It would be better to use the isql command like this:

pwd=`cat .my_secret_password_file`
isql -Usa -SASE1 -X <<END
$pwd
shutdown
go
END

So that the password doesn't show up in ps command output to other users on the box.

Also, the normal shutdown command waits for currently executing statements to finish before shutting down. If somebody is in the middle of a long running select, they would effectively block shutdown. If this is a problem for you, you can add the "with nowait" option to the shutdown command (kills currently running statements before shutting down).

Make sure to run 'chmod go-rwx .my_secret_password_file' (change 'group' & 'other' to subtract read, write, and execute priv) to prevent other people from seeing it.

Johan_sapbasis
Active Contributor
0 Kudos

Hi,

Look at:

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc35823.1600/doc/html/san13...

The sequence when not using the deprecated stopsap/startsap command would include starting the BS server first then the main server. Using the startserver utility.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc35823.1600/doc/html/san13...

1. Sign in as Sybase user syb<sid>adm

2. Change to installation directory $SYBASE/$SYBASE_ASE_install

3. ./startserver -f RUN_yourdbnamehere and RUN_yourdbnamehere_back

I would also use nohup with '&' to provent server from shut when logged out or disconnect perhaps.

Hope this helps.

Regards,

Johan