First, start and close the Informix database
1. Automatically start Informix
Start the online command as: OnInit
However, in general, the Start command is established in the/ETC/RC2.D directory with the name S96informix so that when the operating system is started, online starts.
Edit the file/etc/rc2.d/s96informix as follows:
INFORMIXDIR=/usr/informix
INFORMIXSERVER=picc_online
ONCONFIG=onconfig.picc
export INFORMIXDIR NFORMIXSERVER ONCONFIG
INFORMIXDIR/bin/oninit
Modify the file properties as follows: $chmod +x/etc/rc2.d/s96informix
2. Automatically turn off Informix
Turn off the online command: Onmode-ky
However, the general situation is as follows, the Shutdown command is established in the/ETC/RC0.D directory, the name is K01informix, so that when the operating system is closed, online closed.
Edit file/etc/rc0.d/k01informix as follows:
INFORMIXDIR=/usr/informix
INFORMIXSERVER=picc_online
ONCONFIG=onconfig.picc
export INFORMIXDIR INFORMIXSERVER ONCONFIG
INFORMIXDIR/bin/onmode -ky
Modify the file properties as follows: $chmod +x/etc/rc0.d/k01informix
Two, Informix online common working mode
Offline (stop state)
Quiescent (System maintenance State)
Online (Running state)
Iii. managing Informix Online disk space
Online initialization, a dbspace named Rootdbs is automatically created. The Rootdbs stores management information for online, including physical logs, logical logs, and so on. When you create a database or table, if you do not specify Dbspace, as the default, the library or table is built in Rootdbs. So, if you want to build a library or table in a dbspace, you must specify the dbspace name in the SQL statement. If the database is named ' stores ', we will build this database in ' Workdbs ' dbspace, the SQL statement is as follows:
Create database stores in Workdbs;
In addition, when you build chunk or dbspace, you specify the original disk device name path, the amount of disk space required, and the offset of the block disk space on the original disk device. Among them, the offset is very critical, to be careful to set up, otherwise easy to cause chunk block space overlap and overlay.
For example, suppose the original disk device/INFORMIXDBS1 has 500M space, where Rootdbs uses the former 100M, and if a new chunk is to be established in/INFORMIXDBS1, the offset should be greater than 100M.
1. Establish dbspace with onspaces command
$onspaces-C-D dbspace name-p disk device-O offset-s size
which
-C: Indicates the establishment of a new dbspace
-d:dbspace Name
-P: Original disk device full path name, such as/INFORMIXDBS1
-O: Offset, in K-byte
The first chunk dimension in the-s:dbspace, in K-byte units