After the Web Server verification, it is necessary to perform the updates referring to the database. See the procedure below:
▪The procedures below should only be executed in 3rd-digit updates. For 4th-digit updates, skip this step and restart the SoftExpert Suite service. ▪The verification procedures in this section are only necessary to update environments in version 2.0.7 or earlier. For later versions, skip to the Addition/Update of databases step. |
Verification for Oracle
Oracle Client 12 is installed along with the system. If Oracle 19 is used in the database server, we suggest updating Oracle Client to version 19. To do that, follow the procedure described in the Oracle Instant Client update section.
|
1.Reload the bash configuration:
$ source ~/.bash_profile
$ source /etc/bashrc
|
2.Test the connection:
$ sqlplus <user>/<password>@<tnsname>
|
Troubleshooting:
Problem
|
Possible Solution
|
ORA-12541: TNS: no listener.
|
Verify whether the Oracle environment variables were created correctly.
|
ORA-12154: TNS: could not resolve the connect identifier specified.
|
Verify whether the TNS_ADMIN environment variable was created correctly and if the configuration tnsnames.ora file is configured correctly.
|
ORA-12560: TNS:protocol adapter error.
|
Redefine the permissions of the tnsnames.ora file.
Verify whether the Oracle environment variables were created correctly.
|
3.It will be necessary to verify the content of environment variable NLS_LANG. For that, execute the following commands in SQLPlus to obtain the NLS parameters that must make up 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';
|
4.Close SQLPlus:
5.Now it will be necessary to verify whether the NLS_LANG environment variable is configured in the following files: ▪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:
6.Verify whether, in these files, the variable content is configured according to the results obtained with the three commands executed in SQLPlus:
export NLS_LANG=<VALUE1>_<VALUE2>.<VALUE3>
|
7.Reload the bash configuration:
$ source ~/.bash_profile
$ source /etc/bashrc
|
Addition/Update of databases
Before starting this step, make sure the database backup was performed.
|
If it is necessary to add or update a database, execute the following steps; otherwise, execute the procedure starting in step 7.
|
1.Open the database_config.xml file for editing:
2.Add in the file the new database, that is, repeat the entire structure of the <database> tag by changing the highlighted values with $:
<?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>
|
3.Acceptable parameters for the database_config.xml file, used to connect with the database:
Parameters
|
Acceptable parameters 230
|
Definition and usability
|
<autoCreate>
|
MANUAL
|
This parameter may not be modified.
|
<connectionName>
|
name
|
Name to be defined by the user, only to name the database in the file.
|
<databasePassword>
|
password
|
Password to access the database data.
|
<databaseUser>
|
user
|
User name to access the database data.
|
<db>
|
database_name
|
Database name, if existent.
|
<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>
|
domain
|
Name of the domain in which SoftExpert Suite was installed.
|
<driver>
|
net.sourceforge.jtds.jdbc.Driver
or
oracle.jdbc.driver.OracleDriver
or
org.postgresql.Driver
|
Use:
▪net.sourceforge.jtds.jdbc.Driver for MSSQLServer; ▪oracle.jdbc.driver.OracleDriver for Oracle; and ▪org.postgresql.Driver for Postgresql |
<enable>
|
true
|
Leave it always as "true".
|
<encrypted>
|
false
|
For files written manually, always set the value of this parameter as "false". 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_home
|
If using Oracle, add the oracle 64 bits installation location.
|
<port>
|
5432
or
1521
or
1433
|
By defaults, the ports are:
▪1433 for MSSQLServer; ▪5432 for Postgresql; ▪1521 for Oracle. However, if the connection port is another one, add the correct port.
|
<server>
|
server
|
Name of the database server.
|
<tableSpaceData>
|
tablespace_data
|
Postgresql and Oracle use tableSpaceData, check for it in the database.
|
<tableSpaceIndexes>
|
tablespace_indexes
|
Postgresql and Oracle use tableSpaceData, check for it in the database.
|
<tns>
|
tnsName
|
Enter the tns if the database is Oracle. Oracle Net Services is the tnsnames.ora file. In it, verify the tns name for connection with the database.
|
<allowedHosts>
|
host
|
Fill out the tag when it is necessary to limit the hosts with access permission in the SoftExpert Suite requests. If it is not entered, the requests will not be blocked.
|
4.Save and close the file:
5.Access the SoftExpert Configurator directory:
# cd /usr/local/se/tools/configurator
|
6.Execute the following command to create and update the added database:
7.Execute 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"
|
The options for the action parameter, highlighted in the command above, may be:
▪0: |
Encrypts the database information.
|
▪1: |
Decrypts the database information.
|
▪2: |
Creates/updates the database(s).
|
|
Configuration to avoid Host Header Attack
To disable host identification by the header of the request, avoiding the Host Header Attack, it is necessary to add the record below into the ADPARAMS table of each database:
CDISOSYSTEM = 0
CDPARAM = 750
NMPARAM = '<sesuite.company.com>'
|
Check whether the record already exists or the host must be adjusted. If the configuration has not been applied, use the following command, by updating 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;
|
|