Hello and welcome to the SAP HANA Academy.
The topic of this video tutorial series is Getting Started with SAP HANA on the Google Cloud Platform
and in the next couple of videos we will take a look at how to start and stop an SAP HANA system.
This video will be about using cockpit and studio.
Hi, I am Denys van Kempen.
As of SAP HANA 2.0, so that’s November 2016, you can use the web interface of SAP HANA
cockpit to start and stop an SAP HANA system.
That’s pretty easy, no surprise.
Here I am on the Overview page, SAP HANA Cockpit, SystemDB@SP2, SP2 is the system identifier,
the SID.
Select the Overall System Database Status tile.
This will open the Manage Services page and here in the header we have a Stop System button
(or link, if you prefer).
Click it.
Confirm that you really want to stop the system with a Yes and - after a brief wait - a message
will appear to inform you that the system was successfully stopped.
In the status column for the services, we can see that some services are already stopped
whereas others are scheduled to be stopped, so we might need to refresh the page - you
can do this here in the header, set auto-refresh interval for this page to 1 minute - and,
oh well, the system has already stopped.
We only see the daemon service listed now.
We will discuss the different services and what they do in a minute.
If we then return to the Overview page, we can see that the Overall Database Status is
Stopped.
All the other tiles mention ‘Cannot load data’, which makes it maybe sound like there
is any issue but there is no issue at all: the database is stopped so obviously we cannot
load data, in fact, there is no data to load to begin with.
I guess we will get a more accurate message for our tiles in the future.
If we return to our Manage Services page again and this time select Start System
- it is the same button, of course -
and respond to the question if we want to start the system
(there is no "really", this time) with Yes, we get, after some delay, the message back that
‘The system was successfully started’.
Now, that is a bit overenthusiastic, maybe,
to be fair, we are not quite there yet.
What is meant here is that the Start System command was successfully executed.
Now, we only have to wait for all the process to come up.
The nameserver service is already running.
Let’s do a manual refresh as the interval of 1 minute is a bit long for our purpose here.
Compileserver running, preprocessor running,
daemon starting and waiting for the webdispatcher.
Takes a couple of seconds, maybe more, but eventually, all services are up and the daemon is always the last.
If we then return to the Overview page, we also see that data appears on all of the performance tiles.
Easy.
One remark: for this to work, you need to have specified operating system credentials
for the resource, the system database in this case.
If I select the resources tab and then under SAP Control Credentials for SYSTEMDB@SP2
click Connect and select ‘Delete the stored credentials for this resource’
in the Host OS Credentials for SAP Control’ dialog,
the system returns the message: Clear SAP Control Credentials Succeeded’
and if we now return to our Manage Services page
for the system database and select Stop System: Yes. We get an error.
Show Details returns (what looks to be like some JSON): HDB_SAPCTL_NO_CREDENTIALS.
I’m sure we will get a prettier error in the near future but we get the point:
to stop and start a database, we need operating system credentials.
If you are on a slightly older version of SAP HANA,
you can use the SAP HANA Cockpit for Offline Administration,
as the tool is fully named.
This time you will be prompted straight away to provide a user name and password,
although the tool does not mention what needs to be entered here and expects you to know.
My browser had the username cached, it is the same operating system account we used before,
sp2adm which is the operating system administration account for SAP HANA.
Always has the same format: system identifier + adm.
So, as our SID is SP2, the account will be 'sp2adm'.
The port in the URL is always the same, it is 1128 for HTTP and 1129 for HTTPS.
There is no instance number in the port this time because we are connecting, in fact,
to the SAP host agent - a tool, a component, that’s installed
with each and every SAP HANA system but is not really part of it.
It performs several tasks; we will discuss this topic in some other video.
In SAP HANA 1.0, cockpit was hosted by the built-in application server that came with each HANA system.
This also meant that if you stopped the system, the application server was also stopped,
so you could no longer use cockpit which is why there also is an offline cockpit hosted by
the SAP host agent on HANA 1.0.
The offline cockpit is still there in HANA 2.0, which is why I am able to use it here,
but for HANA 2.0 it is no longer serves any purpose, as you can do everything in the regular
HANA cockpit - assuming, of course, that you have a cockpit running somewhere in your landscape,
as it is a separate installation now, a separate system.
For system operations, select the Start, Restart, Stop tile.
We have a similar view as in cockpit 2.0.
The service name now has HDB as prefix which we can ignore for now but also shows two new
services both with SP2 appended: indexserver and XSengine.
Before we proceed let’s pause briefly and introduce the different services.
The daemon is the watch dog - it monitors all HANA services all of the time
and should, for whatever reason, a service have stopped it will simply start it again.
The term daemon is common usage in UNIX/Linux for this purpose and as HANA runs on Linux
we find the same terminology being used.
The nameserver is also a very important process or service.
It has multiple roles, but here, for example, on a multi-tenant database container system,
it hosts the systemdb database.
The preprocessor and compileserver are supporting services: preproccesing for text analytics
and compilation is needed for SQLScript mainly but could also be used for other procedural
language extensions.
The web dispatcher process is similar to an HTTP server, or web server if you prefer;
it is a bit like the Apache web server to some extent and it is similar, if not the
same, as the one found on SAP Netweaver application server systems.
It performs the same tasks: might serve some static pages but mostly dispatches (redirects)
dynamic content to the appropriate application server, hence the name.
So, where is it dispatching to?
Well, that's what we see here: the XSEngine
XS, or extended services, is a built-in application server for HANA, built-in meaning that it
comes with every release.
XSEngine is the HANA 1.0 version, also known as the XS classic model.
For HANA 2.0, we have XSA, XS advanced model, which is no longer built-in.
You need to add it yourself (install).
The architecture has changed completely on this.
XSA has a whole number of additional processes, we don’t see them here but we will cover
is this separate video tutorial on XSA.
There are more services, for example, should you install the Dynamic Tiering option, for
extended storage, you would also see a service for that.
So, this is not a complete list.
Also important is the indexserver service: it hosts the column and row stores, the database engines.
In HANA 1.0, each system would have a single indexserver process, it would be always be listed.
In HANA 2.0, the indexserver only hosts tenant databases, so if there no tenant database,
there is no indexserver.
This is the multi-tenant database container system feature which was optional in HANA 1.0
but is the only available operation mode in HANA 2.0.
To stop a system, select Stop System on the toolbar below.
This time, we can make a selection - we will see in the next video when we discuss sapcontrol
how this works - you can stop the system softly, give it 5 minutes or more, or immediately:
'Open transactions are aborted and rolled back.'
We have the same options for Restart System.
I am the only user on this system and have yet to start my first transaction, so it is
perfectly fine to select immediately to save some time.
On production systems, of course, you would typically not select this option,
it would have to be for some emergency.
There is no auto-refresh in this offline cockpit, so we will have to manually refresh the page
and we can see the services starting up again - they are either already Running, Initializing, or Scheduled to run.
Here we can actually see that the Web Dispatcher which took the longest to start in cockpit
when we restarted our system the first time,
is actually scheduled behind the indexserver and xsengine services,
tenant processes that our cockpit connection to the system database did not show.
So, we first need to wait for that.
OK - all services are running.
Then, there is also a client/server tool, SAP HANA studio.
Most of you will be familiar with it.
For those new to the topic, it is actually a plugin for the Eclipse development tool,
Java originally.
There are 100’s of plugins and some are provided by SAP.
Runs on Windows, Linux and the Mac.
For HANA 2.0, web tooling is strongly recommended.
You might find the odd case, where you still need to use HANA studio but most of the time
using the web is preferred.
So, although not quite deprecated, it is considered to be more of a HANA 1.0 tool.
You need to add your systems here in the Systems view and then you can simply select
Start, Stop or Restart System from the context menu
- the right-mouse click menu, if you prefer and happen to be right handed.
You can find them under Configuration and Monitoring
- yes, I agree, that might not be where you would expect this.
We do have the same soft and immediate options, this time called Hard,
and the progress of the operation is displayed here on the Processes tab
of the Administration Console in Diagnosis Mode (Ctrl+Shift+O on Windows)
here from the toolbar.
This does require, as in cockpit, an SAP start service connection.
In studio, we can find this here under Properties: SAP Start Service Logon.
You enter the same credentials as for cockpit, the operating system user adm.
If there is nothing entered, you will prompted to provide them after selecting
on of the Start, Stop or Restart System menu options
All services are up. It is exactly the same view as the offline cockpit.
OK, we have briefly discussed the different SAP HANA services or processes.
We have seen that there is such a thing as an SAP start service which requires operating
system credentials and we have seen how you can start, stop and restart a system using
the web interface of HANA cockpit and the client/server tool HANA studio.
In the next video, we will return to HANA express on GCP and see how we can stop and
start our HANA system without cockpits and studios, just using the command line tools
available on the server.
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 we also have a page on Facebook and Google+.
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 his video.
Thank you for watching.