Atlas Knowledge Base
Dashboard
Setting up a Profile

Setting up a Profile


A profile in the compilers tells runsql, isqlline, runcreate, and the set_* family which database to talk to and where the SQL source tree lives. You need at least one profile before you can run any command.

Profiles are stored in the compilers' settings.json (see Getting Started for path).

What a profile contains


Field

Purpose

HOST, PORT

Where the database lives.

PLATFORM

SYBASE, MSSQL, or POSTGRES. The compilers route to the right driver based on this.

USERNAME, PASSWORD

Credentials. Write-once; the compilers never echo the password back to the screen.

COMPANY

The company number (typically 101 for SBN).

DEFAULT_LANGUAGE

Used by set_messages and other text-locale-sensitive commands.

SQL_SOURCE

Local path to your SQL source tree (see "RAW mode vs SQL source" below).

RAW_MODE

true if SQL_SOURCE should be ignored — see below.

DATABASE

Default database for that profile. Optional; can also be passed per-command.

ALIASES

Short names you can pass instead of the full profile name.

set_profile

Run set_profile with no arguments to launch the main menu:


Pick Create new profile, then walk through the prompts:

  1. Profile name — short, all-caps by convention (e.g. SBNA, SRM_LOCAL, STAGING).
  2. Platform — Sybase or MSSQL.
  3. Host — IP or hostname.
  4. Port — defaults to 5000 for Sybase, 1433 for MSSQL.
  5. Username / Password — service account that can run DDL.
  6. Company number — almost always 101.
  7. SQL source path — local checkout of the SQL source tree (see below).
  8. Raw mode? — n for normal use; y only if you need to drive a database that has no matching local source tree (see below).
  9. Aliases — optional comma-separated short names.

[Screenshot: terminal showing the create-profile prompt sequence, with one or two answers filled in]

When you finish, the profile is written to settings.json and the menu re-displays it.

set_profile menu tree

set_profile (main)
├── List profiles
├── Create new profile → new-profile wizard
├── Open <PROFILE> ─────────────→ profile submenu
│ ├── View
│ ├── Edit → field-by-field editor
│ ├── Test ───────────────────→ test submenu
│ │ ├── SQL source
│ │ ├── Connection
│ │ ├── Options
│ │ ├── Table locations
│ │ ├── Changelog
│ │ ├── Symlinks
│ │ └── All of the above
│ ├── Copy → DST
│ └── Delete (confirms)
└── Quit

You can jump straight into any leaf by passing the profile name and using the --test, --view, --edit, --copy, or --delete flags. See Headless creation below.

RAW mode vs SQL source

Two ways the compilers find SQL files:

Normal (with SQL_SOURCE)

SQL_SOURCE points at a local checkout of the SQL source tree, e.g. C:\src\current.sql on Windows or ~/src/current.sql on Linux/macOS. The compilers resolve runcreate $ir>...>file paths against this root and apply placeholder substitution (&dbpro&, &users&, etc.) before sending SQL.

This is what you want for any normal development workflow against an Innovative-managed source tree.

RAW mode (RAW_MODE = true)

SQL_SOURCE is ignored. SQL files are sent as-is with no placeholder resolution. Use RAW mode when:

  1. Driving a database that doesn't follow the SBN source-tree layout (e.g. the Atlas help-page MSSQL DB).
  2. Compiling SQL written outside the IBS source tree.
  3. Running ad-hoc scripts where you control the literal SQL.

Switch a profile to RAW mode with set_profile --edit <NAME> --raw. The next runsql/isqlline against that profile will skip placeholder resolution.

Testing the profile

Once the profile exists, exercise it before you trust it:

set_profile --test <PROFILE> --what all

This runs every test in sequence:


Test

What it proves

SQL source

The path in SQL_SOURCE exists and contains expected directories (css/, tbl/, pro/, etc.). Skipped in RAW mode.

Connection

The compilers can log in with the stored credentials and run select 1 against the default database.

Options

i_get_option resolves a known placeholder against the live database (defaults to &users&).

Table locations

ba_get_table_locations returns rows.

Changelog

ba_gen_chg_log_new exists and accepts a no-op insert.

Symlinks

The profile's expected symlinks (optional) point at the right targets.

Run a single test with --what connection (or any of the other names above). To resolve a different placeholder for the options test, pass --resolve <NAME>.

Connection failures in headless mode print the error and exit 0 — wrap the call and inspect output if you need to react.

Headless creation

For scripted setup (CI, install scripts, agents), every menu action has a CLI equivalent. The flags below are mutually exclusive primary actions.

set_profile --create <NAME> --platform mssql|sybase|postgres
--host <H> --user <U> --password '<PW>'
[--port <N>] [--company <C>] [--language <L>]
[--sql-source <PATH>]
[--alias <A,B,C>]
[--raw]
set_profile --edit <NAME> [any --create field flag]
[--alias <A,B>] [--no-aliases]
set_profile --view <NAME>
set_profile --copy <SRC> --to <DST>
set_profile --delete <NAME> --yes # --yes is mandatory headless
set_profile --test <NAME> --what <test-name>

Examples:

set_profile --create STAGING --platform mssql --host db.staging --user sa --password '...' \
--sql-source C:\src\sbn-services --company 101

set_profile --edit STAGING --port 1444 --password 'rotated'

set_profile --copy STAGING --to STAGING2

set_profile --delete OBSOLETE --yes

Where to next

  1. Running a Command — once your profile passes --test all, run isqlline and runsql against it.




Was this helpful?