Open topic with navigation
This topic includes the following sections:
Before generating a system catalog, do the following:
You can set some system catalog generation options when you generate. See Generating a system catalog from the command line (dbcreate) and Generating a system catalog with DBA.
You can generate the system catalog from the command line with the dbcreate utility or from the xfODBC Database Administrator (DBA), a program that can also be used to modify the system catalog. We recommend you use dbcreate because it enables you to see messages that document the system catalog generation process.
When you generate a system catalog, dbcreate or DBA will do the following:
To generate a system catalog, xfODBC must be able to locate the error message file. For information, see Specifying the error message file (GENESIS_MSG_FILE).
For information on generating a system catalog or a set of system catalogs for databases that share a repository, see Handling a repository shared by multiple databases.
You can run dbcreate from the command line on Windows, UNIX, and OpenVMS. For client/server configurations, dbcreate must be run from the server. Dbcreate is in the connect subdirectory of the main Synergy/DE installation directory. (For information on options used to regenerate a system catalog, see Regenerating the system catalog with dbcreate.)
The syntax for dbcreate is as follows:
dbcreate [option] [...]
Generates a system catalog from a repository. If it’s generated to a directory that already contains a system catalog, it is overwritten. (User and group files, however, are not created or overwritten ‑c is used in conjunction with ‑p.)
If you use a conversion setup file (‑i), tables marked as OUT are omitted from the system catalog.
Updates a system catalog. If the repository has new structures, they are added to the system catalog as new tables. If the repository has structures that are different than the corresponding tables in the system catalog, these tables are updated (unless you specify ‑u.) User and group files are not affected unless ‑p is used.
If you use a conversion setup file (‑i), tables marked as OUT are not overwritten or removed. Settings in the conversion setup file are applied for tables marked as IN.
Adds new structures as new tables in the system catalog. Tables that are already part of the system catalog are not updated. (User and group files are not affected unless this option is used in conjunction with ‑p.)
Conversion setup file settings are ignored with ‑u.
‑r repository_main_file repository_text_file
Specifies the location and name of the repository main file and repository text file. If specified, ‑r overrides RPSMFIL, RPSTFIL, and RPSDAT settings. If not specified, dbcreate uses RPSMFIL, RPSTFIL, and RPSDAT to locate the repository files.
Specifies the directory where the system catalog will be created. If not specified, the system catalog will be created in the working directory.
When used with ‑i, this option creates user and group system catalog files, if they don’t already exist, initializing them with default values. (If user and group files already exist, ‑i will prevent ‑p from initializing them.) When used without ‑i, this option initializes existing users and groups, but won’t create user and group files if they don’t already exist.
The ‑p option does not affect system catalog files other than the user and group files. It may be used with ‑c, ‑i, ‑n, ‑u, and ‑x. It can also be used alone after other system catalog files have been created, but dbcreate will attempt to regenerate the system catalog.
For more information, see Initializing users and groups.
Use with ‑p. Prevents changes to existing users and groups, but enables dbcreate to create user and group system catalog files if they don’t already exist.
When ‑i is specified with a conversion_setup_file, specifies the conversion setup file to use. If you specify a filename without specifying a path, dbcreate looks for the file in the current working directory. This option overrides the SODBC_CNVFIL setting. For client/server configurations, the conversion setup file must be on the server.
If ‑i is specified without a conversion_setup_file, dbcreate does not use a conversion setup file—even if the SODBC_CNVFIL environment variable is set.
Creates a log file to record dbcreate messages. Log_file specifies the path and filename for the log file. Include the filename extension. If you don’t specify a path, the file is saved to the current working directory. Do not use an environment variable in the path specification; no log file will be generated.
If ‑l is not specified, messages are printed to the screen.
By default, ‑l logs only cautions and errors. For verbose logging, use ‑v with ‑l.
Verbose logging, which includes information messages in addition to cautions and errors. When used with ‑l, the log is written to file; otherwise, it is written to the screen. This option can be used with ‑c, ‑u, or ‑x. (Note: If you use ‑v with ‑u or ‑x and a conversion setup file, the log incorrectly indicates that conversion setup file settings are applied. Instead, none are applied if used with ‑u. If used with ‑x, only settings for tables marked as IN are applied.)
‑? or ‑h
Displays a list of dbcreate options.
On OpenVMS, the dbcreate utility is set up as a verb. So if you pass more than eight parameters to dbcreate, you must enclose the parameters in quotes. Each option counts for one parameter, and each path specification counts for a parameter. The following command, for example, has nine parameters, so they must be enclosed in quotes:
$ DBCREATE "-C -R DATA:RPSMAIN DATA:RPSTEXT -P -D CAT: -l LG.TXT"
You don’t have to specify ‑c, ‑u, or ‑x, but if you do, you must specify only one of these options. If you don’t specify any of them, dbcreate uses the default option, which is ‑u if the system catalog exists or ‑c if the system catalog doesn’t already exist.
When you first use dbcreate to generate a new system catalog from your repository definitions, you must use the ‑p option to initialize users and groups. This command creates user and group files (sodbc_users.* and sodbc_groups.*) along with other system catalog files. Without these files, there is no user or password validation when connecting to the database, and all connected users have read-only access to all tables. Be sure to generate these files and keep them with the other system catalog files.
In the following examples, the repository files are named rpsmain and rpstext and are located in a directory defined by the environment variable DATA. The system catalog files will be created in a directory defined by the environment variable TARGET.
On Windows and UNIX:
dbcreate -c -r DATA:rpsmain DATA:rpstext -p -d TARGET:
$ DBCREATE -C -R DATA:RPSMAIN DATA:RPSTEXT -P -D TARGET:
We recommend that you run dbcreate from the command line to generate a system catalog rather than using the DBA program because dbcreate enables you to see messages that document the generation process.
For client/server configurations, DBA must be run from the server.
|1.||Start DBA by opening Windows Control Panel, selecting Synergy Control Panel, and clicking “xfODBC DBA”. Or start it by the following at a Windows or UNIX prompt:|
To open DBA from an OpenVMS prompt, type the following:
$ RUN SODBC_DBA:XFDBA.EXE
|2.||Select Catalog > Generate. (For information on using the menus and windows in DBA, see DBA basics.)|
If you have not yet opened a system catalog, a window is displayed with the following message:
No system catalog connected.s
|3.||Click OK or press enter. The Generate System Catalog window is displayed. (See figure 1.)|
|4.||Enter or modify data in the fields as instructed below:|
Enter the name and location of your repository main file (for example, rpsmain.ism). If the RPSMFIL environment variable is set, this field is automatically populated with the RPSMFIL setting (a path and filename). If RPSMFIL is not set, but RPSDAT is, this field is automatically populated with the RPSDAT setting (a path) and the rpsmain.ism filename.
Enter the name and location of your repository text file (for example, rpstext.ism). If the RPSTFIL environment variable is set, this field is automatically populated with the RPSTFIL setting (a path and filename). If RPSTFIL is not set, but RPSDAT is, this field is automatically populated with the RPSDAT setting (a path) and the rpstext.ism filename.
Enter the directory in which you’d like to place the system catalog files. If you’re regenerating a system catalog and you used the ‑c command-line option when starting DBA, this field displays the path specified in the dictsource line of the connect file.
If you’re regenerating an existing system catalog and you want to use a conversion setup file as input, enter the path and filename. If you’ve set the SODBC_CNVFIL environment variable, DBA automatically populates this field with the SODBC_CNVFIL setting. Clear the field (or leave it blank) if you do not want to use a conversion setup file. For client/server configurations, the conversion setup file must be on the server.
Field report view
Clear this option if you want DBA to ignore repository report view flag settings and include all fields—both viewable and non-viewable. Select this option if you want DBA to omit fields with report view flag settings of non-viewable. Note, however, that fields defined as keys or tags in Repository are always included in the system catalog.
If you’re generating a new system catalog, leave the default option, Clear and re-create catalog, selected. (This isn’t the default if you opened a system catalog before step 2.)
Initialize users and groups
Select this option to create or restore the default set of users and groups. If you select this option and do not select “Overwrite existing”, DBA creates the default set of users and groups only if the system catalog has no users and groups. However, if you select this option and “Overwrite existing”, DBA creates the default users and groups, even if the system catalog already has users and groups. In this case, DBA regenerates the sodbc_users and sodbc_groups files in the directory specified as the dictsource path in the connect file, and all changes you’ve made to users and groups are lost. For information on the default set of users and groups, see Initializing users and groups.
When you first generate a new system catalog from your repository definitions, you must use the “Initialize users and groups” option, which creates user and group files (sodbc_users.* and sodbc_groups.*). Without these files there is no user or password validation when connecting to the database, and all connected users have read-only access to all tables. Be sure to generate these files and keep them with the other system catalog files.
Select this option to overwrite existing users and groups; all changes you’ve made to users and groups will be lost. This option is available only when “Initialize users and groups” is selected.
|5.||Click OK or press enter to start the generation.|
Unless an error occurs, an information window will open and display the message “System catalog generated.” If there is an error, a log file (ConvErrs.log) will be created in your TEMP directory.
|6.||Make sure the system catalog has a table for each structure you want included.|