Kbase 14048: Use of Concealed Logicals on VMS for Multi-Vol Database
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Use of Concealed Logicals on VMS for Multi-Vol Database
INTRODUCTION:
=============
This is an example of how to setup and manipulate VMS concealed rooted
logicals for Progress Multi-volume Database access and maintanance.
WHY YOU NEED TO KNOW THIS:
===========================
Since Progress hardcodes the database extent location directly into
the .DB file of a multi-vol database, you cannot typically move or
relocate these extents without creating a new structure and copying
the existing database to the new empty void structure.
On VMS operating systems, we can use concealed rooted logicals to get
around this limitation. This allows the extents to be moved to new
locations by re-defining the logical rather than creating a new
structure.
PROCEDURAL APPROACH:
====================
Concealed rooted logicals can be used to reference Progress VMS
multi-vol database extents. Since Progress writes the actual
absolute paths into the master block of the .db file, using VMS
concealed logicals allows the files to be moved without having
to create a new structure. This is because VMS does not fully
translate a concealed logical. The rooted characteristic is
used to allow the same child directory name while the parent
directory path changes.
The key point to remember is to ALWAYS reference the database by
the concealed rooted logical, even while the empty void database
is being created.
The concealed logical can point to a device or to a sub-
directory on that device. The child directory where the database
is located MUST have the same name. In the example below, both
will be used to show how they can be manipulated. Also, a server
will be started so in the example the logical will be defined
in the system table.
A process level concealed rooted logical can be used to access
the database in single user mode.
A group or system level concealed rooted logical must be used to
start a server for a database.
The steps are as follows: (please refer to the Progress System
Admin. Doc for more information regarding creating multi-vol
databases)
1)define rooted concealed logical
2)set default to database directory using logical
3)create structure file, using logical pointers
4)create empty void database using structure file
5)Progress copy from a single vol or a multi-vol db to empty void db
6)start server for db
7)access db
8)shutdown server
9)change location of db and change loc of logical pointer
10)start server for db in new location
Ex.
1) define the rooted concealed logical for disk device $1$DIA2:, with
directory name of PROGDB.DIR which is located in root dir of device
$ define/sys/tran=conceal dbloc $1$dia2:[000000.]
2) set default to directory
$ set default dbloc:[progdb]
3)create structure file, refrencing logical.
d dbloc:[progdb]tst1.d1 f 40
d dbloc:[progdb]tst1.d2 f 40
d dbloc:[progdb]tst1.d3
4)create empty void db using structure file
$ prog/struc/create=tst1.st tst1
Formatting extents (blocks, path name, time):
40 DBLOC:[PROGDB]TST1.D1
Allocating 40 blocks.
Begin formatting 40 blocks.
Elapsed time: 00:00:00
40 DBLOC:[PROGDB]TST1.D2
Allocating 40 blocks.
Begin formatting 40 blocks.
Elapsed time: 00:00:01
1 DBLOC:[PROGDB]TST1.D3
Allocating 1 blocks.
Begin formatting 1 blocks.
Elapsed time: 00:00:00
5)copy existing db to new empty void db.
$prog/copy dlc:demo dbloc:[progdb]tst1
Copying DLC:DEMO to DBLOC:[PROGDB]TST1...
Start writing data blocks
323 blocks copied
...Copy complete.
6)start server using logical
$ prog/multi=start dbloc:[progdb]tst1
13:29:22 SERVER: Multi-user session begin with server TST1 (917)
7)access db
$ prog/multi=log dbloc:[progdb]tst1
8) shutdown server
$prog/multi=shut/kill dbloc:[progdb]tst1
Shutdown is executing. (1613)
Shutdown complete. (1614)
9)change location of db and logical pointers..
$show default
DBLOC:[PROGDB]
$show logical/full dbloc
DBLOC" [super] = "$1$DIA2:[000000.]" [concealed] (LNM$SYSTEM_TABLE)
Create new directory structure, where parent directory of
database is same as original location, in this example
PROGDB.DIR, note that this can be on any device..
$show default
$1$DIA2:[PROGDB.NEWDIR.PROGDB]
Copy database files to new location
$ copy/log $1$DIA2:[PROGDB]*.* *.*
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST.ST;4 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST.ST;1 (1 block)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.BI;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.BI;1 (128 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.D1;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.D1;1 (80 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.D2;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.D2;1 (80 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.D3;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.D3;1 (514 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.DB;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.DB;1 (4 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.LG;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.LG;1 (2 blocks)
%COPY-S-COPIED, $1$DIA2:[PROGDB]TST1.ST;1 copied to
$1$DIA2:[PROGDB.NEWDIR.PROGDB]TST1.ST;1 (1 block)
%COPY-S-NEWFILES, 8 files created
Re-define system logical pointer
$define/system/trans=conc dbloc $1$DIA2:[PROGDB.NEWDIR.]
%DCL-I-SUPERSEDE, previous value of DBLOC has been superseded
Set default to new location
$set default dbloc:[progdb]
$show default
DBLOC:[PROGDB]
10)start server for db in new location
$ prog/multi=start dbloc:[progdb]tst1
13:42:08 SERVER: Multi-user session begin with server TST1 (917)
Progress Software Technical Support Note # 14048