• No se han encontrado resultados

Ventilación natural

Updates IFIL Filenames for redirection to alternate locations.

The Redirect feature is used to allow a file originating in one directory structure to be repositioned into another directory location following autorecovery, dynamic dump restore, or replication. As a result, if the IFIL resource of the file contained a path, this path would be incorrect after the file was redirected to the new location. To support copying c-tree files from one directory location to another (on the same system or on a different system) and accessing them in their new location, it is necessary to update any filename paths in a c-tree data file's IFIL resource.

ctredirect is used to update the file names contained in the IFIL resource of the specified files.

ctredirect accepts as command-line options the name of a text file containing the list of files whose IFIL resources are to be updated and the name of a text file containing the filename redirection rules.

A comment may be placed in the redirection rules file by starting the line with a semi-colon (;).

Note: The rules must match the path in the IFIL resource, which may differ from the path used to open the file. The rules must precisely match the path in the IFIL resource, which may differ from the path used to open the file, therefore you may not use wild cards.

Usage

ctredirect -f <filenamelist> -r <redirectlist> -n <sect>

Where:

-f <filenamelist> - Name of a text file containing the names of c-tree data files whose IFIL resources are to be updated.

-r <redirectlist> - Name of a text file containing the redirection rules. The rules are in the format: <current path> <new path> (see the example below).

-n <sect> - Node sector size. The default is 64, corresponding to the server default PAGE_SIZE of 8192.

Example

Consider the current directory contains the data files customer.dat and inventory.dat, and their IFIL resources specify the path /export/home/users/marketing/data for the data and index files. The current directory contains the file myfiles.txt listing the following file names:

customer.dat inventory.dat

The current directory also contains the file myrules.txt containing the following redirection rules:

/export/home/users/marketing/data /export/home2/users/support/data

ctredirect is then called to change the paths in the IFIL resource of these two data files:

./ctredirect -f myfiles.txt -r myrules.txt

Updating the file paths in the IFIL resources of the specified files... [ OK ] customer.dat

[ OK ] inventory.dat

3.7

cttrnmod - Change Transaction Mode Utility

cttrnmod allows an advanced user to change the transaction status of a c-treeACE data file and its associated index files. The utility can also be used to display the transaction status of a c-tree data file and its associated indices.

It is expected only advanced database administrators will run this utility.

Usage

cttrnmod (set <tranmode>|get) (-d <database>|-f <filelist>)

[-u <userid>] [-p <password>] [-s <servername>] [-n <sect>]

Where

set <tranmode> Set the transaction mode to one of the following:

• T Full Transaction Control

• P Partial Transaction Control (No Recoverability)

• N No Transaction Control (No Recoverability) The following extended header attributes may also be set:

• {+,-}R {Enable,Disable} Restorable deletes

• {+,-}C {Enable,Disable} Transaction controlled deletes

get Display the current transaction mode.

-d <database> Operate on all files in the c-tree database <database>.

-f <filename> Operate on all files listed in the file <filelist>.

-u <userid> Specify c-tree user ID.

-p <password> Specify c-tree user password.

-s <servername> Specify c-treeACE Server name to connect to. Default: FAIRCOMS

-n <sect> Specify node sector size. Default: 64 (PAGE_SIZE=8192)

The files to change are specified by either the -d <database> option or the -f <filelist> option. The

-d <database> option specifies the name of a c-tree database -- when this option is specified, the utility operates on all files referenced in that database (excluding SQL system data and index files). The -f <filelist> option specifies the name of a text file containing names of c-tree data files, one per line -- when this option is specified, the utility operates on all files specified in that text file.

Note: Indices created with ctPREIMG or ctTRNLOG are physically structured differently than indices that do not support transactions. Thus a non-tran index cannot be converted to

transaction control, and must be rebuilt after the conversion. If an index file is created ctPREIMG

Important Performance Considerations

When turning transaction processing off for a file, it is possible to take an even larger

performance hit under specific c-treeACE Server configurations. Be sure to remove or comment out the line COMPATIBILITY FORCE_WRITETHRU from your c-treeACE Server configuration file

ctsrvr.cfg. While this option provides only the safest of data integrity for your non-transaction

processing controlled files, it forces an enormous performance penalty for doing so. This keyword has historically been included by default with most c-treeACE Server installations.

Example

The following example demonstrates turning off transaction control for all c-tree data files and their associated index files in the rdsdb database:

# cttrnmod set N -d rdsdb

