FirebirdSQL logo
 Firebird EventsExamples 

From the configuration page for your Firebird DSN on Windows you have access to a useful graphical management console that is built across the ODBC API and Firebird’s Services API.It gives a database administrator on Windows a user-friendly way to run service utilities that would otherwise be run from a command-line tool.We are using it to introduce this chapter because the source code could be a useful resource for developers looking for ideas about including Services functions in their applications.

Exploring the ODBC Services Console

To use the console, open that configuration page and click the button in the centre, labelled btn:[Services]:

fb odbc ClickServices
Figure 1. Launching the Services UI on Windows

The console is a tabbed display providing access to many of the Services API functions, with the menu:Backup[] tab on top.

fb odbc Backup
Figure 2. Firebird ODBC Services console — Backup tab
fb odbc Restore
Figure 3. Restore tab
fb odbc Statistics
Figure 4. Statistics tab

We selected menu:Header pages[], which produced the gstat -h report for our database.Clicking on the btn:[View Log] button delivers the output to the browser:

fb odbc StatisticsLog
Figure 5. Statistics log

Of course, you can have any statistics report, the Firebird log, metadata reports and more.

The menu:Repair[] tab gives easy access to most of the gfix housekeeping functions:

fb odbc Repair
Figure 6. Repair tab

The menu:Users[] tab could be used to maintain accounts in the security database of any version of Firebird prior to version 3.0, although the Services API method was discouraged from V.2.5 onward.The Services API method is still available to maintain users in Firebird 3 databases if they were defined using Legacy_Auth authentication management.It will not work with users defined with the default SRP authentication manager.

fb odbc Users
Figure 7. Users tab

Click on the appropriate button to add, modify or delete a user.Remember, the user performing these tasks must be SYSDBA or a user with elevated server privileges.The role RDB$ADMIN is not sufficiently elevated.

fb odbc AddUser
Figure 8. Add user
fb odbc ModifyUser
Figure 9. Modify user
fb odbc DeleteUser
Figure 10. Delete user