J. Features Introduced in Ingres II 2.5 : Read-only Database Support : Example: Create a Read-only Database
 
Share this page                  
Example: Create a Read-only Database
For example, to create a read-only database called mydatabase on UNIX:
1. Log in as the installation owner.
2. Change location to the staging directory:
cd /stagingarea
3. Create directory and subdirectories:
mkdir ingres
mkdir ingres/data
mkdir ingres/data/default
4. Place appropriate permissions:
chmod 755 ingres
chmod 700 ingres/data
chmod 777 ingres/data/default
5. Change location to the database files:
cd /install/inst1/ingres/data/default
6. Run ingstop to cleanly shut down the Ingres installation. This will ensure a consistent copy of the database.
ingstop
7. Copy the database directory and its subdirectories to the new area:
cp -r mydatabase /stagingarea/ingres/data/default/
8. Restart Ingres:
ingstart
9. Change location to the staging area:
cd /stagingarea
10. Copy the directory structure from the staging area to the CD-ROM or other device:
cp -r ingres /cdrom
11. Create a new database location in the target installation using the create location statement or using the accessdb utility:
create location cdromloc with area='/cdrom', usage=(database);
12. Use the createdb command to access the read-only database in the target installation:
createdb -rcdromloc mydatabase