Re: Re: finding inplace alters
Posted in 2011
Following up on this very old thread....
I managed to get a quick and reliable way of identifying tables with pending
inplace alters.
It's just an SQL script that creates the function. You can create it in any
database on your system.
AFAIK it works. But please report any issues.
The explanation and code is here:
http://informix-technology.blogspot.com/2011/09/get-pending-in-place-alters-obter-as.html
I'd like to publicly send a big "thank you" to Andreas Legner from German
tech support and Art Kagel for providing info, help, guidance and some debug
skills :)
Regards.
On Wed, Jan 12, 2011 at 4:14 PM, Fernando Nunes <domusonline@gmail.com>wrote:
> Thanks Andreas. I did something similar:
>
> SELECT
> s.hexdata[1,8]
> INTO
> v_hexdata
> FROM
> sysmaster:syssltdat s
> WHERE
> s.partnum = '0x100001' AND
> s.pagenum = 1 AND
> s.slotnum = 1 AND
> s.slotoff = 0;
>
> IF v_hexdata = '01001000'
> THEN
> LET v_endian = 'LITTLE';
> ELSE
> IF v_hexdata = '00100001'
> THEN
> LET v_endian = 'BIG';
> ELSE
> RAISE EXCEPTION -746, 0, 'Invalid Endianess calculation...
> Check procedure code!!!';
> END IF
> END IF
>
> Tested on little endian and apparently it works.
> If somebody can test it on a Big Endian machine (Solaris, AIX, HP-UX
> Itanium....) I'd appreciate...
> Just run the query and see if it returns '00100001'
>
> Kind regards.
>
> P.S.: Pending IPA finder through SQL looks good (although the code is a bit
> odd, it is working).
> I'll post it as soon as I test it on a "real" system to check the running
> time... For now, just on my VM which is just a "toy"...
>
>
>
>
> On Wed, Jan 12, 2011 at 10:10 AM, Andreas Legner <
> andreas.legner@de.ibm.com> wrote:
>
>>
>> Hi Fernando,
>>
>> you mean how to determine engine's endianess using an SQL query?
>>
>> There might be more elegant ways, but what about
>>
>> select first 1 hexdata from sysmaster:sysrawdsk;>>
>> This would return first 16 raw bytes from root chunk, so something
>> starting on "00000000 0001" from big endian and "00000000 0100" from little
>> endian servers.
>> Of course this is restricted to user informix.
>>
>> In case this page zero uses an old page header (pre-9.40 page), you'd get
>> "00000001" or "01000000" respectively. You could tell the two cases by
>> checking if first 8 nibbles all are zeroes.
>>
>> More easily, you could:
>>
>> select first 1 hexdata[1,4] from sysshmem;>>
>> This should return first shmem segments magic number 0xe0b7, as either
>> "e0b7" or "b7e0".
>>
>> Cheers,
>> Andreas
>>
>>
>>
>>
>> From:
>> Fernando Nunes <domusonline@gmail.com>
>> To:
>> Andreas Legner/Germany/IBM@IBMDE
>> Cc: informix-list@iiug.org Date: 12.01.2011 03:06 Subject: Re: Re:
>> finding inplace alters
>> ------------------------------
>>
>>
>>
>> Andreas,
>>
>> Thanks for the reply, and don't bother... You were right... A checkpoint
>> is needed.
>> So, at this moment I have something that apparently works... But needs
>> some refinement and further testing...
>> Also... I need a way to find out if the platform is little endian or big
>> endian.... any ideas?
>>
>> Regards!
>>
>
>
>
> --
> Fernando Nunes
> Portugal
>
> http://informix-technology.blogspot.com
> My email works... but I don't check it frequently...
>
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...