Citation: Copyright © 1999 InterBase Software Corp. All rights reserved. Please obtain permission before copying InterBase help text.


Server|Security
User Security

Use this dialog for creating, removing and  modifying users on a local or remote server.  To open the user security dialog box, log in to the server, highlight it in the tree and select Server · User Security from the main menu.

Privilege Requirements

Users require INSERT, UPDATE and/or DELETE privileges in the Users table of the security database in order to be able to add, modify or remove users, respectively.  Initially, only the SYSDBA has these privileges.

Creating New Users

1.	Press New to prepare the form for accepting a new user.

1.	Enter a User Name for the new user.  User names are restricted to 31 standard ASCII characters, but must not contain spaces.

1.	Enter a password for the new user in the Password input box.  This will be the new user's initial password.

1.	Retype the password in the Confirm Password input box to ensure that the correct password was entered.

1.	Enter Optional Information, if desired, which includes the user's First Name, Middle Name, and Last Name.

1.	Press the Apply button to create the new user in the security database.

1.	Repeat steps 1. to 6. for each new user to be created.

1.	Press Close when finished with user security.

When the Apply button is pressed, the data entered is validated and the operator is notified of any errors.  If there are any errors, an error message will appear with details of the error, and you will have a chance to make changes before trying again.  The list of users in the User Name drop down list is refreshed in order to reflect the latest transaction.

Modifying and Removing Users

1.	From the User Name drop-down list, select the User Name to be modified or removed.  The remaining input boxes are filled in with the information stored for that user.

1.	If modifying the user, make the changes to the password and/or optional information and press Apply.  If it is necessary to change a User Name, you will have to delete the old User Name and create a new user with the new User Name.  You must have the UPDATE privilege on the Users table in the security database, or the transaction will fail.

1.	If removing the user, press Delete.  You must have the DELETE privilege on the Users table in the security database, or you will get an error.

When the Apply button is pressed, the changes are validated and the operator is notified of any errors.  If there are any errors, a message will appear with details of the error and you will have a chance to make changes.  When a user is deleted, the list of users is refreshed to reflect the latest transactions.

Notes:

•	The User Name and Password are restricted to ASCII characters.

•	The User Name can be up to 32characters and IS NOT case sensitive.

•	The Password can be up to 31 characters and IS case sensitive.

•	First, Middle and Last names can be up to 32 characters.


Server|Login
Server Login

Related Topics

Logging in to a server allows you to access the databases on that server.  You need to first register the server that you want to log in to.  Login to a registered server by highlighting it in the server tree and selecting Server · Login from the main menu.

Privilege Requirements

A User Name and Password that exist in the security database of the respective server are required to log in.

Logging In

Enter your InterBase server User Name as provided by your InterBase administrator.  The User Name is required to access the server.

Enter your InterBase server Password.  The correct password is required to access the server.

Finally, click Login to attempt to log in to the server using the supplied information.


Database|Register
Register Database

Related Topics

In order to be able to connect to a database, it must be registered first.  Registering a database adds it to the server/database tree as a branch of the corresponding server.  Select Database | Register from the main menu to open the Register Database and Connect dialog box.

User Privileges

You must be logged in to the corresponding server before being able to register a database.  A valid User Name and Password are required to log in to a server .

The Register Database and Connect dialog box

In the Alias Name field, enter a name for the database about to be registered.  This name will be added to the server/database tree on the IB Console main form and is used to access the database specified in the File field.  If the alias is left blank, the name of the database file will be used to fill it in.

In the File field, type the absolute path to the Interbase database file (*.gdb).  If registering a database on a local server, you can use the browse button, [image], to select it by using a file selection dialog box.  If registering a remote database, use the path as provided by the database administrator.

You have the option of logging in to the database at the same time as you register it.  Do so by entering your User Name and Password in the respective fields.

Un-Register Database

Connect To A Database

Related Topics


Server|Certificates
Managing Certificates

Managing certificates consists of adding and removing certificates.  Server Certificates are displayed by selecting the Certificates branch on  the corresponding server.

User Privileges

You must be logged in to the server before these options become available.

 Adding Certificates

1.	Highlight the Certificates branch of the desired server.

1.	Select Server · Add Certificate… from the main menu.

1.	Enter the Certificate ID and Certificate Key from your service license pack in the Add Certificate dialog.

1.	Click OK to add the certificate.  The list of Certificates in the Summary view is updated to reflect the additional certificate.

Removing Certificates

1.  Highlight the Certificates branch of the desired server.

2.  Highlight the Certificate on the Summary page that is to be removed.

3.  Select Server · Remove Certificate.  The Summary list is updated to reflect the change.


Featuresl|Diagnostics
Diagnose Connections

This tool lets you troubleshoot your communications setup by testing for network and/or server problems.  The following tests are available:

•	Interbase database connections

•	TCP/IP connections

•	NetBEUI connections

•	SPX/IPX network configurations.

User Privileges

All users can run a communications diagnostic, however a valid User Name and Password combination that matches an entry in the security database of the selected server is required to do a Database Connection Test.

DB Connection tab

This diagnostic tool allows a user to check their database connection information after network connectivity has been confirmed.  To confirm network connectivity, use the appropriate network protocol tester.

To run a Database Connectivity Test

1.	Provide the Server Information required to communicate with the desired server.  Choose the locale – Local or Remote – of the server. If connecting to a remote server, enter the Server Name and the Network Protocol (choose from the dropdown listbox). If you choose Local, no more information is needed.

1.	Enter the name of a database into the Database field or press the browse button and use the Open File dialog box to locate the database file.  The database file must be located on the server specified.  The connection will be refused if the database file resides on a networked or mapped drive.

1.	Enter a valid User Name and Password.

1.	Click Test, and review the output in the Results window.

Notes:

•	InterBase Server must be running on your machine before you can connect to a local database.

•	Local connection mode is not available on UNIX servers.

•	A database file must not reside on an NFS (networked filesystem) or a mapped drive. When the server finds such a case, it either denies the connection or passes the connection request on to the InterBase service running on the networked file server, if there is one.  To correct this situation, move your database (gdb file) to a hard disk that is physically local to the database server.

•	For a Windows NT or Windows 95/98 server, the database path must contain the appropriate drive letter designation. For example: D:\users\accting\fin\accrec.gdb

•	For a Unix server, you must enter the complete and absolute directory path for the database. You must also provide the hostname; the SuperServer architecture necessarily disables the local database attachment configuration. For example: jupiter:/usr/accting/fin/accrec.gdb

•	UNIX paths are case sensitive.

•	The server process must have permissions to read and write the database file at the operating system level.

•	The security database that contains users and passwords must also be writeable by the server process.

•	The server process must have permissions to create files in the InterBase home directory. It must be able to write to, and perhaps create, the log file and other temporary files.

NetBEUI tab

This test lets you diagnose NetBEUI connectivity between the client and the server. This test checks the network, not the Interbase server or client software configuration.

To run a NetbBEUI diagnostic:

1.	Enter the name of a Windows NT server on which InterBase has been installed.

1.	Click Test, and review the output in the Results window.

Notes:

•	NetBIOS Extended User Interface is supported on Windows NT and Windows 95/98 clients, but only Windows NT supports NetBEUI as a server.

•	To connect via NetBEUI (Windows NT servers only), use UNC notation: \\venus\D:\users\accting\fin\accrec.gdb

•	The connection may fail if a Microsoft Windows network is not the default network for the client. You should also be logged into the MS Windows network with a valid NT user name and password.

•	NetBEUI cannot route network traffic between subnets. Other protocols can also be configured to restrict traffic between subnets. If the client and server are on a complex network with multiple subnets, ask your network administrator if the network configuration allows you to route network traffic between the client and server in question using a given protocol.

•	NetBEUI is often confused with NetBIOS.  NetBIOS is the application programming interface and NetBEUI is the network transport protocol used by all of Microsoft's network systems and IBM's LAN Server based systems.

SPX tab

This test lets you diagnose SPX/IPX connectivity between the client and the server. This test checks the network, not the Interbase server or client software configuration.

To run a SPX/IPX diagnostic:

1.	Enter the name of a Novel NetWare server on which InterBase has been installed.

1.	Click Test, and review the output in the Result window.

