<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mmllllzcn</title>
    <description>The latest articles on DEV Community by mmllllzcn (@mmllllzcn).</description>
    <link>https://dev.to/mmllllzcn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4062113%2Feee70651-be48-4a57-beb0-5ef576a28ad2.png</url>
      <title>DEV Community: mmllllzcn</title>
      <link>https://dev.to/mmllllzcn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mmllllzcn"/>
    <language>en</language>
    <item>
      <title>GBase Database Environment Pre-Check Script: One Command Before Installation</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Fri, 04 Sep 2026 02:01:35 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/gbase-database-environment-pre-check-script-one-command-before-installation-26mh</link>
      <guid>https://dev.to/mmllllzcn/gbase-database-environment-pre-check-script-one-command-before-installation-26mh</guid>
      <description>&lt;p&gt;Before installing &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; on Linux, checking the server environment can save a lot of troubleshooting time.&lt;/p&gt;

&lt;p&gt;In practice, many installation failures are not caused by the database package itself. Missing dependencies, insufficient memory, incorrect permissions, unavailable ports, and unsuitable kernel parameters can all cause problems during installation or instance creation.&lt;/p&gt;

&lt;p&gt;This tutorial provides a simple &lt;strong&gt;GBase Database environment pre-check script&lt;/strong&gt; that checks the main server requirements before you start the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does the Script Check?
&lt;/h2&gt;

&lt;p&gt;The script checks seven areas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Operating system&lt;/li&gt;
&lt;li&gt;CPU, memory, and disk space&lt;/li&gt;
&lt;li&gt;Required packages&lt;/li&gt;
&lt;li&gt;Database ports&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gbasedbt&lt;/code&gt; user&lt;/li&gt;
&lt;li&gt;Directory permissions&lt;/li&gt;
&lt;li&gt;Kernel parameters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The goal is not to replace the official installation requirements. Instead, it provides a quick first-level check before installing &lt;strong&gt;GBase Database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Full Pre-Check Script
&lt;/h2&gt;

