Kingbase Banner

How to Install and Configure KingbaseES Database

How to Install and Configure KingbaseES Database

Abstract metallic and geometric forms representing enterprise database migration and system integration against a dark blue background.

Prerequisites and Environment Validation

Before any installation or migration, validate the target environment against the vendor’s official compatibility matrix. Unsupported operating system versions or kernel configurations are a primary cause of installation failures and performance degradation. The following table outlines general baseline requirements for a standard enterprise deployment.

Component Requirement Verification Note
Operating System Enterprise Linux distributions (e.g., RHEL, CentOS, Anolis) or other supported OS Exact OS version-to-DB version matrix must be validated against the vendor’s compatibility list.
Kernel Specific kernel versions required by the target release Check for required kernel modules (e.g., shmem, sem) as per vendor documentation.
CPU Supported architectures (e.g., x86_64, ARM64, LoongArch) Verify instruction set compatibility for the target architecture.
RAM Minimum requirements for the specific workload Ensure sufficient memory for shared_buffers and OS cache.
Disk SSD recommended; sufficient free space for data and logs Verify IOPS and throughput requirements for the workload.
Licensing Commercial License File (.lic or equivalent) Verify license validity and region restrictions.
Dependencies Required system libraries (e.g., glibc, openssl, readline, zlib) Check package versions against the vendor’s dependency list.

Action: before procurement, request the official compatibility matrix for the specific KingbaseES release from the vendor to confirm support for your OS version and hardware architecture.

The Pre-Migration Feasibility Checklist

Migration risk is primarily driven by schema incompatibilities and unsupported SQL constructs. Use this checklist to assess your legacy Oracle, MySQL, or PostgreSQL databases before moving data. Run the official KingbaseES Database Migration Tool (KDTS) assessment to back it up.

  • Schema Analysis: Verify that all tables, indexes, and constraints are supported by the target KingbaseES version.
  • PL/SQL vs. PL/pgSQL: Identify all stored procedures, functions, and triggers. Note that Oracle PL/SQL requires the Oracle Compatibility Mode, while PostgreSQL syntax requires the PG Compatibility Mode.
  • Data Type Mapping: Check for data types that may have different precision or range in KingbaseES (e.g., NUMBER vs. NUMERIC, CLOB vs. TEXT).
  • Stored Procedures & Functions: Validate that all procedural code can be converted or is supported in the target compatibility mode.
  • Triggers & Views: Ensure that trigger logic and view definitions are compatible with KingbaseES syntax.
  • Licensing & Support: Confirm that the commercial license covers the intended workload and that support channels are accessible for your region.
  • Network & Security: Verify that firewall rules allow database ports and that TLS/SSL certificates are configured for secure connections.

Action: run the KDTS assessment tool against your source database to generate a detailed compatibility report, and address any "High Risk" items before proceeding.

Step-by-Step Installation and License Activation

The procedure below outlines the standard installation workflow for KingbaseES on Linux. Commands and parameters must be verified against the vendor’s installation guide for your release.

  1. Environment Preparation:

    • Create a dedicated system user for the database (e.g., kingbase).
    • Verify OS dependencies and kernel parameters (e.g., shmmax, shmall) as specified in the vendor documentation.
    • Ensure the installation directory has sufficient permissions for the kingbase user.
  2. Package Extraction:

    • Download the KingbaseES installation package (e.g., .tar.gz or .rpm) from the official vendor portal.
    • Extract the package using the appropriate command for your distribution.
    • Navigate to the extracted directory.
  3. Installer Execution:

    • Run the installer script provided in the package.
    • Follow the interactive prompts to select the installation directory, version, and components.
    • Note: for a silent installation, prepare a configuration file with the required parameters and run the installer with the silent mode flag.
  4. License Activation:

    • Copy the commercial license file provided by the vendor to the data directory or the specified license path.
    • Restart the database service to load the license.
    • Verify license status by checking the log file or using the appropriate command-line utility provided by the vendor.
  5. Service Verification:

    • Start the database service.
    • Check service status using the system service manager.
    • Connect using the vendor-provided command-line client to verify the database is accepting connections.

Troubleshooting: if the installation fails, check the installation log for dependency errors. If license validation fails, verify the license file path and make sure the file is not corrupted or expired.

Migration Workflow: From Source to KingbaseES

Data migration involves schema conversion, data extraction, and data loading. The KingbaseES Database Migration Tool (KDTS) and KingbaseES Data Synchronization tools are the primary tools. The workflow below assumes a migration from an Oracle or MySQL source.

  1. Assessment:

    • Run KDTS to analyze the source schema.
    • Review the compatibility report and refactor any unsupported SQL constructs.
  2. Schema Migration:

    • Configure KDTS with the source and target connection details.
    • Select the objects to migrate (tables, indexes, constraints).
    • Execute the schema migration job.
    • Verification: compare object counts and DDL statements between source and target.
  3. Data Migration:

    • Configure the synchronization tool for data synchronization.
    • Set up incremental or full data load based on downtime requirements.
    • Execute the data migration job.
    • Verification: run row count checks and checksum validations on critical tables.
  4. Application Testing:

    • Update application connection strings to point to the KingbaseES instance.
    • Execute application-level tests to verify SQL compatibility and performance.
    • Monitor logs for any SQL errors or performance warnings.

Note: KDTS command-line parameters and configuration file structures must be verified with the vendor. The compatibility mode (Oracle vs. PostgreSQL) significantly affects the migration effort and SQL conversion rules.

High-Availability Cluster Configuration

