0% found this document useful (0 votes)
20 views2 pages

Informix Commands

The document outlines methods for monitoring and managing queries in Informix, including using JDBC traces and executing specific commands to view active queries and session information. It provides a list of basic commands for database operations such as starting and stopping services, monitoring sessions, and managing backups. Additionally, it details commands for viewing table schemas and monitoring database performance metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Informix Commands

The document outlines methods for monitoring and managing queries in Informix, including using JDBC traces and executing specific commands to view active queries and session information. It provides a list of basic commands for database operations such as starting and stopping services, monitoring sessions, and managing backups. Additionally, it details commands for viewing table schemas and monitoring database performance metrics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

What is running in Informix

To see the queries being made in Informix, we have 2 ways, one is


to perform a JDBC trace, which we will not explain here because the idea is on a server
What is happening should be consulted in particular, for example a consultation.
it's slow, and we don't want to modify anything in the connection to avoid slowing down the app
action.

The second option is to see what queries are being executed at this moment, this
What happens is that if there are many queries being executed, we might not see it.
never ours.

So by executing onstat g sql sessionNumber (if we don't know it we put 0 and we ...
remove all), what this does is display by query the query that has to
the moment of executing the command the engine.

This is useful when there are queries that take longer than a few seconds to run.
r (or minutes, or perhaps hours) and we must detect which indices (for example) this is taking
and whether they are the correct ones or not.

From dbaccess <database name> you can see a lot of information use
Where is the menu of this utility.

From the command line:

To see the schema of the tables:


dbschema -d <DB> -t <Table>

To see the procedure schema:


dbachema -d <DB> -f <Procedure>

Basic commands for Informix-online:


Oninit: Start the database services. This is done automatically cu
And the operating system of the server starts.
Onmode ky: Stops the database services. This is done automatically when
the operating system services are stopped.
Onstat -g ses: to monitor the status and resource consumption of the sessions
of the users in the database.
Onstat -g ses id_session: shows information about a specific session.
Onstat g seg: to monitor the segments of virtual memory.
Onstat l: to see information about the logical logs. For example, if they are full.
or if it was backed up.
Onstat m: to consult the latest entries in the database log.
Onstat -d: allows you to see information about the dbspaces created in an instance of l
the database, the size, the space used. It also shows on the first line
the version, the mode (status) and the amount of memory being used by the database
data.
Onstat -g sql id_session: shows information about the SQL statements that are
they are executing at that moment.
Ontape: to retrieve back from the logical logs. This should be done after that...
all processes running in the system have been completed, due to it
Logical logs store the necessary information to perform a rollback in case of a failure.
a problem.
Ontape -s -L 0 -U database_name: To create the transaction log of the database
and data.
Ontape -s -L 0: to make a complete backup of the data.
To recover a backup of the data.
Dbexport easybank: to perform a general unload of all the tables in the system
inside a dbschema. For workgroup server, you need to add: d datadbs.
Dbimport easybank: to restore a dbexport. For workgroup server, you need to add
d datadbs.
Onstat -k: to monitor table locks

You might also like