Note:	Sequenced Packet Exchange (SPX) is a network transport protocol built on top of IPX. SPX is used in Novell NetWare systems for communications in client/server application programs; SPX/IPX perform equivalent functions to TCP/IP.

TCP/IP tab

This test lets you diagnose WinSock TCP/IP connectivity between the client and the server. This test checks the network, not the Interbase server or client software configuration.

To run a TCP/IP diagnostic

1.	Enter the name of an InterBase server (the unique name by which a computer on which InterBase has been installed is known on a network) in the ”Host” – input box.

1.	Choose a service name or number from the dropdown Service list.  See Ping Options for details of the ping service.

1.	Click Test, and review the output in the Result window.

Notes:

•	Internet hostnames consist of an ASCII string, e.g. "wombat.doc.ic.ac.uk" which, consists of a local part (wombat) and a domain name (doc.ic.ac.uk). The hostname is translated into an Internet address either via the /etc/hosts file, NIS or by the Domain Name System (DNS) or resolver. It is possible for one computer to have several hostnames (aliases) though one is designated as its canonical or real name.

•	InterBase clients must specify the server by name, not by IP address. Therefore, the client must be able to resolve the server’s hostname. For TCP/IP, this is done either by maintaining a hosts file on the client with the mappings of hostnames to IP addresses, or by the client querying a DNS server or WINS server to resolve this mapping. Make sure the name server has a correct entry for the server host in question.

•	If the database server is behind a software or hardware firewall, all network traffic may be restricted and the client may not be able to reach the server at all.

•	If the server process on the server has not started, there will be no response to attempts to connect to the gds_db service.

•	The services file must have correct entries to indicate the port number associated with the named service gds_db, This configuration must be accessible on the client as well as the server.

Possible error messages and corresponding actions

•	If the error message is “Failed to find named port, then check your services file to be sure there is an entry for gds_db in the form: gds_db 3050/tcp

•	If the error message is “Failed to connect to the host”, then check

- Hostname, port 3050

- The server to make sure it is installed properly, is running, and is configured for TCP/IP

•	If the error message is “Failed to resolve hostname”, then check

- Hostname

- Your hosts file or DNS to be sure it has an entry for the server

- That you used a hostname and not an IP address

•	If the error message is “Unavailable database”, then check whether the InterBase server is running; the server must be running before attempting a database connection

“Ping” Option

If you want to diagnose the low-level network access between the client and the server, select Ping as the service when performing a TCP/IP test.

This lets you quickly test whether the client cannot reach the server because of a physically disconnected network or improper network software configuration, by using the ping command - a program used to test the ability to reach destinations by sending them one, or repeated, ICMP echo requests and waiting for replies. Since ping works at the IP level its server-side is often implemented entirely within the operating system kernel and is thus pretty much the lowest level test of whether a remote host is alive. Ping will often respond even when higher level, TCP-based services cannot.

Notes:

•	Error messages from ping indicate that there is a network problem. Check that the network is plugged in, that the network wires are not damaged, and that the client and server software is properly configured.

•	Test connectivity from the client in question to another server; if it succeeds, this may rule out improper network configuration on the client.

•	Test connectivity from another client to the InterBase server host; if it succeeds, this may rule out improper network configuration on the server.


Database|Create
Create Database

Once a server is registered, you can either register existing databases or create new ones.  Use this dialog to create a new database on a local or remote server.  Highlight the destination server in the server/database tree and select Database · Create from the main menu.

User Privileges

You must be a valid user on the server and you must have permission to create files on the destination drive.

Creating a database

In the Alias field, enter a name by which you would like to refer to this database.  The Alias is displayed in the server/database tree.

Enter the filename(s) of the database you wish to create, including the full directory path appropriate for the type of server on which you are creating the database.  If you are creating a database on a local server, the browse button, [image], will be enabled, giving you the option of selecting the path using a file selection dialog box.  When creating a database on a remote server, you must specify an absolute path on the remote machine.  If you want to create a multi-file database, enter the first file on the first line of the grid, and any secondary files on subsequent lines.  All files, except the last or only one, require a size and unit to be specified.

Important!:	The database files must be located on the same machine as the server on which it is being created.  If the path is on a different machine, the operation will be passed to the InterBase server running on that machine, if there is one.  An Interbase database cannot be created on a

Database Options

The options grid displays all available database options and their respective default values.  To select a different value for a particular option, highlight the value and click on the drop down triangle and select the desired value.  Repeat for any options that you would like to set to other than it's default.

Finally, press OK to create the database.  IB Console will attempt to create the database on the server host specified and will add the alias to your server/database tree if it is successful.


Database|Properties
Database Properties

The database properties window consists of two tabbed pages, Alias and Properties.

Alias tab

Alias Name	The name under which the database file has been registered.  This name can be edited.
File	The name and directory path of the actual database file.
General tab

Owner	The User Name of the user who owns the database, usually the creator.
Secondary Files	List of locations of secondary database files.
Start Page	Corresponding list of secondary file start pages.
Allocated DB Pages	The number of pages currently allocated to the database.
Page Size	The physical size, in bytes, of each database page.
Additionally, you can configure the following Options:

Forced Writes	When an InterBase Workgroup Server performs forced writes (also referred to as synchronous writes), it physically writes data to disk whenever the database performs an (internal) write operation.  If forced writes are not enabled, then even though InterBase performs a write, the data may not be physically written to disk, since operating systems buffer disk writes. If there is a system failure before the data is written to disk, then information can be lost.  Performing forced writes ensures data integrity and safety, but will slow performance. In particular, operations which involve data modification will be slower. Set this option to Enabled to enable forced writes.  Select Disabled to disable forced writes.  InterBase for NetWare has a feature called the write-ahead log (WAL) which performs much the same function as forced writes. If a database is using WAL, then it is not necessary to enable forced writes to ensure data integrity. Therefore, forced writes will be automatically disabled when WAL is enabled for a database. Conversely, when WAL is disabled (dropped), forced writes are automatically re-enabled. You can manually override these defaults by enabling and disabling forced writes in the Database Properties dialog box.
Caution:	If neither WAL nor forced writes are enabled for a database, then the database will be subject to data loss if there is a hardware or other system failure. In general, it is best to have at least one of these features active.
Sweep Interval	To set the automatic sweep interval, type the number of transactions between each database sweep in the Sweep Interval field.  For example, to set the sweep interval to 10,000 transactions, type 10000 in the text field.  To disable automatic sweeping, set the sweep interval to 0.  You can manually perform a sweep at any time.  The sweep interval can be any value within the range of 0 to 200 000.
Read Only	When 'True', the database will only accept SELECT queries while attempts to insert or update records will fail.  Set to 'False' to enable full database functionality.


Database|Activity
Database Connections

Provides a list of all users, identified by their User Name, currently connected to the selected database.  Click OK to close the window.


Database|Validation
Database Validation

When IB Console validates a database it verifies the integrity of data structures. Specifically, it will:

•	Report corrupt data structures.

•	Report misallocated data pages.

•	Return orphan pages to free space.

Perform database validation when database errors have occurred or any time you suspect data corruption.  After highlighting and shutting down a database, select Database · Maintenance · Validation from the main menu to validate a database.

Privilege Requirements

A database must be shut down before it can be validated.  Only the SYSDBA and database owner can shut down a database .

Options

Validate Record Fragments	When set to False, database validation reports and releases only page structures. When you select True, validation reports and releases record structures as well as page structures.  This option can further reduce the size of a database at the expense of a longer validation time.

Read-Only Validation	Examines the database for unreleased pages and creates a report.  The database is not altered.  Cannot be true if Validate Record Fragments is also true.

Ignore Checksum Errors	Allows the validation to continue even if checksum errors exist.  This must be done before a database with checksum errors can be backed up.


Database|Backup
Database Backup

Restore

Databases should be backed up on a regular basis to allow minimal data loss in the event a database is damaged or destroyed.  In the case of such an event, often the only method of restoring or repairing a database is from a backup.  Being prepared with a recent backup can be the only way to avoid massive loss of data.  Highlight the database you want to backup and select Database · Backup from the main menu.

Privilege Requirements

A valid User Name and Password combination is required to connect to the selected server.  SELECT privilege on every table in the database, including system tables, is required to successfully complete a database backup.

