DBA Data[Home] [Help]

SYS.DBMS_OBJECTS_APPS_UTILS dependencies on OBJ$

Line 53: from obj$ o, obj$ o1, type$ t

49:
50: -- query to get relevant type info
51: cursor c1 is
52: select o.name, o.obj#, o.oid$, t.hashcode, t.version#, o.stime
53: from obj$ o, obj$ o1, type$ t
54: where o.owner#=(select user# from user$ where name=schema2) and
55: o1.owner#=(select user# from user$ where name=schema1) and
56: o1.name= o.name and o.type#=13 and o1.type#=13 and o.oid$=t.tvoid
57: and o.subname is NULL;

Line 62: from obj$ o, obj$ o1, type$ t

58:
59: -- query to get relevant type info if type name is given
60: cursor c5 is
61: select o.name, o.obj#, o.oid$, t.hashcode, t.version#, o.stime
62: from obj$ o, obj$ o1, type$ t
63: where o.owner#=(select user# from user$ where name=schema2) and
64: o1.owner#=(select user# from user$ where name=schema1) and
65: o1.name= o.name and o.type#=13 and o1.type#=13 and o.oid$=t.tvoid
66: and o.name = typename and o.subname is NULL;

Line 73: select 1 from obj$ o, type$ t where o.name=c3name and o.owner#=userid and

69: select user# from user$ where name=schema1;
70:
71: -- hashcode sanity check query
72: cursor c3 (c3name varchar2, c3hashcode raw) is
73: select 1 from obj$ o, type$ t where o.name=c3name and o.owner#=userid and
74: t.tvoid=o.oid$ and t.hashcode = c3hashcode and o.subname is NULL;
75:
76: -- version sanity check query
77: cursor c4 (c3name varchar2, c3version number) is

Line 78: select 1 from obj$ o, type$ t where o.name=c3name and o.owner#=userid and

74: t.tvoid=o.oid$ and t.hashcode = c3hashcode and o.subname is NULL;
75:
76: -- version sanity check query
77: cursor c4 (c3name varchar2, c3version number) is
78: select 1 from obj$ o, type$ t where o.name=c3name and o.owner#=userid and
79: t.tvoid=o.oid$ and t.version# = c3version and o.subname is NULL;
80:
81: -- sanity check to make sure that none of the tables are now dependent on
82: -- schema1

Line 84: select 1 from dependency$ d, obj$ o where o.type#=2 and o.obj#=d.d_obj# and

80:
81: -- sanity check to make sure that none of the tables are now dependent on
82: -- schema1
83: cursor c6 is
84: select 1 from dependency$ d, obj$ o where o.type#=2 and o.obj#=d.d_obj# and
85: d.p_obj# in (select obj# from obj$ where type#=13 and subname is null and
86: owner#=userid);
87:
88: begin

Line 85: d.p_obj# in (select obj# from obj$ where type#=13 and subname is null and

81: -- sanity check to make sure that none of the tables are now dependent on
82: -- schema1
83: cursor c6 is
84: select 1 from dependency$ d, obj$ o where o.type#=2 and o.obj#=d.d_obj# and
85: d.p_obj# in (select obj# from obj$ where type#=13 and subname is null and
86: owner#=userid);
87:
88: begin
89:

Line 156: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);

152: for i in 1..numtypes loop
153: ltinfo := vtabtinfo(i);
154: -- coltype$ update
155: update coltype$ set toid=ltinfo.toid where toid=(select oid$ from
156: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);
157: -- subcoltype$ update
158: update subcoltype$ set toid=ltinfo.toid where toid=(select oid$ from
159: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);
160: -- dependency$ update

Line 159: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);

155: update coltype$ set toid=ltinfo.toid where toid=(select oid$ from
156: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);
157: -- subcoltype$ update
158: update subcoltype$ set toid=ltinfo.toid where toid=(select oid$ from
159: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);
160: -- dependency$ update
161: update dependency$ set p_obj#=ltinfo.objid, p_timestamp=ltinfo.stime
162: where p_obj#=(select obj# from obj$ where name=ltinfo.name and
163: owner#=userid and type#=13 and subname is NULL)

Line 162: where p_obj#=(select obj# from obj$ where name=ltinfo.name and

158: update subcoltype$ set toid=ltinfo.toid where toid=(select oid$ from
159: obj$ where name=ltinfo.name and owner#=userid and type#=13 and subname is NULL);
160: -- dependency$ update
161: update dependency$ set p_obj#=ltinfo.objid, p_timestamp=ltinfo.stime
162: where p_obj#=(select obj# from obj$ where name=ltinfo.name and
163: owner#=userid and type#=13 and subname is NULL)
164: and d_obj# in (select obj# from obj$ where type#=2);
165: end loop;
166:

Line 164: and d_obj# in (select obj# from obj$ where type#=2);

160: -- dependency$ update
161: update dependency$ set p_obj#=ltinfo.objid, p_timestamp=ltinfo.stime
162: where p_obj#=(select obj# from obj$ where name=ltinfo.name and
163: owner#=userid and type#=13 and subname is NULL)
164: and d_obj# in (select obj# from obj$ where type#=2);
165: end loop;
166:
167: -- check to make sure that none of the table are now dependent on schema1 types
168: -- do this only if check_update is TRUE

Line 254: select obj# from obj$ where name= tname and owner#=

250: j number;
251: line_no number;
252:
253: cursor c1 is
254: select obj# from obj$ where name= tname and owner#=
255: (select user# from user$ where name=tschema)
256: and type#=13 and subname is null;
257:
258: cursor c2 is

Line 262: select obj# from obj$ o, type$ t where t.version#=i and o.name=tname and

258: cursor c2 is
259: select line, source, length(source) from source$ where obj#= obj_id;
260:
261: cursor c3 is
262: select obj# from obj$ o, type$ t where t.version#=i and o.name=tname and
263: o.oid$=t.tvoid and o.type#=13;
264:
265: begin
266:

Line 366: select 1 from sys.obj$ o,sys.type$ t1 ,sys.user$ u where o.oid$=t1.tvoid and

362: closec boolean := FALSE;
363: typname dbms_objects_utils_tname;
364:
365: cursor c1 is
366: select 1 from sys.obj$ o,sys.type$ t1 ,sys.user$ u where o.oid$=t1.tvoid and
367: o.name=typname.typname and o.subname is NULL and o.OWNER# = USER# and
368: u.name= typname.schema and substr(t1.hashcode,1,1)='2';
369:
370: begin

Line 393: update obj$ set status=6 where type#=13 and subname is null and

389: -- increment the count of types invalidated
390: numtypes := numtypes+1;
391: dbms_output.put_line('Invalidating ' || typname.schema || '.' ||
392: typname.typname);
393: update obj$ set status=6 where type#=13 and subname is null and
394: name=typname.typname and owner#=(select user# from user$ where
395: name=typname.schema);
396: end loop;
397: commit;