cancel
Showing results for 
Search instead for 
Did you mean: 

HANA 2- Add new system via Linux command line

chladek
Participant
0 Kudos

Hello,
as is in HANA Studio possible 'Add new system' is it possible do it from Linux command line?
I made bash script for fully automated Installation HANA 2 + SAB B1 v10 and last thing what I miss is add the new system into HANA.

Thank You
Regards Zdenek

dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Got the answer to your question? To improve the knowledge base and make the right answers easier to find, please mark the best answer and close the question. Thanks!

Don’t know how? See https://answers.sap.com/questions/13162472/how-to-mark-an-answer-and-how-to-close-a-question.html

For the readers, before you leave, don't forget to up/down vote the answers. You can vote on the question too.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

dvankempen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi zdenek.chladek,

The SAP HANA cockpit web client has an API to do this programmatically but for SAP HANA studio all we have are a few command line parameter flags.

Would this solve your issue?

If not, Studio is just a plugin for Eclipse so you could look into what programmatically is possible with the IDE. For SAP HANA studio plugin, development stopped in 2016 so you would have to look at 3rd party solutions.

chladek
Participant
0 Kudos

Hello Denys,
Your are close to my purpose. What exactly I would like is add service 'scriptserver' into Tenant database. The mentioned command from your link:

hdbstudio -h hana1 -n 02 -u DBADMIN -d Tenant01

will probably want to open HANA Studio with GUI and I need do all without GUI

dvankempen
Product and Topic Expert
Product and Topic Expert

Two different topics,

  • opening SAP HANA studio with GUI probably can be achieved using its configuration file: hdbstudio.ini. You would have to Google this a bit but as mentioned, studio is just an Eclipse plugin. Some JVM setting.
  • the script server is adding by changing system parameter. For this there is a SQL Interface and, as of SPS 05, also a Python utility

See


chladek
Participant

Thank You Denys,
in this way it should be possible, directly from Linux command line.
/usr/sap/NDB/SYS/exe/hdb/

./hdbsql -n localhost -u SYSTEM -p mypass "ALTER DATABASE MY_TENANT_DATABASE ADD 'scriptserver' ;"
chladek
Participant
0 Kudos

last thing what I miss is pass the password in the command via variable in bash script

./hdbsql -n localhost -u SYSTEM-p $mypass -d SYSTEMDB "ALTER DATABASE MY_TENANT_DATABASE ADD 'scriptserver' ;"

dvankempen
Product and Topic Expert
Product and Topic Expert
HakanHaslaman
Product and Topic Expert
Product and Topic Expert
0 Kudos