Database Backup Dialog

Database

Server	Identifies the selected server.
Alias	Specifies the selected registered database.  Use the drop down button to display a list of registered databases (aliases), from which you can select the desired one.

Backup File(s)

Server	The alias of the InterBase Server where the backup files will be written.  Select one from the drop down menu or select <<new>> to backup to a server that is not registered.  InterBase Server must be running on the server selected.
Note:	InterBase Server must be running on the specified backup server or the task will fail.
Alias	When backing up a database, the information you enter is stored with this alias name.  To re-use the same information from this session for subsequent backups, select the alias from the drop down menu.  All of the backup information, including backup server, filenames and sizes, and options, will be re-loaded.
Filename(s) & Size	This grid is used to specify single or multi-file backups.  Each backup file requires its own name and size (the size for the last or only file can be omitted).  To backup to a single file, enter the filename, including the full path, into the first row in the table.  For subsequent files, enter the filenames below the first one in the table.
Options

Format	Selecting Transportable allows you to move a database to a machine with a different operating system from the machine on which the backup was performed.  Select this option to write data in  a generic format to enable you to restore the database to any machine that supports InterBase. To transfer a database to a server running on a different operating system: 1. Select the Transportable Format option in the Database Backup dialog. 2. Backup the database. 3. Make the backup file available on the destination system. 4. Restore the backup file to the destination system. Select Non-Transportable to create a backup file for use only on the current server host.  This option generally creates a faster backup, but is less flexible in its restore options.
Metadata Only	Set this option to True to exclude the data when backing up a database, saving only its metadata (the structure of tables, keys, triggers, etc.)  You might want to do this to: • Retain a record of the metadata before it is modified. • Create an empty copy of the database.  The copy has the same metadata but can be populated with different data. Set to False to backup the data as well as the metadata.
Garbage Collection	Set to True (the default) to instruct IB Console to perform garbage collection during a backup.  To prevent garbage collection during a backup, set to False. Garbage collection marks space used by old versions of data records as free for reuse.  Generally, you want IB Console to perform garbage collection during backup, as the resulting database file may be smaller. See Sweeping a Database for more details on garbage collection.
Tip:	You do not want to perform garbage collection if there is data corruption in old record versions and you want to prevent InterBase from visiting those records during a backup.
Transactions in Limbo	Limbo transactions are usually caused by the failure of a two-phase commit.  They can also exist due to system failure or when a single-database transaction is prepared.  This option tells IB Console how to deal with limbo transactions.  Set this option to Ignore to ignore limbo transaction during a backup.  Set to Process to be able to commit or rollback transactions in limbo. When IB Console ignores limbo transactions during backup, it ignores all record versions created by any limbo transaction, finds the most recently committed version of a record, and backs up that version. When processing transactions in limbo, if IB Console finds a transaction in which the first-phase was committed, but not the second phase, it will suggest that the transaction be committed.  If it finds that the first phase was not committed, it will suggest that the transaction be rolled back. Before backing up a database that contains limbo transactions, it is a good idea to perform a Transaction Recovery operation.
Checksums	A checksum is a page-by-page analysis of data to verify its integrity.  A bad checksum means that a data page has been randomly overwritten; for example, due to a system crash. Checksum errors indicate data corruption, and InterBase normally prevents you from backing up a database if bad checksums are detected.  Examine the data the next time you restore the database. Set this option to Ignore during a backup, which may be necessary to complete a backup.  Set to Process to stop the backup should any checksum errors occur.
Convert To Tables	Converts external database files to internal tables, which are then included as part of the backup.
Verbose Output	To monitor the backup process as it runs, set this option to True.  This option opens a standard display window to display status messages in addition to the standard output.  When set to False, the backup window displays the time that the backup process starts, the time it ends and any error messages.


Database|Restore
Database Restore

Backup

Restore a database from a backup after database corruption or major security breach or some other undesirable activity has taken place which has compromised database integrity.  Select Database · Restore from the main menu to access the restore database dialog box.

Privilege Requirements

You must have permission to drop an existing database before you will be able to restore it.  Adequate access to the backup file(s) is also necessary.

Database Restore Dialog

Backup File(s)

Server	Indicates the alias of the current server, the one that was highlighted prior to opening the Restore dialog.  The backup files must be located on this server.
Alias	Indicates the backup configuration being used.  To load a previously saved backup configuration, enter the alias here or select it from the drop down menu.  Enter a new alias name to save the settings for use again later.
Filename(s)	This  table contains the locations of the backup files on the current server.  The first or only backup file is specified on the first line of the table.  Any subsequent filenames should be entered below the first one.  When the database is in use, the files are filled in the order that they appear in this table, top to bottom.
Database

Server	Specifies the alias of the InterBase server to which you want to restore the database.
Alias	Indicates an alias of an existing database.  Selecting an alias from the drop down menu will automatically load it's associated file information.  Leave blank if restoring a database that does not exist.
Filename(s) & Size	This table specifies the database files being restored.  Each file must be an absolute path on the database server.  For each file, specify the maximum size of each file (not necessary for the last or only file) in bytes. If the database files do not exist, a new database is created.  If they do exist, then the old files may be overwritten, depending on the setting of the Overwrite option.  If you specified a database alias, the file names and sizes are loaded automatically.  Making changes to such a list of files will cause the old database files to be deleted and the restored database will consist of the files specified here.
Options

Page Size	Select a different page size if you want to override the default page size of 1024.  Available sizes are 1024, 2048, 4096 and 8192.  Increasing page size can improve performance for several reasons: • Indexes work faster because the depth of the index is kept to a minimum. • Keeping large rows on a single page is more efficient.  A row that is too large to fit on a single page requires more than one page fetch to read or write to it. • BLOB data is stored and retrieved more efficiently when it fits on a single page. If an application typically stores large BLOB columns (between 1K and 2K), a page size of 2048 bytes is preferable to the default (1024). • If most transactions involve only a few rows of data, a smaller page size may be appropriate, since less data needs to be passed back and forth and less memory is used by the disk cache.
Overwrite	Tells IB Console how to treat any existing database files.  If set to True, IB Console will replace any existing database files.  If set to False (the default) and you attempt to restore to existing database files, IB Console will not replace the existing files, and the restore will fail.
Caution:	Replacing an existing database is discouraged. When restoring to an existing file name, a safer approach is to rename the existing database file, restore the database, then drop or archive the old database as needed.
Commit After Each Table	Normally, the Server Manager restores all metadata before restoring any data. If you set this option to True, IB Console restores the metadata and data for each table together, committing one table at a time.  This option is useful when you are having trouble restoring a backup file; for example, if the data is corrupt or invalid according to integrity constraints.  If you have a problem backup file, restoring the database one table at a time lets you recover some of the data intact. You can restore only the tables that precede the bad data; restoration fails the moment it encounters bad data.
Create Shadow Files	To restore a database without restoring its shadow, set this option to False. You might want to do this if: • You are restoring from a server that supports shadows to a server type that does not support shadows. • The database you are restoring is a copy of an existing database that has a shadow. • You are migrating a database from InterBase version 3.3 to a version 4.0 server that does not support shadows. • The shadow would end up on a machine that is unavailable to the database (due to a network failure, for example). When a database is restored without its shadow, the definition of its shadow is deleted in the restored database. You can then create a new shadow if you like (if you are logged on to a server that supports shadowing), specifying a new name or new location as appropriate.
Deactivate Indices	Normally, InterBase rebuilds indices when a database is restored. If the database contained duplicate values in a unique index when it was backed up, restoration will fail. Duplicate values can be introduced into a database if an index was temporarily made inactive (for example, to allow insertion of many records or to rebalance an index).  To enable restoration to succeed in this case, set the Deactivate Indices option to True. This makes indices inactive and prevents them from rebuilding. Then, eliminate the duplicate index values and re-activate indices through ALTER INDEX in the ISQL tab. A unique index cannot be activated using the ALTER INDEX statement; a unique index must be dropped and then created again. For more information on activating indexes, see the online SQL Reference.
Note:	The Deactivate Indices option is also useful for bringing the database online more quickly. Data access will be slower until the indexes are rebuilt, but at least the database is available. After the database is restored, users can access the database while you reactivate the indexes.
Validity Conditions	If you redefine validity constraints in a database where data is already entered, your data might no longer satisfy the validity constraints. You might not discover this until you try to restore the database, at which time an error message about invalid data appears. To restore a database that contains invalid data, set the Validity Conditions option to Ignore. This option deletes validity constraints from the metadata. After the database is restored, change the data to make it valid according to the new integrity constraints. Then add back the constraints that were deleted. This option is also useful if you plan to redefine the validity conditions after restoring the database. If you do so, thoroughly test the data after redefining any validity constraints.
Verbose Output	To monitor the restore process as it runs, set Verbose Output to True. This option will open a standard text display window to display status messages on the screen.  The standard text display window enables you to search for specific text, save the text to a file, and print the text to a printer.


