Administration Tools - oochangedb

Printer-friendly version
Displays and optionally changes the properties of a database or an individual image of a replicated database.
oochangedb
-db dbSysName | -id dbId
[-ap apSysName]
[[-host newDbHost] -filepath newDbFilePath [-catalogonly]]
[-allcontainerfiles | -localcontainerfiles]
[-movetoap newapSysName]
[-weight weight]
[-exists ask | delete | quit]
[-readonly | -readwrite]
[-standalone]
[-notitle]
[-quiet]
[-help]
[bootFilePath]
Options
-db dbSysName
System name of the database to be changed. If you use this option, you cannot use the -id option.
-id dbId
Integer identifier of the database to be changed (for example, 78). This option also accepts the identifier specified in D-C-P-S format (for example, 78-0-0-0). If you use this option, you cannot use the -db option.
-ap apSysName
(HA) System name of the autonomous partition containing the database image to be changed. This option is not required if there is only one image of the database.
-host newDbHost
New data-server host for the database file. To leave the host unchanged, omit both the -host and -filepath options. If you omit only the -host option, the default host is:
n
The host on which you are running this tool, if -filepath specifies a local path.
n
The host implied by -filepath, if an NFS mount name is specified.
If -filepath specifies a Windows UNC share name, newDbHost is set to the literal string oo_local_host; any value you specify is ignored.
-filepath newDbFilePath
New path (including the filename) to the database file on the designated host. To leave the path unchanged, omit both the -host and -filepath options. If the -host option designates a remote system, newDbFilePath must be full, not relative.
(HA) If you are changing the path of a database-image file, the designated host must be running AMS. Consequently, newDbFilePath must be a name that is understood locally by the host’s file system; you may not specify a Windows UNC share name. If newDbFilePath is an NFS mount name, it is automatically converted to the corresponding local pathname on the implied host.
-catalogonly
Updates the database’s location properties in the federated database’s global catalog, without physically moving or renaming the database file. This option is valid only in combination with the -host and -filepath options.
If the -allcontainerfiles or -localcontainerfiles option is specified, -catalogonly updates the relevant location properties in the specified database’s catalog of containers, without physically moving any container files.
-allcontainerfiles
Checks whether the specified database has external containers, and, if so, moves the files of all such containers (along with the database file) to the location designated by the -host and -filepath options. If those options are omitted or simply serve to rename the database file in place, the container files are moved to the directory currently containing the database file. Any container files already in the destination directory are left unchanged.
This option does not rename any container files. This option is ignored if the database does not have any external containers. Omitting this option leaves the location(s) of any container files unchanged.
-localcontainerfiles
Checks whether the specified database has external containers, and if so, whether the files of any such containers are local (in the same directory as the database file). Any local container files are moved (along with the database file) to the location designated by the -host and -filepath options; any nonlocal container files are left unchanged. (If those options are omitted or simply serve to rename the database file in place, no change is made to any container files.)
This option does not rename any container files. This option is ignored if the database does not have any external containers. Omitting this option leaves the location(s) of any container files unchanged.
-movetoap newapSysName
(HA) System name of the new autonomous partition that is to control the database. The oochangedb tool reports an error if the partition already contains an image of the database.
-weight weight
(HA) New weight of the designated database image. weight must be a positive integer. If it is 0, oochangedb reports an error.
-exists ask | delete | quit
Action to take if the file specified by the -host and -filepath options already exists.
ask Prompts whether to overwrite the existing file. If the answer is No, the program terminates. No is the default.
delete Overwrites any existing file.
quit Terminates without changing the database if the file currently exists.
The default value is ask.
-readonly
Changes the database to a read-only database. When a database is read-only, all requests for read locks are automatically granted and all requests for update locks are automatically refused, independently of the lock server. Making a database read-only applies to all its containers, including any external containers.
While a database is read-only, you can either read its contents or change it back to read/write. You must change the database back to read/write before you can perform any update operations on it.
(HA) If one image of a database is made read-only, all images are automatically made read-only.
-readwrite
Changes a read-only database back to a read/write database. When a database is read/write, all lock requests are serviced by the lock server. Making a database read/write applies to all its containers, including any external containers. All databases are created as read/write databases.
You can change a read-only database back to read/write only if no application or tool is currently reading either that database or any other read-only database in the same federated database.
(HA) If one image is changed back to read/write, all images are changed to back read/write.
-standalone
Nonconcurrent mode. Use this option if no lock server is running or to bypass a running lock server.
Warning: Corruption can occur if concurrent access to the federated database is attempted while any process is using this mode.
-notitle
Suppresses the copyright notice and program title banner. Useful when invoking the tool from another tool or product.
-quiet
Suppresses all normal program output.
-help
Prints the tool syntax and definition to the screen.
bootFilePath
Path to the boot file of the federated database containing the database to be copied. You can omit this argument if you set the OO_FD_BOOT environment variable to the correct path. (HA) You can specify the boot file of any autonomous partition.
Discussion
To move or rename the database file, use the -host and -filepath options. By default, oochangedb physically relocates the database file in the file system. To make the change only logically (without relocating the database file), you add the -catalogonly option. This is appropriate only if the file has been or will be relocated by an operating-system command.
If a database is read-only, you must change it back to read/write with the -readwrite option before you can change any other properties. You can change a read-only database back to read/write only if no application or tool is currently reading either that database or any other read-only database in the same federated database.
If you specify only the -db (or -id) and bootFilePath options, oochangedb provides a report of the current properties.
To move the database file and all related container files to a single location, use the -host, -filepath, and -allcontainerfiles options. (The -allcontainerfiles option consolidates distributed container files into a single directory.) If the database file and a subset of its related container files are already in the same directory, you can change that directory using the -localcontainerfiles option instead of -allcontainerfiles.
See also

Date: 
Tuesday, October 30, 2012
Product: 
Objectivity/DB
Version: 
10.2.1
10.2
10.1.4
10.1.2
9.4.1