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 add a scriptserver.
This video has been recorded on release SAP HANA 2.0 SPS 03 and SAP HANA Cockpit SP 06.
For earlier or later releases, please check the Administration playlist
on the SAP HANA Academy YouTube channel.
Hi, I am Denys van Kempen.
There a multiple reasons why you might want to add a script server to your SAP HANA tenant
database.
A script server is used to execute application function libraries written in C++.
It is an optional service and it is not enabled by default.
There is only so much you can do with SQL and with its procedural language extension,
SQLScript, plus it always requires on-the-fly compilation.
For really advanced and complex stuff, you might need to use a programming language,
and for optimum performance, have the code already compiled.
This is why application function libraries exist.
Most databases use them for one thing or the other.
The only drawback is that - you never know - should there be a bug in your code, in your
application function library, you could potentially crash the database engine.
Of course, we do not want or allow this to happen and that’s why we have an additional
process to sandbox the application functions from the database engine.
This is also why the script server is an optional process.
If you do not have any application functions, there is not need to have one running and waste memory.
You might have heard about AFL - the Application Function Library; BFL - the Business Function Library,
PAL - the Predictive Analysis Library; they all use a script server.
If you want to use the data anonymization feature, of SPS 03 - you need a script server.
We also have Safe Mode for ODBC applications, Smart Data Access or SDA safe mode, in short,
which allows you to use the script server to load ODBC drivers and execute calls and
not the database engine directly, same idea.
Also, if you want to create a remote source to a Google BigQuery database - you will need
a script server.
Just some examples.
So, how do we add one.
Difficult?
Nope, it is easy.
I am connected here with the SAP HANA cockpit to the system database.
On the Overview page, click the Overall Tenant Statuses tile.
This will open the Manage Databases page or app, if you prefer.
Then, on the row for the tenant database, click in the Status column.
This will open Manage Services.
Then in the header of the Service list, click Manage Services, and then Add Service.
This will open the Add Service pop-up dialog.
Select “scriptserver” from the drop-down list.
If you have a distributed system, you can assign it to a particular host.
Otherwise, just leave “auto-assign to host” selected.
Click OK - and the scriptserver service is added and started.
Should you want to stop it, just click Stop Service in the Action column, and using Manage
Services, you can also change the port or remove the service again.
Now, no matter where we click in cockpit, in the end it is all SQL that gets executed.
So, of course, we could also just run the ALTER DATABASE database_name ADD scriptserver
statement, optionally indicating host and port.
This is all documented in the SAP HANA Administration Guide,
Add or Remove Services in a Tenant Database,
and there is also a SAP Note, 1650957 - SAP HANA Database, Starting the Script Server,
with some more background information and links to other notes.
I will put the links in the description of this video on our YouTube channel, below.
That’s it.
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.