General|Overview
IB Console Overview

InterBase Console is an all-in-one database tool.  It combines database administration, SQL interactivity and network communications testing capabilities in one easy to use application.

IB Console provides you with the ability to:

•	Manage local and remote servers.

•	Manage server security: authorize new users, change user passwords, and remove user authorizations.

•	Manage server certificates.

•	Manage database files: create new databases, set database properties.

•	Back up and restore databases.

•	Perform database maintenance: validate the integrity of a database, repair a corrupted database, sweep a database, and recover "limbo" transactions.

•	Shut down and restart a database.

•	Execute SQL interactively.

•	View database metadata in SQL script format.

All from within a single graphical application!

The IB Console window consists of:

•	A menu bar, across the top of the window, containing commands you choose to perform tasks.

•	A number of  toolbars , just below the menu bar, containing shortcut buttons to perform common menu commands.

•	A status bar , at the bottom of the window, that shows the currently selected server and database, and the User logged in.

•	The left pane, which displays registered servers and databases and their various sub-categories in an Explorer style server/database tree.  User-friendly icons located next to the names of servers and databases provide a quick indication of which servers and databases you are currently connected to.

•	The right pane, which contains a number of dynamic, user selectable tabbed pages.  Available pages include Summary, Actions, ISQL, SQL Script, Dependencies, Definition and even one for viewing table Data.


General|Print
Printing

Selecting File · Print opens the Print dialog box.  You can specify which printer to print to, the number of copies to print and collating sequence.  Finally, click OK to print the desired data, or Cancel to exit the dialog without printing.

Printer	Use the drop down printer name menu to select the printer to use.  The Properties button opens the configuration software for the selected printer.
Print Range	The print range is set to All.  You cannot change the amount of text printed in this release of IB Console.
Copies	Specify the number of copies to print by clicking on the Number of copies text box and using the keyboard to enter the number, or use the up/down scroll buttons to increment or decrement the current value by +/- 1.
Collate	When printing more than one copy of data that spans several pages, you may want to collate the printed pages.  Collating prints the data in order the specified number of times.  With collating turned off, each page is printed the specified number of times before the next page is printed.  Click the box next to Collate to turn collating on or off.


General|Printer Setup (obsolete)
Printer Setup (obsolete)

Use the Printer Setup dialog box to specify how printed pages will appear.

Printer

Use the drop down printer name menu to select the printer to use.

The Properties button opens the configuration software for the selected printer.

Paper

Select the size of paper to print to from the Size drop down menu.  The content will be formatted to fit the selected paper size.  Make sure that the size you select is loaded into the printer before you begin printing.

Set the paper Source to the tray containing the selected paper size.  If you are going to feed the paper one-at-a-time, select a manual feed option.

Orientation

Set the direction that you want the text to be printed.  To make the narrow edge of the paper the top of the document (the default and most common), select the Portrait radio button.  To make the wide edge of the paper appear at the top, select the Landscape radio button.  Landscape mode can be very useful for printing table data that is too wide to fit the chosen paper size in the regular fashion.

Select File|Print to print the desired data.


General|Exit
Exiting

Select File · Exit when finished using IB Console.  IB Console will automatically disconnect from all connected databases and log out from all servers.


Editing|Undo
Undo

Use the Undo command to cancel the last action performed on an ISQL statement.  Undo can be used to cancel cut, paste and manual typing actions including delete.  Select Edit · Undo from the main menu.


General|Editing
Standard Editing Features

When entering interactive SQL statements, you can apply standard editing features to the text that constitutes the SQL statement.  IB Console makes available the editing capabilities Cut, Copy and Paste to make manual SQL entry as simple as possible.  Additionally, Copy is available when viewing SQL scripts.

Selecting Text

To cut, copy or delete text, you have to select it first.  To select text, use the cursor keys to place the text cursor just before the first character to be selected.  Hold the Shift key while using the cursor keys to move the text cursor to just after the last character to be selected.  The selected text will appear inverted (usually white text on a black background unless your Windows™ settings have been changed).  You can also use the mouse by moving the mouse cursor to the start character and pressing and holding the primary mouse button while moving the mouse cursor to the end character.  To quickly select all of the text, select Edit · Select All or press Ctrl-A on the keyboard.

Cut

Cutting text removes it from its initial location and stores it on the Windows clipboard, available to be retrieved later.  To cut text, select it first and then select Edit · Cut or hit Ctrl-X on the keyboard.  If no text is selected, Cut will not change the contents of the clipboard.  You cannot cut from the read-only SQL-Script tab.

Copy

Copying text stores the selected text on the Windows clipboard, available for use later, but leaves the initial text in place.  To copy text, select it first and then select Edit · Copy or hit Ctrl-C on the keyboard.  If no text is selected, Copy will not change the contents of the clipboard.

Paste

Pasting takes the contents of the Windows clipboard and inserts it at the current text cursor location.  Use Cut or Copy to place the desired text on the clipboard.  Paste does not clear the clipboard, so the contents can be pasted as many times as necessary.  To paste the contents of the clipboard, select Edit · Paste or hit Ctrl-V.  You cannot paste to the read-only SQL-Script tab.

Clear Text

To clear the contents of the ISQL editing area, select Edit · Clear Text.  This can also be accomplished by pressing Ctrl+A,Ctrl+Z or Ctrl+A,Delete on the keyboard.

You can undo a Cut, Paste or delete action.

All editing features can be accessed from the Edit toolbar


Editing|Find
Find

When working with long ISQL statements, you may want to quickly locate specific text, such as a table name or the beginning of a where clause or group by.  The Find feature enables you to quickly locate text in the active window pane.

Select Edit · Find to open the Find dialog box.  Enter the text to find in the Find What text entry box.  Click Find Next to begin the search from the current text cursor location and to find subsequent iterations.  When the search reaches the end of the text, a message appears indicating that the text was not found.  Click OK to close the message and begin the search from the top.  When finished searching, click Cancel.


Server|Register
Registering Servers

Related Topics

Before access to a database is possible, you must provide the information necessary to communicate with the InterBase server.  This process is called "registering" the server.  To register a server, highlight the topmost item in the server/database tree - "InterBase Servers" - and select Server · Register.  This will open the Register Server dialog box.

Privilege Requirements

A server can be registered by anyone with a network connection.  However, a valid User Name and Password, which exist in the server's security database, are required to log in to the server.

Server Information

If InterBase Server is running locally, the Local Server option will be available.  The Remote Server option is always available.

To connect to a locally running InterBase server, click the Local Server radio button.  Local server connections do not require any additional information, so the Server Name and Network Protocol options will be disabled when Local Server is selected.

If the InterBase server is accessed over a network, select Remote Server (default).  When registering a remote server, provide the Server Name (the network name of the server) and select the Network Protocol used by the server (TCP/IP, NetBEUI, SPX/IPX) from the pulldown menu..  The Server Name can be the network name (i.e. dbserv, ibserver) or network address when using TCP/IP (i.e. 200.112.255.0).

A server only needs to be registered once.  Attempts to register the same server more than once will result in an error.  Once a server is registered it will appear in the server/database tree.

Login Information (optional)

To log in to the server immediately after registering it, provide your User Name and Password, as provided by your InterBase administrator.  To log in to an already registered server, highlight the server name in the tree and select Server · Login.

Click OK to register the server with the provided information.


Server|Un-Register
Un-Registering Servers

Related Topics

