AMT Help Files

Database

Click on the Database node to open the database options of an application.

 

Database

Option Description
Create primary key on LIONRECNO If enabled, the primary key will be set on Lionrecno by default. If indexes use the option Set as primary key, then this overrules the default application setting.
Use default fill factor for indexes defined in SQL

If enabled, the default fill factor for indexes will be inherited from the SQL Database.

Note: this option is ignored while using SQL-Azure databases, since SQL-Azure has no support for the default fill factor.

If not enabled, the default fillfactor for indexes in the application will be set according to the value that is specified in the edit box on the right.

The default value can be overwritten through each separate index.

In case of setting the fill factor through the editbox, the value should be chosen dependant on the no. of records to be added or changed in the concerned table. As indication for setting a suitable fill factor, please regard the following:
Advised fill factor:
100
80
60
More details for determining a suitable fill factor, can be found in the documentation for the concerned SQL Database Engine.

Define Unicode alpha fields for all tables

If enabled alpha fields in all tables can contain Unicode.

warning If exporting Unicode data to ASCII files, non ASCII characters are replaced by question marks.

Define LIONRECNO as Numeric 18 (instead of 9) If enabled, LIONRECNO is a Numeric 18 field instead of the default Numeric 9.

 If using Numeric 9 on large systems the value may exceed the maximum value of 999.999.999 in due time. Therefore, while performing a Reorganization on the database and LIONRECNO in one of the tables exceeds the value 950.000.000 then a warning will be issued stating 'Nearing max value (999999999) of LionRecno. Current <current value>. Please renumber the table'.
If defined as Numeric 18 this warning will not be issued.
No index on Lionrecno If enabled, there will be no implicit index created on LIONRECNO on an Oracle database. This checkbox has no function for an MS-SQL database.
Abort transaction when deleting a non-existing record If enabled, the transaction will be aborted if deleting a non-existing record.
Abort transaction when updating a non-existing record If enabled, the transaction will be aborted if updating a non-existing record.
Add timestamp fields If enabled, by default the timestamp fields will be added to all tables in the application. This can be changed for each table individually in the Table Options.
Allows index keys being NULL If enabled, AMT no longer automatically changes the 'Null Values' to false on database fields used in an index.Instead, Null values are allowed to remain in index keys.

 

Overwrite Collation Sequence

Option Description
MsSql warning Changing the Overwrite Collation Sequence setting can greatly impact an AMT environment, therefore it is strongly advised to consult with Avanade before changing this setting.

With the overwrite collation sequence it is possible to set the application database to a case insensitive collation while using a case sensitive collation for the data itself. This allows for queries with mixed case to be executed correctly, for example: "selECT * FRom TaBlE1".

Per database kind a (case sensitive) collation sequence can be set which will then be used for the data (alpha/string fields) of new table fields. The programmer is responsible for specifying the correct collation value. The reorganization program will use this collation when new tables/fields are added. It is strongly advised to only use the overwrite collation sequence for new applications/databases.

Changing the collation for existing tables/fields is NOT supported.
The reorganization program shows warnings if it finds tables/fields with a different collation sequence but will not execute the change. Migrating existing data must be done manually by creating a new database with the correct (case insensitive) collation sequence, running the reorganization program to create tables/fields with the overwrite collection sequence, copying the data to this new database and finally removing the old database.

Also note that the collation sequence has no references to the logic compares or sort compares. Meaning that changing the collation sequence on the database might result in unexpected compare results as it expects the default collation sequence.

warning Only the application database can have a different collation setting. Other AMT databases (e.g. the system database) must be set according to the important settings for the used database system. Important Settings for MS-SQL Server or Important Settings for Oracle Database.

Oracle

Extra requirements for Oracle databases:

  • Only Oracle Database 12c Release 2 (12.2) is supported for Oracle.The MAX_STRING_SIZE parameter must be set to EXTENDED.
  • Otherwise it will result in the following error: "ORA-43929: Collation cannot be specified if parameter MAX_STRING_SIZE=STANDARD is set."The COMPATIBLE
  • parameter must be set to 12.2 or higher.
Db2 At this moment overwrite collation sequence is not supported for DB2 databases.

 

Database field types

Option Description
DbFieldType This setting controls the behaviour of the DbFieldType value in an AMT table field. See 'Database field types' for more information.
  • Default AMT type, may change when other properties change.
    This setting will set the DbFieldType property back to the default value for the chosen AMT table field properties if any of the following table field properties are changed:
    Type, Length, Decimals or Dictionary.
  • Manually selected, only changed when AMT field type changes.
    If set to this option, the DbFieldType value will only change if the AMT table field type is changed.
    Changes made to Length, Decimals etc. will not affect the chosen DbFieldType.
    With the selection of this option the default database field types for (large) alphanumeric AMT field types can be changed for MSSQL and DB2 databases in the dropdown menus below.

     Please note that the developer is responsible for ensuring that the AMT field fits in the DbFieldType when selecting a non-default DbFieldType.
Default alpha field type when manually selected:
MsSql (N)VARCHAR or (N)CHAR
For tables defined as Unicode, the database type NVARCHAR or NCHAR will be used.
Non-Unicode tables will use VARCHAR or CHAR for alpha fields in a MSSQL database.
Db2 VARCHAR or CHAR
Set either VARCHAR or CHAR as the default type for
alpha fields in the database for Db2 databases.
Default string and large alpha field type:
MsSql (N)VARCHAR(MAX) or (N)TEXT
For tables defined as Unicode, the database type NVARCHAR(MAX) or NTEXT will be used.
Non-Unicode tables will use VARCHAR(MAX) or TEXT for large alpha fields in a MSSQL database.