Daily management and maintenance of Informix online database

Source: Internet
Author: User
Tags chmod informix create database

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.