Overview of Command-line Tools

From InterBase

Go Up to Introduction to Operations

For each task that you can perform in IBConsole, there is a command-line tool that you can run in a command window or console to perform the same task.

The UNIX versions of InterBase include all of the following command-line tools. The graphical Windows tools do not run on a UNIX workstation, though you can run most of the tools on Windows to connect to and operate on InterBase databases that reside on UNIX servers.

An advantage of noninteractive, command-line tools is that you can use them in batch files or scripts to perform common database operations. You can automate execution of scripts through the scheduling facility of your operating system(cron on UNIX, AT on Windows). It is more difficult to automate execution of graphical tools.


The isql tool is a shell-type interactive program that enables you to quickly and easily enter SQL statements to execute with respect to a database. This tool uses InterBase Dynamic SQL mechanism to submit a statement to the server, prepare it, execute it, and retrieve any data from statements with output (for example, from a SELECT or EXECUTE PROCEDURE). isql manages transactions, displays metadata information, and can produce and execute scripts containing SQL statements.

See Interactive Query for full documentation and reference on isql and using isql from IBConsole.


The gbak tool provides options for backing up and restoring databases. gbak now backs up to multiple files and restores from multiple files, making it unnecessary to use the older gsplit command. Only SYSDBA and the owner of a database can back up a database. Any InterBase user defined on the server can restore a database, although the user must be SYSDBA or the database owner in order to restore it over an existing database.

Note: When you back up and restore databases from IBConsole on Windows platforms, you are accessing this same tool through the IBConsole interface.

See About InterBase backup and restore options for full documentation and reference on using gbak.


gfix configures several properties of a database, including:

  • Database active/shutdown status
  • Default cache allocation for clients
  • Sweep interval and manual sweep
  • Synchronous or asynchronous writes
  • Detection of some types of database corruption
  • Recovery of unresolved distributed transactions

You can also access all the functionality of gfix through the IBConsole graphical interface. Only SYSDBA and the owner of a database can run gfix against that database.

See Database Configuration and Maintenance for descriptions of these properties, and a reference of the gfix tool.


You can configure authorized users to access InterBase servers and databases with gsec. You can also perform the same manipulations on the security database with IBConsole.

See Database User Management for full details and reference.


gstat displays some database statistics related to transaction inventory, data distribution within a database, and index efficiency. You can also view these statistics from IBConsole. You must be SYSDBA or the owner of a database to view its statistics.

See Database Statistics and Connection Monitoring for more information on retrieving and interpreting database statistics.

iblockpr (gds_lock_print)

Note that the gds_lock_print utility is deprecated and is not included with some versions of InterBase.

You can view statistics from the InterBase server lock manager to monitor lock request throughput and identify the cause of deadlocks in the rare case that there is a problem with the InterBase lock manager. The utility is called gds_lock_print on the UNIX platforms, and iblockpr on the Windows platforms.

See Database Statistics and Connection Monitoring for more information on retrieving and interpreting lock statistics.


On UNIX servers, use the ibmgr utility to start and stop the InterBase server process. See the section Using ibmgr to Start and Stop the Server for details on using this utility.

Advance To: