HP Large Objects System Management Manual – 543599.001 HP Large Objects System Management Manual Release 1.
HP Large Objects System Management Manual – 543599.001 VERSION ID. 543599.001 RELEASE DATE September 2006 DESCRIPTION OF CHANGES Initial release.
HP Large Objects System Management Manual – 543599.001 Table of Contents 1. Introduction............................................................................................................5 1.1 Why Storing Large Objects with SQL has limitations?.................................5 1.2 Product Description .......................................................................................5 2 Quick Start Guide ........................................................................................
HP Large Objects System Management Manual – 543599.001 3.6.7 dropObjectStore.sh script.....................................................................27 3.6.8 uninstall.sh script .................................................................................27 3.6.9 usageReport.sh script ...........................................................................27 4 Suggested Usage ..................................................................................................28 4.1 Installation..
HP Large Objects System Management Manual – 543599.001 1. Introduction NonStop SQL enables applications to store Large Objects in the Guardian file space. Any size object can be stored from 2 kilobytes to many megabytes or gigabytes – the only constraint being the availability of disk storage. Any type of object can be stored provided it has a predefined size and can be collected (or buffered) into a NonStop application.
HP Large Objects System Management Manual – 543599.001 Each Buddy Space has a corresponding Free Space Map (FSM) File that defines the space allocated within the Buddy Space. The FSM is also an unstructured Enscribe file. A collection of Buddy Spaces and their FSM Files is called a Buddy Set. The diagram below shows the different length segments deployed in Buddy Spaces which combine together to form a Buddy Set.
HP Large Objects System Management Manual – 543599.001 2 Quick Start Guide 2.1 What is provided? 1. NonStop Open System Services (OSS) scripts to create the Object Store environment 2. API Library (a bindable object, [not a Common Runtime Library or a dynamiclink library (DLL)]) 3. Utility programs (buddycon, buddymon, buddyreload) 4. Sample calling programs for all APIs (note these are not part of the supported product, but are provided as samples) 2.
HP Large Objects System Management Manual – 543599.001 The Guardian Large Object environment is now ready to use. 2.4 Creating Buddy Groups, Sets and Spaces Use the Large Object sample programs to establish Buddy Groups, Sets and Spaces. These are placed under bin directory. 1. All samples programs require command line parameters - for usage run the program without any parameters, for example: createbgroup 2. Create one or more Buddy Groups, for example: createbgroup grp01 createbgroup grp02… and so on.
HP Large Objects System Management Manual – 543599.001 9. Stores the next part of the object, for example to store the next 20 MB of the object content: buddytest put grp01 -3931360999717732352 object3 10000000 20000000 10. Stores the final part of the object, for example, to store the final 10 MB of the object content: buddytest put grp01 -3931360999717732352 object3 30000000 10000000 11.
HP Large Objects System Management Manual – 543599.001 example, if more objects are expected of a certain size, then more BuddySpace files would be configured to house those more frequently used sizes. 3.1.4 Free Space Map (FSM) The FSM is the key to the usage of the BuddySpace. Therefore, there must be one FSM per BuddySpace. The FSM is also an unstructured Enscribe file, existing in the same subvolume as the BuddySpace to which it relates. 3.1.
HP Large Objects System Management Manual – 543599.001 112 = Failed - Buddy Group not found 113 = Failed - Buddy Group Inactive 115 = Failed - Buddy Group already open 117 = Failed – Another Buddy Group is already open 100 = a system error occurred (call GetSystemErrorString) pBuddyGroupName: is a 5 character alphanumeric name with no embedded spaces for example, “GRP01” or “B01” 3.2.2 CloseBuddyGroup Close all Buddy Sets within a currently open Buddy Group.
HP Large Objects System Management Manual – 543599.001 120 = Failed – Object Id not found 121 = Failed – Object Offset and/or Length invalid or out of range 100 = a system error occurred (call GetSystemErrorString) ObjectId: is a unique 64 bit number to identify an object – previously returned by PutBuddyObject or AllocateBuddyObject. ByteOffset: is a 32 bit number representing the starting point for extraction of the Object.
HP Large Objects System Management Manual – 543599.001 pCallerTransAborted: indicates whether the caller’s NonStop Transaction Management Facility (TMF) transaction has been aborted. This is irrelevant if the caller has allowed the API to start the transaction. 0 = not aborted 1 = aborted 3.2.5 AllocateBuddyObject Allocates a storage area for a new Object, but doesn’t store the Object content. One or more calls to PutBuddyObject subsequently store the Object content in the allocated space.
HP Large Objects System Management Manual – 543599.001 ObjectId: is a 64 bit unique number to refer to the Object. pCallerTransAborted: indicates whether the caller’s TMF transaction has been aborted 0 = not aborted 1 = aborted 3.2.7 GetSystemErrorString This returns the most recent error string associated with a system error. The calling application might call this function to retrieve more information about why the API returned 100 (system error) in the previous call.
HP Large Objects System Management Manual – 543599.001 pBuddyGroupName: A 5 character alphanumeric name with no embedded spaces, for example: GRP01 or B01 pCallerTransAborted: Indicates whether the caller’s TMF transaction has been aborted 0 = not aborted 1 = aborted 3.3.2 DeleteBuddyGroup Deletes a Buddy Group. The Buddy Group must be “inactive” before deletion is permitted. An inactive Buddy Group is one that has no Buddy Sets.
HP Large Objects System Management Manual – 543599.001 2) The BuddySet subvolume name is automatically derived from data held in the Large Object SQL DB. The name is formulated as follows: ssssxxnn Where, ssss is the ObjectStoreNumber (as set in the .profile shell script) xx is an alpha pair automatically associated with the BuddyGroup. nn is a sequential number allocated when each BuddySet is created. Examples of subvolume names are: LS01AA01, LS01AA02 and LS01AB01, LS01AB02 and so on.
HP Large Objects System Management Manual – 543599.001 Return value: 0 = Successful 112 = Failed – Buddy Group not found 131 = Failed – Volume/subvolume don’t exist 132 = Failed – Buddy Set is opened and/or active 100 = System error (call GetSystemErrorString) pBuddyGroupName: A 5 character alphanumeric name with no embedded spaces, for example: GRP01 or B01. pBuddyVolume: An 8 character volume name (including “$”) to identify the BuddySet for deletion.
HP Large Objects System Management Manual – 543599.001 pBuddySubvolume: An 8 character subvolume name of an existing Buddy Set. BuddyPower: A valid power of two (derived from the segment size) for the target BuddySet which specifies the new Buddy Space to be created. For example, if the BuddySpace consists of 512 byte segments, a BuddyPower of 9 would be specified. pCallerTransAborted : Indicates whether the caller’s TMF transaction has been aborted 0 = not aborted 1 = aborted 3.3.
HP Large Objects System Management Manual – 543599.001 0 = not aborted 1 = aborted 3.3.7 SetBuddyGroupParm Creates or amends a single specified parameter for a given BuddyGroup. Parameters for a Buddy Group can only be amended/created whilst the Buddy Group is inactive. This API does not check that values are sensible, only valid. It is therefore vital not to change anything without understanding the affects on the system. See Appendix B, for parameter descriptions.
HP Large Objects System Management Manual – 543599.001 This API would run periodically by the system administrator to monitor the usage of storage both at BuddySet and BuddySpace level. When a BuddySpace becomes close to full, additional BuddySpace files should be created using the CreateBuddySpace API. Notes: 1) This is a stand-alone API and does not require an application to previously call OpenBuddyGroup or subsequently call CloseBuddyGroup.
HP Large Objects System Management Manual – 543599.001 programs to refer to objects, is retained – the references that application programs retain are therefore unaltered. Therefore, there is no impact on applications by using this utility. The program may run in two modes exclusive and shared. For exclusive mode, the program first checks whether it can open all Buddy Space and FSM files within both the in and out Buddy Sets in exclusive mode.
HP Large Objects System Management Manual – 543599.001 While the Large Object APIs works perfectly without the BuddyGroupMonitor, the system will not handle full storage correctly, and so it is advised that there should be one BuddyGroupMonitor running for each active BuddyGroup at all times. buddymon The buddymon program can be made persistent in the Guardian environment using the standard Subsystem Control Facility (SCF) commands.
HP Large Objects System Management Manual – 543599.001 createCatalog.sh createObjectStore.sh createPartition.sh metaData.sh dropObjectStore.sh uninstall.sh usageReport.sh locations. Creates a standard SQL/MP catalog (invokes SQLCI) Creates Object Store SQL/MP tables and assigns appropriate extent sizes (invokes SQL conversational interface - SQLCI) Optional script to create multiple disk partitions (invokes SQLCI). This script partitions the qBuddy, buddySp, objBuddy and uidObj tables.
HP Large Objects System Management Manual – 543599.001 catalogVolumeName SQL catalog subvolume name and as the first element of the Buddy Set subvolume name. The name must start with an alpha letter for example, sys1. The name of the volume where the SQL catalog is to be created. Must be in the format \$xxxxxx for example, \$data01 none 3.6.2 define.sh script The define.sh script is loaded automatically by .profile and takes the catalog location from the .profile settings.
HP Large Objects System Management Manual – 543599.001 Guardian security the calculation of the extent sizes. The standard Guardian security setting to be used in creating the SQL tables. oooo 3.6.5 createPartition.sh script The createPartition.sh script accepts parameters interactively via the OSS command prompt.
HP Large Objects System Management Manual – 543599.001 presented to you of all available volumes. 3.6.6 metaData.sh script The metaData.sh script accepts parameters interactively via the OSS command prompt. Invoke the script from the OSS prompt by typing: metaData.sh Accepted Parameter Min power of two Default Value 9 Max power of two 20 File Size 2048 Buddy Space audit flag zero (non-audited) Usage The minimum power of two, used when creating BuddySets. Valid range is between 5 and 20.
HP Large Objects System Management Manual – 543599.001 replicate all disk content to a backup system. Wasted space 7 The percentage of unused space permitted to be wasted for each segment. See the section on, Suggested Usage for more information about how this parameter is used. Update the QBUDDY 0 (do not This flag indicates whether the table for every update QBUDDY table is to be updated for DeleteBuddyObject QBUDDY) every delete of buddy objects using DeleteBuddyObject API.
HP Large Objects System Management Manual – 543599.001 4 Suggested Usage 4.1 Installation Users should either modify the shell scripts supplied to reflect their environment, or create their own scripts to perform the tasks covered. Users can run InstallOSS.sh script directly to install the product in OSS environment. At the minimum, it would be sensible to review the parameter values setup during the running of metaData.sh to determine whether they suit the environment being created.
HP Large Objects System Management Manual – 543599.001 4.2.2 Storing and Retrieving Partial Objects The Large Object system allows the calling application to store and retrieve objects in chunks, as opposed to storing full content with one call to PutBuddyObject, as described in the previous section. To store an object in chunks, the space must first be allocated using AllocateBuddyObject. It is then possible to write the object in chunks by using many calls to the PutBuddyObject API.
HP Large Objects System Management Manual – 543599.001 4.2.5 Best Space Usage In this algorithm, a best fit is sought for a Buddy Space that has a segment size just smaller than the object, and a part of the object stored in that segment. This algorithm is then repeated for the remainder of the object using decreasing segment sizes until what is left of the object fits into the smallest segment size.
HP Large Objects System Management Manual – 543599.001 • after updating the database. In such cases, the active transaction is aborted. When the transaction was started by the caller, the API indicates that it has aborted the transaction by setting the parameter *pCallerTransAborted to “1” in addition to returning a return value more indicative of the specific problem. This flag is useful as not all error conditions cause the caller’s transaction to be aborted.
HP Large Objects System Management Manual – 543599.001 • There is no hard limit for the largest object the scheme can store, as it is system dependant. 5.1.5 C, C++ and Java Support The Large Object system is exposed using a C header file, and is callable from C and C++ with no modification. Java programs can call the APIs following the steps described in the NonStop Server for Java Programmers Guide.
HP Large Objects System Management Manual – 543599.
HP Large Objects System Management Manual – 543599.001 Appendix B – Parms The parameter or parm table contains the values that determine how the Large Object scheme performs. Values of the parms must not be changed once the BuddyGroup they relate to is active. The BuddyGroup is active once the first BuddySet is created for that group. Parm values should only be changed using SetBuddyGroupParm. The metaData.
HP Large Objects System Management Manual – 543599.001 104 105 109 221 270 271 300 301 space allocated. BSET_MIN_SEG_SIZE The minimum power of two (between 5 and 20). The smaller this value, the less disk space is wasted, at the expense of more disk access. BSET_MAX_SEG_SIZE The maximum power of two (between 10 and 31). The larger this value, the greater the chance that the BuddySpace is rarely used. The smaller the value, the lower the chance of finding enough free space to store Large Objects.
HP Large Objects System Management Manual – 543599.001 302 321 330 340 350 351 FSM_NUM_UPDATES_BOUNCED The maximum number of times that an update to the FSM finds the space is already taken, by a parallel process, before giving up and moving to the next FSM. BSP_SEG_PCT_UNUSED_SPACE The maximum percentage of a segment that may be wasted in a write. QBUDDY_POLLING_INTERVAL The number of minutes between each QBuddy read by the API.
HP Large Objects System Management Manual – 543599.001 Appendix C – Large Object ERD This entity relationship diagram shows the database for the Large Object scheme.