Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 9 Configuring Your Pagestore on Open Systems : Adding a Page File to a Segment

Adding a Page File to a Segment
If a segment is nearing its data capacity, you can use one of two procedures to add one or more page data sets to the segment:
1.
Use backup and restore utilities along with segment balance. This is the recommended method especially if the segment has many tables.
2.
See Also
TIBCO Object Service Broker for Open Systems Utilities and TIBCO Object Service Broker for Open Systems Managing Backup and Recovery for specific information about the utilities mentioned in the following sections.
Procedure 1: Using Backup and Restore Utilities
Complete the following tasks to add a page data set to an existing segment.
 
Task A If the segment is SEG0, shutdown the Data Object Broker
Issue the following command, replacing nn with the segment number:
hrncr dboffline=nn
Task B Perform a backup of the segment
Use hrntlbps (Backup Pagestore utility) to back up the segment. Issue the following command, replacing nn with the segment number:
hrntlbps -s nn segnn.bak
Task C Verify that the backup is good
Use hrnbrptr (Batch Pointer Check utility) to check the backup.
1.
Issue the following command, replacing nn with the segment number:
hrnbrptr -s nn -h -A snnAudit.txt -H snnHeader.txt -E snnError.txt -R snnReflog.txt -O snnOrphan.txt segnn.bak
2.
3.
Task D Increment the number of data files
1.
2.
Locate the “DB TYPE=PAGE,ACBS=n,…” statement for the segment you want to expand.
3.
Refer to TIBCO Object Service Broker for Open Systems Installing and Operating for information about the dbdef file.
4.
Task E Initialize the new page files
Use hrntlfps (Format Pagestore utility) to initialize the new page files. Issue the following command, replacing nn with the segment and page numbers:
hrntlfps %OS_ROOT%\database\SEGnn\PAGEnn
hrntlfps ${OS_ROOT}/database/SEGnn/PAGEnn
Task F Perform a backup of the expanded segment
Use hrntlbps to backup the expanded segment. Issue the following command, replacing nn with the segment number:
hrntlbps -s nn segnn.bak2
Task G Verify the expanded data set
Use hrnbrptr (Batch Pointer Check utility) to check the backup.
1.
Issue the following command, replacing nn with the segment number:
hrnbrptr -s nn -h -A snnAudit.txt -H snnHeader.txt -E snnError.txt -R snnReflog.txt -O snnOrphan.txt segnn.bak
2.
3.
At this point the expanded segment can be used by the Data Object Broker by skipping to Shutdown the Data Object Broker; however, we recommend that hrnbrbal (Segment Balance utility) be used to balance the data across all the segment's page data sets. This will distribute I/O for new data across all page data sets, yielding better performance.
Task H Distribute the segment data across the page data sets
hrnbrbal (Segment Balance utility) takes your backup and creates a new backup data file reflecting evenly populated page files. To use this utility issue a command similar to the following replacing nn with the segment number and xx with the number of files in the new segment definition:
hrnbrbal -A auditreport -p 40000 -s nn -f xx -N segnnnew.bak segnnold.bak
Refer to TIBCO Object Service Broker for Open Systems Utilities for detailed information about using this utility.
Task I Verify the balanced segment
Use hrnbrptr (Batch Pointer Check utility) to check the backup.
1.
Issue the following command, replacing nn with the segment number:
hrnbrptr -s nn -h -A snnAudit.txt -H snnHeader.txt -E snnError.txt -R snnReflog.txt -O snnOrphan.txt segnn.bak
2.
3.
Task J Reallocate and format the page date files
Use hrntlfps to reallocate and format the new page files in the segment. Issue the following command, replacing nn with the segment and page numbers:
hrntlfps %OS_ROOT%\database\SEGnn\PAGEnn
hrntlfps ${OS_ROOT}/database/SEGnn/PAGEnn
Task K Restore the data to the newly formatted page files
Use hrntlrps (Restore Pagestore utility) to restore the data to the newly formatted page files, i.e., the backup created in Task H, Distribute the segment data across the page data sets. Issue the following command, replacing nn with the segment number:
hrntlrps -r -s nn segnewnn.bak
Task L Backup and verify the data set
This task ensures that the restore has been successful.
1.
2.
Make sure that you use new backup names so that previous backups are not overwritten. This is especially important for the backup created in Perform a backup of the segment which is the fallback backup for this entire procedure.
Task M Shutdown the Data Object Broker
To ensure an orderly shutdown, complete the following steps:
1.
2.
3.
4.
5.
For details, see TIBCO Object Service Broker for Open Systems Installing and Operating.
Task N Restart the Data Object Broker
From the system console, issue the command to start the Data Object Broker. You may need to bring the expanded segment online, using dbonline, which is included in the following example:
hrncr dbonline=nn
For details, see TIBCO Object Service Broker for Open Systems Installing and Operating.
Procedure 2: Using Unload and Load Utilities
Procedure 1: Using Backup and Restore Utilities is the recommended procedure but if your segment does not have many tables you may find it more convenient to use the unload and load utilities instead.
 
