Any time a customer calls in with a problem, the first thing to realize is that no errors will(should) be displayed to the users screen. Any/all errors that OnBar encounters will be sent to the Onbar Activity Log. The location of the activity log is specified by the BAR_ACT_LOG onconfig parameter (see Onbar onconfig parameters). The customer may also see errors in the online log, however the bar activity log may be more useful in explaining why OnBar is having some problems.

If reviewing the onbar log is simply not enough to solve the problem and additional debugging is required then online has some built in debugging features.

There are 2 onconfig parameters that can assist us. BAR_DEBUG and BAR_DEBUG_LOG can be set so that a specified amount of debugging information can be sent to the debug file while onbar is running. This information has proven to be extremely useful when isolating where/how problems are occuring.


Below are some definitions of what will be displayed with a particular level of debugging set. They are not specific to what is listed below. They are mearly general statements of some of what is displayed to the debug log. You can see a sample debug log of when BAR_DEBUG is set to 7 if you want.


I ususally set BAR_DEBUG either 9 or 7 under the following curcumstances.

BAR_DEBUG = 7 If OnBar fails some time after it starts processing pages. This way we dont fill up the log with page headers from BAR_DEBUG=8.

BAR_BUG = 9 If the Onbar fails before is starts processing pages. That way we get as much info as possible without all the page headers. Another reason for setting BAR_DEBUG=9 is if you need to verify wether a page is getting archived/restored. You can then just scan the file looking for that particular page.

Once again this should be used by technical support or R&D scince the output generated from this is generally not something that a customer would be able to understand. This feature should show us exactly where in the OnBar source we are startting to fail or go wrong.

OnBar Error/Return Codes

If Onbar encounters a problem that prevents it from doing its job, an error number should be sent to the BAR_ACT_LOG. This error number can have many different meanings depending on where it was encountered. Error messages that are sent to the BAR_ACT_LOG can come from 4 different places.

  1. The Archive API (The Online engine error number).
  2. The XBSA API (Storage manager error number)
  3. An SQL error number.
  4. Anything else that would cause some Onbar Function to return something other than SUCCESS.

Onbar/Archive API return codes 
Below is the set of return codes that can be sent back from any Archive 
API system call.
#define BAR_NOTFOUND 100 /* = SQLNOTFOUND */ #define BAR_BUG 0x9f /* it's a bug, put it in PTS */ #define BAR_LISTERR 0x9e /* linked list error */ #define BAR_NO_SHMBASE 0x9d /* couldn't set INFORMIXSHMBASE to -1 */ #ifdef XMP #define BAR_NO_PDQPRIORITY 0x9c /* PDQPRIORITY not set in env */ #endif #define BAR_NO_SERVER 0x9b /* INFORMIXSERVER not set in env */ #define BAR_NO_PERMISSION 0x9a /* not user root, informix or NT admin*/ #define BAR_PGID_FAILED 0x99 /* could not set process group id */ #define BAR_NO_LOG_BACKUP 0x98 /* can't backup logs at this time */ #define BAR_BAD_SERVER_STATE 0x97 /* OnLine server was in a bad state */ #define BAR_CONFIG_ERROR 0x96 /* err initializing from config file */ #define BAR_BAD_USAGE 0x95 /* bad command line or date conversion*/ #define BAR_SQL_ERROR 0x94 /* SQL error */ #define BAR_NO_LIST 0x93 /* dbslist is empty */ #define BAR_SRV_CONNECT 0x92 /* couldn't open Archive API connectn */ #define BAR_NO_MEMORY 0x91 /* malloc failed, usually fatal */ #define BAR_BLOB_DOWN 0x90 /* log backup failed 'cuz a blob is down */ #define BAR_NO_PID 0x8f /* unable to fork a child process */ #define BAR_FILE_OPEN 0x8e /* OS open() failed, usually fatal */ #define BAR_FUNCINTRPT 0x8d /* BAR function execution was interrupted */ #define BAR_FAKE_FAILED 0x8c /* fake backup failed */ #define BAR_BAD_VERSION 0x8b /* XBSA ver # not in bar_version table*/ #define BAR_SM_ERROR 0x8a /* XBSA error */ #define BAR_MAX_DBS 0x89 /* whole_system exceed MAX_DBSPACE_COUNT */ #define BAR_NO_WARM 0x88 /* can't warm restore criticals */ #define BAR_NO_CHILD 0x87 /* an expected child couldn't be found*/ #define BAR_EARLY_LOG 0x86 /* user wants to a restore a log that * is too early */ #define BAR_NO_BSALIB 0x85 /* failed to load XBSA shared library */ #define BAR_SHLIB_ERR 0x84 /* failed to find symbol in XBSA library */ #define BAR_AAPI_ERROR 0x83 /* archive api failed */ #define BAR_SERVER_CRASH 0x82 /* archive api failed */

