1. Connect to an External Database

Important

  • You must have a connector JAR file for your MySQL, Microsoft SQL Server or Oracle database.

  • We explain how to install a primary database, however, we recommend that you have one or several database replicas as well to ensure better availability and performance.

You can install one of the following database management systems on any computer where Zephyr is not installed and configure it so that Zephyr can connect to it:

Supported Versions

MySQL Community Server version 8.0. See Zephyr Supported Platforms for more information on the prerequisites for JDBC drivers.

Configure the MySQL Database

1. Log in to your MySQL Server.

Open the Command Prompt on the computer where MySQL Community Server is installed and navigate to the MySQL installation folder (for example, C:\Program Files\MySQL\MySQL Server 5.7\bin)

Connect to your MySQL server using the following command:

mysql.exe -uroot

In this example, the username is root.In a new MySQL instance, root is the default user and can be logged in without a password. If you are using an existing MySQL Server instance, the username and password may be different.

2. Create a new user for Zephyr.

Create a new user whose credentials Zephyr will use to connect to the database and set a user password. To do that, use the following command:

CREATE USER 'zephyrDBuser@'localhost' IDENTIFIED BY 'zephyrDBuserPass';

3. Set permissions for remote access.

Type the command below to make the database accessible remotely:

grant all on *.* to zephyrDBuser@'127.0.0.1' identified by 'zephyrDBUserPass';

where zephyrDBuser is the username and ZephyrDBuserPass is the password of the user created at step 2.

The "*.*" in the command above grant permissions to all databases. Replace 127.0.01 with the IP address of the node where Zephyr will be installed. This command will grant access to all databases for the given IP addresses. The minimum permission requirement is the privilege to create and populate tables.

When installing a database for a Data Center cluster, you need to grant permissions for each node in the cluster.

Note

Now you an access your MySQL database remotely from the designated IPs.

4. Set the amount of memory to be used and the maximum number of connections.

Open the my.ini file (Windows) or my.cnf (Linux). The default location is the MySQL root folder.

Set the following values for the parameters:

Parameter

Minimum value

innodb_buffer_pool_size=

4096M

query_cache_size=

1M

key_buffer_size=

8M

max_connections=

500

If no lines contain these parameters, then create new lines for them.

Note

To check parameter values, use the following SQL queries:

Supported Databases

  • SQL Server 2019

  • SQL Server 2017

Prerequisites

  • Install Microsoft SQL Server on any computer where Zephyr is not installed.

  • Download the JDBC driver and place it on the nodes where Zephyr will be installed.

Configure the Microsoft SQL Server Database

Step 1. Create a user account with relevant permissions.

In Object Explorer, expand the folder of the server instance in which you want to create a new login.

Right-click Security > Logins and select New Login…:

1749221379.png

In the Login – New dialog box, on the General page, enter the name of a user in the Login name box.

To create a login that is saved on a SQL Server database, select SQL Server authentication. In the Password box, enter a password for the new user. Enter that password again in the Confirm password box:

1745944736.png

From the Default database list, select a default database for the login. Master is the default for this option.

From the Default language list, select a default language for the login.

Click OK.

View the newly created login in the Security > Logins folder:

1749614606.png

Next, you need to set permissions for this login. Right click the user and select Properties:

1746010344.png

In the Properties window, grant permissions for the user to Alter any database:

1749680135.png

The Effective tab will show the minimum permissions that must be provided:

1745977554.png

You have created a new Login user with the appropriate permissions.

Step 2. Set permissions for remote access.

In this step, we will enable remote connections on the SQL Server instance that you want to connect to from a remote computer.

Staying within SQL Server Management Studio, right-click the server name in the left pane and select Properties:

1749286931.png

Select Connections in the left pane and make sure that check-box Allow remote connections to this server is selected:

1749254157.png

Now, you need to enable the TCP/IP protocol. To do that, open SQL Server Configuration Manager, expand SQL Server Network Configuration and click Protocols for SQLEXPRESS. Check the status to ensure that the TCP/IP protocol is enabled. If it is disabled right-click on TCP/IP and select Enable:

1749581842.jpg

Select Properties from the same pop-up menu.

On the Protocol tab, make sure that Listen All has a value of Yes:

1749614616.png

Now, click the IP Addresses tab, scroll-down to the APAll section, and enter the port 1433 for TCP Port:

1746370728.png

Now you can start the SQL Server service.

Important

To learn how to start, stop, pause, resume, restart the Database Engine, SQL Server Agent, or SQL Server Browser Service, see Start, stop, pause, resume, restart SQL Server services.

Step 3. Turn on the SQL Server Browser service.

Open SQL Server Configuration Manager, click SQL Server Services in the left pane, right-click SQL Server Browser service and select Properties.

1746370734.png

In the subsequent window, switch to the Service tab, click Start Mode, and select Automatic from the drop-down menu:

1749286946.jpg

Switch to the Log On tab and click Start to start the SQL Browser service.

1746370744.jpg

Make sure the state of the SQL Server Browser service is Running:

