5. SQL Server configuration
5.1. Character encoding
Once the database is created, check that “Collation” is set to “
SQL_Latin1_General_CP1_CS_AS”. If the database is created from the HOPEX application (see
3.9.1 Creating a New “HOPEX environment”), the appropriate encoding is automatically configured.
5.2. Database user
You can connect to the database with 2 modes:
• Native account easier choice
The connection to SQL server for HAS Instance and HOPEX Core module is done with this user/password from SQL server.
• Windows/Domain account: Trusted Connection
The connection is made with the domain user that launch the process. Ensure all users that will launch the desktop application will be defined in SQL Server as well.
5.3. Database connection string
• If you are on a native account, you will use the login/password of SQL.
• If you are on the Windows/Domain account, you will add Trusted_Connection=true in the parameter.
• If you use a secure SQL connection you will need to had TrustServerCertificate=True in the parameter.
• Set the parameter Encrypt=false; or “true” if you use SSL communication. For ODBC Driver 18 the syntax “Encrypt=false;” is mandatory if you do not have SSL communication.
Caution: the value is either true/false or yes/no; In HAS Console the value are true/false in Administration.exe the value are yes/no
5.4. User grants
To run HOPEX Application server the database users need the following privilege and roles.
|
Common actions performed
|
• Create/Delete Database
• Create/Update/Read/Write database structure (tables, procedures, index…)
• Read/Write data access
|
|
Server roles
|
dbcreator(1)
db_ddladmin
db_datawriter
db_datareader
|
|
Database roles
|
db_owner or public(2)
|
|
Server permissions
|
view server state
|
Should you restrict the role of database creation the DBA must create the databases manually following naming convention
(1) for Windows domain account we recommend you remove the db_creator role.
(2) Give public role to restrict access rights