Setting transaction mode to NON_TRAN for files in database rdsdb... Tranmode Filemode Filename

--- --- --- NON-TRAN 0x0000 .\rdsdb.dbs\admin_deptbl.dat NON-TRAN 0x0000 .\rdsdb.dbs\admin_deptbl.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_dept_multi_ndx.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_dept_ndx.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl.dat NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_emp_no_ndx.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl1.dat NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl1.idx NON-TRAN 0x0000 .\rdsdb.dbs\admin_emp_no_ndx1.idx VERIFYING No Transaction Control...

VERIFY succeeded

3 Data Files Updated 0 Errors

The following example demonstrates reading the transaction status of the data and index files in the rdsdb database:

# cttrnmod get -d rdsdb

Reading transaction mode for files in database rdsdb... Tranmode Filemode Filename

--- --- --- ctTRNLOG 0x0031 .\rdsdb.dbs\admin_deptbl.dat ctTRNLOG 0x0031 .\rdsdb.dbs\admin_deptbl.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_dept_multi_ndx.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_dept_ndx.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl.dat ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emp_no_ndx.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl1.dat ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl1.idx ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emp_no_ndx1.idx

ctTRANMODE Control (c-treeACE V11 and c-treeRTG V2 and later)

When using the Transaction Control utility, cttrnmod, to disable transaction support on a file with extended file mode ctTRANMODE, the utility could report that after successfully disabling

ctTRNLOG, the file still has ctTRNLOG set. This is expected for a file with the ctTRANMODE bit set when using a TRANPROC c-tree application.

cttrnmod has been updated to disable ctTRANMODE and ctPIMGMODE bits when it sets a file to no-transaction support. It was also modified to support explicitly enabling or disabling one of these bits (depending on the file mode that is in effect at the time).

Usage

cttrnmod (set <tranmode>|get) (-d <database>|-f <filelist>)

[-u <userid>] [-p <password>] [-s <servername>] [-n <sect>]

Current Options

set <tranmode> - Set the transaction mode to one of the following:

T - Full Transaction Control.

P - Partial Transaction Control (No Recoverability).

N - No Transaction Control (No Recoverability).

repl=on - Enable replication (requires full transaction control).

repl=off - Disable replication.

The following extended header attributes may also be set:

{+,-}R - {Enable,Disable} Restorable deletes.

{+,-}C - {Enable,Disable} Transaction controlled deletes.

{+,-}A - {Enable,Disable} Auto transaction switching.

get - Display the current transaction mode.

-d or -f - Operate on all files in the database or all listed files:

-d <database> - Operate on all files in the c-tree database <database>.

-f <filelist> - Operate on all files listed in the file <filelist>.

-u <userid> - Specify c-tree user ID.

-p <password> - Specify c-tree user password.

-s <servername> - Specify c-tree Server name to connect to. Default: FAIRCOMS

-n <sect> - Specify node sector size. Default: 64 (PAGE_SIZE=8192)

Replication

New replication actions have been added to the cttrnmod utility for flexible control of replication attributes.

cttrnmod now displays replication state for a data file

cttrnmod can change a file's replication state with a new repl option

Note: Replication requires that the data file has a unique index and that the data and index files are using full (ctTRNLOG) transaction control.

Examples

1. Enable full transaction logging on files:

# cttrnmod set T -f files.txt -u ADMIN -p ADMIN -s FAIRCOMS Setting transaction mode to ctTRNLOG for files listed in file files.txt...

Replicate Tranmode Filemode Filename --- --- --- ---

NO ctTRNLOG 0x0032 ctreesql.dbs\admin_t.dat ctTRNLOG 0x0032 ctreesql.dbs\admin_t.idx ctTRNLOG 0x0032 ctreesql.dbs\admin_t_ti.idx

Note the "Replicate" column for current replication state information. 2. Enable replication on files:

# cttrnmod set repl=on -f files.txt -u ADMIN -p ADMIN -s FAIRCOMS Enabling replication for files listed in file files.txt...

Replicate Tranmode Filemode Filename --- --- --- ---

YES ctTRNLOG 0x0032 ctreesql.dbs\admin_t.dat ctTRNLOG 0x8032 ctreesql.dbs\admin_t.idx ctTRNLOG 0x8032 ctreesql.dbs\admin_t_ti.idx

Note: If cttrnmod is used to disable full transaction logging for a file, it also disables replication for that file.

Documento similar