User Guide > User Guide > Using Alternate Locations > Create an Alternate Location
Was this helpful?
Create an Alternate Location
When you create a database, the default locations are assumed unless you specify alternate locations.
To create an alternate location for a new database
1. Create the area (directory structure) where the files will be stored by using operating system commands.
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.
For example, on Windows:
D:
cd \otherplace
mkdir new_area
mkdir new_area\ingres
mkdir new_area\ingres\data
mkdir new_area\ingres\data\default
The area "D:\otherplace\new_area"is created, which you can specify as the Area when defining a new location using the CREATE LOCATION statement.
2. Map the area created in Step 1 to a location by using the CREATE LOCATION statement.
For example: Connect to the database and type this statement to create a location "myloc1" in the area "D:\otherplace\new_area" for database file usage.
CREATE LOCATION myloc1 WITH AREA = 'D:\otherplace\new_area', USAGE = (DATABASE);
Last modified date: 12/06/2024