📘
TimeLine E3
  • TimeLine E3 Documentation
  • Framework
    • Introduction
    • DataSet Definition
    • Window Handling Object
      • Input/Output arguments
      • Open
      • BindDataControls
      • Item Changes
      • Item Search
      • MenuItemClicked
      • Print
      • ModuleOpened (BlueArrow)
      • BlueArrowArguments
      • New Row
      • Delete Row
      • Save
      • Transactions
      • Locking [deprecated]
      • Locking (new)
      • Resizing a response window
      • ParaPanel
      • Adding DMS Tab to a Module
    • BusinessObject
    • Controls
      • BindingFormat
      • LookupGrid and SearchDef
      • ComboBox
      • RadioButton
      • Multiline Textbox
      • xTextBoxSearch
      • xFileBrowse [v16+]
      • DxDispoColumn
      • DxProgressColumn
      • DxTemplateColumn
      • Change control caption programmatically
      • TabControl
      • Navigation
      • Enable controls programmatically
      • Enable a MenuItem programmatically
      • Filter search values
      • Jumping to another module
      • Messages, Notifications, Log, Exceptions, Translation
      • LoggerSink [deprecated]
      • Log
      • OpenFile, FolderBrowsing and SaveFile
      • Execute Actions while displaying an Hourglass
      • Using Progress
      • Async methods with progress bar
      • Wizard
      • Customizing controls using xBehaviors
      • TLProperty.AllowInReadOnly [v16+]
    • DataSet Operations
    • Business-related functionality
      • Getting the next primary key
      • Hybrids
      • Enums
      • Get Current User
    • SQL
    • SQL (using named parameters)
    • Advanced SQL
    • Expression Binding
    • Server-side logic & customization [v16+]
      • Service Hoster
      • Starting / stopping hosted services
      • Changes to scheduled jobs!
      • Business Object Proxies
      • Business Object API
    • Colors in Expression Bindings [v15+]
    • Theming
      • Icons
  • TimeLine Developer (TLD)
    • Debugging in TLD
    • Targets
    • Custom Project Rework [v16+]
  • TimeLine-specific LL functions
  • Stunnel proxy
    • Pre-requisites
    • 1. Initial setup
    • 2. Generate the server/web certificates
    • 3.a. Generating client certificates using the CSR flow
    • 3.b. Generate client certificates from the server console
    • 4. Setting up the E3 client connection
    • 5. Setting up the browser certificates
  • Configuration
    • Configuring the WCF timeout
  • Troubleshooting the E3 Bridge
  • [Deprecated]
    • TimeLine WEB - deprecated in v16+
      • Prerequisites for running the WASM modules on the server
      • Prerequisites for developing WASM modules with TLD
      • Creating a small web module with TLD
      • Terminal Configuration
    • Customization Examples - deprecated in v16+
    • Codestore [deprecated]
    • Configuring the scheduled jobs timeout - deprecated in v16+
  • ASA to PostgreSQL Migration (V17)
    • PostgreSQL Setup and DB Migration
    • ASA17 vs. PostgreSQL: Tips and Differences
      • TimeLine Migration Tools
        • SQL Transpiler
        • DataSet Migration
      • ASA17 vs PostgreSQL Syntax differences
      • Alias referencing
      • In-Line SQL Statements
    • Working with PostgreSQL in TimeLine
      • DB Objects
      • SQL files for DB Update
      • Wait for Commit
      • Postgre Tools and Commands
Powered by GitBook
On this page
  1. ASA to PostgreSQL Migration (V17)

PostgreSQL Setup and DB Migration

PreviousASA to PostgreSQL Migration (V17)NextASA17 vs. PostgreSQL: Tips and Differences

Last updated 11 days ago

Important Considerations for Database Migration to PostgreSQL

When migrating a database to PostgreSQL, please take note of the following:

  • Database users will be lost. The only user that will remain is the DBA user.

  • The following routines will not be migrated: database triggers, events, procedures, and functions. All db objects (tables, views, functions etc) are now lowercase.

  • Views will be migrated (best effort).

  1. Install

When installing PostgreSQL, ALWAYS use sql for the superuser:

Postgres Service Users and Migration

The migration introduces a secondary admin user, named DBA, to maintain consistency with ASA. Initially, sticking to SQL password is recommended purely for the migration process.

The default postgres database, containing metadata and templates, is essential and must not be deleted.

The users are global to the PostgreSQL service. After the migration, you can still easily change passwords for the users.

You can change the password anytime following these steps:

open PGAdmin -> rightclick the postgres user -> properties -> tab 2 -> password: sql -> save.

  1. Database migration:

The last Standard SQL for V16 is 9132. We highly recommend updating your V16 database to the latest SQLs using TimeLine Server 16 before continuing.

The migrated DB will have the name of the old database - not the name of the profile in TL Server (consider renaming it to v17 before creating the TL Server 17 profile).

Open TimeLine Server 17, right click on the database you want to migrate (Database provider SAOLEDB.17). Attention, this will create a new database, so the ASA Profile will still be working

  1. Change the Postgre Adress and Port if they are any different from the default values

Troubleshooting migration issues

  • In the root folder of TL Server17, there's a log file called "output.log"

  • Consider deleting existing data before each migration, as new migrations append information without resetting it

  • Check the log file for foreign key (FK) error messages by searching for "violates foreign key constraint" or by scrolling to the file's end to find similar lines as shown in the screenshot below

  • Below each error line in the log, the corresponding failed SQL command is displayed. Alternatively, navigate to the /_PG_Migration subfolder and open reload_pg.sql and locate the line number indicated by the error message (e.g., line 39943 in the screenshot) for further investigation

  1. Open pgAdmin and check if the database structure was generated.

Hint: if you don’t have any tables listed, there was a problem with the migration. If this happens, do not hesitate to contact us.

  1. To check if the database was migrated successfully, verify if the double columns from the ASA17 database are now double precision. Anything else is wrong

  1. If the migrated database has errors, you can delete the database as follows:

  1. Create a new server profile in TimeLine Server, as follows:

  1. Updated the new database (server Profile) with V17 Postgre SQLs only

PostgreSQL 17.5
PostgreSQL superuser password: sql
Migration of ASA17 Database to PostgreSQL
Changing PG Adress and Port at DB Migration
pgAdmin4 Database Structure
ASA17 double data type converted to double precision in PostgreSQL
Incorrect migration of double data type. We had a bug in an old version of the migration tool.
Deleting database from pgAdmin
TL Server Profile setup
Updating PostgreSQL Database in TimeLine Server 17