Unix Technical Forum

Finding pending in-place alters

This is a discussion on Finding pending in-place alters within the Informix forums, part of the Database Server Software category; --> Hello. I know this has probably been covered a dozen times or more here, but we're preparing to do ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 10:26 AM
Thomas J. Girsch
 
Posts: n/a
Default Finding pending in-place alters

Hello. I know this has probably been covered a dozen times or more
here, but we're preparing to do a database engine upgrade, and one of
the required tasks is to close any pending in-place alters, so that all
records in all tables conform to the current data definition.

I have a sysmaster query that identify which tables have been altered
in-place, but it doesn't tell me which of these tables actually HAS old
records out there. The only way I've found so far is to do an oncheck
-pT, which I have yet again learned the hard way locks tables and wreaks
all sorts of havoc on live production systems.

So does anyone know a way to do this _without_ resorting to invasive
onchecks?

Thanks in advance,

- TJG
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 10:26 AM
Superboer
 
Posts: n/a
Default Re: Finding pending in-place alters

select
{+ ORDERED }
pg_partnum + pg_pagenum - 1 partn
from
sysdbspaces a,
syspaghdr
where pg_partnum = 1048576 * a.dbsnum + 1
and pg_next != 0
into temp pp with no log ;


select b.dbsname database, b.tabname table
from systabnames b, pp where partn =
partnum;

ahum a quick search in the news group helps too....

See you

Superboer.


Thomas J. Girsch schreef:

> Hello. I know this has probably been covered a dozen times or more
> here, but we're preparing to do a database engine upgrade, and one of
> the required tasks is to close any pending in-place alters, so that all
> records in all tables conform to the current data definition.
>
> I have a sysmaster query that identify which tables have been altered
> in-place, but it doesn't tell me which of these tables actually HAS old
> records out there. The only way I've found so far is to do an oncheck
> -pT, which I have yet again learned the hard way locks tables and wreaks
> all sorts of havoc on live production systems.
>
> So does anyone know a way to do this _without_ resorting to invasive
> onchecks?
>
> Thanks in advance,
>
> - TJG


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 10:26 AM
Obnoxio The Clown
 
Posts: n/a
Default Re: Finding pending in-place alters


Thomas J. Girsch said:
>
> Hello. I know this has probably been covered a dozen times or more
> here, but we're preparing to do a database engine upgrade, and one of
> the required tasks is to close any pending in-place alters, so that all
> records in all tables conform to the current data definition.
>
> I have a sysmaster query that identify which tables have been altered
> in-place, but it doesn't tell me which of these tables actually HAS old
> records out there. The only way I've found so far is to do an oncheck
> -pT, which I have yet again learned the hard way locks tables and wreaks
> all sorts of havoc on live production systems.
>
> So does anyone know a way to do this _without_ resorting to invasive
> onchecks?


I've been to this movie a couple of times recently, and the upshot was
that it turned out every time to be more "cost-effective" to freeze any
schema changes and just run global updates in batches across all tables.

--
Bye now,
Obnoxio

"C'est pas parce qu'on n'a rien à dire qu'il faut fermer sa gueule"
- Coluche

did i mention i like nulls? heck, i even go so far as to say that all
columns in a table except the primary key could/should be nullable. this
has certain advantages, for example, if you need to insert a child record
and you don't have a parent row for it, just do an insert into the parent
table with the primary key value (everything else null), and voila,
relational integrity is preserved. but this is, admittedly, a bit
controversial among modellers.

--r937, dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 10:27 AM
bozon
 
Posts: n/a
Default Re: Finding pending in-place alters

TJG Said
>I have a sysmaster query that identify which tables have been altered in-place, but it >doesn't tell me which of these tables actually HAS old records out there.


What is your query that does this?

>So does anyone know a way to do this _without_ resorting to invasive onchecks?


If you can restore your production server to a test system run your
onchecks there.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 10:28 AM
Thomas J. Girsch
 
Posts: n/a
Default Re: Finding pending in-place alters

bozon wrote:
> TJG Said
>> I have a sysmaster query that identify which tables have been altered in-place, but it >doesn't tell me which of these tables actually HAS old records out there.

>
> What is your query that does this?
>

See Superboer's response.

>> So does anyone know a way to do this _without_ resorting to invasive onchecks?

>
> If you can restore your production server to a test system run your
> onchecks there.
>

This is what we've done in the past, but this time tight development
schedules prohibited us from doing so.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2008, 10:28 AM
Thomas J. Girsch
 
Posts: n/a
Default Re: Finding pending in-place alters

Superboer wrote:

> ahum a quick search in the news group helps too....
>
>

And a quick re-read of my message would show you that I already _knew_
how to do those sysmaster queries, but that those only show the
_possible_ pending in-place alters, not the _actual_ ones.

I'm not above a RTFM reprimand now and again, but let's save them for
when they apply, shall we?

As it turns out, on one of our systems, those queries identified about
two dozen tables, only a third of which actually needed the dummy
updates. On large tables, we'd like to avoid running those dummy
updates except where absolutely necessary.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-20-2008, 10:28 AM
Obnoxio The Clown
 
Posts: n/a
Default Re: Finding pending in-place alters


Thomas J. Girsch said:
>
> Superboer wrote:
>
>> ahum a quick search in the news group helps too....
>>
>>

> And a quick re-read of my message would show you that I already _knew_
> how to do those sysmaster queries, but that those only show the
> _possible_ pending in-place alters, not the _actual_ ones.
>
> I'm not above a RTFM reprimand now and again, but let's save them for
> when they apply, shall we?
>
> As it turns out, on one of our systems, those queries identified about
> two dozen tables, only a third of which actually needed the dummy
> updates. On large tables, we'd like to avoid running those dummy
> updates except where absolutely necessary.


RTFM.

--
Bye now,
Obnoxio

"C'est pas parce qu'on n'a rien à dire qu'il faut fermer sa gueule"
- Coluche

did i mention i like nulls? heck, i even go so far as to say that all
columns in a table except the primary key could/should be nullable. this
has certain advantages, for example, if you need to insert a child record
and you don't have a parent row for it, just do an insert into the parent
table with the primary key value (everything else null), and voila,
relational integrity is preserved. but this is, admittedly, a bit
controversial among modellers.

--r937, dbforums.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-20-2008, 10:28 AM
Double Echo
 
Posts: n/a
Default Re: Finding pending in-place alters

Obnoxio The Clown wrote:
> RTFM.
>


say it ain't so, they took the cow away...


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com