High availability is critical for enterprise workloads. KingbaseES supports multiple high-availability architectures. The choice depends on your workload characteristics, budget, and the specific HA solution the vendor provides (e.g., Shared-Storage HA or Distributed HA).

  • Shared-Storage HA:

    • Architecture: multiple nodes share the same storage and access the same data files.
    • Pros: potential for low latency; supports high availability with specific storage configurations.
    • Cons: higher complexity; requires high-speed, low-latency shared storage (e.g., SAN, NFS).
    • Use case: mission-critical applications requiring high availability and minimal failover time.
  • Distributed/Replication HA:

    • Architecture: one primary node handles writes, while multiple standby nodes handle reads or provide failover.
    • Pros: easier to configure; lower storage costs; good for read-heavy workloads.
    • Cons: limited write scalability; failover may involve a brief downtime or data loss depending on synchronization mode.
    • Use case: applications with high read volume and lower write frequency.

Verification: specific RTO (Recovery Time Objective) and RPO (Recovery Point Objective) metrics must be validated with the vendor based on your network and storage configuration. Review cluster configuration files and network requirements with the vendor’s HA documentation.

Failure Mode Analysis and Rollback Procedures

Migration and installation failures can occur due to schema incompatibilities, license issues, or resource constraints. A defined rollback procedure is essential to restore the original state.

  1. Identify Failure Point:

    • Check database logs for error messages.
    • Verify if the failure occurred during schema migration, data load, or service startup.
  2. Stop Services:

    • Stop the KingbaseES service.
    • Stop any migration tools or synchronization jobs.
  3. Restore Backup:

    • Restore the source database from the pre-migration backup.
    • If the target KingbaseES instance is corrupted, drop and recreate it, or restore from a known good backup.
  4. Verify Integrity:

    • Check the source database for consistency using the appropriate backup verification tool provided by the vendor.
    • Ensure the application can connect to the restored source database.
  5. Resume Migration:

    • Fix the identified issue (e.g., refactor SQL, adjust resources).
    • Re-run the migration job from the last successful checkpoint.

Note: rollback scripts and backup verification strategies must be validated with the vendor. Always maintain a full backup of the source database before initiating any migration.

Performance Tuning Baseline for Transactional Workloads

KingbaseES tuning parameters may differ from standard PostgreSQL. The following table provides a baseline for transactional workloads. Adjust these values based on your hardware and workload profile.

Parameter Recommended Baseline Description
shared_buffers 25% of RAM Memory for shared data structures.
work_mem 4MB – 16MB Memory for sort/hash operations per query.
effective_cache_size 75% of RAM Estimate of disk cache available.
maintenance_work_mem 256MB – 1GB Memory for maintenance operations (VACUUM, CREATE INDEX).
max_connections 100 – 500 Maximum concurrent connections.
wal_level replica WAL level for replication and backup.

Action: verify tuning parameters with the vendor documentation, monitor performance metrics (CPU, I/O, memory), and adjust iteratively. Use EXPLAIN ANALYZE to identify query bottlenecks.

FAQ

What are the specific OS and hardware prerequisites for installing KingbaseES?

Exact OS version-to-DB version matrix and hardware requirements must be validated against the vendor’s official compatibility list for the specific KingbaseES release you are using.

How do I verify my Oracle/MySQL schema compatibility before migration?

Use the official KDTS assessment tool to generate a compatibility report. Review the report for unsupported constructs and refactor SQL as needed before migration.

What are the steps to rollback a failed KingbaseES migration?

Stop the KingbaseES service, restore the source database from a pre-migration backup, verify integrity, and fix the identified issue before re-attempting the migration.

How can I configure High Availability for KingbaseES?

Configure High Availability by setting up the specific architecture (e.g., Shared-Storage or Distributed) supported by the vendor. Specific configuration files, network requirements, and RTO/RPO metrics must be verified with the vendor for your region.

What are the differences between Oracle and PostgreSQL compatibility modes in KingbaseES?

Oracle Compatibility Mode supports PL/SQL syntax and Oracle-specific data types, requiring more conversion effort from Oracle sources. PostgreSQL Compatibility Mode supports PL/pgSQL and PostgreSQL syntax, offering better compatibility with open-source ecosystems.

Disclaimer: Specific commands, parameters, and configurations must be verified against the official KingbaseES documentation for the specific release. The information provided here is a general guide and does not replace vendor-specific instructions.


💡 More Resources

If you would like to dive deeper into KingbaseES and its application practices across various industries, we have compiled the following official resources to help you get started quickly and develop and operate with efficiency:

  • Kingbase Community: A one-stop interactive platform for technical exchanges, Q&A, and experience sharing—join forces with fellow DBAs and developers.
  • Kingbase Solutions: One-stop full-stack database migration and cloud-native solutions, supporting smooth migration of multi-source heterogeneous data, ensuring high availability, real-time integration, and sustained high performance.
  • Kingbase Case Studies: Real-world user scenarios and implementation outcomes, showcasing KingbaseES’s outstanding capabilities in high availability, high performance, and IT adaptation.
  • Kingbase Documentation: Authoritative and comprehensive product manuals and technical guides, covering the entire lifecycle from installation and deployment to development, programming, and operations management.
  • Free Download: Get the latest installation packages, drivers, tools, and patches, supporting multiple platforms and domestic chip architectures.
  • Digital Construction Encyclopedia: Covers digital strategy planning, data integration, metrics management, database visualization applications, and more to empower enterprise digital transformation.

Open Source Resources:

Welcome to explore the resources above and begin your Kingbase journey!