&lt;p&gt;Save the following as &lt;code&gt;gbase_precheck.sh&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;RED&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0;31m'&lt;/span&gt;
&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0;32m'&lt;/span&gt;
&lt;span class="nv"&gt;YELLOW&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[1;33m'&lt;/span&gt;
&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\033[0m'&lt;/span&gt;

&lt;span class="nv"&gt;PASS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0
&lt;span class="nv"&gt;WARN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0
&lt;span class="nv"&gt;FAIL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0

check&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;desc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;cmd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$cmd&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;[PASS]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$desc&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="o"&gt;((&lt;/span&gt;PASS++&lt;span class="o"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;RED&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;[FAIL]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$desc&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="o"&gt;((&lt;/span&gt;FAIL++&lt;span class="o"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

check_warn&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;desc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;local &lt;/span&gt;&lt;span class="nv"&gt;cmd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$cmd&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;[PASS]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$desc&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="o"&gt;((&lt;/span&gt;PASS++&lt;span class="o"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;YELLOW&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;[WARN]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$desc&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="o"&gt;((&lt;/span&gt;WARN++&lt;span class="o"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=========================================="&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"  GBase Database Environment Pre-Check"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=========================================="&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 1. Operating System ==="&lt;/span&gt;
check &lt;span class="s2"&gt;"CentOS or Red Hat detected"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"grep -Eqi 'CentOS|Red Hat' /etc/redhat-release"&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"Kernel version &amp;gt;= 3.10"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"uname -r | awk -F. '{if (&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;1 &amp;gt;= 3 &amp;amp;&amp;amp; &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;2 &amp;gt;= 10) exit 0; exit 1}'"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 2. Hardware Resources ==="&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"Memory &amp;gt;= 4GB"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"free -g | awk '/Mem:/{if (&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;2 &amp;gt;= 4) exit 0; exit 1}'"&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"CPU &amp;gt;= 2 cores"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"test &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;(nproc) -ge 2"&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"Disk space &amp;gt;= 100GB"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"df -BG /opt | awk 'NR==2{gsub(&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;G&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\"\"&lt;/span&gt;&lt;span class="s2"&gt;); if (&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;4 &amp;gt;= 100) exit 0; exit 1}'"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 3. Dependency Packages ==="&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;pkg &lt;span class="k"&gt;in &lt;/span&gt;unzip libaio libgcc libstdc++ ncurses-devel&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;check &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$pkg&lt;/span&gt;&lt;span class="s2"&gt; installed"&lt;/span&gt; &lt;span class="s2"&gt;"rpm -q &lt;/span&gt;&lt;span class="nv"&gt;$pkg&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 4. Port Check ==="&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;port &lt;span class="k"&gt;in &lt;/span&gt;9088 9089 19088&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;check_warn &lt;span class="s2"&gt;"Port &lt;/span&gt;&lt;span class="nv"&gt;$port&lt;/span&gt;&lt;span class="s2"&gt; available"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="s2"&gt;"! ss -lnt | awk '{print &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;4}' | grep -qE ':&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;port&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$'&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done

&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 5. User Check ==="&lt;/span&gt;

check &lt;span class="s2"&gt;"gbasedbt user exists"&lt;/span&gt; &lt;span class="s2"&gt;"id gbasedbt"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 6. Directory Check ==="&lt;/span&gt;

check &lt;span class="s2"&gt;"/opt/GBASE is writable"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"test -d /opt/GBASE &amp;amp;&amp;amp; test -w /opt/GBASE"&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"/tmp space &amp;gt;= 10GB"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"df -BG /tmp | awk 'NR==2{gsub(&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;G&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="se"&gt;\"\"&lt;/span&gt;&lt;span class="s2"&gt;); if (&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;4 &amp;gt;= 10) exit 0; exit 1}'"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== 7. Kernel Parameters ==="&lt;/span&gt;

check_warn &lt;span class="s2"&gt;"Semaphore values meet baseline"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="s2"&gt;"awk '{if (&lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;1 &amp;gt;= 250 &amp;amp;&amp;amp; &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;2 &amp;gt;= 1024000 &amp;amp;&amp;amp; &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;3 &amp;gt;= 100 &amp;amp;&amp;amp; &lt;/span&gt;&lt;span class="se"&gt;\$&lt;/span&gt;&lt;span class="s2"&gt;4 &amp;gt;= 128) exit 0; exit 1}' /proc/sys/kernel/sem"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=========================================="&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"  Results: PASS=&lt;/span&gt;&lt;span class="nv"&gt;$PASS&lt;/span&gt;&lt;span class="s2"&gt;  WARN=&lt;/span&gt;&lt;span class="nv"&gt;$WARN&lt;/span&gt;&lt;span class="s2"&gt;  FAIL=&lt;/span&gt;&lt;span class="nv"&gt;$FAIL&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=========================================="&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$FAIL&lt;/span&gt; &lt;span class="nt"&gt;-gt&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;RED&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$FAIL&lt;/span&gt;&lt;span class="s2"&gt; critical issue(s) found.&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Please review them before installing GBase Database."&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$WARN&lt;/span&gt; &lt;span class="nt"&gt;-gt&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;YELLOW&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="nv"&gt;$WARN&lt;/span&gt;&lt;span class="s2"&gt; warning(s) found.&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Review the warnings before installation."&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;0
&lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GREEN&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;All checks passed. Environment is ready.&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;NC&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;0
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to Run It
&lt;/h2&gt;

&lt;p&gt;Make the script executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod&lt;/span&gt; +x gbase_precheck.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;bash gbase_precheck.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful environment might produce output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;==========================================
  GBase Database Environment Pre-Check
==========================================

=== 1. Operating System ===
[PASS] CentOS or Red Hat detected
[PASS] Kernel version &amp;gt;= 3.10

=== 2. Hardware Resources ===
[PASS] Memory &amp;gt;= 4GB
[PASS] CPU &amp;gt;= 2 cores
[PASS] Disk space &amp;gt;= 100GB

=== 3. Dependency Packages ===
[PASS] unzip installed
[PASS] libaio installed
[PASS] libgcc installed
[PASS] libstdc++ installed
[PASS] ncurses-devel installed

=== 4. Port Check ===
[PASS] Port 9088 available
[PASS] Port 9089 available
[PASS] Port 19088 available

==========================================
  Results: PASS=11  WARN=0  FAIL=0
==========================================

All checks passed. Environment is ready.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a required package is missing or a critical check fails, the script returns a non-zero exit code. That makes it useful not only for manual checks but also for automated deployment workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Run a Pre-Check?
&lt;/h2&gt;

&lt;p&gt;A pre-check separates &lt;strong&gt;environment problems&lt;/strong&gt; from &lt;strong&gt;database installation problems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, if &lt;code&gt;ncurses-devel&lt;/code&gt; is missing, fixing the package dependency first is much easier than troubleshooting an installation failure later.&lt;/p&gt;

&lt;p&gt;The same applies to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insufficient memory&lt;/li&gt;
&lt;li&gt;Insufficient disk space&lt;/li&gt;
&lt;li&gt;Missing &lt;code&gt;gbasedbt&lt;/code&gt; user&lt;/li&gt;
&lt;li&gt;Port conflicts&lt;/li&gt;
&lt;li&gt;Incorrect directory permissions&lt;/li&gt;
&lt;li&gt;Kernel configuration issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Running one small script before installation gives you a much clearer starting point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate It with Ansible
&lt;/h2&gt;

&lt;p&gt;If you are deploying &lt;strong&gt;GBase Database&lt;/strong&gt; to multiple servers, the same script can be integrated into an Ansible workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;GBase Database Environment Pre-Check&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gbase_servers&lt;/span&gt;

  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Upload pre-check script&lt;/span&gt;
      &lt;span class="na"&gt;copy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gbase_precheck.sh&lt;/span&gt;
        &lt;span class="na"&gt;dest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/tmp/gbase_precheck.sh&lt;/span&gt;
        &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0755'&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run pre-check&lt;/span&gt;
      &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;bash /tmp/gbase_precheck.sh&lt;/span&gt;
      &lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;result&lt;/span&gt;

    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Display results&lt;/span&gt;
      &lt;span class="na"&gt;debug&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;var&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;result.stdout_lines&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows you to validate the target servers before starting a batch &lt;strong&gt;GBase Database&lt;/strong&gt; installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;A few minutes of environment validation can prevent hours of installation troubleshooting.&lt;/p&gt;

&lt;p&gt;The recommended workflow is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-check the server → Fix environment issues → Install GBase Database → Create the instance → Verify the database.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The script above is intended as a practical baseline rather than a replacement for version-specific &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation requirements. Always compare the checks with the requirements of the specific GBase Database release you are deploying.&lt;/p&gt;

&lt;p&gt;For repeated deployments, combining this pre-check with Ansible can turn the manual installation process into a more consistent and repeatable workflow.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>beginners</category>
    </item>
    <item>
      <title>GBase Database Instance Creation: A Complete Step-by-Step Walkthrough</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Fri, 04 Sep 2026 01:58:31 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/gbase-database-instance-creation-a-complete-step-by-step-walkthrough-45io</link>
      <guid>https://dev.to/mmllllzcn/gbase-database-instance-creation-a-complete-step-by-step-walkthrough-45io</guid>
      <description>&lt;p&gt;Installing &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; software is only the first step. The database becomes usable after an instance is created, configured, and started.&lt;/p&gt;

&lt;p&gt;This guide provides a practical &lt;strong&gt;GBase Database instance creation&lt;/strong&gt; walkthrough for a standalone Linux environment. It covers instance initialization, automatic configuration, instance verification, database connectivity, and a simple SQL test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before creating a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; instance, make sure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GBase Database software is installed.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;gbasedbt&lt;/code&gt; operating system user is available.&lt;/li&gt;
&lt;li&gt;The installation directory is accessible to &lt;code&gt;gbasedbt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Required system dependencies are installed.&lt;/li&gt;
&lt;li&gt;The server has sufficient disk space and memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have followed the standard &lt;strong&gt;GBase Database&lt;/strong&gt; installation process, the initialization script will handle the required environment and instance configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Plan Your Instance Parameters
&lt;/h2&gt;

&lt;p&gt;Before starting instance creation, determine the basic parameters for your server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Instance name: gbase01
IP address: 192.168.1.100
Port: 9088
Data directory: /opt/GBASE/gbase_data
Character set: zh_CN.utf8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual values should match your server, network, storage, and application requirements.&lt;/p&gt;

&lt;p&gt;Planning these parameters first helps avoid configuration conflicts during initialization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Run the GBase Database Initialization Script
&lt;/h2&gt;

&lt;p&gt;Switch to the &lt;code&gt;gbasedbt&lt;/code&gt; user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;su - gbasedbt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the initialization script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc
sh GBaseInit_gbasedbt.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The initialization script guides you through the &lt;strong&gt;GBase Database&lt;/strong&gt; instance creation process and automatically performs the required configuration.&lt;/p&gt;

&lt;p&gt;Depending on the installation package and selected options, the script handles items such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance name&lt;/li&gt;
&lt;li&gt;Network address and port&lt;/li&gt;
&lt;li&gt;Database locale&lt;/li&gt;
&lt;li&gt;Instance configuration&lt;/li&gt;
&lt;li&gt;SQLHOSTS configuration&lt;/li&gt;
&lt;li&gt;Data directories&lt;/li&gt;
&lt;li&gt;Database instance startup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means you do not need to manually create the &lt;code&gt;onconfig&lt;/code&gt; file, edit SQLHOSTS, configure every environment variable, or run a separate instance initialization command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Once the initialization script completes successfully, the GBase Database instance is already started.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Verify the Generated Configuration
&lt;/h2&gt;

&lt;p&gt;After the initialization script finishes, verify that the required environment variables are available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSERVER&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also inspect the generated configuration files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; onconfig&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the SQLHOSTS configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The instance name, network address, and port should correspond to the values selected during the initialization process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Verify the GBase Database Instance
&lt;/h2&gt;

&lt;p&gt;Because the initialization script has already started the instance, the next step is simply to check its status.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successfully initialized &lt;strong&gt;GBase Database&lt;/strong&gt; instance should report an online status.&lt;/p&gt;

&lt;p&gt;You can also check whether the configured database port is listening:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat &lt;span class="nt"&gt;-tlnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;9088&lt;/code&gt; with the port configured during instance creation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Test Database Connectivity
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;dbaccess&lt;/code&gt; to verify that the database connection works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dbaccess sysmaster -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run a simple SQL statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the query returns &lt;code&gt;1&lt;/code&gt;, the &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; instance is accepting database connections.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Create a Simple Test Database
&lt;/h2&gt;

&lt;p&gt;Now create a small test database and table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;test_db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;test_db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;test_table&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;test_table&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'GBase'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;test_table&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result should look similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;id     name
1      GBase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple test confirms that the &lt;strong&gt;GBase Database&lt;/strong&gt; instance can create databases and tables, insert data, and execute queries successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Issues
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Port Conflict
&lt;/h3&gt;

&lt;p&gt;If the selected database port is already occupied, choose another available port during instance configuration.&lt;/p&gt;

&lt;p&gt;You can check whether a port is in use with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat &lt;span class="nt"&gt;-tlnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Permission Errors
&lt;/h3&gt;

&lt;p&gt;Make sure the &lt;code&gt;gbasedbt&lt;/code&gt; user has the required permissions for the GBase Database installation and data directories.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; gbasedbt:gbasedbt /opt/GBASE/gbase_data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Connection Problems
&lt;/h3&gt;

&lt;p&gt;If &lt;code&gt;dbaccess&lt;/code&gt; cannot connect, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Instance status with &lt;code&gt;onstat -&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Environment variables&lt;/li&gt;
&lt;li&gt;SQLHOSTS configuration&lt;/li&gt;
&lt;li&gt;Server IP address and port&lt;/li&gt;
&lt;li&gt;Firewall settings&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Locale Problems
&lt;/h3&gt;

&lt;p&gt;If applications display unexpected characters, verify that the database and client locale settings match the requirements of your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Creating an instance is the step that turns &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; from installed software into a running database system.&lt;/p&gt;

&lt;p&gt;With the provided initialization script, the workflow is straightforward:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plan → Run &lt;code&gt;GBaseInit_gbasedbt.sh&lt;/code&gt; → Verify configuration → Check instance status → Test connectivity → Create a test database.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The important point is that the initialization script does more than generate configuration files. It completes the instance setup and starts the database, so there is no need to manually run another &lt;code&gt;oninit -ivy&lt;/code&gt; command afterward.&lt;/p&gt;

&lt;p&gt;If you are familiar with Informix, the overall workflow will look familiar. Once you understand the instance initialization process, you can standardize it for repeatable &lt;strong&gt;GBase Database&lt;/strong&gt; deployments and later automate the workflow with tools such as Ansible.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Complete Guide to GBase Database Command-Line Installation on CentOS</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Fri, 04 Sep 2026 01:53:09 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/complete-guide-to-gbase-database-command-line-installation-on-centos-5bb8</link>
      <guid>https://dev.to/mmllllzcn/complete-guide-to-gbase-database-command-line-installation-on-centos-5bb8</guid>
      <description>&lt;p&gt;Installing &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; from the command line is a practical approach for Linux servers, SSH-based deployment, and automated database provisioning.&lt;/p&gt;

&lt;p&gt;This guide walks through the complete &lt;strong&gt;GBase Database&lt;/strong&gt; installation process on CentOS 7/8, from system preparation and package installation to automatic instance configuration and verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  System Requirements
&lt;/h2&gt;

&lt;p&gt;Before installing &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, prepare a CentOS server with sufficient resources:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Minimum&lt;/th&gt;
&lt;th&gt;Recommended&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OS&lt;/td&gt;
&lt;td&gt;CentOS 7+&lt;/td&gt;
&lt;td&gt;CentOS 7.9/8.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;4 GB&lt;/td&gt;
&lt;td&gt;64 GB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CPU&lt;/td&gt;
&lt;td&gt;2 cores&lt;/td&gt;
&lt;td&gt;8+ cores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disk&lt;/td&gt;
&lt;td&gt;100 GB&lt;/td&gt;
&lt;td&gt;500 GB SSD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User&lt;/td&gt;
&lt;td&gt;root / gbasedbt&lt;/td&gt;
&lt;td&gt;gbasedbt for runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 1: Install Dependencies
&lt;/h2&gt;

&lt;p&gt;Install the packages required by &lt;strong&gt;GBase Database&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yum &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; unzip libaio libgcc libstdc++ ncurses-devel &lt;span class="se"&gt;\&lt;/span&gt;
    pam&lt;span class="k"&gt;*&lt;/span&gt; jdk java-1.8.0-openjdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify the key packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rpm &lt;span class="nt"&gt;-q&lt;/span&gt; unzip libaio libstdc++
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create the GBase Database User
&lt;/h2&gt;

&lt;p&gt;Create a dedicated &lt;code&gt;gbasedbt&lt;/code&gt; operating system user for running the database instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; /home/gbasedbt &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/bash gbasedbt
passwd gbasedbt

&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /opt/GBASE/gbase
&lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; gbasedbt:gbasedbt /opt/GBASE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For production environments, follow your organization's password and account security policies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Extract the Installation Package
&lt;/h2&gt;

&lt;p&gt;Upload the &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation package to the server and extract it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /opt
&lt;span class="nb"&gt;tar&lt;/span&gt; &lt;span class="nt"&gt;-xzf&lt;/span&gt; GBase8sV3.3_2.0_x86_64.tar.gz
&lt;span class="nb"&gt;ls &lt;/span&gt;GBase8s/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure the extracted directory contains the installation program before continuing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Install GBase Database from the Command Line
&lt;/h2&gt;

&lt;p&gt;Start the console installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /opt/GBase8s
./ids_install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a typical installation, select:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What type of installation do you want?
  1) Typical
  2) Compact
  3) Custom

Please enter a number [1]: 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Specify the installation directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Specify installation directory:

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the instance will be created separately, select the option not to create a server instance during software installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Run the GBase Database Initialization Script
&lt;/h2&gt;

&lt;p&gt;This is where the installation becomes much simpler.&lt;/p&gt;

&lt;p&gt;You do &lt;strong&gt;not&lt;/strong&gt; need to manually configure environment variables, create the &lt;code&gt;onconfig&lt;/code&gt; file, configure &lt;code&gt;sqlhosts&lt;/code&gt;, select the database port, or initialize the instance one command at a time.&lt;/p&gt;

&lt;p&gt;Switch to the &lt;code&gt;gbasedbt&lt;/code&gt; user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;su - gbasedbt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run the initialization script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /opt/GBASE/gbase/etc/
sh GBaseInit_gbasedbt.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script guides you through the required configuration and automatically performs the necessary setup for the &lt;strong&gt;GBase Database&lt;/strong&gt; instance.&lt;/p&gt;

&lt;p&gt;Depending on the installation package and configuration, the script handles the relevant environment, instance, network, locale, and database initialization settings.&lt;/p&gt;

&lt;p&gt;This means the overall workflow is much simpler than manually creating and maintaining every configuration file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Verify the GBase Database Installation
&lt;/h2&gt;

&lt;p&gt;After the initialization script completes, verify that the environment and database instance are ready.&lt;/p&gt;

&lt;p&gt;Check the main environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSERVER&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the database instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The instance should report an online status when initialization has completed successfully.&lt;/p&gt;

&lt;p&gt;You can also test database connectivity with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dbaccess sysmaster -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a simple SQL test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;DATABASE&lt;/span&gt; &lt;span class="n"&gt;test_db&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;test_t&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;test_t&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Hello GBase'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;test_t&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the database and SQL operations work correctly, the &lt;strong&gt;GBase Database&lt;/strong&gt; installation is ready for use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation Verification Checklist
&lt;/h2&gt;

&lt;p&gt;For repeatable deployments, basic verification can also be automated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== GBase Database Installation Verification ==="&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"1. oninit exists: "&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;&lt;span class="s2"&gt;/bin/oninit"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"PASS"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"FAIL"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"2. Instance status: "&lt;/span&gt;
onstat - 2&amp;gt;/dev/null | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s2"&gt;"On-Line"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"PASS"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"FAIL"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"3. SQLHOSTS configuration: "&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"PASS"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"FAIL"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The command-line installation process for &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; is straightforward when you use the provided initialization script.&lt;/p&gt;

&lt;p&gt;The key workflow is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install dependencies → Create the gbasedbt user → Install GBase Database → Run &lt;code&gt;GBaseInit_gbasedbt.sh&lt;/code&gt; → Verify the instance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The initialization script removes much of the manual configuration work, making the installation process easier to reproduce on remote Linux servers.&lt;/p&gt;

&lt;p&gt;Once you are comfortable with this workflow, you can further automate &lt;strong&gt;GBase Database&lt;/strong&gt; deployment with tools such as Ansible for repeatable server provisioning and environment setup.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>beginners</category>
    </item>
    <item>
      <title>TIL: What Does `oninit -ivy` Mean in GBase Database?</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Thu, 03 Sep 2026 02:36:43 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-what-does-oninit-ivy-mean-in-gbase-database-1n8a</link>
      <guid>https://dev.to/mmllllzcn/til-what-does-oninit-ivy-mean-in-gbase-database-1n8a</guid>
      <description>&lt;p&gt;If you have installed &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, you have probably seen this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is commonly used when initializing and starting a GBase 8s instance. But what do &lt;code&gt;-i&lt;/code&gt;, &lt;code&gt;-v&lt;/code&gt;, and &lt;code&gt;-y&lt;/code&gt; actually mean?&lt;/p&gt;

&lt;p&gt;Understanding these options makes it much easier to troubleshoot &lt;strong&gt;GBase Database startup problems&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does &lt;code&gt;oninit -ivy&lt;/code&gt; Mean?
&lt;/h2&gt;

&lt;p&gt;The basic command format is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="o"&gt;[&lt;/span&gt;options]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The three options in &lt;code&gt;oninit -ivy&lt;/code&gt; have different purposes:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-i&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Initialize&lt;/td&gt;
&lt;td&gt;Initializes the database server and creates the initial database storage structures when required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Verbose&lt;/td&gt;
&lt;td&gt;Displays more detailed information during startup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;-y&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Automatically answers yes to prompts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;essentially means &lt;strong&gt;initialize, show verbose output, and automatically confirm prompts&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Should You Use &lt;code&gt;-i&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;-i&lt;/code&gt; option is associated with &lt;strong&gt;initializing the database server&lt;/strong&gt;. It should not be treated as a normal option for every restart.&lt;/p&gt;

&lt;p&gt;For example, during initial instance setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the instance has already been initialized, routine startup normally does not require &lt;code&gt;-i&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-vy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact startup procedure can depend on how your GBase Database environment was created and configured, so avoid repeatedly using initialization options on an existing production instance unless the procedure specifically requires it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does &lt;code&gt;-v&lt;/code&gt; Do?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;-v&lt;/code&gt; enables verbose startup output.&lt;/p&gt;

&lt;p&gt;This is particularly useful when troubleshooting &lt;strong&gt;GBase Database startup failures&lt;/strong&gt;, because you can get more information about where the startup process is stopping.&lt;/p&gt;

&lt;p&gt;For troubleshooting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also combine it with other options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-vy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When diagnosing a problem, verbose output is often more useful than simply checking whether the command returned successfully.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does &lt;code&gt;-y&lt;/code&gt; Do?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;-y&lt;/code&gt; automatically answers &lt;strong&gt;yes&lt;/strong&gt; to prompts that would otherwise require interactive confirmation.&lt;/p&gt;

&lt;p&gt;This makes it useful for scripted or automated startup procedures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, &lt;code&gt;-y&lt;/code&gt; should be used carefully. Automatically confirming a destructive or initialization-related operation is not something you want to do blindly on an existing production instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Routine Stop and Restart
&lt;/h2&gt;

&lt;p&gt;A common workflow is to stop the instance and then start it again.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onmode &lt;span class="nt"&gt;-ky&lt;/span&gt;
oninit &lt;span class="nt"&gt;-vy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important distinction is that &lt;code&gt;onmode -ky&lt;/code&gt; stops the database server, while &lt;code&gt;oninit&lt;/code&gt; starts it again. The &lt;code&gt;-i&lt;/code&gt; option is not normally part of a routine restart.&lt;/p&gt;

&lt;p&gt;Always verify the instance state after startup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Checking Startup Logs
&lt;/h2&gt;

&lt;p&gt;If &lt;strong&gt;GBase Database&lt;/strong&gt; does not start as expected, check the server messages and online log.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/tmp/online.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Depending on the failure, you may see messages related to configuration, shared memory, storage, permissions, or network connectivity.&lt;/p&gt;

&lt;p&gt;Typical problems include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cannot find onconfig file
Cannot bind to port
Not enough shared memory
Permission denied
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact error message is usually more useful than the fact that &lt;code&gt;oninit&lt;/code&gt; simply failed.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple GBase Database Startup Checklist
&lt;/h2&gt;

&lt;p&gt;When troubleshooting a GBase 8s startup failure, check these items in order:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Check the Environment
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSERVER&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure the variables point to the correct installation, instance, configuration, and sqlhosts files.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Check the Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc/&lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file cannot be found, fix the environment or configuration path before trying to start the instance again.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Check the Instance Status
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells you whether the GBase Database server is online and provides basic instance information.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Check the Server Messages
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-m&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more detailed information, inspect the online log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-50&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/tmp/online.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Don't Treat &lt;code&gt;oninit -ivy&lt;/code&gt; as a Magic Command
&lt;/h2&gt;

&lt;p&gt;One common mistake is to memorize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;without understanding what it does.&lt;/p&gt;

&lt;p&gt;The important part is knowing &lt;strong&gt;when initialization is appropriate and when a normal startup is enough&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A useful mental model is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;-i&lt;/code&gt; → initialization&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-v&lt;/code&gt; → verbose startup information&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-y&lt;/code&gt; → automatically answer yes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For routine operations, avoid adding initialization options simply because they were used during the first setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;oninit -ivy&lt;/code&gt; is a familiar command for GBase Database(GBase 8s) administrators, but each option has a specific purpose.&lt;/p&gt;

&lt;p&gt;Understanding &lt;code&gt;-i&lt;/code&gt;, &lt;code&gt;-v&lt;/code&gt;, and &lt;code&gt;-y&lt;/code&gt; helps you choose the right startup command and makes troubleshooting much easier.&lt;/p&gt;

&lt;p&gt;When &lt;strong&gt;GBase Database&lt;/strong&gt; fails to start, don't immediately rerun &lt;code&gt;oninit -ivy&lt;/code&gt;. First check the environment variables, &lt;code&gt;onconfig&lt;/code&gt;, instance status, server messages, and online log.&lt;/p&gt;

&lt;p&gt;That small habit can turn a frustrating &lt;strong&gt;GBase 8s startup failure&lt;/strong&gt; into a much faster diagnosis.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: GBase Database Silent Installation with bundle.properties</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Thu, 03 Sep 2026 02:34:20 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-gbase-database-silent-installation-with-bundleproperties-gka</link>
      <guid>https://dev.to/mmllllzcn/til-gbase-database-silent-installation-with-bundleproperties-gka</guid>
      <description>&lt;p&gt;When deploying &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; across multiple servers, silent installation can save a lot of repetitive manual work. Instead of answering installation prompts on every machine, you can define the installation settings in a &lt;code&gt;bundle.properties&lt;/code&gt; file and reuse the same template.&lt;/p&gt;

&lt;p&gt;Here is a practical &lt;strong&gt;GBase Database silent installation&lt;/strong&gt; guide covering the command, commonly used parameters, batch deployment, and post-installation checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Silent Installation Command
&lt;/h2&gt;

&lt;p&gt;After preparing your &lt;code&gt;bundle.properties&lt;/code&gt; file, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sh ids_install &lt;span class="nt"&gt;-i&lt;/span&gt; silent &lt;span class="nt"&gt;-f&lt;/span&gt; bundle.properties
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For automated deployments, keep the properties file together with the installation package and validate it before starting the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core bundle.properties Parameters
&lt;/h2&gt;

&lt;p&gt;A basic configuration may look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;USER_INSTALL_DIR&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/GBASE/gbase&lt;/span&gt;
&lt;span class="py"&gt;CHOSEN_INSTALL_SET&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;TYPICAL&lt;/span&gt;
&lt;span class="py"&gt;CHOSEN_INSTALL_FEATURE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;

&lt;span class="py"&gt;INSTANCE_NAME&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;gbase01&lt;/span&gt;
&lt;span class="py"&gt;SERVER_NUM&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="py"&gt;PORT_NUM&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;9088&lt;/span&gt;

&lt;span class="py"&gt;DB_LOCALE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;zh_CN.utf8&lt;/span&gt;
&lt;span class="py"&gt;CLIENT_LOCALE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;zh_CN.utf8&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact available parameters can vary by &lt;strong&gt;GBase Database(GBase 8s) version and installation package&lt;/strong&gt;, so treat the vendor-provided &lt;code&gt;bundle.properties&lt;/code&gt; template or installation documentation as the authoritative reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation Configuration
&lt;/h2&gt;

&lt;p&gt;Common installation-related settings include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;USER_INSTALL_DIR&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/GBASE/gbase&lt;/span&gt;
&lt;span class="py"&gt;USER_INSTALL_LANGUAGE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;zh&lt;/span&gt;
&lt;span class="py"&gt;USER_ACCEPT_LICENSE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;YES&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;USER_INSTALL_DIR&lt;/code&gt; defines the target installation directory.&lt;/p&gt;

&lt;p&gt;Before deployment, make sure the parent filesystem has enough capacity and that the installation user has the required permissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Instance Configuration
&lt;/h2&gt;

&lt;p&gt;Instance-related settings may include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;INSTANCE_NAME&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;gbase01&lt;/span&gt;
&lt;span class="py"&gt;PORT_NUM&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;9088&lt;/span&gt;

&lt;span class="py"&gt;DB_LOCALE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;zh_CN.utf8&lt;/span&gt;
&lt;span class="py"&gt;CLIENT_LOCALE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;zh_CN.utf8&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your installation package supports parameters for data and log locations, configure them according to the specific version and deployment architecture.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;DATALOCALE&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/GBASE/gbase_data&lt;/span&gt;
&lt;span class="py"&gt;LOGDIR&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/opt/GBASE/gbase_logs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not assume that every parameter is supported by every GBase 8s installer version. Validate the parameter names against the &lt;code&gt;bundle.properties&lt;/code&gt; generated or supplied for your release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Installation Options
&lt;/h2&gt;

&lt;p&gt;Some installation packages also provide additional options for logging or optional components, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight properties"&gt;&lt;code&gt;&lt;span class="py"&gt;CONSOLE_LOG_LEVEL&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;2&lt;/span&gt;
&lt;span class="py"&gt;INSTALL_DEV_LIB&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;NO&lt;/span&gt;
&lt;span class="py"&gt;INSTALL_JDBC&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;YES&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These options should also be checked against the installer version before being included in a reusable deployment template.&lt;/p&gt;

&lt;h2&gt;
  
  
  Batch Deployment Example
&lt;/h2&gt;

&lt;p&gt;Once the silent installation has been tested on one server, the same package and configuration can be deployed to multiple machines.&lt;/p&gt;

&lt;p&gt;Using SSH keys is preferable to putting passwords directly into a deployment script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;SERVERS&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;&lt;span class="s2"&gt;"192.168.1.101"&lt;/span&gt; &lt;span class="s2"&gt;"192.168.1.102"&lt;/span&gt; &lt;span class="s2"&gt;"192.168.1.103"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;REMOTE_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gbase"&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;server &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;SERVERS&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Deploying GBase Database to &lt;/span&gt;&lt;span class="nv"&gt;$server&lt;/span&gt;&lt;span class="s2"&gt; ==="&lt;/span&gt;

    scp gbase8s.tar.gz bundle.properties &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;REMOTE_USER&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;server&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:/opt/"&lt;/span&gt;

    ssh &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;REMOTE_USER&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;server&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;'
cd /opt
tar -xzf gbase8s.tar.gz
cd gbase8s

sh ids_install -i silent -f /opt/bundle.properties
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nv"&gt;$?&lt;/span&gt; &lt;span class="nt"&gt;-eq&lt;/span&gt; 0 &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== &lt;/span&gt;&lt;span class="nv"&gt;$server&lt;/span&gt;&lt;span class="s2"&gt; installation completed ==="&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== &lt;/span&gt;&lt;span class="nv"&gt;$server&lt;/span&gt;&lt;span class="s2"&gt; installation failed ==="&lt;/span&gt;
    &lt;span class="k"&gt;fi
done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For production automation, add pre-checks for disk space, memory, required packages, ports, users, permissions, and existing GBase Database instances before starting the installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the Installation
&lt;/h2&gt;

&lt;p&gt;After the silent installation finishes, verify that the main executable exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; /opt/GBASE/gbase/bin/oninit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the instance status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should also verify the environment variables and configuration files used by the instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSERVER&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful installer exit code does not necessarily mean the database instance is ready for production. Always perform a basic startup and connectivity test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Silent Installation Matters
&lt;/h2&gt;

&lt;p&gt;For a single &lt;strong&gt;GBase Database&lt;/strong&gt; installation, console mode is usually sufficient. For tens or hundreds of servers, however, manually answering installation prompts becomes slow and error-prone.&lt;/p&gt;

&lt;p&gt;A standardized &lt;code&gt;bundle.properties&lt;/code&gt; template provides several advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repeatable installations&lt;/li&gt;
&lt;li&gt;Consistent directory and instance configuration&lt;/li&gt;
&lt;li&gt;Easier batch deployment&lt;/li&gt;
&lt;li&gt;Reduced manual input&lt;/li&gt;
&lt;li&gt;Better integration with automation and CI/CD workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Silent installation can also be useful when building standardized VM or container images, provided that the licensing, initialization, networking, and runtime requirements of the target GBase 8s environment are handled separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;bundle.properties&lt;/code&gt; file is one of the most useful pieces of an automated &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; deployment workflow.&lt;/p&gt;

&lt;p&gt;But don't treat it as a universal configuration file. &lt;strong&gt;Parameter names and supported options can vary between GBase 8s releases.&lt;/strong&gt; Build your template from the installation package for the specific version you are deploying, test it on a clean server, and only then reuse it for batch deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One tested silent-install template can eliminate dozens of repetitive installation steps—and make GBase Database deployment much more predictable.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Insufficient /tmp Space Causes GBase Database Installation Failure</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Thu, 03 Sep 2026 02:31:40 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-insufficient-tmp-space-causes-gbase-database-installation-failure-31do</link>
      <guid>https://dev.to/mmllllzcn/til-insufficient-tmp-space-causes-gbase-database-installation-failure-31do</guid>
      <description>&lt;p&gt;Today I ran into a common but easy-to-miss &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation problem. The installer stopped with &lt;code&gt;No space left on device&lt;/code&gt;, even though the target disk still had tens of gigabytes available. The real bottleneck was not &lt;code&gt;/opt&lt;/code&gt; or the main disk—it was the &lt;code&gt;/tmp&lt;/code&gt; filesystem used during installation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Symptoms
&lt;/h2&gt;

&lt;p&gt;During a GBase Database installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./ids_install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the installer suddenly terminated with an error similar to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ERROR: Failed to extract files. Disk may be full.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I checked the main installation filesystem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /opt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and found plenty of free space.&lt;/p&gt;

&lt;p&gt;The confusing part was that the GBase 8s installation still reported that the disk was full.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Root Cause: Check /tmp
&lt;/h2&gt;

&lt;p&gt;The GBase Database(GBase 8s) installer may use &lt;code&gt;/tmp&lt;/code&gt; for temporary extraction and installation files. Therefore, having enough free space on the target installation directory does not necessarily mean that the installer has enough temporary storage.&lt;/p&gt;

&lt;p&gt;The first checks should be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /tmp
&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; /tmp/ids_install&lt;span class="k"&gt;*&lt;/span&gt; 2&amp;gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also check the filesystem behind &lt;code&gt;/tmp&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /tmp
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; /tmp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command is important because &lt;code&gt;No space left on device&lt;/code&gt; can also occur when a filesystem runs out of &lt;strong&gt;inodes&lt;/strong&gt;, even when &lt;code&gt;df -h&lt;/code&gt; still shows available capacity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution 1: Clean Up Temporary Files
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;/tmp&lt;/code&gt; is genuinely full, identify large files first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;du&lt;/span&gt; &lt;span class="nt"&gt;-sh&lt;/span&gt; /tmp/&lt;span class="k"&gt;*&lt;/span&gt; 2&amp;gt;/dev/null | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rh&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remove only files that you have verified are safe to delete.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;find /tmp &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"ids_install*"&lt;/span&gt; &lt;span class="nt"&gt;-mtime&lt;/span&gt; +1 &lt;span class="nt"&gt;-delete&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Avoid blindly deleting everything under &lt;code&gt;/tmp&lt;/code&gt;, especially on a production server where other applications may be using temporary files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution 2: Provide a Larger Temporary Directory
&lt;/h2&gt;

&lt;p&gt;For a GBase Database installation that requires more temporary space, using a dedicated filesystem or directory can be a cleaner approach.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /opt/tmp
&lt;span class="nb"&gt;chmod &lt;/span&gt;1777 /opt/tmp

&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;TMPDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/tmp

./ids_install &lt;span class="nt"&gt;-i&lt;/span&gt; console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before starting the installation, verify that the new location has sufficient capacity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /opt/tmp
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$TMPDIR&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using a dedicated temporary directory also makes it easier to monitor installation-related files during troubleshooting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Solution 3: Increase the Available Space for /tmp
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;/tmp&lt;/code&gt; is backed by a small filesystem or &lt;code&gt;tmpfs&lt;/code&gt;, increasing its capacity may be appropriate depending on your server configuration.&lt;/p&gt;

&lt;p&gt;First inspect the current setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /tmp
mount | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;' /tmp '&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then resize or reconfigure &lt;code&gt;/tmp&lt;/code&gt; according to your operating system and deployment standards.&lt;/p&gt;

&lt;p&gt;I would not recommend blindly running a new &lt;code&gt;mount -t tmpfs ... /tmp&lt;/code&gt; on a production system. Changing the &lt;code&gt;/tmp&lt;/code&gt; mount can affect existing processes and may require additional configuration to survive a reboot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-Installation Check for GBase Database
&lt;/h2&gt;

&lt;p&gt;A simple pre-check can catch many installation problems before running the GBase 8s installer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Disk Space Check ==="&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/tmp: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /tmp | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $4}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; available"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/opt: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; /opt | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $4}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; available"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"HOME: &lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-h&lt;/span&gt; ~ | &lt;span class="nb"&gt;tail&lt;/span&gt; &lt;span class="nt"&gt;-1&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'{print $4}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; available"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Inode Check ==="&lt;/span&gt;
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; /tmp

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Memory Check ==="&lt;/span&gt;
free &lt;span class="nt"&gt;-h&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Dependency Package Check ==="&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;pkg &lt;span class="k"&gt;in &lt;/span&gt;unzip libaio libgcc libstdc++ ncurses-devel&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;rpm &lt;span class="nt"&gt;-q&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$pkg&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &amp;amp;&amp;gt;/dev/null &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[OK] &lt;/span&gt;&lt;span class="nv"&gt;$pkg&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[MISSING] &lt;/span&gt;&lt;span class="nv"&gt;$pkg&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why This Matters in Batch Deployments
&lt;/h2&gt;

&lt;p&gt;This problem becomes more noticeable when deploying &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; across multiple servers.&lt;/p&gt;

&lt;p&gt;A machine may have plenty of capacity on &lt;code&gt;/opt&lt;/code&gt;, while &lt;code&gt;/tmp&lt;/code&gt; has a much smaller limit. During simultaneous installations, temporary extraction files can consume that space quickly.&lt;/p&gt;

&lt;p&gt;A successful GBase Database installation therefore requires more than checking the final installation directory. You should verify &lt;strong&gt;temporary storage, filesystem capacity, inode availability, memory, and required packages&lt;/strong&gt; before starting the installer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaway
&lt;/h2&gt;

&lt;p&gt;When GBase Database(GBase 8s) installation fails with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No space left on device
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;don't look only at the target installation directory.&lt;/p&gt;

&lt;p&gt;Check these first:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;/tmp&lt;/code&gt; available space&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;/tmp&lt;/code&gt; inode usage&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;TMPDIR&lt;/code&gt; configuration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Temporary installation files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Required system packages&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Available memory&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The lesson:&lt;/strong&gt; sufficient disk space for GBase Database does not always mean sufficient temporary space for the GBase 8s installer.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Fixing “Cannot Find onconfig File” in GBase Database</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Thu, 03 Sep 2026 02:18:38 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-fixing-cannot-find-onconfig-file-in-gbase-database-43hj</link>
      <guid>https://dev.to/mmllllzcn/til-fixing-cannot-find-onconfig-file-in-gbase-database-43hj</guid>
      <description>&lt;p&gt;Today I helped troubleshoot a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; instance that failed to start. The error looked like a missing configuration file, but the real problem was incorrect environment variables. If &lt;code&gt;oninit -ivy&lt;/code&gt; appears to do nothing and the log reports &lt;code&gt;Cannot find onconfig file&lt;/code&gt;, checking your environment variables should be one of the first steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Symptoms
&lt;/h2&gt;

&lt;p&gt;After running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;oninit &lt;span class="nt"&gt;-ivy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;there was no visible output, and the GBase Database instance did not start.&lt;/p&gt;

&lt;p&gt;Checking the online log showed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GBASERMT Cannot find onconfig file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first, this looks like an &lt;code&gt;onconfig&lt;/code&gt; file problem. However, the file was actually present. The issue was that &lt;strong&gt;GBase Database could not locate it through the configured environment&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Root Cause
&lt;/h2&gt;

&lt;p&gt;GBase Database(GBase 8s) uses several environment variables to locate its installation directory, instance configuration, and connectivity files.&lt;/p&gt;

&lt;p&gt;A typical environment looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/GBASE/gbase
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTSERVER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gbase01
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ONCONFIG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;onconfig.gbase01
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTSQLHOSTS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc/sqlhosts.gbase01
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DB_LOCALE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;zh_CN.utf8
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CLIENT_LOCALE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;zh_CN.utf8
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GL_USEGLU&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After modifying the environment, reload it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify the critical variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSERVER&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Common GBase Database Configuration Mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. GBASEDBTDIR Points to the Wrong Directory
&lt;/h3&gt;

&lt;p&gt;A common mistake is accidentally adding an extra directory level:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/GBASE/gbase/gbase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;when the actual installation directory is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTDIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/opt/GBASE/gbase
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check whether the GBase Database executable exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/bin/oninit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;oninit&lt;/code&gt; cannot be found, fix &lt;code&gt;GBASEDBTDIR&lt;/code&gt; first.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. ONCONFIG Does Not Match the Configuration File
&lt;/h3&gt;

&lt;p&gt;Check the available configuration files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc/onconfig.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then make sure &lt;code&gt;ONCONFIG&lt;/code&gt; matches the actual filename:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ONCONFIG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;onconfig.gbase01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The filename and the &lt;code&gt;ONCONFIG&lt;/code&gt; value must correspond.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. GBASEDBTSQLHOSTS Points to a Missing File
&lt;/h3&gt;

&lt;p&gt;Check the configured sqlhosts path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file does not exist, verify the intended location and create or restore the correct sqlhosts configuration.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
gbase01 onsoctcp 192.168.1.100 9088
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the actual hostname, protocol, IP address, and port for your environment rather than copying these values directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Diagnostic Script
&lt;/h2&gt;

&lt;p&gt;When troubleshooting a GBase Database startup problem, this simple script can quickly identify missing variables and files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Environment Variable Check ==="&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"GBASEDBTDIR: &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTDIR&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;[NOT SET]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"GBASEDBTSERVER: &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTSERVER&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;[NOT SET]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"ONCONFIG: &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ONCONFIG&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;[NOT SET]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"GBASEDBTSQLHOSTS: &lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GBASEDBTSQLHOSTS&lt;/span&gt;&lt;span class="k"&gt;:-&lt;/span&gt;&lt;span class="p"&gt;[NOT SET]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Critical File Check ==="&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;&lt;span class="s2"&gt;/bin/oninit"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[OK] oninit exists"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[ERROR] oninit missing"&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;&lt;span class="s2"&gt;/etc/&lt;/span&gt;&lt;span class="nv"&gt;$ONCONFIG&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[OK] onconfig exists"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[ERROR] onconfig missing"&lt;/span&gt;

&lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$GBASEDBTSQLHOSTS&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[OK] sqlhosts exists"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"[ERROR] sqlhosts missing"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Key Lesson
&lt;/h2&gt;

&lt;p&gt;When &lt;strong&gt;GBase Database&lt;/strong&gt; fails to start with an &lt;code&gt;onconfig&lt;/code&gt;-related error, do not immediately assume that the configuration file is corrupted or missing.&lt;/p&gt;

&lt;p&gt;Check these first:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is &lt;code&gt;GBASEDBTDIR&lt;/code&gt; correct?&lt;/li&gt;
&lt;li&gt;Does &lt;code&gt;$GBASEDBTDIR/bin/oninit&lt;/code&gt; exist?&lt;/li&gt;
&lt;li&gt;Does &lt;code&gt;ONCONFIG&lt;/code&gt; match the actual configuration filename?&lt;/li&gt;
&lt;li&gt;Does &lt;code&gt;$GBASEDBTSQLHOSTS&lt;/code&gt; point to the correct file?&lt;/li&gt;
&lt;li&gt;Have you reloaded the environment after making changes?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you have worked with Informix-style database administration before, these environment variables will look familiar. For repeatable deployments, putting them into a dedicated environment script can also reduce startup and configuration errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bottom line:&lt;/strong&gt; many GBase Database startup failures are not caused by the database engine itself. Sometimes, the problem is simply that the instance does not know where to find its own configuration.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Four Key Configurations Inside the GBase Database `onconfig` File</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Wed, 02 Sep 2026 05:31:50 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-four-key-configurations-inside-the-gbase-database-onconfig-file-gfd</link>
      <guid>https://dev.to/mmllllzcn/til-four-key-configurations-inside-the-gbase-database-onconfig-file-gfd</guid>
      <description>&lt;p&gt;Many people install &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, start the instance, and never open the &lt;code&gt;onconfig&lt;/code&gt; file again.&lt;/p&gt;

&lt;p&gt;I took a closer look at it recently and found four configuration areas that are especially important for database performance, memory management, and logging.&lt;/p&gt;

&lt;p&gt;If you're learning GBase Database administration, understanding these parameters is a good place to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is &lt;code&gt;onconfig&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;onconfig&lt;/code&gt; is the core configuration file for a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; instance.&lt;/p&gt;

&lt;p&gt;It contains instance-level parameters that control areas such as memory, buffer pools, logical logging, connections, and other database behavior.&lt;/p&gt;

&lt;p&gt;The typical naming convention is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;onconfig.&amp;lt;instance_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can locate the configuration files with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc/onconfig.&lt;span class="k"&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Four Parameters Worth Checking
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. BUFFERPOOL — Database Buffer Pool
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;BUFFERPOOL&lt;/code&gt; controls how data pages are cached in shared memory.&lt;/p&gt;

&lt;p&gt;A larger buffer pool can reduce disk I/O for workloads that repeatedly access the same data, but it also consumes more memory.&lt;/p&gt;

&lt;p&gt;The important point is that buffer pool configuration should be based on the workload and available system memory rather than a universal fixed value.&lt;/p&gt;

&lt;p&gt;For environments using different dbspace page sizes, buffer pool configuration also needs to account for those page sizes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. LOGSIZE — Logical Log Size
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;LOGSIZE&lt;/code&gt; specifies the size of each logical log file.&lt;/p&gt;

&lt;p&gt;Logical logs are important for transaction processing and recovery, so the appropriate size depends on workload characteristics, especially transaction volume and logging activity.&lt;/p&gt;

&lt;p&gt;One important detail: changing &lt;code&gt;LOGSIZE&lt;/code&gt; affects newly created logical log files. Existing logical log files do not automatically change size.&lt;/p&gt;

&lt;p&gt;This means &lt;code&gt;LOGSIZE&lt;/code&gt; should be considered together with &lt;code&gt;LOGFILES&lt;/code&gt;, rather than tuned in isolation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. LOGFILES — Number of Logical Log Files
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;LOGFILES&lt;/code&gt; specifies the number of logical log files.&lt;/p&gt;

&lt;p&gt;Together, &lt;code&gt;LOGSIZE&lt;/code&gt; and &lt;code&gt;LOGFILES&lt;/code&gt; determine the amount of logical log space available to the database.&lt;/p&gt;

&lt;p&gt;For a write-intensive OLTP workload, insufficient logical log capacity can become a problem as transaction volume increases.&lt;/p&gt;

&lt;p&gt;When reviewing GBase Database logging configuration, look at these parameters together with actual log usage and transaction behavior instead of applying a generic "larger is always better" rule.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. SHMTOTAL — Total Shared Memory
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;SHMTOTAL&lt;/code&gt; specifies the total amount of shared memory that the database server can use.&lt;/p&gt;

&lt;p&gt;This parameter is particularly important when planning memory usage on a production server shared with other applications.&lt;/p&gt;

&lt;p&gt;A value of &lt;code&gt;0&lt;/code&gt; can indicate that no specific shared-memory limit is imposed, depending on the database configuration.&lt;/p&gt;

&lt;p&gt;Setting a fixed limit requires careful planning. If the database needs more memory than the configured limit allows, some operations can fail.&lt;/p&gt;

&lt;p&gt;For that reason, &lt;code&gt;SHMTOTAL&lt;/code&gt; should be considered together with the other memory-related configuration parameters and the physical memory available on the server.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to View the Configuration
&lt;/h2&gt;

&lt;p&gt;You can inspect the active &lt;strong&gt;GBase Database&lt;/strong&gt; configuration with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-g&lt;/span&gt; config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To find a specific parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-g&lt;/span&gt; config | &lt;span class="nb"&gt;grep &lt;/span&gt;BUFFERPOOL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also inspect the relevant &lt;code&gt;onconfig&lt;/code&gt; file directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="nv"&gt;$GBASEDBTDIR&lt;/span&gt;/etc/onconfig.&amp;lt;instance_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Checking the active configuration is especially useful during troubleshooting because the configuration file and the currently running instance should be considered separately.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Should You Modify &lt;code&gt;onconfig&lt;/code&gt;?
&lt;/h2&gt;

&lt;p&gt;Not every &lt;code&gt;onconfig&lt;/code&gt; parameter can be changed in the same way.&lt;/p&gt;

&lt;p&gt;Some parameters support dynamic changes, while others require modifying the configuration file and restarting the database instance.&lt;/p&gt;

&lt;p&gt;For parameters that support dynamic modification, GBase 8s provides administrative commands such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onmode &lt;span class="nt"&gt;-wf&lt;/span&gt; &lt;span class="nv"&gt;parameter&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;value
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For parameters that require a restart, modify the appropriate &lt;code&gt;onconfig&lt;/code&gt; file and restart the instance according to your operational procedure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Always verify the parameter's dynamic configuration support before changing it.&lt;/strong&gt; The exact behavior can depend on the parameter and GBase 8s version.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Better GBase Database Tuning Approach
&lt;/h2&gt;

&lt;p&gt;There is no universal &lt;code&gt;onconfig&lt;/code&gt; template that works for every &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; deployment.&lt;/p&gt;

&lt;p&gt;A better approach is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Understand the workload.&lt;/li&gt;
&lt;li&gt;Check available system resources.&lt;/li&gt;
&lt;li&gt;Review the current configuration.&lt;/li&gt;
&lt;li&gt;Identify the actual bottleneck.&lt;/li&gt;
&lt;li&gt;Change one important parameter at a time.&lt;/li&gt;
&lt;li&gt;Monitor the result.&lt;/li&gt;
&lt;li&gt;Document the change.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For OLTP systems, pay particular attention to buffer pool usage, logical log activity, transaction volume, and memory consumption.&lt;/p&gt;

&lt;p&gt;For other workloads, the important parameters and tuning priorities may be different.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;GBase Database(GBase 8s) &lt;code&gt;onconfig&lt;/code&gt; file is the control center of the database instance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You don't need to memorize every parameter. But after installation, it is worth understanding the settings that directly affect your workload.&lt;/p&gt;

&lt;p&gt;Start with these four:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;BUFFERPOOL&lt;/code&gt; — data page caching&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LOGSIZE&lt;/code&gt; — logical log file size&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LOGFILES&lt;/code&gt; — number of logical log files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SHMTOTAL&lt;/code&gt; — total shared memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding these parameters can make GBase Database troubleshooting much easier—and help you make configuration changes based on actual workload behavior rather than guesswork.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Check Port 9088 Before Installing GBase Database</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Wed, 02 Sep 2026 05:23:42 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-check-port-9088-before-installing-gbase-database-2bc3</link>
      <guid>https://dev.to/mmllllzcn/til-check-port-9088-before-installing-gbase-database-2bc3</guid>
      <description>&lt;p&gt;Last week, I helped a team troubleshoot a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation failure. The logs repeatedly reported:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cannot bind to port 9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason was simple: &lt;strong&gt;port 9088 was already being used by another process&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It was a good reminder that checking the database port before installing GBase Database can save a lot of unnecessary troubleshooting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Port 9088 Matters
&lt;/h2&gt;

&lt;p&gt;In this GBase Database(GBase 8s) deployment, &lt;strong&gt;9088 is the database service listening port&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;During installation and instance initialization, GBase 8s needs to bind the configured port. If another process is already listening on that port, the database instance cannot bind to it and may fail to start.&lt;/p&gt;

&lt;p&gt;Before installation, check whether 9088 is available.&lt;/p&gt;

&lt;h2&gt;
  
  
  One-Command Port Check
&lt;/h2&gt;

&lt;p&gt;On Linux, use &lt;code&gt;ss&lt;/code&gt; to check the port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-ltnp&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;":9088 "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the command returns something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LISTEN 0 128 0.0.0.0:9088 0.0.0.0:* users:(("nginx",pid=1234))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;port 9088 is already occupied.&lt;/p&gt;

&lt;p&gt;If there is no output, the port is likely available.&lt;/p&gt;

&lt;p&gt;On systems where &lt;code&gt;ss&lt;/code&gt; is not available, you can use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat &lt;span class="nt"&gt;-tlnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What to Do If 9088 Is Occupied
&lt;/h2&gt;

&lt;p&gt;First, identify which process is using the port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-ltnp&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;":9088 "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not immediately run &lt;code&gt;kill -9&lt;/code&gt;. First determine whether the process is required by the system or another application.&lt;/p&gt;

&lt;p&gt;If it is an unnecessary service, stop it using the appropriate service manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;systemctl stop &amp;lt;service&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify that port 9088 has been released:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ss &lt;span class="nt"&gt;-ltnp&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;":9088 "&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If another application must continue using 9088, you can configure &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; to use another available port.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the Port Configuration Consistent
&lt;/h2&gt;

&lt;p&gt;If you change the GBase Database port, make sure the server configuration and client connection configuration use the same port.&lt;/p&gt;

&lt;p&gt;For example, if the database service is changed to 9098, the corresponding &lt;code&gt;sqlhosts&lt;/code&gt; entry should use 9098:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gbase01 onsoctcp 192.168.1.100 9098
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the server listens on 9098 but the client still tries to connect to 9088, the connection will fail.&lt;/p&gt;

&lt;p&gt;This is a common point to check when troubleshooting GBase Database connectivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the Firewall Too
&lt;/h2&gt;

&lt;p&gt;A free port does not automatically mean that clients can reach it.&lt;/p&gt;

&lt;p&gt;If remote clients need to connect to GBase Database through TCP port 9088, check the server firewall:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;firewall-cmd &lt;span class="nt"&gt;--list-ports&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your security policy allows it, add the required port:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;firewall-cmd &lt;span class="nt"&gt;--add-port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;9088/tcp &lt;span class="nt"&gt;--permanent&lt;/span&gt;
firewall-cmd &lt;span class="nt"&gt;--reload&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is usually no need to disable the entire firewall just to make the database accessible. Opening only the required port is a better approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Simple Pre-Installation Checklist
&lt;/h2&gt;

&lt;p&gt;Before installing &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is port &lt;code&gt;9088&lt;/code&gt; already in use?&lt;/li&gt;
&lt;li&gt;Which process owns the port?&lt;/li&gt;
&lt;li&gt;Is the port configured consistently in the database and &lt;code&gt;sqlhosts&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Can remote clients reach the port through the firewall?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;A GBase Database installation problem does not always come from the database itself. Sometimes, a single occupied port is enough to stop the instance from starting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before installing GBase Database(GBase 8s), spend a few seconds checking port 9088. It can save you hours of troubleshooting later.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: The Wrong Character Set in GBase Database Can Turn Chinese Into `????`</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Wed, 02 Sep 2026 05:17:56 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-the-wrong-character-set-in-gbase-database-can-turn-chinese-into--4li8</link>
      <guid>https://dev.to/mmllllzcn/til-the-wrong-character-set-in-gbase-database-can-turn-chinese-into--4li8</guid>
      <description>&lt;p&gt;I recently troubleshot a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; character set issue: the database was running normally and connections worked, but Chinese data appeared as &lt;code&gt;????&lt;/code&gt; after insertion. The root cause was simple—the wrong character set had been selected during installation.&lt;/p&gt;

&lt;p&gt;This is an easy mistake to make when setting up GBase Database for the first time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproducing the Problem
&lt;/h2&gt;

&lt;p&gt;During the &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation, I accepted the default settings, leaving the locale as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;en_US.8859-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The database itself worked normally. But after creating a table and inserting Chinese text:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;test_cn&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;test_cn&lt;/span&gt; &lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'测试数据'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;test_cn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;id  name
1   ????
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The database was Online. The SQL was valid. The problem was the character set configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;en_US.8859-1&lt;/code&gt; Causes Problems
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;en_US.8859-1&lt;/code&gt; uses ISO 8859-1, which is designed primarily for Western European characters. It does not provide the character coverage required for Chinese text.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, locale settings affect how character data is handled between the database, client, and application.&lt;/p&gt;

&lt;p&gt;Two important environment variables are:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DB_LOCALE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Database locale and character set&lt;/td&gt;
&lt;td&gt;&lt;code&gt;zh_CN.utf8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CLIENT_LOCALE&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Client-side locale and character set&lt;/td&gt;
&lt;td&gt;&lt;code&gt;zh_CN.utf8&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a Chinese UTF-8 environment, keeping these settings consistent helps avoid unexpected character conversion problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Configure the Character Set
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Method 1: Set It During Installation
&lt;/h3&gt;

&lt;p&gt;This is the simplest approach.&lt;/p&gt;

&lt;p&gt;During the &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; installation and instance initialization process, select the appropriate locale instead of accepting the default:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zh_CN.utf8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choosing the correct locale from the beginning is much easier than dealing with character conversion problems after production data has been loaded.&lt;/p&gt;

&lt;h3&gt;
  
  
  Method 2: Check the GBase Database Environment
&lt;/h3&gt;

&lt;p&gt;If the instance has already been installed, check the GBase Database environment profile.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vi /home/gbasedbt/profile.gbase01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for the locale-related environment variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;DB_LOCALE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;zh_CN.utf8
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;CLIENT_LOCALE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;zh_CN.utf8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact values should match your application's character set requirements.&lt;/p&gt;

&lt;p&gt;After changing the environment variables, reload the profile before testing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; /home/gbasedbt/profile.gbase01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify the active values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$DB_LOCALE&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$CLIENT_LOCALE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also check the GBase Database environment with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nb"&gt;env&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;LOCALE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important point is to check the &lt;strong&gt;environment profile&lt;/strong&gt;, rather than looking for these variables in the &lt;code&gt;onconfig&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  UTF-8 or GBK?
&lt;/h2&gt;

&lt;p&gt;GBase Database(GBase 8s) supports multiple character sets, so the right choice depends on your application and existing data.&lt;/p&gt;

&lt;p&gt;For new applications that need multilingual support, &lt;strong&gt;UTF-8 is generally the safer choice&lt;/strong&gt; because it provides broad character coverage and works well across modern applications and systems.&lt;/p&gt;

&lt;p&gt;GBK can still make sense for legacy Chinese-only environments where existing applications and data already depend on it.&lt;/p&gt;

&lt;p&gt;The key is consistency across the database, client, application, and data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;A GBase Database instance can be completely healthy while Chinese text is still displayed as &lt;code&gt;????&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When troubleshooting character encoding in &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;DB_LOCALE&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;CLIENT_LOCALE&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The database locale&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Application/client encoding&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Existing data encoding&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Don't blindly accept the default locale during installation.&lt;/strong&gt; If your GBase Database environment needs Chinese or multilingual data, make the character set decision before loading production data. A small configuration choice at installation time can prevent a much bigger migration problem later.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Why `localhost` Can Break Your GBase Database sqlhosts Configuration</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Wed, 02 Sep 2026 03:57:22 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/til-why-localhost-can-break-your-gbase-database-sqlhosts-configuration-jp6</link>
      <guid>https://dev.to/mmllllzcn/til-why-localhost-can-break-your-gbase-database-sqlhosts-configuration-jp6</guid>
      <description>&lt;p&gt;I was helping a colleague troubleshoot a &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; connection failure today and found a common configuration pitfall: using &lt;code&gt;localhost&lt;/code&gt; in the &lt;code&gt;sqlhosts&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;If your GBase Database instance is already &lt;strong&gt;On-Line&lt;/strong&gt; but &lt;code&gt;dbaccess&lt;/code&gt; still returns &lt;code&gt;Can't connect to database server (25574)&lt;/code&gt;, the &lt;code&gt;sqlhosts&lt;/code&gt; configuration is one of the first things to check.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;After configuring &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt;, the instance looks healthy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But connecting with &lt;code&gt;dbaccess&lt;/code&gt; fails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Can't connect to database server (25574)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One possible cause is an incorrect server address in &lt;code&gt;sqlhosts&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gbase01 onsoctcp localhost 9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks harmless, especially when the database server and client are on the same machine. But &lt;code&gt;localhost&lt;/code&gt; can introduce protocol and address-resolution problems that are easy to overlook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why &lt;code&gt;localhost&lt;/code&gt; Can Cause Problems
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;sqlhosts&lt;/code&gt; file tells &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; how clients should communicate with a database server.&lt;/p&gt;

&lt;p&gt;For TCP/IP connections, &lt;code&gt;onsoctcp&lt;/code&gt; should point to a valid network address or hostname. Using &lt;code&gt;localhost&lt;/code&gt; forces the connection toward the local loopback interface rather than the server's normal network address.&lt;/p&gt;

&lt;p&gt;This becomes especially problematic when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The client connects remotely&lt;/li&gt;
&lt;li&gt;The server is bound to a specific network interface&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/etc/hosts&lt;/code&gt; resolves the hostname unexpectedly&lt;/li&gt;
&lt;li&gt;Firewall or network rules restrict loopback traffic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In other words, the database can be &lt;strong&gt;On-Line&lt;/strong&gt; while the client still cannot reach it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommended sqlhosts Configuration
&lt;/h2&gt;

&lt;p&gt;Instead of &lt;code&gt;localhost&lt;/code&gt;, use the server's actual IP address:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gbase01 onsoctcp 192.168.1.100 9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or use a hostname that resolves correctly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gbase01 onsoctcp gbase-server-01 9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify the hostname:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;getent hosts gbase-server-01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple check can save a lot of troubleshooting time when configuring &lt;strong&gt;GBase Database&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Troubleshoot GBase Database Connections
&lt;/h2&gt;

&lt;p&gt;First, check the active environment configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;onstat &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nb"&gt;env&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;sqlhosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then verify whether the database port is listening:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;netstat &lt;span class="nt"&gt;-tlnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1:9088
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the service is listening only on the loopback interface. A remote client will not be able to connect through that address.&lt;/p&gt;

&lt;p&gt;If the port is listening on the server's network interface, continue checking firewall rules, hostname resolution, the &lt;code&gt;sqlhosts&lt;/code&gt; entry, and the client connection parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  GBase Database sqlhosts: A Simple Rule
&lt;/h2&gt;

&lt;p&gt;For &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; deployments, &lt;code&gt;sqlhosts&lt;/code&gt; deserves attention during initial configuration and troubleshooting.&lt;/p&gt;

&lt;p&gt;A practical rule is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;onsoctcp&lt;/code&gt; with a reachable IP address or correctly resolved hostname instead of relying on &lt;code&gt;localhost&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A database being &lt;strong&gt;On-Line&lt;/strong&gt; does not automatically mean that every client connection path is correctly configured.&lt;/p&gt;

&lt;p&gt;If you're learning &lt;strong&gt;GBase Database(GBase 8s)&lt;/strong&gt; administration, understanding &lt;code&gt;sqlhosts&lt;/code&gt;, network protocols, ports, and hostname resolution is a good place to start.&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Rollback Plan Template: Make Database Cutover Safe</title>
      <dc:creator>mmllllzcn</dc:creator>
      <pubDate>Fri, 28 Aug 2026 01:40:10 +0000</pubDate>
      <link>https://dev.to/mmllllzcn/rollback-plan-template-make-database-cutover-safe-51m1</link>
      <guid>https://dev.to/mmllllzcn/rollback-plan-template-make-database-cutover-safe-51m1</guid>
      <description>&lt;p&gt;A &lt;strong&gt;database migration&lt;/strong&gt; without a tested &lt;strong&gt;rollback plan&lt;/strong&gt; is a risk waiting to surface.&lt;/p&gt;

&lt;p&gt;Before moving production traffic to &lt;strong&gt;GBase Database&lt;/strong&gt; or any other target, define the exit strategy in advance.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Define Rollback Triggers
&lt;/h3&gt;

&lt;p&gt;Use measurable conditions, not opinions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dual-write data difference &amp;gt; 0 for N minutes&lt;/li&gt;
&lt;li&gt;P95 latency exceeds baseline by 10% for M minutes&lt;/li&gt;
&lt;li&gt;Error rate exceeds the predefined threshold&lt;/li&gt;
&lt;li&gt;Replication or data consistency checks fail&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Define Rollback Steps
&lt;/h3&gt;

&lt;p&gt;A practical &lt;strong&gt;rollback plan&lt;/strong&gt; should include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Freeze writes on the new system&lt;/li&gt;
&lt;li&gt;Route application traffic back to the source&lt;/li&gt;
&lt;li&gt;Verify reverse synchronization&lt;/li&gt;
&lt;li&gt;Confirm transaction completeness&lt;/li&gt;
&lt;li&gt;Resume normal traffic only after validation&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  3. Assign Ownership &amp;amp; Timing
&lt;/h3&gt;

&lt;p&gt;Every rollback step needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A named owner&lt;/li&gt;
&lt;li&gt;A defined time budget&lt;/li&gt;
&lt;li&gt;A clear success condition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The complete &lt;strong&gt;database migration&lt;/strong&gt; rollback process must fit inside the maintenance window.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Rehearse Before Go-Live
&lt;/h3&gt;

&lt;p&gt;A rollback plan that has never been tested is only documentation.&lt;/p&gt;

&lt;p&gt;Run a full drill before the &lt;strong&gt;GBase Database&lt;/strong&gt; cutover. Record the actual recovery time and fix any step that exceeds the target.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule:&lt;/strong&gt; If the rollback drill exceeds the maintenance window, change the plan—not the clock.&lt;/p&gt;

&lt;p&gt;💬 Does your database migration checklist include a timed rollback rehearsal?&lt;/p&gt;

</description>
      <category>gbase</category>
      <category>database</category>
      <category>数据库</category>
      <category>todayilearned</category>
    </item>
  </channel>
</rss>
