DBA Data[Home] [Help]

SYS.DBMS_OBJECTS_UTILS dependencies on COLTYPE$

Line 18: execute immediate 'select bitand(flags, 128) from coltype$ where

14: begin
15:
16: oldimg := 0;
17: -- first make sure that there are dictionary tables in 8.0 format
18: execute immediate 'select bitand(flags, 128) from coltype$ where
19: obj#=(select obj# from obj$ where name=''KOTTD$'' and owner#=0)' into oldimg;
20: if (oldimg = 0) then
21: dbms_output.put_line ('No type dictionary table to upgrade');
22: return;

Line 36: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)

32: execute immediate 'select count(*) from kottd$' into origcnt;
33: execute immediate 'insert into kottd_temp$(sys_nc_oid$, sys_nc_rowinfo$)
34: select sys_nc_oid$, sys_nc_rowinfo$ from kottd$';
35: commit;
36: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)
37: where obj#=(select obj# from obj$ where name=''KOTTD$'' and owner#=0)';
38: commit;
39: execute immediate 'alter system flush shared_pool';
40: --error expected discarding it

Line 70: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)

66: execute immediate 'insert into kottb_temp$(sys_nc_oid$, sys_nc_rowinfo$)
67: select sys_nc_oid$, sys_nc_rowinfo$ from kottb$';
68: execute immediate 'select count(*) from kottb$' into origcnt;
69: commit;
70: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)
71: where obj#=(select obj# from obj$ where name=''KOTTB$'' and owner#=0)';
72: commit;
73: execute immediate 'alter system flush shared_pool';
74: execute immediate 'begin insert into kottb$(sys_nc_oid$, sys_nc_rowinfo$)

Line 104: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)

100: execute immediate 'insert into kottbx_temp$(sys_nc_oid$, sys_nc_rowinfo$)
101: select sys_nc_oid$, sys_nc_rowinfo$ from kottbx$';
102: execute immediate 'select count(*) from kottbx$' into origcnt;
103: commit;
104: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)
105: where obj#=(select obj# from obj$ where name=''KOTTBX$'' and owner#=0)';
106: execute immediate 'alter system flush shared_pool';
107: execute immediate 'begin insert into kottbx$(sys_nc_oid$, sys_nc_rowinfo$)
108: select sys_nc_oid$, sys_nc_rowinfo$ from kottbx_temp$ ; exception when

Line 136: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)

132: execute immediate 'insert into kotad_temp$(sys_nc_oid$, sys_nc_rowinfo$)
133: select sys_nc_oid$, sys_nc_rowinfo$ from kotad$';
134: commit;
135: execute immediate 'select count(*) from kotad$' into origcnt;
136: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)
137: where obj#=(select obj# from obj$ where name=''KOTAD$'' and owner#=0)';
138: execute immediate 'alter system flush shared_pool';
139:
140: execute immediate 'begin insert into kotad$(sys_nc_oid$, sys_nc_rowinfo$)

Line 172: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)

168: execute immediate 'insert into kotmd_temp$(sys_nc_oid$, sys_nc_rowinfo$)
169: select sys_nc_oid$, sys_nc_rowinfo$ from kotmd$';
170: commit;
171: execute immediate 'select count(*) from kotmd$' into origcnt;
172: execute immediate 'update coltype$ set flags=flags-bitand(flags,128)
173: where obj#=(select obj# from obj$ where name=''KOTMD$'' and owner#=0)';
174: execute immediate 'alter system flush shared_pool';
175: execute immediate 'begin insert into kotmd$(sys_nc_oid$, sys_nc_rowinfo$)
176: select sys_nc_oid$, sys_nc_rowinfo$ from kotmd_temp$; exception when others

Line 217: select distinct c.obj#, c.intcol# from col$ c, coltype$ t where

213: intcolno number;
214:
215: -- Query to get the orphaned rows
216: cursor c1 is
217: select distinct c.obj#, c.intcol# from col$ c, coltype$ t where
218: bitand(c.property, 33554432)=33554432 and c.obj#=t.obj# and
219: c.intcol# not in (select typidcol# from coltype$ t1 where c.obj#=t1.obj# and
220: typidcol# is not null);
221:

Line 219: c.intcol# not in (select typidcol# from coltype$ t1 where c.obj#=t1.obj# and

215: -- Query to get the orphaned rows
216: cursor c1 is
217: select distinct c.obj#, c.intcol# from col$ c, coltype$ t where
218: bitand(c.property, 33554432)=33554432 and c.obj#=t.obj# and
219: c.intcol# not in (select typidcol# from coltype$ t1 where c.obj#=t1.obj# and
220: typidcol# is not null);
221:
222: begin
223:

Line 257: execute immediate 'select bitand(flags, 128) from coltype$ where

253:
254: begin
255: oldimg := 0;
256: -- first make sure that kottd$ is in 8.1 image format
257: execute immediate 'select bitand(flags, 128) from coltype$ where
258: obj#=(select obj# from obj$ where name=''KOTTD$'' and owner#=0)' into oldimg;
259: if (oldimg = 128) then
260: dbms_output.put_line ('kottd$ is in 8.0 image format');
261: return;

Line 272: execute immediate 'update coltype$ set flags=flags+128

268: -- create a temp kottd$ table in 8.1 image format
269: execute immediate 'create table kottd_temp$ of kottd';
270: -- now temporarily put the kottd$ in 8.0 image format, so that the image
271: -- gets converted
272: execute immediate 'update coltype$ set flags=flags+128
273: where obj#=(select obj# from obj$ where name=''KOTTD$'' and owner#=0)';
274: commit;
275: execute immediate 'alter system flush shared_pool';
276: -- now copy the 3 images into the temp table

Line 282: execute immediate 'update coltype$ set flags=flags-128

278: select sys_nc_oid$, sys_nc_rowinfo$ from kottd$ where sys_nc_oid$=''00000000000000000000000000000044'' or sys_nc_oid$=''00000000000000000000000000000045'' or sys_nc_oid$=''00000000000000000000000000000046''';
279: -- now delete these 3 from kottd$
280: execute immediate 'delete from kottd$ where sys_nc_oid$=''00000000000000000000000000000044'' or sys_nc_oid$=''00000000000000000000000000000045'' or sys_nc_oid$=''00000000000000000000000000000046''';
281: -- move kottd$ back to 8.1 image format
282: execute immediate 'update coltype$ set flags=flags-128
283: where obj#=(select obj# from obj$ where name=''KOTTD$'' and owner#=0)';
284: commit;
285: execute immediate 'alter system flush shared_pool';
286: -- copy the updated images back