Previous Topic

Next Topic

Create Location

Valid in: SQL, ESQL

The Create Location statement assigns a name to a physical disk and directory location.

To change the characteristics of an existing location, use the alter location statement. To delete an existing location, use the drop location statement. For detailed information about locations, see the Database Administrator Guide. To specify the work (sorting) locations for a session, use the set work locations statement.

Previous Topic

Next Topic

Syntax

The Create Location statement has the following format:

[EXEC SQL] CREATE LOCATION location_name

WITH AREA = area_name,

USAGE = (usage_type {, usage_type}) | NOUSAGE

RAWPCT = n

To prevent any files from being stored at the location, specify WITH NOUSAGE.

Previous Topic

Next Topic

Embedded Usage

In an embedded Create Location statement, the with clause can be specified using a host string variable (with :hostvar). Usage_type and area_name can be specified using host string variables.

Previous Topic

Next Topic

Permissions

You must have maintain_locations privileges and be working in a session that is connected to the iidbdb.

Previous Topic

Next Topic

Locking

The Create Location statement locks pages in the iilocation_info catalog.

Previous Topic

Next Topic

Related Statements

Alter Location

Drop Location

Grant (privilege)

Modify

Locations can be assigned when creating tables or indexes by using the following statements:

Create Index

Create Table

Declare Global Temporary Table

Modify...to Relocate

Work Locations

Previous Topic

Next Topic

Examples: Create Location

The following are Create Location statement examples:

VMS:

Create a new location for databases; allow all types of files to be stored.

create location accounting_db with area = 'disk1:',

usage = (all);

Create a new location, but prevent any files from being created there.

create location new_db with area = 'disk2:',

nousage;

UNIX:

Create a location using a UNIX path.

create location extraloc

with area = '/usr/ingres_extra',

usage = journal, checkpoint;


© 2007 Ingres Corporation. All rights reserved.