Un-registering a server removes it and all databases within from the server/database tree.  To un-register a server, highlight it in the tree and select Server · Un-Register.  A confirmation dialog box will appear, asking you if you are sure you want to un-register the server.  Click OK to un-register the server and all databases registered to it.  Any active database connections will be disconnected, and you will be logged out of the server if you were logged in.


Server|Logout
Server Logout

Related Topics

It is recommended that users log out of a server when leaving their terminal unattended to prevent others from making unauthorized changes. To log out of a server, highlight it in the server tree and select Server · Logout.  Logging out of a server will disconnect any databases currently connected.


Server|Server Log
Server Log

The server log stores records of server events, such as users connecting and disconnecting.  To view the current server log, highlight the desired server and select Server · Server Log from the main menu.


Server|Administration Log
Administration Log

The administration log stores records of backup, restore and repair/validation events.  To view the current administration log, highlight the desired server and select Server · Administration Log from the main menu.


Backup_Configuration|Remove
Remove Backup File

To remove the record of a backup event - a.k.a. a 'Backup Alias' - from the Backup Files branch of a server in the tree, click on the alias of the record to be removed and select Server · Remove Backup File.

Note:	Removing a backup file record does not remove the backup file from disk.  It is a good idea to only remove backup file records if the backup file itself has been removed.


Server|Properties
Server Properties

Selecting Server · Properties opens a dialog box displaying several server attributes and statistics.  The dialog box is divided into two tabs, each displaying different types of information.  The properties on the Alias tab can be edited if the server is not local.  If the server is local, the items on the Alias tab are all diabled.  The statistics displayed on the General tab are informative only, and are not editable here.  The General tab is only visible when logged in to the respective server.  A description of each property or statistic is given in the list below.

Alias

Alias Name	Alias of the selected server.

Host Name	The network name of the InterBase server host.

Network Protocol	The current network protocol being used to connect to the network host.  Disabled when logged in to the server.

General

Version	Release number of the InterBase server software.

Capabilities	List of capabilities for which the server is licensed, including the number of concurrent users.

Attached Databases	List of databases currently connected to the server.  Double clicking one of the databases listed displays the Current Activity for that database.

Number of databases	Number of databases connected to the server.

Number of attachments	Number of concurrent users.


Install Adobe Acrobat


Database|Drop
Drop Database

Dropping a database deletes the database file associated with the alias currently highlighted in the tree, removing both data and metadata. After choosing Database · Drop, a dialog box will ask you to confirm that you want to delete the database.

Privilege Requirements

A database can be dropped only by its owner or the SYSDBA user.

Dropping a database removes the alias from the server/database tree as well.

Caution:	Dropping a database deletes the database file(s) from the server, eliminating all data and metadata in the database.

Create Database

Un-Register Database


Database|Un-Register
Database Un-Register

Related Topics

To remove a database from the server/database tree, you need to un-register it.  To un-register a database highlight it in the tree view and select Database · Un-Register from the main menu.  You will automatically be disconnected if you are currently connected.  Un-registering a database has no effects other than removing it from the server/database tree.

Disconnect Database

Un-Register Server


Database|Connect
Connecting To A Database

Related Topics

Once a database has been registered, you will need to connect to it to be able to view the tables and data and to use ISQL.  Select Database · Connect from the main menu to connect to the highlighted database.

Privileges

You must login to the server before you will be able to connect to a database on the server.  A valid User Name and Password are required to log in to a server.  A valid User Name and Password is also required to connect to the database.  By default, these are the same as used to connect to the server, but a different User Name and Password and optional Role can be specified by selecting Database · Connect As.

The Connect As Dialog Box

After opening the Database Connect dialog box, enter your User Name and Password in the corresponding fields.  The User Name and Password are required to connect to any database.  The optional Role field permits you to connect to the database using a pre-assigned role name.

If you have been assigned one or more roles, and wish to connect using one of them, enter the role in the Role field.  Leaving the Role field blank will connect you to the database using your set of granted privileges, as specified in the RDB$USER_PRIVILEGES system table.


Database|Disconnect
Database Disconnect

Related Topics

To disconnect a database, highlight the database in the server/database tree and select Database · Disconnect from the main menu.  You are asked to verify that you want to disconnect from the database.  Click OK to disconnect immediately.


Scripts|Load
Load Script From File...

To load a script that was previously saved to file, select Query · Load Script From File…  This will display the Open dialog, where you can specify the path and name of the SQL script file to load.

By default, the dialog will display only the files with a .sql extension.  To display files with a different extension, select the appropriate filter from the File of type drop down menu.  To display all files in the current directory, select the All files (*.*) filter.  After selecting the file, or entering the full path into the File name field, click Open to load the file into the text editing area of the ISQL tab.

Save Script To File...


Scripts|Save
Save Script To File...

To save the current script to a file to be retrieved later, select Query · Save Script To File… from the main menu.

This opens the Save as dialog box, allowing you to specify the path and name for the SQL script file.  By default, the filename will be appended with a .sql extension, indicating an SQL script file.  To save the file with a .txt extension, select Text Files (*.txt) from the Save as type drop down menu.  To save the file exactly as entered, without altering the name, save it as type All Files (*.*).  Press Save on the Save as dialog box to save the script to the specified file.

Load Script From File...


Scripts|History
Traversing the History List of Scripts

IB Console automatically maintains a history list of all SQL scripts executed during a session.  Every script stored in the list can be accessed and reused.  When traversing through the list of executed scripts, they are loaded into the text area immediately.

Previous Script

To move backwards through the history list select Query · Previous Script from the main menu.  This will load the previous item in the history list into the text area of the ISQL tab.  The Previous Script option becomes disabled after reaching the last (oldest) item in the history list.

Next Script

To move forwards through the history list, select Query · Next Script from the main menu.  This will load the next item in the history list into the text area of the ISQL tab.  The Next Script option becomes disabled after reaching the top of the history list, which is a new, blank script.

The script can then be executed, with or without modification.


Scripts|Save Results
Save Output To File...

After executing an SQL statement you may want to save the results in a file.  This is called Exporting in IBConsole.  To export the current result set, select Query · Save Output To File… from the main menu.  This opens the Export To dialog box, allowing you to specify the path and the name of the file.

By default, the export file will be saved with a .txt extension, which can be disabled by selecting All Files (*.*) from the Save as type drop down menu.  Press Save on the Export to dialog to save the data to the specified file.


Transactions|About Committing
About Committing and Rolling Back Work

SQL consists of two distinct types of statements:

•	Those which affect the structure of a database, metadata, including table definitions, referential integrity, indexes, etc.  These statements are part of Data Definition Language SQL statements, or DDL.  Examples of DDL  statements include those which begin with CREATE, ALTER, DROP, etc.

•	Those which affect the data stored in the database.  These statements are part of Data Manipulation Language SQL, or DML.  DML statements include those that begin with INSERT, UPDATE, DELETE, etc.

When an SQL statement is executed, the database stores the transaction in a temporary state until it is committed, which only then makes it permanent.  This allows a statement to be ignored and the initial data to remain unchanged, a process called rolling back a transaction.

IB Console gives you the option of committing DDL statements immediately upon execution.  By default this option is turned on.  To turn off automatic commit after DDL statement execution, choose Query · Session Settings… and uncheck the Auto Commit DDL option.

IB Console does not automatically commit DML statements.  They must be committed manually.

Caution:	When the Auto Commit DDL option is on, executing a DDL statement will also commit any uncommitted DML statements.

Certain activities, such as disconnecting the current database or logging out of the current server, may prompt you to commit any uncommitted transactions.

Manually Committing Work

To commit SQL statements, making them permanent, select Query · Commit Work.  This will commit any uncommitted DML and DDL statements.

Rolling Back Work

To undo any uncommitted SQL statements executed in the current session, select Query · Rollback Work.

Note:	The Query menu is only available when the ISQL tab is the current tab displayed in the right pane of the IB Console window.


General|Shortcuts
Shortcuts and Popups

Throughout this help system, you will find that only one or two methods of accessing the actions and tasks available in IB Console are given.  All tasks can be accessed via the main menu.  However, the rich interface of IB Console provides many additional methods of accessing most features so that you can use IB Console the way you prefer.

Other ways to access most available features include:

