Was this helpful?
Alternate Locations
You can use alternate locations for a new database, but first you must create the area (directory structure) where the files will be stored, and then define their location.
You create a location's area using the facilities of the host operating system.
Each area must have a specific subdirectory structure, depending on the file types with which it is associated. This structure parallels that of the corresponding default location area, as summarized in Default Locations.
Create an Area in Windows
An area must be created before you can define an alternate location for a new database.
Note:  If you use the extenddb command with the –aarea_dir flag, the area is created for you. You do not have to create the directory path below the ingres root directory.
To create an area in Windows, follow these steps:
1. Change location to the drive and directory where you create the new directory structure. For example, to create the new directory structure on the D: drive under the \otherplace directory, issue the following commands at the command prompt:
D:
cd \otherplace
2. Create a new subdirectory. For example, to make a subdirectory named new_area, issue the following command at the command prompt:
mkdir new_area
3. Create subdirectories for the types of database files that use the new area. For example, to create a subdirectory for data files in new_area, issue these commands at the command prompt:
mkdir new_area\ingres
mkdir new_area\ingres\data
mkdir new_area\ingres\data\default
To make subdirectories for checkpoint, journal, dump, or work files, substitute ckp, jnl, dmp, or work for data when issuing these commands.
In these steps, you created the area D:\otherplace\new_area, which you can now specify as the Area when defining a new location using the CREATE LOCATION operation. The subdirectories you created in Step 3 determine which Usage Types you can use in CREATE LOCATION and ALTER LOCATION statements (or equivalent dialogs in Director or VDBA). For example, creating ingres\data\default allows you to enable Database as a Usage Type, and creating ingres\work\default allows you to enable Work as a Usage Type.
Create an Area in Linux
An area must be created before you can define an alternate location for a new database.
Note:  If you use the extenddb command with the –aarea_dir flag, the area is created for you. You do not have to create the directory path below the ingres root directory.
To create an area in Linux, follow these steps:
1. Log in as the installation owner.
By using this account, this user becomes the owner of the subdirectories created in this procedure.
2. Change location to the directory where you create the new directory structure. For example, to create the new directory structure in the otherplace directory, issue the following command at the operating system prompt:
cd /otherplace
The installation owner account must be able to create a directory below this directory; this means permissions set to at least 755. If this number needs to be changed, see your system administrator. Top-level directories are usually managed by root.
3. Create a new subdirectory. For example, to make a subdirectory named new_area, issue the following command at the operating system prompt:
mkdir new_area
4. Create subdirectories for the types of database files that use the new area. For example, to create a subdirectory for data files in new_area, issue these commands at the operating system prompt:
mkdir new_area/ingres
mkdir new_area/ingres/data 
mkdir new_area/ingres/data/default
To make subdirectories for checkpoint, journal, dump, or work files, substitute ckp, jnl, dmp, or work for data when issuing the above commands.
5. Place the appropriate permissions on the new directories and subdirectories, as shown in the following example. Limit access to the data directory to the user account for the installation owner only:
chmod 755 new_area
chmod 755 new_area/ingres
chmod 700 new_area/ingres/data
chmod 777 new_area/ingres/data/default
To place permissions on new directories for checkpoint, journal, dump, or work files, substitute ckp, jnl, dmp, or work for data when issuing the above commands.
In these steps, you created the area /otherplace/new_area, which you can now specify as the Area when defining a new location using the CREATE LOCATION statement (or equivalent operation in Director or VDBA). The subdirectories you created in Step 4 determine which Usage Types you can specify. For example, creating ingres/data/default allows you to specify Database as a Usage Type, and creating ingres/work/default allows you to specify Work as a Usage Type.
Raw Area in Linux
A raw area contains data from a single database only.
A raw location can be assigned a usage of database only, cannot be used as the root location of a database, and can contain data for one table only.
The maximum size of a table is bound by the smallest raw location to which it is assigned.
A raw area can contain many locations; each location can contain the data for one table. A raw location is the equivalent of a cooked database file that contains data of one table only.
To set up a raw area file, use the mkrawarea utility. For more information, see the Command Reference Guide.
How to Change from Raw to Cooked (Non-raw) Transaction Log
If your installation uses a raw transaction log file and you want to change to a cooked transaction log file, follow this process:
1. Destroy the existing transaction logs, including dual logs if present.
2. Define the locations to be used for the new transaction logs.
3. Create the new transaction logs.
4. Test the new transaction logs by restarting Actian X.
Last modified date: 04/03/2024