|
|
|
In-place alters
|
|||
|---|---|---|---|
|
#18+
Есть способы кроме oncheck узнать, есть на таблице in-place alters ? Например запросом к системным таблицам ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.01.2005, 10:51 |
|
||
|
In-place alters
|
|||
|---|---|---|---|
|
#18+
Имеется ввиду не как получить список таблиц, а именно узнать является ли таблица полностью преобразованной или нет (т.е. получить информацию для конкретной таблицы сколько записей находится в разных версиях in-place alter) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.01.2005, 10:53 |
|
||
|
In-place alters
|
|||
|---|---|---|---|
|
#18+
http://groups-beta.google.com/group/comp.databases.informix/browse_frm/thread/6301b8ef308cea50/7a1f12918025916a?q=informix+place+alter+script&_done=%2Fgroups%3Fq%3Dinformix+place+alter+script%26hl%3Den%26lr%3D%26sa%3DN%26tab%3Dwg%26&_doneTitle=Back+to+Search&&d#7a1f12918025916a Informix Technical Support (case 200515) provided me with the following script to identify outstanding "in-place ALTERs". It runs quickly, even with 9,000+ SAP tables. This might be a good item to include in the Informix FAQ. I have successfully run it with IDS 7.31.UC3-1 and IDS 7.30.UC7XK. # ksh script - run from ksh tblpartnum=1048577 numdbs=`dbaccess sysmaster << !!! 2> /dev/null |grep -v max|awk '{print $0}' select {+ full(sysdbstab)} max(dbsnum) from sysdbstab !` i=1 while (( i <= $numdbs )) do dbaccess sysmaster <<! select hex(t1.pg_partnum), t1.pg_pagenum,t1.pg_physaddr,hex(t2.partnum),t3. tabname from syspaghdr t1, sysptntab t2, systabnames t3 where t1.pg_partnum=$tblpartnum and t1.pg_flags=2 and t1.pg_next !=0 and t1.pg_physaddr=t2.physaddr and t2.partnum=t3.partnum ! let i=i+1 let tblpartnum=tblpartnum+1048576 done ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.01.2005, 17:06 |
|
||
|
In-place alters
|
|||
|---|---|---|---|
|
#18+
Могу предложить еще два варианта (чистый SQL, поэтому подходит под любую платформу), один на базе какого старого IBM FAQ, а второй взят из ukr.comp.dbms.informix. Но , насколько я помню, оба были довольно длительными по времени выполнения (правда, все относительно :)) ----------------------------------------------------------- -- Find the tables with active in-place alters -- (detect tables modified by an in-place alter statement) -- These include tables whose data pages are completely converted to the new form. -- oncheck -pT <database>:<table> -- Set OPTCOMPIND to 0 in the configuration file or environment and run -- -- V.Shulzhenko DBA Tools (by IBM FAQ) 08'2002 ----------------------------------------------------------- set isolation to dirty read; select pg_partnum + pg_pagenum - 1 partn from syspaghdr, sysdbspaces a where pg_partnum = 1048576 * a.dbsnum + 1 and pg_next != 0 into temp _temp_dbatools with no log; ----------------------------------------------------------- select b.dbsname[1,18] database ,b.tabname[1,18] table from systabnames b, _temp_dbatools where partn = partnum order by 1,2; =============================== ----------------------------------------------------------- -- Find the tables with active in-place alters (2-nd variant) -- (detect tables modified by an in-place alter statement) -- These include tables whose data pages are completely converted to the new form. -- oncheck -pT <database>:<table> -- -- Set OPTCOMPIND to 0 in the configuration file or environment and run -- -- V.Shulzhenko DBA Tools (by UCDI) ----------------------------------------------------------- set isolation to dirty read; select t3.dbsname[1,18] database ,t3.tabname[1,18] table ,hex(t2.partnum) partnum_hex from syspaghdr t1, sysptntab t2, systabnames t3 where t1.pg_flags=2 and t1.pg_next !=0 and t1.pg_physaddr=t2.physaddr and t2.partnum=t3.partnum order by 1,2 ======================== ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.01.2005, 21:36 |
|
||
|
|

start [/forum/topic.php?fid=44&msg=32862645&tid=1609116]: |
0ms |
get settings: |
8ms |
get forum list: |
10ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
19ms |
get topic data: |
6ms |
get forum data: |
1ms |
get page messages: |
27ms |
get tp. blocked users: |
1ms |
| others: | 268ms |
| total: | 344ms |

| 0 / 0 |
