Holger Jakobs
Holger Jakobs

Reputation: 1062

How to access an Informix database on localhost (Windows)

I have a very simple question. After installing Informix (iif.12.10.FC2DE.win2003.zip) on my computer, the database system seems to be running.

How can I access it? I even installed Server Studio (serverstudio_w_sentinel_win_9.1.10397.zip), but all frontends ask for so many things (what is the difference between host ans server, btw), and I don't know what to enter.

I have a lot of experience with HP-SQL, Oracle and PostgreSQL (all on Unix/Linux). In PostgreSQL, you just enter psql on the command line as the user postgres and create users and databases.

There is a bit of a missing link. Can anybody help me with this? Unfortunately, the computer runs Windows 8, so there is no helpful Start Menu.

Thanks in advance!

Upvotes: 2

Views: 17599

Answers (2)

SerchRac
SerchRac

Reputation: 181

When you install informix there is an option for install default instance and at the end you can choose if want start it and open command line or not. If you select yes a command line will be prompted and you'll can access to bin folder and type

dbaccess.exe

(bin folder usually is in your informix instalation folder)

Now you can manage your informix server.

If you want create your own instance you'll can't execute dbaccess -at least you open the correct command line-. To open the correct command line you need access to your instalation folder and execute the cmd according your instance, for example myinstance.cmd, this will open a command line and now you can go to bin folder and execute 'dbaccess.exe'.

This is a very very high exaplanation but it seems to be usefull for my team. If you need more info the @ceinmart anwer is awsome, or:

http://www-01.ibm.com/support/docview.wss?uid=swg21651873

https://www.ibm.com/support/knowledgecenter/en/SSGU8G_11.50.0/com.ibm.igmsw.doc/ids_iw_020x.htm

Upvotes: 0

ceinmart
ceinmart

Reputation: 1836

I never installed Informix at Windows 8 , AFAIK should not be different of any other windows.

First, as common knowledgment the "pre-configured" and basic access to Informix database is with an utility called dbaccess , you can compare it with sqlplus from Oracle, mysql from MySQL and psql from Postgre. It run only in CUI mode, but something as "ncurses like" based on menus (it isn't by self a command line like the others mentioned)

So, answering the question , to start the basic access with dbaccess you should open the Informix Command Line which is a shortcut what should have been created during the installation at you windows Informix Apps Menu.

Logged with Informix , at Start menu, you should have access to Apps menu clicking at the lower arrow at the bottom of the screen. Look for Informix command line icon, it's a shortcut to .bat very specify to your instance configuration, this file will define the informix environment variables (INFORMIXSERVER, PATH, etc) and open the prompt to you. Then just type dbaccess and voila , there is...
At windows 7 you need run this command line as administrator (right click on icon and choose the administrator option). Not sure if Windows 8 is the same...

Basically that's all...

But I always see windows users "up theirs noses" to dbaccess because it isn't friendly for a windows user, since it run at command line and windows command line is very limited if compared with any *nix shell.
Now if you ask for any informix user at Unix/Linux world the history is different...

So, alternatives graphics tools to access Informix like DBeaver, ServerStudio, SquirrelSQL, DbVisualizer, etc... you must know some configurations of your instance:

Looking from client point of view, for a TCP/IP connection, you must know :

  • INFORMIX SERVER : Is the name of your instance/engine (not database) and is directly associated to the instance listeners.
    One instance can have multiples names (listeners) and one machine can have multiple instances running simultaneously. At basic install and with auto configuration you probably will found only one name, something like ol_#####.
    For oracle this is similar of ORACLE_SID . if you open your Informix command line, you can discovery this typing echo %INFORMIXSERVER%
  • HOSTNAME : The hostname/IP of the machine where is the engine. This can be the localhost/127.0.0.1 but depends if it was configured ant the listeners of the engine. Probably will be the hostname of your windows..
  • SERVICE NAME : this is the network service configuration / port number for TCP/IP listener.
    This can be a number or the name, if you use the name, then you need configure the services file. Probably you will find it at: c:\windows\system32\Drivers\etc\services
  • PROTOCOL : There a few options here, but by default use the onsoctcp, unless you configure/choose other like Data Driver (DR).
  • DATABASE NAME : This is will be the default database used by the connection, if you don't have anyone set to "sysmaster" which is the mainly database of the engine. but don't play with it! it is like SYS/SYSTEM database for Oracle...
  • USER/PASSWORD : By default Informix uses OS authentication, so only users which exists at Windows will able to login at the database (of course, they will need the grants to access databases, tables, etc).

This is a connection string for a JDBC client (like SquirrelSQL) :

jdbc:informix-sqli://<host_name>:<port_number>/<database_name>:INFORMIXSERVER=<server_name>

If you like to know more information about the network configured at your instance/engine check this :

  • SetNet32 : the utility specify for Windows which configure the listeners used by the engine.
    (this is only for windows where they use windows registry to save the information. At *nix world is used the $INFORMIXDIR/etc/sqlhosts file or any other pointed by $INFORMIXSQLHOSTS file).
  • ONCONFIG : the mainly configuration file of your engine, located at %INFORMIXDIR%/etc/onconfig.%INSTANCENAME% . inside it, look for DBSERVERNAME, DBSERVERALIASES

For more information you can look at online informix Manual : http://pic.dhe.ibm.com/infocenter/informix/v121/index.jsp or download the PDFs (you will find the link to download at the main page of this link)


DBeaver and SquirrelSQL
This tools are FREE Java I-SQL where both works fine with Informix.
DBeaver have an advantage , it's automatically download and install the JDBC driver for you.
For SquirrelSQL you need setup it manually (but isn't hard).

Upvotes: 9

Related Questions