Databases

Firebird SQL User Guide

| Product: Firebird SQL

Overview

This guide covers the deployment and configuration of Firebird SQL on Linux using cloudimg AMIs from the AWS Marketplace. Firebird is a relational database management system that offers ANSI SQL compliance, ACID transactions, and support for stored procedures, triggers, and views. It is lightweight, requires minimal administration, and runs well on modest hardware.

What's included in this AMI:

  • Firebird SQL with database listener on port 3050
  • Dedicated installation volume at /opt/firebird
  • SYSDBA credentials auto generated and stored securely
  • Systemd service for automatic startup on boot
  • OS package update script for keeping the system current
  • AWS CLI v2 for AWS service integration
  • Systems Manager Agent (SSM) for remote management
  • CloudWatch Agent for monitoring
  • Latest security patches applied at build time
  • 24/7 cloudimg support with guaranteed 24 hour response SLA

Prerequisites

Before launching this AMI, ensure you have:

  1. An active AWS account
  2. An active subscription to the Firebird SQL listing on AWS Marketplace
  3. An EC2 key pair for SSH access
  4. Familiarity with EC2 instance management and SSH

Recommended Instance Type: t3.small (2 vCPU, 2 GB RAM) or larger. The minimum requirements are 1 vCPU, 1 GB RAM, and 20 GB disk space.

Step 1: Launch the AMI

  1. Navigate to the AWS Marketplace and search for "Firebird SQL cloudimg"
  2. Click Continue to Subscribe, accept the terms, then Continue to Configuration
  3. Select your preferred Region and Software Version
  4. Click Continue to Launch
  5. Choose Launch through EC2 for full control over instance configuration
  6. Select your instance type (t3.small recommended)
  7. Configure storage: 20 GB gp3 minimum
  8. Configure your Security Group with the following inbound rules:
Port Protocol Source Purpose
22 TCP Your IP SSH access
3050 TCP Your IP Firebird SQL database listener for remote connectivity

Important: Restrict port 3050 to trusted IP addresses or application servers only.

  1. Select your EC2 key pair and launch the instance

Step 2: Connect via SSH

Once your instance is running and has passed both status checks (2/2), connect using SSH:

ssh -i your-key.pem ec2-user@<public-ip-address>

To switch to the root user:

sudo su -

Step 3: Retrieve SYSDBA Credentials

The SYSDBA password has been randomly generated and stored on the instance:

cat /stage/scripts/firebird_sysdba_password.log

Note this password for use when connecting to the database.

Step 4: Connect to Firebird SQL

Connect to the Firebird SQL database from the server command line as the root user:

isql -u sysdba

Enter the password from the firebird_sysdba_password.log file when prompted.

When connecting remotely via a database client or GUI application, use:

  • Host: The public or private IP of your EC2 instance
  • Port: 3050
  • Username: SYSDBA
  • Password: The value from /stage/scripts/firebird_sysdba_password.log

Step 5: Create a Database

Create a new database using isql:

CREATE DATABASE '/opt/firebird/data/myapp.fdb'
  USER 'SYSDBA' PASSWORD 'your_password';

Create a table:

CREATE TABLE customers (
  id INTEGER NOT NULL PRIMARY KEY,
  name VARCHAR(100),
  email VARCHAR(200),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Insert data:

INSERT INTO customers (id, name, email) VALUES (1, 'John Doe', 'john@example.com');
COMMIT;

Query data:

SELECT * FROM customers;

Server Components

Component Install Path
Firebird SQL /opt/firebird

Note: Component versions may be updated on first boot by the automatic OS package update script.

Filesystem Layout

Mount Point Size Description
/ 38 GB Root filesystem
/boot 2 GB Operating system kernel files
/opt/firebird 9.8 GB Firebird SQL installation directory

Key directories:

Directory Purpose
/opt/firebird Firebird installation root
/opt/firebird/bin Firebird binaries (isql, gbak, gfix)
/opt/firebird/data Database files (.fdb)
/opt/firebird/security4.fdb Security database (user accounts)

Managing the Firebird Service

Firebird is managed via systemd and starts automatically on boot.

Check service status:

systemctl status firebird

Stop Firebird:

systemctl stop firebird

Start Firebird:

systemctl start firebird

Restart Firebird:

systemctl restart firebird

Scripts and Log Files

Script/Log Path Description
initial_boot_update.sh /stage/scripts Updates the OS with the latest packages on first boot
initial_boot_update.log /stage/scripts Output log for the boot update script
firebird_sysdba_password.log /stage/scripts Firebird SQL SYSDBA password

On Startup

An OS package update script runs on first boot to ensure the image is fully up to date. You can disable this by removing the script and its crontab entry:

rm -f /stage/scripts/initial_boot_update.sh

crontab -e
# Delete the following line, save and exit:
@reboot /stage/scripts/initial_boot_update.sh

Troubleshooting

Cannot connect to Firebird on port 3050

  1. Verify Firebird is running: systemctl status firebird
  2. Check your security group allows port 3050 from your IP
  3. Test local connectivity: isql -u sysdba
  4. Verify the listener is active: netstat -tlnp | grep 3050

Authentication fails

  1. Verify the SYSDBA password from /stage/scripts/firebird_sysdba_password.log
  2. Ensure you are using the correct case (SYSDBA is uppercase)
  3. Check the security database exists: ls /opt/firebird/security4.fdb

Database file not found

  1. Verify the full path to the .fdb file
  2. Check file permissions
  3. Ensure the Firebird user has read/write access to the data directory

Service fails to start

  1. Check logs: journalctl -u firebird --no-pager -n 50
  2. Verify disk space: df -h /opt/firebird
  3. Check for port conflicts: netstat -tlnp | grep 3050

Security Recommendations

  • Change the SYSDBA password after first login using gsec or SQL commands
  • Restrict port access: Only allow port 3050 from trusted IPs
  • Create application specific users: Do not use SYSDBA for application connections
  • Secure the password file: Delete /stage/scripts/firebird_sysdba_password.log after noting the value
  • Back up databases regularly: Use gbak for creating transportable backups
  • Keep Firebird updated: Apply security patches when available
  • Use encrypted connections: Configure SSL/TLS for remote database connections

Support

If you encounter any issues with this product, contact cloudimg support:

  • Email: support@cloudimg.co.uk
  • Website: www.cloudimg.co.uk
  • Support hours: 24/7 with guaranteed 24 hour response SLA