All tables
tables · table

Backup_Taken_Log

The Backup_Taken_Log table serves as a transactional audit trail within the SQL Server environment, capturing metadata related to database backup operations. It records which user initiated a backup, the specific company context (compcode), the precise timestamp of the event, and the resulting status of the backup operation. This table is critical for disaster recovery auditing and system maintenance monitoring.

Row count
1
Last entry
2026-01-16
Source
tables

Columns

6
ColumnTypeNullableMeaning
indexintegerNOPrimary Key: Unique identifier for the log entry.
compcodestringYESCompany Code: Links the backup event to a specific business unit.
userIDstringYESThe identifier of the system or user account that triggered the backup.
BackupDatestringYESISO 8601 formatted date indicating when the backup was performed.
TimestringYESThe wall-clock time the backup event occurred.
Backup_StatusintegerYESNumeric flag indicating the outcome of the backup operation.

Full documentation

### 1) Overview
 The `Backup_Taken_Log` table serves as a transactional audit trail within the SQL Server environment, capturing metadata related to database backup operations. It records which user initiated a backup, the specific company context (`compcode`), the precise timestamp of the event, and the resulting status of the backup operation. This table is critical for disaster recovery auditing and system maintenance monitoring.
 
 ### 2) Column Dictionary
 
 | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage |
 | :--- | :--- | :--- | :--- | :--- | :--- |
 | **index** | integer | NO | Primary Key: Unique identifier for the log entry. | | `WHERE index = 0` |
 | **compcode** | string | YES | Company Code: Links the backup event to a specific business unit. | e.g., "DAS" | `JOIN dbo.company ON ...` |
 | **userID** | string | YES | The identifier of the system or user account that triggered the backup. | e.g., "system" | `WHERE userID = 'admin'` |
 | **BackupDate** | string | YES | ISO 8601 formatted date indicating when the backup was performed. | e.g., "2026-01-16" | `CAST(BackupDate AS DATE)` |
 | **Time** | string | YES | The wall-clock time the backup event occurred. | e.g., "12:33:49" | `ORDER BY BackupDate, Time` |
 | **Backup_Status** | integer | YES | Numeric flag indicating the outcome of the backup operation. | 0 (Success/Pending), 1 (Fail) | `CASE WHEN Backup_Status = 0 THEN 'OK' END` |
 
 ### 3) Relationships & Join Map
 
 Based on the **SCHEMA_MAP**, the following relationships are established or inferred:
 
 #### Mandatory Joins (Multi-tenant context)
 * **dbo.company**: Joined via `compcode`. Most transactional and master tables in this schema share this column to enforce data partitioning by company.
 
 #### Likely User Joins (User Auditing)
 * **dbo.pass1**: Joined on `userID` = `dbo.pass1.username`. This links backup logs to specific system user profiles.
 * **dbo.UserrightsHdr**: Joined on `userID` = `dbo.UserrightsHdr.usercode`. This identifies the authorization level of the user performing the backup.
 * **dbo.Deletion_Log**: Joined on `userID` = `dbo.Deletion_Log.ERP_User` (Likely). Provides a comprehensive audit of administrative actions.
 
 #### Cross-Reference Joins
 * **dbo.PhyLocation**: Joined on `userID` = `dbo.PhyLocation.username` (Likely) to determine the physical site from which the user is operating.
 
 ---