3. Using Alternate Locations : Locations and Areas : Alternate Locations : Create an Area in VMS
 
Share this page                  
Create an Area in VMS
An area must be created before you can define an alternate location for a new database.
To create an area in VMS, follow these steps:
1. Log into the VMS system account.
2. Create the top level [INGRES] directory on the new device with the protection mask set to equal (S:RWE,O:RWE,G,W:RE) and ownership set to [INGRES] by executing the following command at the operating system prompt:
CREATE/DIR device:[INGRES]/OWNER_UIC=[INGRES] ‑
/PROT=(S:RWE,O:RWE,G,W:RE)
Substitute the name of the new device for device in the command. Also, do not set the protections any more restrictive than recommended here, because doing so can result in errors later.
3. Make sure the master file directory [000000] on the new device has at least W:E protection by executing the following command at the operating system prompt:
DIR/PROT device:[0,0]000000.dir
If the protection is incorrect (for example, the WORLD has no access), correct this with the following command:
SET FILE/PROT=(S:RWE, O:RWE, G, W:E) ‑ 
device:[0,0]000000.dir
4. Define a logical name for the new area at the system level:
DEFINE/SYSTEM/EXEC/TRANS=CONCEALED ‑
 logical_name device
Substitute the name of the new area for logical_name. This is useful if you ever reconfigure your system or move data between systems, because it is much easier to redefine one logical than to re-point all references to a device.
For example, the following command defines a new altarea1 for device DUA1 at the indicated subdirectory:
DEFINE/SYSTEM/EXEC/trans=concealed ‑
altarea1 dua1:[MYDIRECTORY.SUBDIRECTORY.]
@II_SYSTEM:[INGRES.UTILITY]INGDEFDEV.COM
5. The definition in Step 4 lasts until the next system boot. Add the same DEFINE statement to SYS$MANAGER:SYSTARTUP_V5.COM or II_SYSTEM:[INGRES]IISTARTUP1.COM so that it is executed on future boots.
6. Exit the VMS system account.
7. Log in to the system administrator’s account.
8. Create the subdirectories and set the appropriate protections on these directories by executing the INGDEFDEV command procedure at the operating system prompt:
9. When INGDEFDEV prompts you, provide the device name and the file type (data, journal, checkpoint, dump, or work) that resides in this area. Because you can specify only one file type each time you run INGDEFDEV, you must run INGDEFDEV once for each file type and device name pairing.
Depending on the type of file that resides in this area, INGDEFDEV creates one of the following directories, where device is the name of the new device from Step 2:
-device:[INGRES.DATA] (for data files)
-device:[INGRES.CKP] (for checkpoint files)
-device:[INGRES.JNL] (for journal files)
-device:[INGRES.DMP] (for dump files)
-device:[INGRES.WORK] (for work files)
In these steps, you created an area corresponding to the logical_name identified in Step 4, which you can now specify as the area name when defining a new location using the create location statement. The directories created by INGDEFDEV in Step 9 determine which usage types you can specify for both the create location and alter location statements. For example, creating [INGRES.DATA] allows you to specify usage = database, and creating [INGRES.WORK] allows you to specify usage = work.