Hello and welcome to the SAP HANA Academy.
The topic of this video tutorial series is SAP HANA Administration and in this video
I will show you how you can stop and start a SAP HANA system using SAP HANA cockpit.
This video has been recorded on release SAP HANA cockpit 2.0 SP08 from October 2018.
For earlier or later releases, please check the playlist on the SAP HANA Academy.
Hi, I am Denys van Kempen.
There are multiple ways how you can stop and start a SAP HANA system —using the command
line, using SAP HANA studio, using sapcontrol —and you will find several video tutorials
in this playlist about how to go about it.
Now, particularly for cloud-based systems, having access to the command line, to a terminal,
or any other client, may not be so easy or it may not be an option at all with corporate
firewalls blocking access to the secure shell SSH port to access the system.
This makes the SAP HANA cockpit a very convenient tool to stop and start SAP HANA systems plus
it is very easy.
I am connected here to the cockpit and we are looking at the Resource Directory, listing
all the systems I have access to.
Let’s group them by system first.
As you can see, we have a connection to the system database of system H4C, this is the
actual cockpit environment, and to the system database plus a couple of tenants of system
HA0.
You can only stop and start a system from the system database.
So, you will need to be able to connect to the systemdb, have the credentials and the
required privileges; ALTER DATABASE, for example.
You also need to enter the operating system credentials for the actual process that is
going to stop and start the database: sapcontrol, or SAP control, if you prefer.
It actually does not really matter, which approach you take to stop and start a SAP
HANA system —web, command line, studio — in the end, it will be the sapcontrol utility
which does the actual work.
I have posted a blog on the SAP Community in an “Under the Hood” series where I
explain how this works in some detail.
I will add the link in the description of this video below.
OK — so we need a username and password, typically this will the operating system administration
account, SID+adm, in my case here, ha0adm, with the password.
They will be saved to cockpit here, encrypted of course, and by ticking the box you can
also remove them.
OK —let’s connect to the systemdb.
This will open System Overview and on this page we find the Overall Database Status tile.
Note that we can directly, immediately, Stop the system from the tile.
The system is running.
Should it have been stopped, we would have been able to start it from here.
Clicking the button will open Manage Services with a Stop System pop-up where we can indicate
whether we want to stop the system Softly or do it Immediately.
Immediately means that we are not going to wait for any ongoing transactions.
We will unplug all connections and deal with the mess when we restart the instance: rolling
back any transactions in process.
Startup time will be a bit longer, as a result.
With softly we are going to allow running statements to finish for a given period of
time.
We can select that here: 5 minutes, 15 minutes or even 30 minutes and during this time, no
new connections can be made.
Note that —if we cancel this— we can also stop the system from this Manage Services
page or app.
Same thing.
OK — System stopped, stopping and scheduled for stopping, that is.
The daemon process, here with process ID 21942, will be responsible for this.
This page is refreshed automatically every 3 seconds or so.
OK — System stopped.
Note that the daemon still has its process ID, the same one.
The daemon is, in fact, still running.
We are going to need it to start the system again and to do that, click the link, and
confirm.
Now the daemon will start all processes up again.
First the nameserver, which also hosts the system database.
This will be, or should be, pretty quick.
Some supporting services: compileserver, preprocessor.
We get an indication of CPU usage.
When the XS Advanced runtime processes are starting, in case you have installed this
component, this might turn in the red.
This takes a while and some resources.
These are all our Java and Node.JS runtimes and all of the applications hosted by the
runtimes.
During startup, you will see Not running in the Status column with a Service Alert.
This is normal and does not necessarily indicate any issue.
You may also get a Running with issues Status once the process is up and usually this disappears
when the alert is refreshed.
If not, you can check the alert (Alert Details).
Select Configure Alert, here below on the toolbar, and run a Check Now.
After a couple of seconds the message Check completed should appear with in most cases
the information that no alerts were issued and if we then return to Manage Services,
the issue is no longer being reported.
If you do still get issues on any processes, you can start by checking the trace file.
OK.
That’s how we stop and start a system.
Should you need to restart a particular service, you can do so here, in the action column.
You will be prompted for a confirmation and also informed that the service might be automatically
restarted depending on how the daemon is configured.
Well, I can tell you that by default, the daemon is configured to always restart any
stopped services, the watchdog function this is called, so in most cases a stop will correspond
to a restart, in fact.
Now, should you want to stop and start individual tenant databases, then you would go to Manage
Databases, here from System Overview for SYSTEMDB or from the Resource Directory, and then you
can select the tenant from list and click Stop Tenant database.
You will get the same selection screen where you can indicate a soft or hard stop, and
then the status should go from Stopping, to Stopped.
That’s right.
From the table header menu here, the elipsis, we can select the restart mode.
Default means that the tenant will start when the system starts.
The alternative is No auto-restart in which case you will have to manually start the tenant
each time.
OK- Start Tenant, and now the status should go to Starting, and then, eventually, Running.
Very good.
OK, so much for stopping and starting systems and databases.
Thanks for watching.
You can find more video tutorials on our YouTube channel.
If you would like to be informed about new video tutorials, please subscribe to our channel.
You can connect with us on LinkedIn or follow us on Twitter, as well for updates, and if
you are watching this video on YouTube, do not hesitate to leave your comments to the
video page and, if you like, give us your vote on this video.
Thank you for watching.