Progress
Database Administration
Guide and Reference
Creating a Structure Description File
The structure description file is a text file you prepare that actually defines the database structure. It contains all of the information required by the PROSTRCT CREATE utility to create a database control area.
Use any text editor, such as vi, edit, or the Progress Procedure Editor, to create the structure description file. The name you give to the structure description file is usually the name of the database you define, with a .st extension.
The structure description file is made up of one or more lines of text that provide information about each storage area of the database. Each line of text is composed of tokens, which are text strings made up of alphanumeric characters that describe the following characteristics:
Example Structure Description File
The following example shows the information that is needed in a structure description (ST) file named
sports2000.st
to define a database with:
- One primary recovery area.
- One schema area.
- Three after-image areas each with a fixed-length extent.
- One transaction log area with a fixed-length extent used with two-phase commit.
- Six application data areas each with one fixed- and one variable-length extent. The area names for the six application data areas are: Employee, Inventory, Cust_Data, Cust_Index, Order, and Misc.
The following is a syntax description of the line format for a structure description (ST) file:
Note that you can comment the ST file and use blank lines. Precede comments with a pound sign (#), colon (:), or asterisk (*) in the first column of each comment line.
Example Structure Description File For Large Files
When creating a new database, large file processing is enabled if the ST file specifies a fixed length extent size or a maximum size for a variable length extent that is greater than 2 GB. The following example shows the ST file of a database with large file processing enabled.
For more information on enabling large file processing, see the "PROUTIL ENABLELARGEFILES Qualifier" section in Database Administration Utilities."
Defining Storage Areas and Extents
Define each storage area and extent on a separate line of text in the ST file. Each line is composed of tokens. The first token of each line identifies the type of storage area to be created. These tokens must be lowercase. Table 4–1 lists each token with the corresponding storage area type.
Extent Pathnames and Naming Conventions
If the first token defines an application data storage area (d), add an area name after it. Then, the next token defines the file pathname. This pathname must represent a standard operating system file. The only pathname restrictions are those that might be imposed by your operating system’s create and read permissions for a particular file.
NOTE: In a structure description (ST) file, to specify a pathname that contains spaces (such as\usr1\misc data
), precede the pathname with an exclamation point (!) and wrap the pathname in quotation marks ( “ “). For example, !”\usr1\misc data
”.The PROSTRCT CREATE utility is designed to allow the end user to specify the minimum amount of information necessary to create a database. Only the area type and extent location must be specified. A specific filename or file extension need not be provided.
The utility will generate filename and file extensions for all database files according to the following naming convention:
- If the pathname is for a raw device, the name is taken as is with no changes.
- If a relative pathname is provided, including using common dot(.) notation, the relative pathname will be expanded to an absolute pathname.
- For BI extents, the filename is the database name with a .bn extension, where n represents the order in which the extents were created.
- For AI extents, the filename is the database name with a .an extension, where n represents the order in which the extents were created.
- For TL extents, the filename is the database name with a .tl extension.
- For Schema area extents, the filename is the database name with a .dn extension, where n represents the order in which the extents were created and will be used.
- For application data area extents, the filename is the database name and an area number. The area number is a unique identifier set by Progress to differentiate between different areas. The application data area extent filenames also have a .dn extension, where n represents the order in which the extents were created and will be used.
Rules For Creating Storage Areas and Extents
When you are defining storage areas and extents in order to create a new database:
- The minimum information required in an ST file is one schema area extent definition statement and one primary recovery (BI) area extent definition statement.
- The minimum information needed to specify any extent is the storage area type and extent pathname. For example:
NOTE: Progress Software Corporation recommends you define a primary recovery area on a different disk than the schema and after-image areas. However, if you do not define a primary recovery extent path in the ST file, the PROSTRCT CREATE utility automatically creates one in the same directory as the database control area.
- You cannot use any of the reserved storage area names defined in Table 4–2 as application data storage area names.
Extent Length
You can specify a fixed-length or variable-length extent:
- Fixed-length
When you create a fixed-length extent, its blocks are preallocated and preformatted specifically for the database. If the extent is on a raw partition, the third token of the extent description line is r. If you want the extent to be fixed length, the third token of the extent description line is f. This token must be lowercase. If the extent is fixed length, or raw, use a fourth token to indicate its length in kilobytes.
The size of the extent, in kilobytes, must be a multiple of 16K. If you specify a size that is not a multiple of 16K, PROSTRCT CREATE displays a warning message and rounds the size up to the next multiple of 16K. The minimum length for a fixed-length file is 16K, and the maximum length of a file depends on the size of the file system and the physical volume containing the extent.
- Variable-length
Typically, you use a variable-length extent as an overflow file when all fixed-length extents have been exhausted. For DB and BI extents, you can define one variable-length extent for each area. There is no limit to the number of variable-length AI extents you can define.While you indicate a variable-length extent by leaving out the extent size in the ST file entry line, you may also specify the maximum size to which the extent can grow by indicating the “v” extent type and a size in kilobytes. The initial allocation for a variable-length extent is 128K.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |