Skip to main content
Version: 2.2.1

Database updates

After the web server verification, updates referring to the database must be carried out. See the procedure below:

danger
  • The procedures below must only be executed in 3rd-digit updates. For 4th-digit update, skip this step and restart the SoftExpert Suite service.
  • The verification procedures in this section are only necessary for updating environments in version 2.0.7 or earlier. For later versions, skip to the Adding/updating databases step.

Verification for Oracle​

danger

Oracle Client 12 is installed along with the system. If Oracle 19 is used on the database server, we suggest updating Oracle Client to version 19. To do this, follow the procedure described in the "Oracle Instant Client update" section.

  1. Reload the bash configuration:
$ source ~/.bash_profile
$ source /etc/bashrc
  1. Test the connection:
$ sqlplus <user>/<password>@<tnsname>

Troubleshooting:

ProblemPossible solution
ORA-12541: TNS: no listener.Check whether the Oracle environment variables were created correctly.
ORA-12154: TNS: could not resolve the connect identifier specified.Check whether the TNS_ADMIN environment variable was created correctly, and whether the tnsnames.ora configuration file is configured correctly.
ORA-12560: TNS:protocol adapter error.Reset the permissions of the tnsnames.ora file. Check whether the Oracle environment variables were created correctly.
  1. The content of the NLS_LANG environment variable must be checked. To do this, run the following commands in SQLPlus to get the NLS parameters that must compose the variable.
  • VALUE1:
SELECT VALUE FROM NLS_SESSION_PARAMETERS WHERE PARAMETER = 'NLS_LANGUAGE';
  • VALUE2:
SELECT VALUE FROM NLS_SESSION_PARAMETERS WHERE PARAMETER = 'NLS_TERRITORY';

  • VALUE3:
SELECT VALUE FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
  1. Close SQLPlus:
quit
  1. Now check whether the NLS_LANG environment variable is configured in the following files:
  • bashrc:
# vi /etc/bashrc
  • setenv.sh:
# vi /usr/local/se/apps/tomcat/bin/setenv.sh
  • setenv.sh:
    • In this file, the variable must be together with other exports:
# vi /etc/init.d/sesuite
  1. Check whether the content of the variable in these files is configured in accordance with the results obtained through the three commands run in SQLPlus:
export NLS_LANG=<VALUE1>_<VALUE2>.<VALUE3>
  1. Reload the bash configuration:
$ source ~/.bash_profile
$ source /etc/bashrc

Adding/updating databases​

caution
  • Before starting this step, make sure the database is backed up.
  • If you need to add or edit a database, perform the following steps; otherwise, execute the procedure from step 7.
  1. Open the database_config.xml file for editing :
# vi database_config.xml
  1. Add the new database to the file, that is, repeat the entire structure of the <\database> tag by changing the highlighted values to $:
<?xml version='1.0' ?>
<database>
<databaseList>
<database>
<autoCreate>MANUAL</autoCreate>
<connectionName>$connection_name</connectionName>
<databasePassword>$password</databasePassword>
<databaseUser>$user</databaseUser>
<db>$database_name</db>
<domain>$domain</domain>
<driver>$driver</driver>
<enable>true</enable>
<encrypted>false</encrypted>
<instance/>
<oraHome>$oracle_home</oraHome>
<port>$port</port>
<server>$server</server>
<synom>false</synom>
<tableSpaceData>$tablespace_data</tableSpaceData>
<tableSpaceIndexes>$tablespace_indexes</tableSpaceIndexes>
<tns>$tns</tns>
<allowedHosts>
<host>$host.softexpert.com</host>
</allowedHosts>
</database>
</databaseList>
</database>
  1. Acceptable parameters for the database_config.xml file, used for connection to the database:
ParametersAcceptable parameters 230Definition and usability
<autoCreate>MANUALThis parameter cannot be modified.
<connectionName>nameName to be defined by the user, simply to name the database in the file.
<databasePassword>passwordPassword to access the database data.
<databaseUser>userUser name to access the database data.
<db>database_nameDatabase name, if any.
<charset> iso-8859-1
or
Unicode
Define whether the database will be iso or unicode. Unicode should be used only for oracle and postgres databases. The standard is iso-8859-1, and the database configurator validates this information.
<domain>domainName of the domain in which SoftExpert Suite was installed.
<driver>- net.sourceforge.jtds.jdbc.Driver
- oracle.jdbc.driver.OracleDriver
- org.postgresql.Driver
Use:
- net.sourceforge.jtds.jdbc.Driver for MSSQLServer;
- oracle.jdbc.driver.OracleDriver for Oracle;
and - org.postgresql.Driver for PostgreSQL
<enable>trueLeave it always as "true".
<encrypted>falseFor manually written files, always put "false" in the value of this parameter. The configurator encrypts this file and changes this value.
<instance>Used for SQL Server database, when it contains instances. It is left empty by default.
<oraHome>oracle_homeWhen using Oracle, add the oracle 64 bits installation location.
<port>- 5432
- 1521
- 1433
By default, the ports are:
- 1433 for MSSQLServer;
- 5432 for PostgreSQL;
- 1521 for Oracle.
However, if the connection port is different, the correct port must be added.
<server>serverName of the database server.
<tableSpaceData>tablespace_dataPostgreSQL and Oracle use tableSpaceData; check in the database.
<tableSpaceIndexes>tablespace_indexesPostgreSQL and Oracle use tableSpaceIndexes; check in the database.
<tns>tnsNameEnter the tns if the database is Oracle. Oracle Net Services is the tnsnames.ora file; check in it the tns name for connection to the database.
<allowedHosts>hostFill in the tag when it is necessary to limit the hosts with access permission in the SoftExpert Suite requests. If it is not filled in, the requests will not be blocked.
  1. Save and close the file:
:wq!
  1. Access the SoftExpert Configurator directory:
# cd /usr/local/se/tools/configurator
  1. Run the following command to create and update the added database:
# bash run.sh
  1. Run the following command to encrypt the database data of the database_config.xml file:
# java -jar se-configurator.jar -installDirectory="/usr/local/se" -action="0"
caution

The options for the action parameter, highlighted in the command above, may be:

  • 0: Encrypts database information.
  • 1: Decrypts database information.
  • 2: Creates/updates databases.

Configuration for preventing Host Header Attack​

In order for host identification by the request header to be disabled, preventing Host Header Attack, the record below must be added to the ADPARAMS table of each database:

CDISOSYSTEM = 0
CDPARAM = 750
NMPARAM = '<sesuite.company.com>'

Check whether the record already exists or whether the host must be adjusted. If the configuration has not been applied, use the following command, changing the example with the host that must be used:

INSERT INTO ADPARAMS (CDISOSYSTEM, CDPARAM, NMPARAM) VALUES (0, 750, '<sesuite.company.com>');

This configuration may be undone by deleting this record, for example:

DELETE FROM ADPARAMS WHERE CDISOSYSTEM = 0 AND CDPARAM = 750;