Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: what is obj$.type#=10?

RE: what is obj$.type#=10?

From: Bobak, Mark <Mark.Bobak_at_il.proquest.com>
Date: Wed, 23 Jun 2004 14:43:56 -0400
Message-ID: <4C9B6FDA0B06FE4DAF5918BBF0AD82CF03B455E7@bosmail00.bos.il.pqe>


Because unused NON-EXISTANT objects are cleaned up by SMON every 12 = hours.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Jacques Kilchoer Sent: Wednesday, June 23, 2004 2:40 PM
To: oracle-l_at_freelists.org
Subject: RE: what is obj$.type#=3D10?=20

 -----Original Message-----
Jonathan Lewis

Once again I learn something from the list. (I wrote a sample script =3D below to show what Mr. Lewis is talking about.) I have a question =3D though. In an Oracle 9.2 database, I create public synonym X for =3D some_table. Then I drop public synonym X. No one has ever used public =
=3D

synonym X, there are no dependencies on it, so why does a row remain in =
=3D

SYS.OBJ$ for X with type# 10? That row will remain until I restart the =
=3D

database.

SQL> create table beta.country
  2 (country_code varchar2 (10), country_name varchar2 (40)) ; Table cr=3DE9=3DE9e.

SQL> create public synonym country for beta.country ; Synonyme cr=3DE9=3DE9.

SQL> grant select on beta.country to alpha ; Autorisation de privil=3DE8ges (GRANT) accept=3DE9e.

SQL> create procedure alpha.country_proc   2 as
  3 x country.country_code%type ;
  4 begin
  5 null ;
  6 end ;
  7 /
Proc=3DE9dure cr=3DE9=3DE9e.

SQL> select

  2  	b.name as owner, a.name as object_name, a.type#,
  3  	decode (a.type#, 2, 'TABLE', 5, 'SYNONYM', 7, 'PROCEDURE') as =3D
object_type
  4 from
  5 sys.obj$ a, sys.user$ b
  6 where
  7  	a.name in ('COUNTRY', 'COUNTRY_PROC')
  8  	and a.owner# =3D3D b.user# ;
OWNER                          OBJECT_NAME                        TYPE# =

=3D

OBJECT_TY
------------------------------ ------------------------------ --------- =

=3D

PUBLIC                         COUNTRY                                5 =

=3D

SYNONYM
ALPHA                          COUNTRY                               10
ALPHA                          COUNTRY_PROC                           7 =

=3D

PROCEDURE
BETA                           COUNTRY                                2 =

=3D

TABLE SQL> create table alpha.country
  2 (country_code varchar2 (15), country_name varchar2 (40)) ; Table cr=3DE9=3DE9e.

SQL> select

  2  	b.name as owner, a.name as object_name, a.type#,
  3  	decode (a.type#, 2, 'TABLE', 5, 'SYNONYM', 7, 'PROCEDURE') as =3D
object_type
  4 from
  5 sys.obj$ a, sys.user$ b
  6 where
  7  	a.name in ('COUNTRY', 'COUNTRY_PROC')
  8  	and a.owner# =3D3D b.user# ;
OWNER                          OBJECT_NAME                        TYPE# =

=3D

OBJECT_TY
------------------------------ ------------------------------ --------- =

=3D

PUBLIC                         COUNTRY                                5 =

=3D

SYNONYM
ALPHA                          COUNTRY                                2 =

=3D

TABLE
ALPHA                          COUNTRY_PROC                           7 =

=3D

PROCEDURE
BETA                           COUNTRY                                2 =

=3D

TABLE

Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Wed Jun 23 2004 - 13:42:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US