•	Toolbars.

•	Popup menus.  Clicking on an item with the secondary mouse button (usually the right button for right-handed users) will cause a popup menu to appear.  Selecting an item from the popup menu will cause the associated dialog box to appear, usually with some or all of the fields filled in with the data of the item you right-clicked on.

•	Double clicking on an item that has an associated popup menu to perform the default action.  The default action is the bold item in the popup menu.

•	Highlighting certain items in the tree causes action items to be displayed in the right pane, under the Actions tab.  Clicking an action item is equivalent to selecting it from the main menu.

•	Highlighting certain items in the tree causes a summary of associated items or instances of the highlighted item to be displayed in the right-pane.  Summary items may also have an associated popup menu.  Right-click to view and select from the popup menu.  Double-click to perform the default action.

Experiment with the objects in the window to become familiar with the locations of controls and to find your favorite way of doing the tasks you perform most often.


Database|Shutdown
Database Shutdown

Only the SYSDBA or the owner of a database may shut it down and connect to it while it is shut down.  To shut down a database:

1.	Select the database that you want to shut down by highlighting it in the server/database tree.

2.	Select Database · Maintenance · Shutdown.

3.	Set the desired shutdown options, detailed below.

4.	Press the "OK" button to shut down the specified database.

Options

Shutdown	This option specifies how the database will be shut down, and consists of three methods: • Deny new connections while waiting – This method prevents connections to the database during the time-out period. At the end of the time-out period, if there are still active connections, then the database is NOT shut down. • Deny new transactions while waiting – This method prevents new transactions against the current database during the time-out period. Denying new transactions will also deny new connections, since a database connection requires a transaction. At the end of the time-out period, if there are still active transactions, then the database is NOT shut down. • Force shutdown after the time-out period  – This method allows the database to be shut down at the end of the time-out period, or as soon as there are no active transactions.  Any uncommitted transactions are rolled back and users are disconnected.
Shutdown Timeout	IBConsole will attempt to shut down the database during this period.

Notes:

•	Shutting down a database means that no users can connect to it except the SYSDBA user or the database owner. This is useful for performing maintenance tasks, which require exclusive access such as defining a WAL file or running database validation.

•	Forcing database shutdown will interfere with normal database operations, and should only be used after users have been given appropriate broadcast notification well in advance.


Database|Restart
Restarting a Database

After a database has been shut down, it must be restarted (brought back on-line) before users can access it.

To restart a database which has been shut down, highlight it in the server/database tree and choose Database · Maintenance · Restart from the main menu.  The selected database will be brought back on-line immediately.


Database|Sweep
Sweeping a Database

Sweeping a database is a systematic way of removing outdated records from the database. Periodic sweeping prevents a database from growing too large. However, sweeping can also slow system performance.

InterBase uses a multi-generational architecture. This means that multiple versions of data records are stored directly on the data pages. When a record is updated or deleted, InterBase keeps a copy of the old state of the record and creates a new version. This can increase the size of a database.

To limit the growth of the database, InterBase performs garbage collection, which frees up space allocated to outdated versions of a record. Whenever a transaction accesses a record, outdated versions are garbage collected. However, records that were rolled back are ignored by typical transactions and will not be garbage collected. To guarantee that all records are garbage collected, including those that were rolled back, InterBase periodically "sweeps" the database.

When sweeping a database, InterBase reads every record in the database. This forces garbage collection of outdated record versions as well as rolled back records. InterBase automatically sweeps a database at a set interval: by default, 20,000 transactions.

Because automatic sweeping is tied to a transaction, sweeping a database can affect application performance. For example, on a single-threaded platform, if a user's transaction coincides with the sweep interval, the user's process may stop while the sweep takes place. On multi-threaded platforms, the sweep can spawn a separate process so that it does not block other processes.

Sweeping a database is not the only way to perform systematic garbage collection. Backing up a database achieves the same result because InterBase must read every record, an action that forces garbage collection throughout the database. As a result, regularly backing up and restoring a database can reduce the need to sweep. This enables you to maintain better application performance.

Performing An Immediate Sweep

Choose Database · Maintenance · Sweep from the main menu to sweep the currently highlighted database.

Setting Up Automatic Sweeping

The Database Properties dialog box enables you to change the automatic sweep interval or disable automatic sweeping.


Database|Statistics
Database Statistics

To view statistics on a database, highlight it in the server/database tree and select Database · Maintenance · Statistics from the main menu.  Statistics for the database automatically appear in the standard editing window .

Click File · Exit when finished.


Transactions|Recovery
Transaction Recovery

When committing a transaction that spans multiple databases, InterBase automatically performs a two-phase commit. A two-phase commit guarantees that the transaction updates either all of the databases involved or none of them; data is never partially updated.

In the first phase of a two-phase commit, InterBase prepares each database for the commit by writing the changes from each sub-transaction to the database. A sub-transaction is the part of a multi-database transaction that involves only one database. In the second phase, InterBase marks each sub-transaction as committed, in the order that it was prepared.

If a two-phase commit fails during the second phase, some sub-transactions will be committed and others will not be. A two-phase commit can fail if a network interruption or disk crash makes one or more databases unavailable. Failure of a two-phase commit causes limbo transactions, transactions that do not know whether to commit their changes or roll them back. You can recover these limbo transactions using IB Console.

To recover transactions that are "in limbo" from two-phase commit, choose Database · Maintenance · Transaction Recovery......  The Transaction Recovery dialog box will then appear and display a list of limbo transactions.  Each transaction listed can then be operated upon, that is, committed or rolled back.

IB Console analyzes the state of sub-transactions by determining when the two-phase commit failed. If the first transactions are in limbo but later transactions are not, Server Manager assumes that the prepare phase did not complete. In this case, you are prompted to do a rollback.


General|View
Display Options, View Menu

The first item in the View menu, Toolbars, allows you to select which toolbars are to be displayed during the current session.  The next six options in the view menu affect how information is displayed in the Summary tab.

System Data

This option affects the display of system information when a branch of a database node is highlighted.  When checked, system information, such as system tables, system functions etc., will be displayed.  When not checked, system information will not be displayed.  Click to toggle the setting.

Dependencies

This option determines whether the Dependencies tab will be displayed below the Summary tab.  Click to toggle the setting.

The remaining four options affect the display of lists in the Summary tab.  Only one of the following options can be selected at a time.

Large

Displays each item with an icon and text underneath it.

Small

Displays each item with an icon and text to the right of it.  Tries to fit as many columns as possible without having to scroll left-to-right.

List

Displays each item with an icon and text to the right of it.  Displays the items in as many rows as will fit the window without having to scroll up or down.

Details

Displays the items in a detail grid.  The name of the item is displayed in the first column from the left.  Additional information about the item is displayed in adjacent columns.  For items that have several columns of details, the horizontal scroll bar can be used to view the additional information.  One item is displayed per line.

The data can be refreshed at any time.


View|Font
Changing the Text Font

When working with the ISQL and SQL Script tab of IB Console, you have the option of changing the way text appears.  By selecting View · Text Font, you open the text formatting dialog box.  Here, you can select the font, font style, font size and  font effects, including color.  You can also select from the different scripts available for each font.  A text box displays a sample of how the text will appear with all of the selected options.

Using different fonts, styles, etc. can help to give emphasis to certain keywords, improving the appearance of printed copies.


View|Refresh
Refreshing Data

Occasionally, an update may occur to server or database information that is not reflected immediately in IB Console.  This can happen if IB Console is started and information is displayed and then another application or another user changes the information being displayed.  IB Console will not be aware of the change until it verifies the information with the server.  To do this at any time, you can Refresh the information.  To refresh the information in the window, select View · Refresh.


Scripts|Execute
Executing SQL Scripts

Interactive SQL is available from the ISQL tab of the right pane of the main window.

Required Privileges

A valid User Name and Password are required to connect to a database.  However, in order to be able to successfully execute the SQL statements you wish to run, you must have adequate permissions or you must have specified a role with adequate permissions when connecting.  For a complete description on permissions, see the Language Reference, SQL Statement and Function Reference, GRANT keyword.

Executing  Scripts

To execute the current SQL script, select Query · Execute script.  This will attempt to execute any text in the text area of the ISQL tab, whether it was entered manually, loaded from a script file or loaded from the history list.


