MICSリソースファイルには、システムIDが、** と MICS のみに設定します。

不要なリソースを削除しておきます。

テーブル一覧
SELECT RDB$RELATION_NAME AS TABLE_NAME 
FROM RDB$RELATIONS 
WHERE RDB$VIEW_SOURCE IS NULL AND RDB$SYSTEM_FLAG = 0 
ORDER BY RDB$RELATION_NAME ASC

/* リソースなので、MICS,GE,** 以外は削除する。 */
select 'GEA03',  SYSTEM_ID,count(*) from GEA03  group by SYSTEM_ID union
select 'GEA04',  SYSTEM_ID,count(*) from GEA04  group by SYSTEM_ID union
select 'GEA05',  SYSTEM_ID,count(*) from GEA05  group by SYSTEM_ID union
select 'GEA06',  SYSTEM_ID,count(*) from GEA06  group by SYSTEM_ID union
select 'GEA08',  SYSTEM_ID,count(*) from GEA08  group by SYSTEM_ID union
select 'GEA11',  SYSTEM_ID,count(*) from GEA11  group by SYSTEM_ID union
select 'GE12' ,  SYSTEM_ID,count(*) from GE12   group by SYSTEM_ID union
select 'GE80' ,  SYSTEM_ID,count(*) from GE80   group by SYSTEM_ID union
select 'GE81' ,  SYSTEM_ID,count(*) from GE81   group by SYSTEM_ID
order by 1,2

delete from GEA03 where SYSTEM_ID not in ('MICS','GE','**')
delete from GEA04 where SYSTEM_ID not in ('MICS','GE','**')
delete from GEA05 where SYSTEM_ID not in ('MICS','GE','**')
delete from GEA06 where SYSTEM_ID not in ('MICS','GE','**')
delete from GEA08 where SYSTEM_ID not in ('MICS','GE','**')
delete from GEA11 where SYSTEM_ID not in ('MICS','GE','**')
delete from GE12  where SYSTEM_ID not in ('MICS','GE','**')
delete from GE80  where SYSTEM_ID not in ('MICS','GE','**')
delete from GE81  where SYSTEM_ID not in ('MICS','GE','**')


/* ログインは、残しておきます。 */
select 'GEA10',  SYSTEM_ID,count(*) from GEA10  group by SYSTEM_ID 


/* 全データを初期化する。 */
select 'GEA09', SYSTEM_ID,count(*) from GEA09 group by SYSTEM_ID  union
select 'GE15' , SYSTEM_ID,count(*) from GE15  group by SYSTEM_ID  union
select 'GE16' , SYSTEM_ID,count(*) from GE16  group by SYSTEM_ID  union
select 'GE17' , SYSTEM_ID,count(*) from GE17  group by SYSTEM_ID  union
select 'GE20' , SYSTEM_ID,count(*) from GE20  group by SYSTEM_ID
order by 1,2


delete from GEA09 
delete from GE15  
delete from GE16  
delete from GE17  
delete from GE20  



/* MICSでは未使用 */
select 'GE30', SYSTEM_ID,count(*) from GE30  group by SYSTEM_ID union
select 'GE31', SYSTEM_ID,count(*) from GE31  group by SYSTEM_ID union
select 'GE32', SYSTEM_ID,count(*) from GE32  group by SYSTEM_ID union
select 'GE33', SYSTEM_ID,count(*) from GE33  group by SYSTEM_ID union
select 'GE36', SYSTEM_ID,count(*) from GE36  group by SYSTEM_ID union
select 'GE38', SYSTEM_ID,count(*) from GE38  group by SYSTEM_ID union
select 'GE39', SYSTEM_ID,count(*) from GE39  group by SYSTEM_ID
order by 1,2

/* MICSでは未使用  宛先テーブルは、SYSTEM_ID を持っていない */
select count(*) from GE34 

/* MICSでは未使用 */
select 'GE50',  SYSTEM_ID,count(*) from GE50  group by SYSTEM_ID union
select 'GE51',  SYSTEM_ID,count(*) from GE51  group by SYSTEM_ID union
select 'GE52',  SYSTEM_ID,count(*) from GE52  group by SYSTEM_ID union
select 'GE53',  SYSTEM_ID,count(*) from GE53  group by SYSTEM_ID union
select 'GE54',  SYSTEM_ID,count(*) from GE54  group by SYSTEM_ID union
select 'GE55',  SYSTEM_ID,count(*) from GE55  group by SYSTEM_ID union
select 'GE56',  SYSTEM_ID,count(*) from GE56  group by SYSTEM_ID union
select 'GE57',  SYSTEM_ID,count(*) from GE57  group by SYSTEM_ID union
select 'GE58',  SYSTEM_ID,count(*) from GE58  group by SYSTEM_ID union
select 'WKGE52_XIN', SYSTEM_ID,count(*) from WKGE52_XIN  group by SYSTEM_ID union
select 'WKGE54_XIN', SYSTEM_ID,count(*) from WKGE54_XIN  group by SYSTEM_ID 
order by 1,2

/* MICSでは未使用 */
select SYSTEM_ID,count(*) from GE62  group by SYSTEM_ID
order by 1,2


