FREQUENTLY ASK QUESTIONS

YOU CAN SEARCH PART OF THE TEXT OR NUMBER.

Sample database file + encrypt the file


Default configuration file

The database.enc configuration file defines the location of the database server and the authorization to each database. Below is the configuration file in its default state. In this open state, the file is usable and the installation can be run this way after replacing the connection credentials with production credentials. The open form is not suitable and allows easy disclosure of SQL Server access to unauthorized persons. To encrypt the data, go to the "Configuration File Encryption" section later on this page.

 

<config>
  <connections>
    <connection id="CS01" name="DATA">
      <provider>mssql</provider>
      <string>Data Source=[SQL_SERVER_PCINSTANCE_NAME];Initial Catalog=[NAME_DATABASE_data]</string>
      <user>pal</user>
      <password>[HESLO_SQL_UZIVATELE_PAL]</password>
    </connection>
    <connection id="CS02" name="ARCHIVE">
      <provider>mssql</provider>
      <string>Data Source=[SQL_SERVER_PCINSTANCE_NAME];Initial Catalog=[NAME_DATABASE_archiv]</string>
      <user>pal</user>
      <password>[HESLO_SQL_UZIVATELE_PAL]</password>
    </connection>
    <connection id="CS03" name="QSD">
      <provider>mssql</provider>
      <string>Data Source=[SQL_SERVER_PCINSTANCE_NAME];Initial Catalog=[NAME_DATABASE_qsd]</string>
      <user>pal</user>
      <password>[HESLO_SQL_UZIVATELE_PAL]</password>
    </connection>
    <connection id="CS04" name="ATTACHMENTS">
      <provider>mssql</provider>
      <string>Data Source=[SQL_SERVER_PCINSTANCE_NAME];Initial Catalog=[NAME_DATABASE_attach]</string>
      <user>pal</user>
      <password>[HESLO_SQL_UZIVATELE_PAL]</password>
    </connection>
    <connection id="CS05" name="TRAINING">
      <provider>mssql</provider>
      <string>Data Source=[SQL_SERVER_PCINSTANCE_NAME];Initial Catalog=[NAME_DATABASE_training]</string>
      <user>pal</user>
      <password>[HESLO_SQL_UZIVATELE_PAL]</password>
    </connection>
  </connections>
  <databases actual="DB01">
    <database id="DB01" name="[PRODUCTION]">
      <default>CS01</default>
      <subdatabases>
        <subdb type="archiv">CS02</subdb>
        <subdb type="qsd">CS03</subdb>
        <subdb type="attachments">CS04</subdb>
      </subdatabases>
    </database>
    <database id="DB02" name="[TRAINING]">
      <default>CS05</default>
    </database>
  </databases>
</config>

 

Description of individual parts and their meaning:

Defining connection to a database:

<connection id="CS01" name="DATA">
  <provider>mssql</provider>
  <string>Data Source=SQL_SERVER_PC;Initial Catalog=NAZEV DATABAZE DATA</string>
  <user>pal</user>
  <password>HESLO_SQL_UZIVATELE_PAL</password>
</connection>

connection

 

 

Definition of a connection to a specific database (Palstat can be use one or more connections)

 

 

Id

Unique connection identifier

 

 

Name

Connection name describing the type of database and visible eg in the DBBM program

 

provider

 

What type of database will we connect to

 

string

 

The so-called connection string, defines the server and database name.

 

 

Data Source

Define the name or IP address ofthe SQL server INCLUDING  the instance name

 

 

Initial Catalog

The SQL database name for the connection type

 

user

 

The user name under which the application should connect to the SQL sever. Set to "pal"

 

 

password

 

User password


Establishing a connection to a block with one database option:

<databases actual="DB01">
  <database id="DB01" name="NAZEV FIRMY - Palstat 3G">
    <default>CS01</default>
    <subdatabases>
      <subdb type="archiv">CS02</subdb>
      <subdb type="qsd">CS03</subdb>
      <subdb type="attachments">CS04</subdb>
    </subdatabases>
  </database>
</databases>

connection

 

 

