SQL Language Guide : 7. SQL Statements : CREATE LOCATION
 
Share this page                  
CREATE LOCATION
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The CREATE LOCATION statement assigns a name to a physical disk and directory location.
Note:  You must be connected to the iidbdb database to issue CREATE/ALTER/DROP LOCATION statements.
For detailed information about locations, see “Using Alternate Locations” in the User Guide.
This statement has the following format:
CREATE LOCATION location_name
WITH AREA = area_name,
USAGE = (usage_type {, usage_type}) | NOUSAGE
RAWPCT = n
location_name
Specifies the name to be assigned to the disk and directory combination. Must be a valid object name.
area_name
Specifies the disk and directory location to which the location is mapped. Must be a valid operating-system specification. This parameter can be specified using a quoted string or an unquoted string that does not include special (non-alphanumeric) characters.
Limits: Path name must not exceed 126 characters.
usage_type
Specifies the types of file that can be stored at this location. Valid values are:
DATABASE
WORK
CHECKPOINT
JOURNAL
DUMP
ALL
NOUSAGE
To prevent any files from being stored at the location, specify WITH NOUSAGE.
Note:  The JOURNAL and DUMP usage types are for Ingres tables only. Vector does not maintain files in the II_JOURNAL or II_DUMP locations.
CREATE LOCATION Examples
1. Create a location using a Linux path:
CREATE LOCATION extraloc WITH AREA = '/usr/vw_extra',
USAGE = (WORK);
2. Create a location on HDFS:
CREATE LOCATION vhl01 WITH AREA = 'hdfs://namenode:54310/vectorwise/vhl01', USAGE = (DATABASE);
3. Create a location on federated HDFS:
CREATE LOCATION vh202 WITH AREA = 'viewfs://namespace/vectorwise/vh202', USAGE = (DATABASE);