Transactions|Recovery Dialog Box
Transaction Recovery Dialog Box

The Transaction Recovery dialog box lists all the pending transactions in the database in the scrolling area on the left side of the dialog box. Click on the "+" to display all the subtransactions of a transaction.

You can change the path of the database specified by each subtransaction by choosing Connect Path. A dialog box will open enabling you to enter the directory path of the other database involved in the subtransaction, including the server name and separator indicating communication protocol, then click on OK. This may be necessary because the path shown was the path to the database from the client machine which expected the transaction. It is possible that the indicated network protocol or intermediate servers are unavailable from your workstation and you will therefore need to enter a new value.

To use TCP/IP, separate the server and directory path with a colon (:). To use Novell SPX, separate the server and directory path with an at-sign (@). To use Named Pipes/NetBEUI, precede the server name with either a double backslash (\\) or a double slash (//), and then separate the server name and directory path with either a backslash or a slash.

You can choose to either commit or roll back each transaction. You can also seek advice by choosing the Advice button. This will open the Transaction Recovery Advice dialog box.


Transactions|Recovery Advice
Transaction Recovery Advice

This dialog box displays information on each sub-transaction: whether it has been committed, the remote server name, and database name.

At the bottom, an action will be recommended: either commit or roll back for the subtransaction.


Features|Tree
InterBase Servers Tree

The server/database tree provides a quick and easy way to get to the data you're looking for.  The tree view is arranged in a hierarchical manner, starting at the top left with "InterBase Servers".  Items added to the tree are called child branches or nodes.  The branch to which a child is added is called the parent.

Getting Information From The Tree

There are many types of items that can be added to the tree.  Each type of node has an icon associated with it, to the left of the name, to aid in quick identification.  Each icon also has a contents indicator to its left.

The contents indicator is used to display or hide the contents of the node in the tree and is the main method of navigating the tree.  The contents indicator appears as a + (plus) or - (minus) sign inside a small square if there are additional contents to display.  If there are no additional contents, it is omitted.  When the square contains a + sign, the node has additional branches attached which are hidden.  Clicking on the contents indicator or double clicking on the node name will cause the branches to be displayed.  When the branches are displayed, the contents indicator will have a - sign inside it.  Clicking the node again will hide the contents.

Clicking on a node name highlights it and causes detailed information about the item to be displayed in the right side pane. Only one item in the tree can be highlighted at a time.  If a branch containing the highlighted node is subsequently closed, then the parent node (the one that closed) automatically becomes highlighted.

Adding To The Tree

The first type of node that can be added to the tree is a server.  Servers are added to the tree when they are registered.  Upon logging in to a server, it expands the server node, displaying folders of information related to the server, including users, certificates and databases.  Highlighting the Database Aliases node of a server enables you to register an existing or new database.  Registering a database adds a new branch to the tree.  Logging in to the database causes more branches to be added to the tree, making most database information available.


Features|Internal Text Viewer
Internal Text Viewer

IB Console, provides an internal text viewer for several purposes.  The text viewer has the following features.

Menu Bar

File

Save As	Opens a Save As dialog box allowing you to save the entire contents of the window to a file you specify.

Print	Performs the same function as  File | Print .

Exit	Closes the window and returns control to the main IB Console window.

Edit

Copy	Copies the selected text to the clipboard.  See Edit | Copy for more details.

Select All 	Selects all of the text in the window.  Selected text can be copied to the clipboard.

Find items	Allows you to search the window contents for a specific text string.

Tool Bar

	Save As	Opens the Save As dialog box, allowing you to save the entire contents of the window to a file.
	Print contents	Prints the contents of the window using the page settings specified in the IB Console Printer Setup.
	Copy	Performs the same action as the main Edit | Copy function.
Text Area

The text area is the large, white part of the window or tab where the information is displayed.  The text can be manipulated in the manner specified by the status of the dialog or tab, shown in the status bar.

Status Bar

The Status Bar is divided into three segments.

The first segment from the left displays the current Line and Column of the text cursor within the window.  The first number displayed is the line # and the second one is the Column or character position of the cursor on the line.

The middle segment provides the status of the window contents. The following list gives details on the possible contents of this segment:

"Read-Only"	Indicates that the contents of the window cannot be changed.  In this case, text can be selected , copied and saved but not altered.
"Modified"	Indicates that the contents have been edited since they were loaded or last saved (applies only to the ISQL tab).
""(blank)	The segment is empty when the contents can be modified, but have not been changed since being saved or loaded.
The last segment is not used, and is always empty.


Toolbars|Standard
Standard Toolbar

The Standard Toolbar provides shortcuts to the most common menu commands.  By default, the Standard Toolbar is the only one shown at startup.  To toggle visibility of the Standard Toolbar, select View · Toolbars · Standard.

The Standard Toolbar

	Register Server	Adds a server to the server/database tree, with the option to log in at the same time.
	Un-register Server	Removes a server from the server/database tree, along with all databases registered to it.  You are automatically logged out of any active connections.
	Server Login	Opens a dialog box prompting you for your user name and password and optional role before connecting you to the selected server.
	Server Logout	Logs you out of the currently selected server and disconnects you from all databases on that server.
	Create Database	Opens a dialog that lets you specify the path and options for a new InterBase database.
	Register Database	Adds a database to the server/database tree.
	Un-Register Database	Logs you out of the currently selected database if you are logged in and removes it from the server/database tree.
	Database Connect	Opens a dialog box prompting you for your User Name and Password and optional role before connecting to the selected database.
	Database Disconnect	Disconnects you from the currently selected database.
Command availability

When you begin a new IB Console session, only Register Server, Diagnose Connection and Help are available.  Some View options are also available.  After registering a server, Server Un-Register and Server Login become available.  Several commands become available upon login to a server.  After registering and logging in to a database, all commands are available.

Certain specific commands are enabled only when an appropriate item is selected in the server/database tree.  For instance, Server Logout is only available when a branch of a connected server is highlighted.


Tabs|SQL Script
SQL Script Tab

The SQL Script tab of the IB Console window is used to display scripts used to create the selected database component.  The specific metadata displayed depends on the type of item selected in the server/database tree.  A complete set of metadata is displayed when the name of a connected database is selected.  Selecting branches of a database node will filter out inapplicable metadata, displaying only the script(s) for the type of node selected.  For instance, if the Domains node is selected, only the statements required to rebuild the domains are displayed.

The SQL Script tab consists of a text editing area and a common status bar.  You can find , select and copy text in the SQL Script tab.


Tabs|Summary
Summary Tab

Many items in the server/database tree consist of a number of instances.  For example, many table columns are associated with the Columns branch of any table.  The Summary tab displays the instances of the selected item in the manner specified by the current View options.

Items displayed in the Summary tab can be selected in the same manner as items in the server/database tree.  They may have associated popup menus and can be double-clicked to perform the default action.


Tabs|Definition
Definition Tab

The Definition tab displays a data grid of detailed information about the item currently selected in the server/database tree.  The information displayed depends on the type of item highlighted.

For example, selecting a table in the tree view will display the table's name, owner and recorded description in the Definition tab.


Tabs|Data
Data Tab

The Data tab displays the data stored in the selected table.  It is equivalent to performing a SELECT * FROM tablename in the ISQL tab.

Required Privileges

The SELECT privilege for the desired table is required to be able to view its data.

The Data tab is available only when a table node in the server/database tree is highlighted.


Tabs|ISQL
ISQL Tab

The Interactive SQL tab is where you enter your own SQL statements and/or load script files and execute them against the database.  It consists of several features:

•	The text editing area , where SQL statements are entered and modified.

•	The results area, where results of executing SQL statements are displayed.  The results area has a gray background and is between the text area and status bar of the ISQL window.

•	A Status bar for displaying cursor location and script status.

•	The standard editing features are available when the ISQL tab is in use.

•	Additionally, the SQL Toolbar makes it easier to perform most ISQL tasks.


Features|Main Status Bar
Main Status Bar

The status bar on the bottom of the main IBConsole window displays the following information, when applicable:

Server	The name of the server currently selected in the tree.

Database	Name of the database currently selected in the tree.

User	The User Name used to connect to the selected server as displayed in Server.

Additionally, the status bar has a textured triangle in the bottom right side corner.  Using the mouse, you can "grab" the triangle and "drag" it to resize the IB Console window.


Toolbars|ISQL
SQL Tool Bar

The ISQL Tool Bar provides a set of buttons for quickly accessing menu commands.

	Load Script	Loads an SQL script file.
	Save Script	Saves the contents of the text area to a script file.
	Execute	Executes the current script against the selected database.
	Previous Script	Reloads the previous script in the history list of executed scripts.
	Next Script	Reloads the next script in the history list of executed scripts after first selecting a previous script.  Also, clears the text area to begin a new script.
	Save Results	Saves the contents of the Results area to a file.


Backup_Configuration|About
Backup Aliases

When performing a database backup, several options need to be specified to ensure that the backup is performed as desired.  This information is saved by IB Console with an alias name that you provide.  By specifying the alias of a previous backup, all of the options specified for that backup are restored.  This enables you to quickly perform routine backups, to reuse lengthy backup configurations or to store several different backup configurations for use depending upon resource availability.

To view information about an existing backup alias, select Server · Backup File Properties .


Tabs|Actions
Actions tab

The actions tab displays, in a large, easy-to-read format, the most common activities associated with the item currently selected in the server/database tree.  Some items do not have any associated actions, such as a Tables branch.  For these types of items, the Summary tab is usually displayed instead.  Some menu items may be available, but they generally apply to the parent node of the selected item.  For instance, when Tables is selected, Database · Backup is available to back up the database which contains the highlighted branch.


General|Preferences
Preferences

The Preferences dialog provides ways to customize some IBConsole features.  This enables you to give IBConsole the look and feel you prefer.  Select Edit · Preferences to open the Preferences dialog.

The Preferences dialog consists of two tabbed pages; the General tab, containing options affecting the whole of IBConsole, and the Interactive SQL tab, containing options affecting only the ISQL tab of IBConsole.

General

Application Temporary Directory	When using an external text viewer, the content that is to be displayed is saved in a temporary file.  This setting specifies the directory to be used to store these temporary files.
Use Default Editor	If you want to use an editor other than the default editor built into IBConsole, uncheck this option.  The default is checked.  If using an external editor, you must provide the Editor Filename.
Editor Filename	Specify the executable filename of the external text editor that you wish to use instead of the internal IBConsole text viewer.  Use the browse button to use an Open File dialog to search for the executable file.  This option is available only if the Use Default Editor option is unchecked.
Editor Parameters	Enter any parameters required by the editor entered in Editor Filename.  The parameters will be entered following the editor executable name, before the name of the temporary file to be displayed.
Interactive SQL

Display Query Plan	If True, displays the query plan chosen by the optimizer.  To modify the optimizer plan, use the PLAN option of the SQL SELECT statement.  By default, this option is False.
Auto Commit DDL	If True (default), data definition (DDL) statements immediately commit all work since the last commit.  If False, DDL and DML statements must be manually committed or rolled back.  DML statements remain uncommitted until either a manual commit or an automatic DDL commit.
Display Statistics	If True, displays performance statistics for each statement entered. The following performance statistics  appear after the result of each statement: • Number of read or write requests. • Number of requests for data or updates that can be serviced in cache. • Elapsed time. • CPU time. • Memory usage. • Database page size. • Database buffers used.
Character Set	This setting determines the active character set for strings for subsequent database connections. It enables you to override the default character set for a database. Click on the arrow to the right of the Character Set field to display a dropdown list of available character sets. Click on a character set from this list to select it. You must specify the character set before connecting to a database to activate the new setting.
BLOB Display	Determines the display of BLOB data types. SELECT always displays the BLOB ID for columns of BLOB data type. By default, a SELECT will also display actual BLOB data of text subtypes beneath the associated row.  The following options are available: Disable  Do not display contents of BLOB columns. Enabled Display BLOB data of all subtypes. Restrict Display contents of BLOB columns only for the subtype specified in BLOB Subtype.
BLOB Subtype	Specifies the type of BLOB columns to display.  Select Unknown  to display all BLOBs.  Select Text (the default) to display only text type BLOB data.


Backup_Configuration|Properties
Backup File Properties

To see a list of backup files associated with a backup configuration/alias, highlight the alias name in the server/database tree and select Server · Backup File Properties.  This displays the following information:

Server	The name of the server on which the backup files are stored.

Alias Name	The configuration name selected.

Database Alias	The alias of the database used to create the backup files.

Filename(s)	List of files storing the backup information.


Toolbars|Server
Server Toolbar

The server toolbar consists of buttons to quickly perform the most common server administration functions.

	User Security	Opens the User Security dialog.
	Add Certificate	Use to add new certificates to the current server.
	Remove Certificate	Use to remove certificates from the current server.
	Server Properties	Displays a list of server properties


Toolbars|Database
Database Toolbar

The databases toolbar consists of buttons to quickly perform the most common database administration tasks.

	Backup	Backs up the current database.
	Restore	Restores the database from the current backup alias.
	Statistics	Displays statistics for the currently selected database.
	Validate	Validates the current database.
	Properties	Displays properties of the database currently selected.


GENERAL|ABSOLUTE PATHS
Absolute Paths

An Absolute Path is a logical directory path to a file on a particular machine, starting at the root directory.  A fully qualified path consists of the following parts:

<drive letter>:\<directory_a\><directory_b\><directory n\><filename>.

For instance, "D:\Program Files\InterBase Corp.\InterBase\IBConsole.exe" could be an absolute path on a Windows machine;"/usr/bin/ksh.exe" could be an absolute path on a UNIX system.  The directory and drive letter separators depend upon the InterBase host platform.  Refer to the operating system documentation for more information on the syntax of specifying an absolute path.

Local means that all parts of the path must exist on the machine being accessed.  The paths do not have to be shared on the network, nor are mapped drive letters to be used.


Toolbars|Edit
Edit Toolbar

The Edit toolbar provides buttons to most commands under the Edit menu.  Editing commands are available when either the SQL Script tab or the ISQL tab is selected.

	Undo	Cancels the last edit made in the text area.
	Cut	Copies the selected text to the clipboard and removes it from the text area.
	Copy	Copies the selected text to the clipboard.
	Paste	Inserts a copy of the clipboard contents at the current text cursor location.
	Print	Prints the contents of the text area.


How To|Access Data
Database Connection Order

Related Topics

To connect to a database, you must perform the following actions in the specified order.

1.	Register the server.

2.	Log in to the server.

3.	Register the database.

4.	Log in to the database.

Once logged in to a database, use the ISQL tab or any of the other IBConsole features to manipulate the data within or the metadata itself.


Features|Toolbars
Toolbars

The rich interface of IBConsole provides a number of toolbars to enable you to perform common tasks with great efficiency.  Each toolbar contains buttons to perform related tasks.  Details of each button can be found by clicking on the links below.

The available toolbars are:

1.	 Standard Toolbar

2.	 Server Toolbar

3.	 Database Toolbar

4.	 Edit Toolbar

5.	 SQL Toolbar

Selecting a toolbar from the View · Toolbars menu will toggle the visibility of that toolbar.  Currently visible or active toolbars are marked with a checkmark.

The toolbars which are set to visible can be displayed in two different states.  They can be docked (Fig. 1), near the top of the IBConsole window just below the main menu, or they can float anywhere on the screen (Fig. 2).  While docked they can be repositioned to suit your personal preference.  To move a docked toolbar, click and hold onto the grab bar and drag the toolbar to its new position.

Fig 1.  Docked toolbar.
Fig 2.  Floating toolbar

To float a toolbar, click on a part of the toolbar either above, below or to the left of any button and drag the toolbar away from the docking area.  As you drag the toolbar, a gray box outlines the shape of the toolbar.  When the toolbar has been dragged far enough away from the docking area, or close enough if moving a floating toolbar back to the docking area,  the shape of the outline will change, signaling that the state will be changed if it is dropped.


Toolbars|Grab Bar
Toolbar Grab Bar

A grab bar is a vertical bar between the left edge of a toolbar and its first button, used to reposition the toolbar while docked.  The mouse pointer changes to horizontal resize, [image], when over a grab bar.