#include #include #include #include #define PG_DATA 0x00001 /* Data page */ #define PG_PARTN 0x00002 /* Partition page */ #define PG_FREE 0x00004 /* Free List page */ #define PG_CHUNK 0x00008 /* Chunk Free List page */ #define PG_REMAINDER 0x00009 /* Remainder data page */ #define PG_PBLOB 0x0000b /* Partition resident BLOB page */ #define PG_BLOB 0x0000c /* BlobSpace resident BLOB page */ #define PG_BBIT 0x0000d /* Blob Chunk Free List Bit */ #define PG_BMAP 0x0000e /* Blob Chunk Blob Map Page */ #define PG_BTREE 0x00010 /* B-tree node page */ #define PG_BTROOT 0x00020 /* B-tree root node */ #define PG_BTTWIG 0x00040 /* B-tree twig node */ #define PG_BTLEAF 0x00080 /* B-tree leaf node */ #define PG_LOG 0x00100 /* Logical Log page */ #define PG_LOGEND 0x00200 /* Last Page of Log Log */ #define PG_LOGSYNC 0x00400 /* Sync Page of Log Log */ #define PG_PHYSLOG 0x00800 /* Physical Log page */ #define PG_RSRVD 0x01000 /* Reserved Root Pages */ #define PG_NOPLOG 0x02000 /* No phys log required */ #define PG_NOPHYSLOG 0x04000 /* Used for optimizing during */ /* a load */ #define PG_BTDELFG 0x08000 /* B-tree leaf w/DELFG's */ #define PG_LOGFIRST 0x10000 /* First pag4 in log buffer */ #define PG_LOGEVENT 0x20000 /* Page contains log record with */ /* GTS [Global TimeStamp] */ #define PG_LOGSEALED 0x40000 /* Logfile has been cleanly */ /* closed shouid be marked with */ /* GTS, only on the page of a log */ void oni_pageinfo(int flags); int main(int argc, char *argv[]) { int flags; if (argc == 1) { printf("Need a flag value\n "); exit(2); } flags=atoi(argv[1]); oni_pageinfo(flags); } void oni_pageinfo(int flags) { if(flags & PG_DATA) printf("PG_DATA 0x0001 Data page\n"); if(flags & PG_PARTN) printf("PG_PARTN 0x0002 Partition page\n"); if(flags & PG_FREE) printf("PG_FREE 0x0004 Free List page\n"); if(flags & PG_CHUNK) printf("PG_CHUNK 0x0008 Chunk Free List page\n"); if(flags & PG_REMAINDER) printf("PG_REMAINDER 0x0009 Remainder data page\n"); if(flags & PG_PBLOB) printf("PG_PBLOB 0x000b Partition resident BLOB page\n"); if(flags & PG_BLOB) printf("PG_BLOB 0x000c BlobSpace resident BLOB page\n"); if(flags & PG_BBIT) printf("PG_BBIT 0x000d Blob Chunk Free List Bit\n"); if(flags & PG_BMAP) printf("PG_BMAP 0x000e Blob Chunk Blob Map Page\n"); if(flags & PG_BTREE) printf("PG_BTREE 0x0010 B-tree node page\n"); if(flags & PG_BTROOT) printf("PG_BTROOT 0x0020 B-tree root node\n"); if(flags & PG_BTTWIG) printf("PG_BTTWIG 0x0040 B-tree twig node\n"); if(flags & PG_BTLEAF) printf("PG_BTLEAF 0x0080 B-tree leaf node\n"); if(flags & PG_LOG) printf("PG_LOG 0x0100 Logical Log page\n"); if(flags & PG_LOGEND) printf("PG_LOGEND 0x0200 Last Page of Log Log\n"); if(flags & PG_LOGSYNC) printf("PG_LOGSYNC 0x0400 Sync Page of Log Log\n"); if(flags & PG_PHYSLOG) { printf("PG_PHYSLOG 0x0800 Physical Log page [Old versions]\n"); printf(" Big chunk until v12.10xC8 \n"); printf(" After v12.10xC8 not applicable \n"); } if(flags & PG_RSRVD) printf("PG_RSRVD 0x1000 Reserved Root Pages\n"); if(flags & PG_NOPLOG) printf("PG_NOPLOG 0x2000 No phys log required [Memory Only]\n"); if(flags & PG_NOPHYSLOG) printf("PG_NOPHYSLOG 0x4000 No log log required [load] [Memory Only]\n"); if(flags & PG_BTDELFG) printf("PG_BTDELFG 0x8000 B-tree leaf w/DELFGs\n"); if(flags & PG_BTDELFG) printf("PG_LOGFIRST 0x10000 First Page in log buffer\n"); if(flags & PG_BTDELFG) printf("PG_LOGEVENT 0x20000 Log record with GTS\n"); if(flags & PG_BTDELFG) printf("PG_LOGSEALED 0x40000 Logfile has been cleanly closed\n"); }