1749188632.jpg

Step 4. Configure the firewall to allow network traffic.

Configure the firewall to allow network traffic related to the SQL Server and to the SQL Server Browser service.

The following port exceptions should be set:

A port exception for TCP port 1433:

In the New Inbound Rule Wizard of your firewall, do the following to create a port exception:

  1. Select Port.

  2. Select TCP and specify port 1433.

  3. Select Allow the connection.

  4. Choose all three profiles (Domain, Private & Public).

  5. Name the rule SQL – TCP 1433:

1745977604.gif

A port exception for UDP port 1434:

Click New Inbound Rule again and do the following:

  1. Select Port.

  2. Select UDP and specify port 1434.

  3. Select Allow the connection.

  4. Choose all three profiles (Domain, Private & Public).

  5. Name the rule SQL – UDP 1434:

1749680188.gif

Step 5. Set up authentication

In SQL Server Management Studio, right-click the server name in the left pane and select Properties.

1749286931.png

In the subsequent window, select Security in the pane on the left, then select SQL Server and Windows Authentication mode in the Server authentication section, and click OK:

1751023649.png

Your database is ready to be used.

Step 6. Specify the amount of memory to be used.

In SQL Server Management Studio, right-click on the server name in the left pane and select Properties.

1749286931.png

In the subsequent dialog, select Memory in the pane on the left and specify the desired values in the Minimum server memory and Maximum server memory fields. The recommended minimum is 8 GB:

1751023676.png

Logs

Log files may help you troubleshoot issues. To view the logs in SQL Server, expand Management > SQL Server Logs, right-click any log file, and click View SQL Server Log:

Supported Databases

  • Oracle Database 19c.

Prerequisites

  • Download and install Oracle Database on any computer where Zephyr is not installed.

  • Download the JDBC driver. Make sure the JDBC driver is stored on the node where Zephyr will be installed.

    • Oracle Database 19c

Configure the Oracle Database

Step 1: After you install Oracle Database, set collation and DB parameters:

The default collation is binary for Oracle, and the one that is supported. The following query can be used to validate the collation for the user (database):

SELECT COALESCE(value, (SELECT value
             FROM nls_database_parameters
             WHERE parameter = 'NLS_SORT'))
FROM nls_session_parameters
WHERE parameter = 'NLS_SORT'
To configure the database, connect through the command console:

Type : sqlplus

Enter USER Name : sys/sysdba

Enter Password : *******

Run the commands below to set up Oracle database parameters:

Oracle must be set up with the AL32UTF8 parameter to support UTF-8 characters. To check your charset setting:

SELECT * FROM v$nls_parameters WHERE parameter LIKE '%CHARACTERSET%';

Step 2: Set up your database charset:

  1. shutdown immediate;

  2. startup restrict;

  3. select name from v$database;

  4. view code below:

    ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;
  5. view code below:

    SELECT value FROM NLS_DATABASE_PARAMETERS WHERE parameter=’NLS_CHARACTERSET’;
  6. shutdown immediate;

  7. startup;

Step 3: Connect to the database in Oracle SQL Developer:

1752727571.png

User creation

Create a table space:

CREATE tablespace jilo
DATAFILE 'jilo.dbf'
SIZE 2120M
AUTOEXTEND ON;

Create an Oracle user:

create user ITCC identified by zephyr default tablespace <tablespace_name> quota unlimited on <tablespace_name>;
grant connect to ITCC;
grant create table to ITCC;
grant create sequence to ITC;
grant create trigger to ITCC;
grant create session to ITCC;
grant create view to ITCC; 

***** If user was created on a default table space of not know , execute following to give unlimited space on current user table space *********
grant unlimited tablespace to ITCC;
***********--------------------------------************
create user DVERSION identified by zephyr default tablespace <tablespace_name> quota unlimited on <tablespace_name>;
grant connect to DVERSION;
grant create table to DVERSION;
grant create sequence to DVERSION;
grant create trigger to DVERSION;
grant create session to DVERSION;
---------------------------------
Internal note: if there are any issues in permissions, use grant all for now.
---------------------------------
CREATE USER itcc IDENTIFIED BY zephyr;
GRANT ALL PRIVILEGES TO itcc;
CREATE USER dversion IDENTIFIED BY zephyr;
GRANT ALL PRIVILEGES TO dversion;

If you face issues with the table space, try doing the following: for data files below, find the path of data files and use path value and replace the value "<example>/u01/app/oracle/oradata/XE/system.dbf<example>" below.

SELECT * FROM DBA_DATA_FILES;

ALTER DATABASE DATAFILE '<example>/u01/app/oracle/oradata/XE/system.dbf<example>' 
AUTOEXTEND ON MAXSIZE UNLIMITED;

You can check the connection to your database when installing Zephyr on your cluster nodes. To do that, click Test Connection on the Configure Database screen of the installation program (see Install Zephyr Enterprise on Nodes). If Zephyr fails to connect to it, the installation will be interrupted.

Next Step >

See Also

Support and Troubleshooting

Publication date: