Progress
Database Administration
Guide and Reference
Copying a Database
To copy a source database to a target database, use one of the following:
These utilities copy not only the contents of a database but the database structure as well. Consequently, a target database must contain the same physical structure as the source database. For example, it must have the same number of storage areas, records, blocks, and block size.
NOTE: Do not use an operating system utility to copy a Progress database.For more information about administration utilities, such as PROCOPY and PRODB, see Database Administration Utilities."
EXAMPLE
Use the PROCOPY utility to copy an existing database. For example, to copy the
Sports2000
database to a database namedmysports2000
, enter the following:
PROCOPY supports storage areas. Therefore, if a target database exists, it must contain at a minimum the same type and number of storage areas and same extent types as the source database. However, the number of extents in the storage areas of the target database do not need to match the number of extents in the source database. Progress attempts to extend the existing extents in the target database to accommodate the possible increase in size.
If a target database does not exist, PROCOPY creates one using an existing structure description (ST) file in the target database directory. If an ST file does not exist, PROCOPY creates the target database using the structure of the source database and places all of the extents in the same directory as the target database structure (DB) file, even when the source database resides in multiple directories.
PROCOPY Uses Absolute Pathnames
When you use the PROCOPY utility, the target database you create always has an absolute pathname regardless of the pathname convention used by the source database. For more information on absolute pathnames, see the "Relative- and Absolute-path Databases" section in The Progress Database."
For example, if you use PROCOPY to create a database, name it
example2
, and use a relative path database such assports2000
as the source database,example2
will have an absolute pathname even though the source database,sports2000
, uses a relative pathname. Use PROSTRCT LIST to verify the absolute pathname of your target database. For example:
In the following sample output of the PROSTRCT LIST utility, note the absolute pathname of the database,
example2.db
:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |