Sysptntab info needed
Posted in 2000
Topics: High Availability & Replication, Server Administration
Has anyone out there been able to convert sysptnhdr:skstamp and sysprnhdr:altstmp to a more familiar date or datetime? I've tried the l2date() and Jonathan's DATETIME(1970-01-01* etc. to no avail. Any ideas?? -- John Carlson Informix DBA WHSmith USA #include std_disclaimer.h /* These are my opinions, not my company's opinion */
In article <38BBF961.91036730@bellsouth.net>,
"Carlson@WHSmith" <carlson1@bellsouth.net> wrote:
> Has anyone out there been able to convert sysptnhdr:skstamp and
> sysprnhdr:altstmp to a more familiar date or datetime? I've tried the
> l2date() and Jonathan's DATETIME(1970-01-01* etc. to no avail. Any
> ideas??
Compare that fields with sysshmvals:sh_stamp.
That field I think is 'counter of activity'.
Not really sure what kind of activity. Changes in buffers?
For example this statement
select sh_curtime,
sh_stamp
from sysshmvals;
is changing sh_stamp by 4 on my server
(there is no any other activity on that server).
This should be the same stamp Informix is using to get
snapshot of database for backup.
Regards
Vardan
>
> --
> John Carlson
> Informix DBA
> WHSmith USA
>
> #include std_disclaimer.h /* These are my opinions, not my
company's
> opinion */
>
--
Vardan Aroustamian
vaar@geocities.com
Sent via Deja.com http://www.deja.com/
Before you buy.
In v7.3, skstamp and altstmp are stored in sysptntab - presumably a typo in
your mail, or are things different in your version (please say no!)
This query returns information for an unfragmented table.
select b.tabname,
(extend ('1970-01-01 00:00:00', year to second))
+ (skstamp+sh_curtime-sh_stamp) units second
+ ($GMT_OFFSET*60*60) units second Last_updated,
(extend ('1970-01-01 00:00:00', year to second))
+ (altstmp+sh_curtime-sh_stamp) units second
+ ($GMT_OFFSET*60*60) units second last_altered,
(extend ('1970-01-01 00:00:00', year to second))
+ (sh_curtime) units second
+ ($GMT_OFFSET*60*60) units second Current
from sysmaster:sysptntab a, sysmaster:sysshmvals, <my_db>:systables b
where a.partnum = b.partnum
and b.tabname = "<suspect_table>";
GMT_OFFSET is -5 under Eastern Standard.
The info. returned fluctuates a bit, but is generally a few seconds within
the "actual" times.
Rudy
"Carlson@WHSmith" wrote:
> Has anyone out there been able to convert sysptnhdr:skstamp and
> sysprnhdr:altstmp to a more familiar date or datetime? I've tried the
> l2date() and Jonathan's DATETIME(1970-01-01* etc. to no avail. Any
> ideas??
>
> --
> John Carlson
> Informix DBA
> WHSmith USA
>
> #include std_disclaimer.h /* These are my opinions, not my company's
> opinion */
In article <38BE9D71.BF09A3DA@americasm01.nt.com>,
Rudy Fernandes <rferdy@americasm01.nt.com> wrote:
> In v7.3, skstamp and altstmp are stored in sysptntab - presumably a
typo in
> your mail, or are things different in your version (please say no!)
>
> This query returns information for an unfragmented table.
>
> select b.tabname,
> (extend ('1970-01-01 00:00:00', year to second))
> + (skstamp+sh_curtime-sh_stamp) units second
> + ($GMT_OFFSET*60*60) units second Last_updated,
> (extend ('1970-01-01 00:00:00', year to second))
> + (altstmp+sh_curtime-sh_stamp) units second
> + ($GMT_OFFSET*60*60) units second last_altered,
> (extend ('1970-01-01 00:00:00', year to second))
> + (sh_curtime) units second
> + ($GMT_OFFSET*60*60) units second Current
> from sysmaster:sysptntab a, sysmaster:sysshmvals, <my_db>:systablesb
> where a.partnum = b.partnum
> and b.tabname = "<suspect_table>";
>
> GMT_OFFSET is -5 under Eastern Standard.
> The info. returned fluctuates a bit, but is generally a few seconds
I disagree.
It "fluctuates" depending on activity on your server.
sh_stamp on idle system will not change at all and on
active system it will change much faster than sh_curtime.
I think it's just coincidence that on your system speeds
of changes of sh_stamp and sh_curtime are equal.
Just run
select sh_curtime,
sh_stamp
from sysshmvals;
on idle system couple of times with several minutes
interval and compare results.
On my system I got
sh_curtime sh_stamp
952035585 -1336001275
sh_curtime sh_stamp
952035779 -1336001270
Regards
Vardan
> within
> the "actual" times.
>
> Rudy
>
> "Carlson@WHSmith" wrote:
>
> > Has anyone out there been able to convert sysptnhdr:skstamp and
> > sysprnhdr:altstmp to a more familiar date or datetime? I've tried
the
> > l2date() and Jonathan's DATETIME(1970-01-01* etc. to no avail. Any
> > ideas??
> >
> > --
> > John Carlson
> > Informix DBA
> > WHSmith USA
> >
> > #include std_disclaimer.h /* These are my opinions, not my
company's
> > opinion */
>
>
--
Vardan Aroustamian
vaar@geocities.com
Sent via Deja.com http://www.deja.com/
Before you buy.
You're right. I need to investigate this further. Thks. Rudy Vardan Aroustamian wrote: > In article <38BE9D71.BF09A3DA@americasm01.nt.com>, > Rudy Fernandes <rferdy@americasm01.nt.com> wrote: > > In v7.3, skstamp and altstmp are stored in sysptntab - presumably a > typo in > > your mail, or are things different in your version (please say no!) > > > ..., > > (extend ('1970-01-01 00:00:00', year to second)) > > + (sh_curtime) units second > > + ($GMT_OFFSET*60*60) units second Current > > from sysmaster:sysptntab a, sysmaster:sysshmvals, <my_db>:systables > ... > I disagree. > > ... > Vardan >