Support Questions

Find answers, ask questions, and share your expertise

Ambari Database Setup other than postgres

avatar

I want to use external ( location other than ambari-server host) database (MariaDB or Oracle 11g) for Ambari. Can any one help me to know the steps to be followed.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Manisha Pande

In order to use Non Default Databases you will first need to setup the Database and ambari provides various "*.sql" files which has the DDL to create/setup the DB and create various tables in it.

These SQL files can be found inside the "/var/lib/ambari-server/resources" directory on ambari server.

More detailed instructions can be found here:

MySQL: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.5/bk_ambari-administration/content/using_amba...

Oracle: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.5/bk_ambari-administration/content/using_amba...

Once the Database is setup and we execute the DDL on the DB side then while runnign the "ambari-server setup" command at some point it will ask for "Advanced Database Configuration" there we can enter the remote Database Hostname & Port . The setup wizard itself will ask for the DB username & password Schema name etc.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Manisha Pande

In order to use Non Default Databases you will first need to setup the Database and ambari provides various "*.sql" files which has the DDL to create/setup the DB and create various tables in it.

These SQL files can be found inside the "/var/lib/ambari-server/resources" directory on ambari server.

More detailed instructions can be found here:

MySQL: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.5/bk_ambari-administration/content/using_amba...

Oracle: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.5/bk_ambari-administration/content/using_amba...

Once the Database is setup and we execute the DDL on the DB side then while runnign the "ambari-server setup" command at some point it will ask for "Advanced Database Configuration" there we can enter the remote Database Hostname & Port . The setup wizard itself will ask for the DB username & password Schema name etc.

avatar

@Jay Kumar SenSharma

Thanks for the reply!!

I am setting database in other than ambari-server (other host). How to do that setup.

How ambari will know which database needs to be connected.

Please help

Regards.

avatar
Master Mentor

@Manisha Pande

Suppose you want to setup a Remotely running Oracle Server ()assuming it is running on remote host "oracledb.example.com" on port 1521) for your Ambari Server.

Then you will need to do this:

Step1). Refer to the Ambari Doc to know how run the DDL on the Remote Database.

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.5/bk_ambari-administration/content/using_amba...

Step2). On the ambari Server Host run the ambari setup as following:

Basically when Ambari Setup wizard asks for "Enter advanced database configuration [y/n] (n)?" Then enter 'y' and proceed

Example:

# ambari-server setup
Using python  /usr/bin/python
Setup ambari-server
Checking SELinux...
SELinux status is 'enabled'
SELinux mode is 'permissive'
WARNING: SELinux is set to 'permissive' mode and temporarily disabled.
OK to continue [y/n] (y)? y
Customize user account for ambari-server daemon [y/n] (n)? n
Adjusting ambari-server permissions and ownership...
Checking firewall status...
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? n
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? y
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
==============================================================================
Enter choice (4): 2
Hostname (oracledb.example.com): oracledb.example.com
Port (1521): 1521
Select Oracle identifier type:
1 - Service Name
2 - SID
(1): 1
Service Name (ambari): ambari
Username (ambari): ambari
Enter Database Password (bigdata): 
Configuring ambari database...
Configuring remote database connection properties...
WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-Oracle-CREATE.sql'
Proceed with configuring remote database connection properties [y/n] (y)? y

.

avatar
Master Mentor

@Manisha Pande

If this answers your query/issue then please mark this HCC thread as answered by clicking on "Accept" link on the correct answer, That way it will help other HCC users to quickly find the answers.