A database block can contain several databases that can be selected at startup

 

 

actual

The database indentifier to be the default

 

database

 

Defning a block with a connection, multiple blocks can be inserted and will be offered a startup.

 

 

id

Unique identifier, used until

 

 

name

The name of the database should be visible to users when Palstat starts.

 

default

 

The connection identifier to be used for this block as the default (usually a data database)

 

subdatabases

 

If a database block is used with multiple databases, the data is decomposed.

 

subdb

 

Report with a connection identifier to a specific type of database.

 

 

 

type

Defines what type of database it is. Only edit the identifier, never "type"

 

Establishing a connection to a block with two database options:

<databases actual="DB01">
   <database id="DB01" name=" DATABAZE 1 - Palstat 3G">
     <default>CS01</default>
     <subdatabases>
       <subdb type="archiv">CS02</subdb>
       <subdb type="qsd">CS03</subdb>
       <subdb type="attachments">CS04</subdb>
     </subdatabases>
   </database>
  <database id="DB02" name="DATABAZE 2 - Palstat 3G">
    <default>CS11</default>
  </database>
</databases>


Configuration file encryption - recommended

Perform the encryption after the system installation when the passwords in the configuration files are readable and the PalstatCAQ application is fully functional.

 

Defining passwords for encryption:
 

  • in the CAQservice directory look for "PasswordManager.exe"
  • define "Password ID" for example "MSSQL_PASS" or "SMTP_PASS"
  • for each ID assign the corresponding password
  • save the configuration when an encrypted BIN file is newly created in the ./CONFIG directory


Assigning an ID to the configuration:
 

  • each password is represented by its own ID identifier defined in the previous step
  • now assign the individual IDs to the appropriate locations in database.enc (MSSQL) or config.xml (SMTP)
  • in the place in the appropriate file where the password is readable, insert the password identifier in the following form
    • "#ID=MSSQL_PASS" e.g. for database.enc
    • "#ID=SMTP_PASS" např. pro config.xml

 

Reverse decrypt:

It is limited to 2FA for service interventions only and restricted by a special activation process that is not available to users and administrators.

caqinfo /expert [2FA] /pwdstore

Sample database.enc with converting passwords to encryption

<config>
  <connections>
    <connection id="CS01" name="Example">
      <provider>mssql</provider>
      <string>Data Source=SQLSERVERSQL_INSTANCE;Initial Catalog=SQL_DATABASE</string>
      <user>pal</user>
      <password>#ID=MSSQL_PASS</password>
    </connection>
  </connections>

  <databases actual="DB02">
	<database id="DB02" name="Example">
		<default>CS01</default>
	</database>
   </databases>
</config>


 



 

Configuration file encryption - outdated

The procedure below is outdated and we recommend switching to a more modern security method.

To encript the configuration file, the CONFIG directory must also include the „database.pwd“ file, which serves as the key for creating the encrypted connection file. It is only available on request.

With this program you can also define multiple instances of PALSTAT CAQ and run several systems completely separately, testing for example. Just create the required number of "connections" and assign them to multiple records as shown in the image below.


Creating an encrypted connection  – optional (  database.pwd file required)

Run the ./APL/ConnStrEditor.exe program and you will be prompted to insert a confirmation file immediately after startup. On the server, browse the database.pwd file in the CONFIG directory. The program will then open when you enter the "Edit connection" tab. Click on the icon to create a new connection. Then fill in the fields.

„Name“ the connection name is for identification only

„Provider“ type of database provider

„Login“ a „Password“ enterthe user that is authorized to access the server

„Connection String“ see example below. Contains the database and server name

Data Source=lukas-pc;Initial Catalog=pal3g_data

Connections are established in the same way for all databases which palstat uses:

pal3g_data, pal3g_archiv, pal3g_attach, pal3g_qsd

You can use the“Test it” button to test whether the defined connection is functional.

Assigning connections to databases

After creating the connection, it is necessary to assign them for each database, see below and set the created instance as the default using the "Set as default" button. 

 

 

 

 

 

https://www.palstat.cz/