Automated Creation of Location Directories
Before Version 2.6, the Ingres DBA had to manually create the directories for alternate locations as prescribed in the Database Administrator Guide. This step had to be performed prior to creating a Location with accessdb, or could be deferred if Locations were created using EXEC SQL CREATE LOCATION syntax. To circumvent directory permissions problems, accessdb had to be run by the Ingres user whenever Locations were created, altered, or extended.
This process is clarified and simplified in Ingres 2.6 with the following changes:
• The Ingres server performs all manipulations of Location directories. This resolves the permissions problems of earlier releases and allows any accessdb user with the “maintain_locations” privilege to create, alter, or extend Locations.
• The server automatically creates Location directories when a CREATE/ALTER LOCATION statement is executed, whether by accessdb or user-invoked SQL. Because only missing directories are created, the DBA retains the ability to manually create as much, or all, of the Location path as wanted before creating the Location.
Using the example from the section Create an Area in UNIX in the Database Administrator Guide, the following directories will be verified or created automatically during the execution of:
CREATE LOCATION new_loc WITH AREA='/otherplace/new_area', USAGE=(DATABASE)
Note:
• Permissions are not changed for extant directories.
• The top-level directory “/otherplace” must exist and will not be created by the server.
• Raw location directories (UNIX only) cannot be automatically created and must be made with the MKRAWAREA utility, which must be run by “root.” The Locations may be created prior to MKRAWAREA but a warning will be issued noting that the utility must be run prior to their use.