On this page

How do I set up QA and production copies of WORLD to practise environment commands?

Applies to BroadSQL 5.5.0 · reviewed October 18, 2026

What you'll accomplish

Several BroadSQL features only make sense when one application has a database per deployment stage: ENV moves between them, / PROD runs a query once on production, COMPARE TABLE STRUCTURE compares two stages. Your real databases may not be the place to try them for the first time.

You will build a small practice set from the WORLD sample: a fictional application, WORLDAPP, with three connections. WORLD-IN (integration) and WORLD-QA (quality assurance) are copies of the sample file, and the WORLD connection you already have plays the production database. At the end, SHOW GROUP; lists the three connections, and every environment example of these how-tos works on your installation.

Short answer

Copy the sample file twice, create the Environments IN, QA and PROD (only PROD flagged Production) and the Database Group WORLDAPP, add the connections WORLD-IN and WORLD-QA, then move WORLD into WORLDAPP as its PROD connection with EDIT CONNECTION WORLD;.

What exists by default, and what you create

NameExists by default?In this practice set
Connection WORLDYes: the sample, jdbc:h2:./samples/WorldDB, environment LOCAL, no Database GroupThe production database of WORLDAPP, environment PROD
Connections WORLD-IN, WORLD-QANoCopies of the sample, environments IN and QA
Database Group WORLDAPPNoTies the three connections together
Environments IN, QA, PRODOnly if someone created themPROD is flagged Production, the others are not

1. Copy the sample database file

The two copies are ordinary H2 database files next to the original. Close BroadSQL first: H2 does not let two programs open the same file, and a file copied while it is open may be incomplete. On Windows:

Type in a Windows Command Prompt, in the BroadSQL installation folder, while BroadSQL is closed
copy samples\WorldDB.mv.db samples\WorldDB_IN.mv.db
copy samples\WorldDB.mv.db samples\WorldDB_QA.mv.db

On Linux, the same with cp:

Type in a Linux terminal, in the BroadSQL installation folder, while BroadSQL is closed
cp samples/WorldDB.mv.db samples/WorldDB_IN.mv.db
cp samples/WorldDB.mv.db samples/WorldDB_QA.mv.db

2. Create the Environments and the Database Group

Start BroadSQL again. First list the Environments that already exist, to skip the ones you have:

Type at the BroadSQL prompt
SHOW ALL ENVIRONMENTS;

Then create the missing ones and the Database Group. Each command asks a few questions: give a description such as Integration, answer n to Production [y/n] for IN and QA and y for PROD, then y to save.

Type at the BroadSQL prompt
ADD ENVIRONMENT IN;
ADD ENVIRONMENT QA;
ADD ENVIRONMENT PROD;
ADD GROUP WORLDAPP;

3. Add the two copies as connections

ADD CONNECTION asks for each field in turn. Run it once per copy:

Type at the BroadSQL prompt
ADD CONNECTION WORLD-IN;
ADD CONNECTION WORLD-QA;

Answer with these values; they are the values of the WORLD connection, except the name, the URL, the Database Group and the Environment:

FieldWORLD-INWORLD-QA
NameSample World Database, integrationSample World Database, QA
TypeH2H2
URLjdbc:h2:./samples/WorldDB_INjdbc:h2:./samples/WorldDB_QA
User Namesasa
User Passwordempty, as for WORLDempty, as for WORLD
Database GroupWORLDAPPWORLDAPP
EnvironmentINQA

On Windows, the CONFIG window does the same in its Connections, Database Groups and Environments tabs.

4. Make WORLD the production connection

EDIT CONNECTION shows each current value and asks whether to keep it. Keep every value except the Database Group (WORLDAPP) and the Environment (PROD):

Type at the BroadSQL prompt
EDIT CONNECTION WORLD;

5. Check the result

Open the QA copy and list the connections of its Database Group:

Type at the BroadSQL prompt
CONNECT WORLD-QA;
SHOW GROUP;

SHOW GROUP lists one connection per Environment, in a table like this one:

BroadSQL session: after each prompt, what you type; the other lines are what BroadSQL prints
WORLD-QA> SHOW GROUP;
List of environments for Database Group 'WORLDAPP':
|------------|---------------|--------------------|---------------------------------------------|---------------|
|ENVIRONMENT |ID             |USER                |NAME                                         |TYPE           |
|------------|---------------|--------------------|---------------------------------------------|---------------|
|IN          |WORLD-IN       |                    |Sample World Database, integration           |H2             |
|PROD        |WORLD          |                    |Sample World Database                        |H2             |
|QA          |WORLD-QA       |                    |Sample World Database, QA                    |H2             |
|------------|---------------|--------------------|---------------------------------------------|---------------|

3 database connections found
Illustrative output: the values come from the WORLD sample database and the layout from this release; it was not captured from a BroadSQL run, and your timings will differ.

What changes for the WORLD connection

  • WORLD is now in an Environment flagged Production: before a statement that can change data on it (INSERT, UPDATE, CREATE TABLE and so on), BroadSQL asks for a confirmation. A SELECT never asks. See Production confirmation.
  • When colors are on, the prompt of WORLD is shown in the Production style.
  • From WORLD-IN or WORLD-QA, ENV PROD; opens WORLD, and / PROD runs your last query on it once.
  • The three databases start identical. Any change you make in one copy stays in that copy, which is how the comparison recipes show differences.

Undo the practice set

To go back to the installation as it was: EDIT CONNECTION WORLD; with the Environment LOCAL and an empty Database Group, then DEL CONNECTION WORLD-IN; and DEL CONNECTION WORLD-QA; (they become inactive), and finally delete samples/WorldDB_IN.mv.db and samples/WorldDB_QA.mv.db while BroadSQL is closed. The Environments and the Database Group can stay; DEL GROUP and DEL ENVIRONMENT remove them.

Watch out

  • A connection ID has at most 15 characters, and a Database Group holds at most one connection per Environment.
  • The URL is relative to the installation folder, like the URL of WORLD: start BroadSQL with its launchers.
  • These names are an example. Your own databases need their own Database Groups and Environments: see Connections, Database Groups and Environments.

Commands used

Found something wrong or unclear on this page? , with the page address.