IBConsole

In past versions of InterBase, there were two main tools you could use to interact directly with the program: the Server Manager application, which could be used to administer both a local and a remote server; and Windows Interactive SQL (WISQL). Version 6 includes a much more powerful front-end application, called IBConsole. This is a full-fledged Windows program (built with Delphi) that allows you to administer, configure, test, and query an InterBase server, whether local or remote.

IBConsole is a simple and complete system for managing InterBase servers and their databases. You can use it to look into the details of the database structure, modify it, query the data (which can be useful to develop the queries you want to embed in your program), back up and restore the database, and perform all the other administrative tasks.

As you can see in Figure 15.2, IBConsole allows you to manage multiple servers and databases, all listed in a single, handy configuration tree. You can ask for general information about the database and list its entities (tables, domains, stored procedures, triggers, and everything else), accessing the details of each. You can also create new databases and configure them, back up the files, update the definitions, check what's going on and who is currently connected, and so on.

FIGURE 15.2:

IBConsole allows you to manage, from a single computer, InterBase databases hosted by multiple servers.

'I IBConsole

Console View Server Database Tools Windows Help

i LU

InterBase Servers ""^J Local Server

Databases Éj"*'^' employee.gdb M Domains ; il] Tables : Views

Stored Procedures External Functions ^ Generators ( 0 Exceptions $ Blob Filters

  • 4=§ Roles
  • IBWintech Ê % WINTECH.GDB ¡jfëjl Backup

IMI base |lj] Server Log

  • 5$ Users
  • wintech_server

Action

Description

Disconnect Disconnect from the current database

Properties Show database properties

Database Statistics Display database statistics

Shutdown Shutdown the database

Sweep Perform a database sweep

Transaction Recovery Recover limbo transactions

View Metadata View Database Metadata

Database Restart Restart a database

Drop Database Drop the current database

Database Backup Backup an InterBase database

Connected Users View a list of users currently connected to the server

Restore Database Restore an InterBase database

Server: Local Server

Database: employee.gdb

User: SYSDBA

The IBConsole application allows you to open multiple windows to look at detailed information, such as the tables window depicted in Figure 15.3. In this window, you can see lists of the key properties of each table (columns, triggers, constraints, and indexes), see the raw metadata (the SQL definition of the table), access permissions, have a look at the actual data, modify it, and study the dependencies of the table. Similar windows are available for each of the other entities you can define in a database.

FIGURE 15.3:

IBConsole can open separate windows to show you the details of each entity— in this case, a table.

Properties for: EMPLOYEE

I EMPLOYEE

Properties Metadata Permissions Data Dependencies gl

I EMPLOYEE

Properties Metadata Permissions Data Dependencies

HJ í| 1

H ri ij

Name

Type

Character Set Collation Default Value

Allow Nulls

EMP NO

(EMPNO) SMALLINT

No

FIRST NAME

(FIRSTNAME) VARCHAR(15]

No

LAST NAME

(LASTNAME) VARCHAR(20)

No

PHONE EXT

VARCHAR(4)

Yes

HIRE DATE

TIMESTAMP K

DEFAULT 'NOW'

No

DEPT NO

(DEPTNO) CHAR(3)

No

JOB CODE

(JOBCODE) VARCHAR(5)

No

JOB GRADE

(JOBGRADE) SMALLINT

No

JOB COUNTRY

(COUNTRYNAME) VARCHAR(15)

No

SALARY

(SALARY) NUMERIC(15,2)

DEFAULT 0

No

FULL NAME

VARCHAR

Yes

C:\..AeHamples\DatabaseVemploiJee.gdb Tables

C:\..AeHamples\DatabaseVemploiJee.gdb Tables

Finally, IBConsole embeds an improved version of the original Windows Interactive SQL application (see Figure 15.4). You can directly type a SQL statement in the upper portion of the window (without any actual help from the tool, unfortunately) and then execute the SQL query. As a result, you'll see the data, but also the access plan used by the database (which an expert can use to determine the efficiency of the query) and some statistics on the actual operation performed by the server.

This is really a minimal description of IBConsole, which is a rather powerful tool and the only one included by Borland with the server besides command-line tools. IBConsole is probably not the most complete tool in its category, though. Quite a few third-party InterBase management applications are more powerful, although they are not all very stable or user-friendly. Some InterBase tools are shareware programs, while others are totally free. Two examples, out of many, are InterBase Workbench (www.interbaseworkbench.com) and IB_WISQL (done with and part of InterBase Objects, www.ibobjects.com).

FIGURE 15.4:

The Interactive SQL window of IBConsole allows you to try out in advance the queries you plan to include in your Delphi programs.

' I Interactive SQL - employee.gdb

File Edit Query Database Transactions Windows Help

^imJx

[select las^name,, hire_date, salary from employee where salary > 200000

lJ_I

I Client dialect 1 ¡Transaction is ACTIVE. |AutoDDL: ON

Data Plan Statistics

I Client dialect 1 ¡Transaction is ACTIVE. |AutoDDL: ON

Data Plan Statistics

LAST NAME

1 HIF!E_DATE

SALARY

Bender

1Ü/S/1992

212850

Ichida

2/4/1993

6000000

Yamamoto

7/1/1993

7490000

Ferrari

7/12/1993

99000000

Glon

9/23/1993

390500

-

  1. AInterBase6\exarnples\Database\ernployee.gdb
  2. AInterBase6\exarnples\Database\ernployee.gdb

TlP To find the latest third-party InterBase tools, have a look at www.interbase2000.org/tools, which hosts an up-to-date list.

Self Publishing a Book The Easy Way

Self Publishing a Book The Easy Way

This comprehensive guide will present you with a variety of self-publishing options and explore their viability. Well take a look at all types of books and book-delivery systems.

Get My Free Ebook


Post a comment