Creating a dbspace that uses the default page size

You can use onspaces or ON-Monitor to create a standard dbspace and a temporary dbspace.

About this task

For information about creating a dbspace with a non-default page size, see Creating a dbspace with a non-default page size.

Any newly added dbspace (and its mirror, if one exists) is available immediately. If you are using mirroring, you can mirror the dbspace when you create it. Mirroring takes effect immediately.

Procedure

To create a standard dbspace using onspaces:
  1. On UNIX™, you must be logged in as user informix or root to create a dbspace.

    On Windows™, users in the Informix-Admin group can create a dbspace.

  2. Ensure that the database server is in online, administration, or quiescent mode.
  3. Allocate disk space for the dbspace, as described in Allocate disk space.
  4. To create a dbspace, use the onspaces -c -d options.

    KB is the default unit for the -s size and -o offset options. To convert KB to megabytes, multiply the unit by 1024 (for example, 10 MB = 10 * 1024 KB).

    See Creating a dbspace with a non-default page size for information about additional onspaces options if you are creating a dbspace with a non-default page size.

  5. If you do not want to specify the first and next extent sizes for the tblspace tblspace in a dbspace, go to 6.

    If you want to specify the first and next extent sizes for the tblspace tblspace in a dbspace, see additional information in Specifying the first and next extent sizes for the tblspace tblspace.

  6. After you create the dbspace, you must perform a level-0 backup of the root dbspace and the new dbspace.

Example

The following example shows how to create a 10-megabyte mirrored dbspace, dbspce1, with an offset of 5000 KB for both the primary and mirror chunks, using raw disk space on UNIX:
onspaces -c -d dbspce1 -p /dev/raw_dev1 -o 5000 -s 10240 -m /dev/raw_dev2 5000
The following example shows how to create a 5-megabyte dbspace, dbspc3, with an offset of 200 KB, from raw disk space (drive e:) on Windows:
onspaces -c -d dbspc3 \\.\e: -o 200 -s 5120

For more information about creating a dbspace with onspaces, see Dbspaces and information about the onspaces utility in the HCL OneDB™ Administrator's Reference.

What to do next

To create a dbspace with ON-Monitor (UNIX):

  1. Select the Dbspaces > Create option.
  2. Enter the name of the new dbspace in the field Dbspace Name.
  3. If you want to create a mirror for the initial dbspace chunk, enter Y in the Mirror field. Otherwise, enter N.
  4. If the dbspace that you are creating is a temporary dbspace, enter Y in the Temp field. Otherwise, enter N.
  5. If you are specifying a page size for a standard dbspace, enter the size in KB in the Page Size field. The size must be a multiple of the page size of the root dbspace. For more information about specifying page sizes, see Creating a dbspace with a non-default page size.

    All tables, indexes, and other objects within the dbspace use pages of the specified size.

  6. Enter the full path name for the initial primary chunk of the dbspace in the Full Pathname field of the primary-chunk section.
  7. Specify an offset in the Offset field.
  8. Enter the size of the chunk, in KB, in the Size field.
  9. If you are mirroring this dbspace, enter the full path name, size, and optional offset of the mirror chunk in the mirror-chunk section of the screen.

For more information, see the ON-Monitor topics in the HCL OneDB Administrator's Reference.