Changed System Tables

SAP ASE version 16.0 introduces changes to system tables.

sysattributes

The sysattributes system table supports the full database encryption feature. The encrypted database feature introduces 43, a new systtributes class that signifies full database encryption. For every storage allocation of the database that undergoes encryption, SAP ASE inserts a row in sysattributes with these values:
Column NameValue
class
43
object
dbid (database ID)
object_info1
Starting logical page ID
object_info2
Ending logical page ID
int_value
Last encrypted logical page ID on one storage allocation
This row is removed when SAP ASE finishes encrypting the database.

sysconstraints

In versions of SAP ASE earlier than 16.0, sysconstraints saved information about check constraints, unique and primary key constraints, referential constraints, and rules and computed column definitions. In SAP ASE 16.0 sysconstraints also stores the following information about multiple triggers associated with a table:
Name Datatype Description
colid smallint Ordering number of trigger. The default is 0.
constrid int Trigger ID.
tableid int ID of the table on which the trigger is declared.
error int Not used for triggers.
status int
  • 0x0080 = a delete trigger
  • 0x0100 = an insert trigger
  • 0x0200 = an update trigger
  • 0x0400 = trigger is disabled
spare int Unused

sysdatabases

The sysdatabases system table supports the full database encryption feature. The encrypted database feature introduces status5, a new column that indicates the encryption status of a database. The values are:
HexDescription
0x00000001
Indicates whether the database is encrypted or not.
0x00000002
The database is being encrypted, and the encryption is still in progress.
0x00000004
The database is being decrypted, and the decryption is still in progress.
0x00000008
The database is only partially encrypted, either due to an error or because the process was suspended by the user.
0x00000010
The database is only partially decrypted, either due to an error or because the process was suspended by the user.

sysobjects

In versions of SAP ASE earlier than 16.0, sysobjects saved the following:
  • deltrig column for delete triggers
  • instrig column for insert triggers
  • updtrig column for update triggers

In SAP ASE 16.0, the first trigger created on a table for delete, insert, and update operations, where the trigger is created without the order clause (or order 0) is associated with the table in one of the above columns in sysobjects.

The second and subsequent triggers created for a given action are associated with the table through a row in syscontraints. In addition, any trigger with order 1 or greater always uses sysconstraints for the table/trigger association.

The sysobjects row for the dependent table uses bits in the sysstat2 field to indicate that a trigger is disabled. In versions earlier than SAP ASE 16.0, there could be no more than one insert, delete, or upgrade trigger, which used these three bits:
  • disable_instrig 0x001000000
  • disable_deltrig 0x002000000
  • disable_updtrig 0x004000000
These bits exist in SAP ASE 16.0 and are used when a table's trigger ID is stored in sysobjects, as described above.
Related concepts
Full Database Encryption and System Changes
create archive database for Full Database Encryption
dbencryption_status
sp_helpdb
sp_encryption
ddlgen
sybmigrate
Related reference
alter database for Full Database Encryption
create database for Full Database Encryption
create encryption key
drop encryption key