This blog post will be mainly focused on how to start / stop the informix server. Create a database and table etc.
Login from informix user and run the server instance
Login with the informix windows user that was created during the installation and simply search for informix under start and you will find a server instance similar to "ol_informix1210". Run the server instance as Administrator.
Basic commands to get started with informix
Run the below commands in the cmd that was open.
- Start informix server - oninit -ivy
- Shut down informix server - onmode -ky
- Check server status - onstat -g dis
Create Informix DB
Use the command "dbaccess" cmd to navigate to db creation section. You will be getting the following options.
Navigate to Database - > Create
Provide a suitable name for the database which needs to be created.
Select a DB space
After selecting a DB space select "Create-new-database" and click enter. This will create the new database.
Create a table
Select the DB that was created and go to tables section the select "Create" and provide a table name.
Add columns as your requirement refer below pic to get an idea.
Once you are done select "Build-new-table" this will create the table.
Connect and test the informix DB created
You can use a client like DBeaver to connect to the database you created. You have to provide the host, Port, server,database/Schema, username and password in order to connect to the server.
NOTE - Informix by default binds a ipv6 for the port. So to connect to the db follow the below sample.
* You can use a simple tool such as cports to view the ports and the address that it is bind to or you can use the command
netstat -a | findstr 'Port number'
jdbc connection URL looks like this, which needs for the connection.
jdbc:informix-sqli://{hostip}:{port}/{DBName}:INFORMIXSERVER={InformixServerName}
jdbc:informix-sqli://fe80::f16e:99a8:22ca:682:9088/test:INFORMIXSERVER=ol_informix1210
Now you can view the table that was created via dbeaver client
Binding the Port to a IP V4
In informix you have the possibility to create a server with a IP V4 or IP V6. We can create a IP V4 from the 'Server Instance Manager'.
From there you will be asked to set a 'service name' and a 'port number' while proceeding. Set the desired values for these fields, So they can be referred lately.
Thanks for sharing these.
ReplyDeleteIt’s always useful to get pointers to the good blogs out there.
You might also be interested to know more about our company -
Parana Impact, which is one of the leading database marketing,
data intelligence and digital marketing service provider.
IBM Informix Database Users Email List Suitable to small scale to large scale companies which will focus on driving more revenue and increase profitability.