Skip to main content

skip to main content

developerWorks  >  Information Management  >

IBM Informix Dynamic Server Tools

DB-Access Utility for Windows to allow for connectivity to IDS version 9.40.xC2

developerWorks
Document options

Document options requiring JavaScript are not displayed

Sample code


My developerWorks needs you!

Connect to your technical community


Rate this page

Help us improve this content


Level: Introductory

Ammu Soni (asoni@us.ibm.com), Senior Quality Assurance Engineer, IBM

10 Jun 2004

Download the standalone DB-Access tool for Informix Dynamic Server (IDS) 9.40.xC2.

Introduction

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



Back to top


Enhancement to DB-Access

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


cat test.sql connect to ‘testdb’ user ‘informix’ using ‘new.pass’; create table tab1 (cola int); -- No exit on no rows found select * from tab1; insert into tab1 values(100); -- Display rows from tab1 select * from tab1; -- should exit out as tab3 does not exist select * from tab3; -- should not execute. should have already exited -- as previous statement resulted in an error create table tab4(col1 int); close database; cat test.out Connected. Table created. cola No rows found. 1 row(s) inserted. cola 100 1 row(s) retrieved. 206: The specified table (tab3) is not in the database. 111: ISAM error: no record found. Error in line 14 Near character position 18 Disconnected. [1] + Done(134) dbaccess -a - new.sql > new.out 2>&1 444 Abort dbaccess

In order to test the above example, you need to set certain environment variables, as follows:

  1. Install the database server.
  2. 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.)
  3. Set up the Global Language Support (GLS) locale, where language localization requires it (such as DB_LOCALE and CLIENT_LOCALE)
  4. Execute as follows:

    -a - test.sql > test.out 2>&1

    Make sure that there is a >space< after the '-' where the filename is specified.

Environment variables

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.



Back to top


Minimum System Requirements

  • CSDK 2.81 TC2 and higher
  • Win2K SP2 or higher
  • This release has also been certified for Windows XP and Windows .NET Server



Back to top


Installation Instructions

  1. Click the code icon at the top or bottom of the page to download the .zip file.
  2. Open a command prompt to the directory where the installer resides.
  3. 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)



Back to top


Support

  • This utility is available as-is. No additional support is provided.




Back to top


Download

NameSizeDownload method
dbacc_2_psoft.zip1.5MBFTP|HTTP
Information about download methods


Resources

Learn

Get products and technologies
  • Build your next development project with IBM trial software, available for download directly from developerWorks.


Discuss


About the author

Ammu Soni is a Senior Quality Assurance Engineer who has worked on the Informix Dynamic Server for more than eight years. Ammu works on the Stress Testing team of IBM-Informix Dynamic Server, mainly involving Kernel and Backup-Restore Utilities.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top