Verifying Project Database Files and the Role of AMDBASE.LOG in SIMATIC PCS 7

Verifying Project Database Files and the Role of AMDBASE.LOG in SIMATIC PCS 7

In SIMATIC PCS 7 and STEP 7, having only AMDBase.db and no AMDBASE.LOG file inside the project AMOBIJS folder is completely normal and expected when a project is closed. AMDBASE.LOG is a temporary transaction journal generated by the Sybase SQL Anywhere engine during active editing sessions to track uncommitted changes; upon closing SIMATIC Manager cleanly, all pending transactions are committed into AMDBase.db, and the .LOG file is truncated or deleted. The presence of an orphaned AMDBASE.LOG file while SIMATIC Manager is closed indicates an abnormal system termination or crash.

Table of Contents

Executive Summary

System administrators and automation engineers performing project health audits frequently inspect the internal directory structure of SIMATIC PCS 7 projects. When examining the <ProjectName>\AMOBIJS\ folder, engineers often observe that while some projects contain both AMDBase.db and AMDBASE.LOG, other healthy projects contain only AMDBase.db. This observation leads to uncertainty regarding whether a missing .LOG file indicates database damage or data loss. In relational database architecture, the transaction log serves a transient role during active execution. This article explains the lifecycle of Sybase transaction logs in STEP 7, clarifies healthy file states, and details the database verification utility.

Architecture and Fundamental Mechanics

Relational Database Lifecycle, Write-Ahead Logging (WAL), and Clean Shutdown Mechanics:

  • Architecture of the AMOBIJS Database Subsystem:
  • The AMOBIJS folder represents the core object repository for the S7 Project (STEP 7 symbol tables, hierarchy, hardware configuration parameters, and CFC cross-reference links).
  • The primary data store is AMDBase.db (Adaptive Server Anywhere database file).

  • The Role and Mechanics of AMDBASE.LOG:

  • Sybase SQL Anywhere utilizes a Write-Ahead Logging (WAL) architecture.
  • When a project is opened in SIMATIC Manager:

    1. The database engine (dbeng*.exe) mounts AMDBase.db.
    2. It creates or opens AMDBASE.LOG as an active transaction log.
    3. As the engineer places blocks, creates interconnections, or modifies symbols, modifications are written to AMDBASE.LOG first to guarantee atomic transactions and crash recoverability.
  • Clean Shutdown vs. Crash State:

  • Clean Closure: When the user closes SIMATIC Manager normally, the engine executes a Checkpoint operation. All logged transactions are flushed and committed permanently into the main data pages of AMDBase.db. The engine then closes the file handles and deletes or truncates AMDBASE.LOG to 0 bytes.
  • Crash State: If the computer loses power or SIMATIC Manager is killed via Task Manager, AMDBASE.LOG remains on disk with uncommitted transactions. On subsequent opening, the engine reads AMDBASE.LOG to perform automatic rollback/rollforward recovery.

Step-by-Step Implementation Procedure

  1. Verify Normal Database File State in Closed Projects:
    * Ensure SIMATIC Manager is closed.
    * Navigate to the project folder: <ProjectPath>\<ProjectName>\AMOBIJS\.
    * Confirm that AMDBase.db is present with a non-zero file size (typically tens to hundreds of megabytes).
    * The absence of AMDBASE.LOG (or an empty 0 KB file) confirms that the previous project session closed cleanly.

  2. Handling an Orphaned AMDBASE.LOG File:
    * If AMDBASE.LOG exists with a non-zero file size while SIMATIC Manager is closed, an abnormal termination occurred.
    * Do NOT manually delete AMDBASE.LOG! Deleting an active transaction log risks losing recent edits and corrupting the database pointers.
    * Launch SIMATIC Manager and open the project; allow the database engine to process the transaction log and execute automatic recovery.

  3. Execute Clean Checkpoint and Reorganization:
    * With the project open, select menu File > Reorganize....
    * Choose Slow reorganization (if prompted); this rebuilds internal indexes, removes deleted space, and re-writes clean database pages.
    * Once reorganization finishes, close SIMATIC Manager cleanly via File > Exit.
    * Re-check the AMOBIJS folder; confirm that AMDBASE.LOG has been cleaned up.

  4. Verify Project Integrity with s7check (Optional Diagnostic):
    * Siemens provides diagnostic tools such as s7check.exe to validate database consistency across all project tables.

Verification

  1. In Windows File Explorer, verify that AMDBase.db exists in the AMOBIJS folder.
  2. Open the project in SIMATIC Manager; confirm that opening completes without database consistency warnings.
  3. Close SIMATIC Manager cleanly; verify in Windows File Explorer that AMDBASE.LOG is removed or reset to 0 bytes.

Limitations and Operational Precautions

Never copy or replace AMDBase.db between different projects or S7 programs manually; internal database GUIDs must align with the project structure (.s7p). Modifying database files using third-party SQL tools is strictly unsupported.

Engineer FAQ

Is it normal to have only AMDBase.db and no AMDBASE.LOG?

Yes, it is completely normal. The transaction log is deleted or truncated to 0 bytes upon clean closure of SIMATIC Manager.

What is AMDBASE.LOG used for?

It is a temporary write-ahead transaction log used during active editing sessions to ensure crash recovery.

Should I delete AMDBASE.LOG if it exists?

No! Never manually delete AMDBASE.LOG; opening the project in SIMATIC Manager allows the database engine to recover transactions cleanly.

Where is the project database located?

Inside the <ProjectFolder>\AMOBIJS\ directory.

How do I ensure database consistency after an unexpected power outage?

Open the project in SIMATIC Manager and run 'File > Reorganize' to rebuild indices and flush transactions.

Technical References

Related Articles

Related Tags

  • AMDBASE.DB
  • AMDBASE.LOG
  • AMOBIJS
  • Database Health
  • Transaction Log
  • Clean Shutdown
  • Sybase SQL Anywhere
  • PCS 7 V9.0
20 respuestas