Display contents of Logical Log
Posted in 2010
User asked how to read logical logs with onlog when LTAPEDEV points to a directory (ontape file-based log backups); passing just the directory gave "Error opening the tape device, Error No. = 2". Resolved: point onlog -d at the individual backup file in that directory, named hostname_SERVERNUM_Log<unique id> (e.g. onlog -d /dir/livestrong_55_Log0000000040), pressing Enter at the mount-tape prompt. Alternatively give the directory plus the -n log range option. The poster confirmed it worked. Also noted: onlog only shows backed-up logs; use onbar -P for ON-Bar backups.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Stored Procedures & SPL, Logging & Checkpoints
Is there a way to display the contents of the logical logs if the LTAPEDEV
parameter is set to backup the logical logs to a directory? (LTAPEDEV
/informix11/inflog)
I had a look at the onlog command and in that the -d switch accepts the tape
drive path.
Appreciate your response.
"Onlog -d /informix11/inflog " should do it
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of RAGHAVAN
MANIKARNIKE
Sent: Tuesday, 13 April 2010 1:17 PM
To: ids@iiug.org
Subject: Display contents of Logical Log [19654]
Is there a way to display the contents of the logical logs if the LTAPEDEV
parameter is set to backup the logical logs to a directory? (LTAPEDEV
/informix11/inflog)
I had a look at the onlog command and in that the -d switch accepts the tape
drive path.
Appreciate your response.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
The onlog utility doesnt like that. It gives the following error
onlog -d /informix11/inflog -l
IBM Informix Dynamic Server Logical Log display
Software Serial Number AAA#B000000
Copyright IBM Corporation 1996, 2004 All rights reserved.
Error opening the tape device, Error No. = 2.
The onlog /? gives the following
Usage: onlog [-l] [-q] [-b] [-d <tape device>] [-n <starting log unique
identifier>-<ending log unique identifier>] [-u <user name>]
[-t <TBLspace number>] [-x <transaction number>]
[-c <compression dictionary file>]
-l Display maximum information about each log record
-c Use compression dictionary to expand compressed data
-q Do not display program header
-b Display information about logged BLOB pages (-d option only)
-d Read from tape device (written by ontape)
-n Display the specified log(s)
-u Display the specified user(s)
-t Display the specified TBLspace(s)
-x Display the specified transaction(s)
I think this feature (of backing up the logical log to a folder) is new from
v11.50.xxx
Hello!
Pay attention, because "onlog" utility will only be able to view the
logical-logs marked as "B"-Backed up
or even the current one (although it´s not recommended, since it will
block your system, I read somewhere).
For old backed-up logical logs, that aren´t on your "onstat -l" output,
you should use "onbar -P" commands.
Best regards.
Alexandre Marini
Tecnologia da Informação - DBA
msn: alexandre_marini@hotmail.com
SEFAZ-MS / SGI-UIMP / Sistemas IBM-Informix
See you at the 2010 IIUG Informix Conference
April 25-28, 2010
Overland Park (Kansas City), KS
www.iiug.org/conf
<http://www.iiug.org>
RAGHAVAN MANIKARNIKE escreveu:
> The onlog utility doesnt like that. It gives the following error
>
> onlog -d /informix11/inflog -l>
> IBM Informix Dynamic Server Logical Log display
> Software Serial Number AAA#B000000
> Copyright IBM Corporation 1996, 2004 All rights reserved.
>
> Error opening the tape device, Error No. = 2.
>
> The onlog /? gives the following
>
> Usage: onlog [-l] [-q] [-b] [-d <tape device>] [-n <starting log unique
>
> identifier>-<ending log unique identifier>] [-u <user name>]
>
> [-t <TBLspace number>] [-x <transaction number>]
>
> [-c <compression dictionary file>]
>
> -l Display maximum information about each log record
>
> -c Use compression dictionary to expand compressed data
>
> -q Do not display program header
>
> -b Display information about logged BLOB pages (-d option only)
>
> -d Read from tape device (written by ontape)
>
> -n Display the specified log(s)
>
> -u Display the specified user(s)
>
> -t Display the specified TBLspace(s)
>
> -x Display the specified transaction(s)
>
> I think this feature (of backing up the logical log to a folder) is new from
> v11.50.xxx
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
>
Original post:
Is there a way to display the contents of the logical logs if the LTAPEDEV
parameter is set to backup the logical logs to a directory? (LTAPEDEV
/informix11/inflog)
I had a look at the onlog command and in that the -d switch accepts the tape
drive path.
Appreciate your response.
Response:
Yes you can use onlog to look at logical logs backed up if LTAPEDEV is set to
a directory. What you need to do is look in the LTAPDEV directory and find the
actual file name of the logical log you want look at with onlog. For example
my LTAPEDEV is set to /spare1/product/testdir/tapedir so I go to that
directory and do an ls and see the following:
livestrong_55_L0 livestrong_55_Log0000000040
So I have 2 files, the livestrong_55_Log0000000040 is my 1 logical log that I
have backed up into this directory. I believe the filename format is
hostname_SERVERNUM_Log<logical log uniqueid>. So you can see my workstation
name is livestrong the SERVERNUM from my onconfig was 55 and the unique id of
the logical log I backed up was 40. So now to use onlog I would just run the
following command:
onlog -d /spare1/product/testdir/tapedir/livestrong_55_Log0000000040
It will prompt you to mount the tape, which you just go ahead and hit return
and you should see your logical log info.
IBM Informix Advanced Support
APD Team
Original post:
Yes you can use onlog to look at logical logs backed up if LTAPEDEV is set to
a directory. What you need to do is look in the LTAPDEV directory and find the
actual file name of the logical log you want look at with onlog. For example
my LTAPEDEV is set to /spare1/product/testdir/tapedir so I go to that
directory and do an ls and see the following:
livestrong_55_L0 livestrong_55_Log0000000040
So I have 2 files, the livestrong_55_Log0000000040 is my 1 logical log that I
have backed up into this directory. I believe the filename format is
hostname_SERVERNUM_Log<logical log uniqueid>. So you can see my workstation
name is livestrong the SERVERNUM from my onconfig was 55 and the unique id of
the logical log I backed up was 40. So now to use onlog I would just run the
following command:
onlog -d /spare1/product/testdir/tapedir/livestrong_55_Log0000000040
It will prompt you to mount the tape, which you just go ahead and hit return
and you should see your logical log info.
Additional info:
Actually you can also just do onlog -d /spare1/product/testdir/tapedir (just
list the directory you have set in LTAPEDEV) however, if you use this option,
you have to also include the -n option (this is simpler then fully pathing out
the file as I mentioned above)
Jacques Renaut
IBM Informix Advanced Support
APD Team
Jacques, thanks for sorting this out. I was able to view the contents of the logical logs with what you mentioned. We will have to provide the individual logical log name along with the directory name. Appreciate your help.