XBSA return codes 
Below is the set of return codes that can be sent back from any XBSA system 
#define BSA_RC_SUCCESS 0 #define BSA_RC_ABORT_ACTIVE_NOT_FOUND 0x02 #define BSA_RC_ABORT_SYSTEM_ERROR 0x03 #define BSA_RC_AUTHENTICATION_FAILURE 0x04 #define BSA_RC_BAD_CALL_SEQUENCE 0x05 #define BSA_RC_BAD_HANDLE 0x06 #define BSA_RC_BUFFER_TOO_SMALL 0x07 #define BSA_RC_DESC_TOO_LONG 0x08 #define BSA_RC_OBJECTSPACE_TOO_LONG 0x09 #define BSA_RC_INVALID_TOKEN 0x0a #define BSA_RC_INVALID_VOTE 0x0b #define BSA_RC_INVALID_KEYWORD 0x0c #define BSA_RC_MATCH_EXISTS 0x0d #define BSA_RC_MORE_DATA 0x0e #define BSA_RC_MORE_RULES 0x0f #define BSA_RC_NEWTOKEN_REQD 0x10 #define BSA_RC_NO_MATCH 0x11 #define BSA_RC_NO_MORE_DATA 0x12 #define BSA_RC_NO_RESOURCES 0x13 #define BSA_RC_NULL_DATABLKPTR 0x14 #define BSA_RC_NULL_OBJNAME 0x15 #define BSA_RC_NULL_POINTER 0x16 #define BSA_RC_NULL_RULEID 0x17 #define BSA_RC_OBJECT_NAME_TOO_LONG 0x18 #define BSA_RC_OBJECT_NOT_EMPTY 0x19 #define BSA_RC_OBJECT_NOT_FOUND 0x1a #define BSA_RC_OBJINFO_TOO_LONG 0x1b #define BSA_RC_OBJNAME_TOO_LONG 0x1c #define BSA_RC_OPERATION_NOT_AUTHORIZED 0x1d #define BSA_RC_OLDTOKEN_REQD 0x1e #define BSA_RC_TOKEN_EXPIRED 0x1f #define BSA_RC_TXN_ABORTED 0x20 #define BSA_RC_UNMATCHED_QUOTE 0x21 #define BSA_RC_USER_OWNS_OBJECTS 0x22 Following is a more recent subset for XBSA Return Codes Return Code Value Meaning [BSA_RC_ABORT_SYSTEM_ERROR] 0x03 System detected error, operation aborted. [BSA_RC_ACCESS_FAILURE] 0x4D Access to the requested object is not possible. [BSA_RC_AUTHENTICATION_FAILURE] 0x04 There was an authentication failure. [BSA_RC_BUFFER_TOO_SMALL] 0x4E The supplied buffer is too small to contain the data, as specified by the accompanying size parameter. [BSA_RC_INVALID_CALL_SEQUENCE] 0x05 The sequence of API calls is incorrect. [BSA_RC_INVALID_COPYID] 0x4F The copyId field contained an unrecognized value. [BSA_RC_INVALID_DATABLOCK] 0x34 The BSA_DataBlock32 parameter contained an inconsistent value. [BSA_RC_INVALID_ENV] 0x50 An entry in the environment structure is invalid or missing. [BSA_RC_INVALID_HANDLE] 0x06 The handle used to associate this call with a previous BSAInit() call is invalid. [BSA_RC_INVALID_OBJECTDESCRIPTOR] 0x51 The BSA_ObjectDescriptor was invalid. [BSA_RC_INVALID_QUERYDESCRIPTOR] 0x53 The BSA_QueryDescriptor was invalid. [BSA_RC_INVALID_VOTE] 0x0B The value specified for vote is invalid. [BSA_RC_NO_MATCH] 0x11 No object matched the specified predicate. [BSA_RC_NO_MORE_DATA] 0x12 No more data is available. [BSA_RC_NULL_ARGUMENT] 0x55 A NULL pointer was encounterered in one of the arguments [BSA_RC_OBJECT_NOT_FOUND] 0x1A There is no copy of the requested object. [BSA_RC_SUCCESS] 0x00 The function succeeded. [BSA_RC_TRANSACTION_ABORTED] 0x20 The transaction was aborted. [BSA_RC_VERSION_NOT_SUPPORTED] 0x4B The Backup Service implementation does not support the specified version of the interface.
Home   Index