Task A If the segment is SEG0, shutdown the Data Object Broker
Issue the following command, replacing nn with the segment number:
hrncr dboffline=nn
Task B Perform a backup of the segment
Use hrntlbps (Backup Pagestore utility) to back up the segment. Issue the following command, replacing nn with the segment number:
hrntlbps -s nn segnn.bak
Task C Verify that the backup is good
Use hrnbrptr (Batch Pointer Check utility) to check the backup.
1.
Issue the following command, replacing nn with the segment number:
hrnbrptr -s nn -h -A snnAudit.txt -H snnHeader.txt -E snnError.txt -R snnReflog.txt -O snnOrphan.txt segnn.bak
2.
3.
Task D Unload the table date from the segment
Use hrnbrulb (Batch Unload utility) to unload the table data. For details, see TIBCO Object Service Broker for Open Systems Utilities.
For each table to be unloaded from the segment, you must prepare control statement information using the BATCHUNLD_CARDS tool. For details, see TIBCO Object Service Broker Shareable Tools.
Task E Increment the number of data files
1.
2.
Locate the “DB TYPE=PAGE,ACBS=n,…” statement for the segment you want to expand.
3.
Refer to TIBCO Object Service Broker for Open Systems Installing and Operating for information about the dbdef file.
4.
Task F Initialize the segment page files
Use hrntlfps to initialize the new page files in the segment. Issue the following command, replacing nn with the segment and page numbers:
hrntlfps %OS_ROOT%\database\SEGnn\PAGEnn
hrntlfps ${OS_ROOT}/database/SEGnn/PAGEnn
Task G Reload each table’s date into the expanded segment
Use hrnbrtbl (Batch Load utility) to load the table data. For details, see TIBCO Object Service Broker for Open Systems Utilities.
For each table to be unloaded from the segment, you must prepare control statement information using the BATCHLOAD_CARDS tool. For detailed information about this tool refer to TIBCO Object Service Broker Shareable Tools.
Task H Perform a backup of the segment
Use hrntlbps to backup the expanded segment. Issue the following command, replacing nn with the segment number:
hrntlbps -s nn segnn.bak2
Task I Verify that the backup is good
Use hrnbrptr (Batch Pointer Check utility) to check the backup.
1.
Issue the following command, replacing nn with the segment number:
hrnbrptr -s nn -h -A snnAudit.txt -H snnHeader.txt -E snnError.txt -R snnReflog.txt -O snnOrphan.txt segnn.bak
2.
3.
Task J Shutdown the Data Object Broker
To ensure an orderly shutdown, complete the following steps:
1.
2.
3.
4.
5.
For details, see TIBCO Object Service Broker for Open Systems Installing and Operating.
Task K Restart the Data Object Broker
From the system console, issue the command to start the Data Object Broker. You may need to bring the expanded segment online, using dbonline, which is included in the following example:
hrncr dbonline=nn
For details, see TIBCO Object Service Broker for Open Systems Installing and Operating.
 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved