The onutil ALTER DBSLICE ADD DBSPACE command does not move or redefine user data. After you alter the dbslice, you can store new tables in either the new or old dbspaces.
These new dbspaces are not automatically visible to the existing tables in the dbslice. Refragment the existing tables to enable them to use the new dbspaces in the dbslice. To refragment existing tables, use the ALTER FRAGMENT command, described in the IBM Informix: Guide to SQL Syntax.
>>-ALTER DBSLICE--dbslice_name--ADD DBSPACE--FROM---------------> .-,---------------------. V | >----| Dbslice Component |-+-----------------------------------><
Dbslice Component: (1) |--| SIZE size Pathname Coserver Component |--------------------> >--+--------------------+--+----------------------+--CHUNK------> '-THRESHOLD--percent-' '-FRAGMENTS--fragments-' (2) >--| Pathname Definition |-------SIZE--size--+--------+---------> +-KBYTES-+ +-MBYTES-+ '-GBYTES-' >--+--------------------------------------+---------------------| | (3) | '-MIRROR--| Pathname Definition |------'
| Element | Purpose | Restrictions | Syntax |
|---|---|---|---|
| dbslice_name | The name of the dbslice to alter | The dbslice must exist. | See Dbslice Name. |
| fragments | The approximate number of fragments each new dbspace will contain | Value is between 3 and 65500 | Decimal or hexidecimal integer. |
| percent | The percentage of total space in the dbspace which, when used, triggers an alarm. | Value is between 1 and 100 | Decimal or hexidecimal integer. |
| size | The size of the initial chunk of each new dbspace | Value must be greater than 0. Size must not exceed 4 gigabytes. Can specify units of kilobytes, megabytes, or gigabytes. | Unsigned integer; default unit is kilobytes. |
Coserver Component: |--COGROUP--+-cogroup_name--------------+-----------------------| +-coserver_name-------------+ '-coserver_range_identifier-'
| Element | Purpose | Restrictions | Syntax |
|---|---|---|---|
| cogroup_name | The name of a cogroup in the database server | The cogroup name must exist when you execute the command. Name must be unique within a database server. | See Cogroup Name. |
| coserver_name | The name of a coserver that the database server
automatically generates. A coserver name has the following format:
dbserername.coserver_number |
See Coserver Name. | |
| coserver_range
_identifier |
The range of coservers in the dbslice. Coserver range identifiers can include embedded formatting characters of the following form: %r(first..last) | These formatting characters are replaced by integer values in the range that first and last specify to produce a list of coserver names. | See Coserver Range Identifier. |
Pathname Definition: |--+-| Pathname Format |-+--+----------------+------------------| +-"-------------------+ '-OFFSET--offset-' +-pathname------------+ '-"-------------------'
Pathname Format: .-----------------------------------. V | |--"--prefix----+-------------------------------+-+--"----------| +-pathname_fragment-------------+ +-%c----------------------------+ +-%n----------------------------+ +-%o----------------------------+ | (1) | +-%f--(--first--"--last--)------+ '-,-----------------------------'
| Element | Purpose | Restrictions | Syntax |
|---|---|---|---|
| first | The starting value of the integer to substitute
for each path
When first is in the pathname, its value can be any integer that makes each generated pathname unique. |
The value of first must be equal to or less than the value of last. | Unsigned integer |
| last | The ending value of the integer to substitute
in each path
When last is in the pathname, its value can be any integer that makes each generated pathname unique. |
The value of last must be equal to or larger than first. | Unsigned integer |
| offset | The offset, in kilobytes, into the file or raw device to reach the chunk of each dbspace | Value must be greater than or equal to 0. See specifying an offset in the chapter on managing disk space in the IBM Informix: Administrator's Guide. | Unsigned integer |
| pathname | The file or raw device of the first chunk in the dbspace on each node The pathname can optionally contain formatting characters. | The chunk must be a file or raw device. Use a full pathname. | Pathname must conform to the rules specific to your operating system. See Pathname Format. |
| prefix | The portion of the directory name pathname that precedes the formatting character | The directory name must correspond to files that exist on the applicable coservers. | The directory name must conform to the rules specific to your operating system. |
| pathname_
fragment |
The portion of the generated pathname that follows the formatting characters | The generated pathnames must correspond to files that exist on the applicable coservers. You can intersperse the formatting characters in between parts of the pathname. | Pathname must conform to the rules specific to your operating system. See Pathname Format. |
| %c | A formatting character that is replaced with the number of the coserver on which a dbspace is to be created. The number is the value that you specified in the COSERVER configuration parameter for this coserver. | If the number is less than 10, the number does not have a leading zero. | See Generating Pathnames with Coserver Numbers. |
| %n | A formatting character that is replaced with the host name of the node for the coserver on which a dbspace is to be created. | The host name is the value that you specified in the NODE configuration parameter for this coserver. | See Generating Pathnames with Node Names. |
| %o | A formatting character that is replaced with the ordinal number of a dbspace within a dbslice | The ordinal number starts numbering at 1 plus the old dbspace count of the dbslice. | See Generating Pathnames with Dbspace Ordinal Numbers. |
| %r(first..last) | Formatting characters that are replaced by successive integer values in the range that first and last specify | You can specify the %r(first..last) formatting characters only once in a pathname format. | See Generating Pathnames for Multiple Dbspaces per Coserver. |
Use the onutil ALTER DBSLICE ADD DBSPACE command to add dbspaces to a dbslice on one or more coservers. The new dbspaces do not need to be the same size as the old dbspaces in the dbslice. The database server must be in online or quiescent mode when you alter a dbslice.
Before you alter the dbslice, use the touch command to allocate storage for the chunk files. Use any chunk name that you want. The database server derives the dbspace names from the dbslice name and a dbspace identifier. For more details, see Derived Dbspace Identifier.
The new dbspaces in the dbslice are the same type as the original dbspaces in the dbslice. If you alter a dbslice that contains mirrored dbspaces, the new dbspaces are also mirrored. If you alter a temporary dbslice, the new dbspaces are also temporary dbspaces.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]