create plogspace: Create a plogspace (SQL administration API)

Use the create plogspace argument with the admin() or task() function to create a plogspace in which to store the physical log.

Syntax


1  EXECUTE FUNCTION
1 admin
1 task
2  (
2  "create? unencrypted plogspace" , "plogspace" , "path_name"
2  , "chunk_size"?  , "offset"?  , "mirror_path"?  , "mirror_offset"
2  ) ;
ElementDescriptionKey Considerations
chunk_sizeThe size, in KB, of the chunk of the new plogspace. The size is rounded to a multiple of the page size.See admin() and task() Argument Size Specifications.
mirror_offsetThe offset, in KB, of the mirror chunk.Unsigned integer. The size must be equal to or greater than 1000 KB and a multiple of the page size. The starting offset plus the chunk size cannot exceed the maximum chunk size.

The maximum chunk size is 2 or 4 TB, depending on the platform.

mirror_pathThe path name to the chunk that mirrors the chunk of the plogspace.If you mirror the plogspace, the plogspace chunk cannot be extendable.
offsetThe offset, in KB, into the disk partition or into the device to reach the chunk of the new plogspace.Unsigned integer. The size must be equal to or greater than 1000 KB and a multiple of the page size. The starting offset plus the chunk size cannot exceed the maximum chunk size.

The maximum chunk size is 2 or 4 TB, depending on the platform.

path_nameThe disk partition or device of the chunk of the plogspace that you are creating. The chunk must be an existing unbuffered device or buffered file. When you specify a path name, you can use either a full path name or a relative path name. However, if you use a relative path name, it must be relative to the directory that was the current directory when you initialized the database server.

UNIX example (unbuffered device):

/dev/rdsk/c0t3d0s4

UNIX example (buffered device):

/ix/ifmx/db1chunk

Windows example:

c:\Ifmxdata\ol_icecream\mychunk1.dat

plogspaceThe name of the plogspace to be created.The plogspace name must be unique and cannot exceed 128 bytes. It must begin with a letter or underscore and must contain only letters, numbers, underscores, or the $ character.

The syntax must conform to the Identifier segment. For more information, see Identifier.

Usage

Use the create unencrypted plogspace argument to create an unencrypted plogspace when encryption is enabled by the DISK_ENCRYPTION configuration parameter.

This function is equivalent to the onspaces -c -P command.

An instance can have only one plogspace. If a plogspace exists, when you create a new plogspace, the physical log is moved to the new space and the old plogspace is dropped.

The physical log must be stored on a single chunk. The chunk is marked as extendable by default so that the database server can expand the plogspace if necessary to expand the physical log. If you mirror the plogspace, the space cannot expand because a mirror chunk cannot be extendable.

Examples

The following example creates a plogspace that has a size of 30000 KB with an offset of 0.

EXECUTE FUNCTION task ("create plogspace", "plogdbs", 
"/dev/chk1", 30000, 0);

The following example creates a mirrored plogspace that has a size of 30000 KB with an offset of 0.

EXECUTE FUNCTION task ("create plogspace", "plogdbs", 
"/dev/chk1", 30000, 0, "/dev/mchk1", 0);