Video Presentation of BroadSQL

Step 1 - Install and run BroadSQL for initial configuration

For installing BroadSQL on your machine, do the following:

  • Verify the pre-requisites to make sure you can use BroadSQL on your computer.
  • Download the latest version of BroadSQL, then unzip the archive in a folder on your hard disk, say C:\BROADSQL.
  • BroadSQL ships with a copy of Oracle, Derby and H2 database. If you work with other JDBC drivers, or if you have more recent copies of the JDBC drivers, simply copy the drivers to the sub folder LIB
  • Open a terminal window in the application folder, say C:\BroadSQL.
  • Type BroadSQL $CLI and press ENTER
  • BroadSQL prompts you for the master password: clipper8AD. We strongly suggest that you change the default password later on.

 

After first time installation, BroadSQL contains no database connection records, except a connection to the Connections Definition File (CDF). The CDF is the encrypted database that contains other database connections. The objective of this first step is to install BroadSQL and connect to the CDF.

  • Open a terminal window in the application folder, say C:\BroadSQL.
  • Type BroadSQL $CLI and press ENTER
  • BroadSQL prompts you for the master password: clipper8AD. We strongly suggest that you change the default password later on.



Step 2 - Create your database connection in the CDF

Now that you are connected to the CDF, you can start creating your database connections. For each database connection you want to manage in BroadSQL, you must create one row in the table CONNECTIONS of the Connections Definition File (CDF). The structure of the table CONNECTIONS is the following:

Field Description Example
ID Unique identifier of the connection. Used to connect to the database. Must be unique. Is case sensitive. For Oracle connections, you may use the SID $CLI
DRIVER The driver string provided by your JDBC driver org.h2.Driver
URL The JDBC URL to the database jdbc:h2:ServersDefinitionFile.lc;CACHE_SIZE=5000;CIPHER=AES
TYPE_ID The database type, informational and optional H2
STATUS_ID The status of the connection. Only ACTIVE connections are used in the client ACTIVE
NAME A human-friendly description of the database connection CliSQL Connections Definition File
LANDSCAPE_ID A landscape is a logical collection of several databases that may for example belong to the same application CliSQL
INSTANCE_ID Several instances of the same database may exist: LIVE, QA, T&I LIVE
USER_NAME The user name of the connection ADMIN
USER_PASSWORD The user password. Note that for H2 encrypted databases the password is repeated. clipper8AD clipper8AD
COMMENT A free text comment  

Typically, you will use a SQL query like the following:

$CLI> INSERT INTO CONNECTION (ID,DRIVER,URL,TYPE_ID,STATUS_ID,NAME,LANDSCAPE_ID,INSTANCE_ID,USER_NAME,USER_PASSWORD,COMMENT) values ('MYDB',
','org.h2.Driver','jdbc:h2:ServersDefinitionFile.lc;CACHE_SIZE=5000;CIPHER=AES','H2','ACTIVE','CliSQL Connections Definition File','CliSQL',
'LIVE','ADMIN','clipper8AD clipper8AD');



Step 3 - Re-start BroadSQL

You must restart BroadSQL in order to make your changes effective.

  • Type EXIT; and press the ENTER key. This will close BroadSQL client
  • From the command line, type BroadSQL followed by the name of your database connection. BroadSQL will connect you to this specific connection.



Step 4 - Start using BroadSQL and enjoy its amazing features

You can enter any SQL command supported by the JDBC driver of your database : select, update, insert, etc. These commands are transferred as-is to your database and BroadSQL displays the result back in the console

  • Use the command CONSOLE to close the current connection and open another connection. For example CONNECT XE; will close the current connection and open the database identified by XE
  • Use the command CONSOLE to close the current connection and open another connection. For example CONNECT XE; will close the current connection and open the database identified by XE
  • For exporting to Excel file do the following:
    1. Type the command EXP followed by the relative file name. For example, type EXP MYDATA.XLSX;. BroadSQL stores all exported files to the c:\temp directory. You can change this setting in the BroadSQL.INI file
    2. Then, type your SQL query
    3. BroadSQL displays the first 1000 rows in the console and stores the full extraction in the Excel file. You can also specify other format: .MDB for Microsoft Access storage, .XLS for older Excel versions, or .TXT
  • The SHOW something commands lets you display a list of objects. For example, SHOW TABLES cust%; displays all tables which name starts with 'cust'