DB-Access provides a user interface for entering, executing, and debugging Structured Query Language (SQL) statements and Stored Procedure Language (SPL) routines. SQL and SPL allow you to perform data-definition tasks, such as specifying the number and type of data columns in a table as well as data management tasks, such as storing, viewing, and changing table data. The DB-Access interface allows you to apply powerful Informix extensions to SQL and SPL.
You can use DB-Access for the following aspects of database processing:
- Using ad hoc queries that you execute infrequently
- Connecting to one or more databases, transferring data between the database and external text files, and displaying information about a database
- Displaying system catalogs and the Information Schema
- Testing applications that you intend to store for use in a production environment
The DB-Access user interface also supports the following:
- Running statements interactively, discarding them after you achieve the desired results, or saving them in a file for repetitive execution
- Typing statements directly in the DB-Access text-entry screen or your preferred text editor
- Starting DB-Access in menu mode and selecting options from the menus
The -a command line option is new to the dbaccess command syntax.
Exit on first error (dbaccess –a)
Use the -a command line option to stop the process directly after the first error is encountered. Stopping a process from continuing after the first error can ensure greater database consistency. The following is an example:
Listing 1. Using the command line option to stop the process after the first error
dbaccess -a - test.sql > test.out 2>&1 |
In order to test the above example, you need to set certain environment variables, as follows:
- Install the database server.
- Open a command prompt window, and set the following environment variable:
- SET INFORMIXDIR=C:\Informix
- SET INFORMIXSERVER=myserver
- SET DBLANG=EN_US.CP1252 (Set this if the server is not on a Windows platform.)
- Set up the Global Language Support (GLS) locale, where language localization requires it (such as DB_LOCALE and CLIENT_LOCALE)
- Execute as follows:
-a - test.sql > test.out 2>&1Make sure that there is a >space< after the '-' where the filename is specified.
You must have %INFORMIXDIR%\bin in your path if you use DB-Access on a Windows platform. Your operating system uses the path to locate the initialization script and the dbaccess executable.
- CSDK 2.81 TC2 and higher
- Win2K SP2 or higher
- This release has also been certified for Windows XP and Windows .NET Server
- Click the code icon at the top or bottom of the page to download the .zip file.
- Open a command prompt to the directory where the installer resides.
- If the environment variable INFORMIXDIR is set to the location of IBM Informix CSDK, run setup.bat. Otherwise, run setup.bat with the argument of the directory where IBM Informix CSDK or I-Connect is installed (for example, setup.bat C:\Informix)
- This utility is available as-is. No additional support is provided.
| Name | Size | Download method |
|---|---|---|
| dbacc_2_psoft.zip | 1.5MB |
FTP
|
Information about download methods
Learn
-
Read the DB-Access Manual online.
-
developerWorks Information Management zone: Learn more about DB2. Find technical documentation, how-to articles, education, downloads, product information, and more.
-
Stay current with developerWorks
technical events and webcasts.
Get products and technologies
-
Build your next development project with
IBM
trial software, available for download directly from developerWorks.
Discuss
-
Participate in developerWorks blogs and get involved in the developerWorks community.
Comments (Undergoing maintenance)





