SQL Language Guide : 7. SQL Statements : ALTER LOCATION
 
Share this page                  
ALTER LOCATION
Valid in: SQL, ESQL, OpenAPI, ODBC, JDBC, .NET
The ALTER LOCATION statement changes the type of files that can be created at an existing location.
Note:  You must be connected to the iidbdb database to issue CREATE/ALTER/DROP LOCATION statements.
Current usage of the location is unaffected, but future attempts to extend a database to the target extension are constrained by the new usage setting.
This statement has the following format:
ALTER LOCATION location_name
   WITH USAGE = (usage_type {, usage_type}) | NOUSAGE
location name
Specifies the name of an existing disk and directory combination.
usage_type
Specifies the types of file that can be stored at this location. Valid values are:
DATABASE
WORK
CHECKPOINT
JOURNAL
DUMP
ALL
NOUSAGE
Prevents any files from being stored at the location.
ALTER LOCATION Examples
The following examples change the type of files that can be created at an existing location:
1. Specify that only checkpoint files can be created at the checkpoint_disk location.
ALTER LOCATION checkpoint_disk
    WITH USAGE = (CHECKPOINT);
2. Prevent any files from being created at the new_db location.
ALTER LOCATION new_db WITH NOUSAGE;