Home » RDBMS Server » Server Administration » delete from 'dba_objects' table
delete from 'dba_objects' table [message #155455] Mon, 16 January 2006 06:34 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

HII ALL
HOW CAN I HAVE ACCESS ON THE TABLE 'DBA_OBJECTS'
I WANT TO DELETE OR UPDATE RECORDS IN THAT TABLE
AND I CANNOT Sad

IT GIVES ME THAT ERROR

ORA-01732: data manipulation operation not legal on this view

I WANT TO DELETEEEE

PLZ REPLY ME QUICKLY


Re: delete from 'dba_objects' table [message #155463 is a reply to message #155455] Mon, 16 January 2006 06:58 Go to previous messageGo to next message
tarundua
Messages: 1080
Registered: June 2005
Location: India
Senior Member

Why do you wants to delete rows from DBA_OBJECTS. Its the part of data dictionary.

Don't try to manipulate data dictionary, Mad it is Oracle's responsibility and Oracle does it better.
Re: delete from 'dba_objects' table [message #155590 is a reply to message #155455] Tue, 17 January 2006 08:30 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
yes.. very dangerous things to do.

what is exactly you want to 'delete'?? you an use alter table commands or drop command to 'delete' unwanted stuff safely.

Regards
Andy
Re: delete from 'dba_objects' table [message #155641 is a reply to message #155590] Tue, 17 January 2006 14:52 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
As others have mentioned, you are barking up the wrong tree.

To literally answer your question though, DBA_OBJECTS is a view, not a table, based on sys.obj$ , sys.user$ and sys.link$
and that's why you cannot delete from it.
Re: delete from 'dba_objects' table [message #155644 is a reply to message #155455] Tue, 17 January 2006 15:48 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

thx for reply
the problem from the begining
i wanted to drop a user and all its tables

and instead of
drop user ..;

i deleted all the table from the database
and that's was wrong

as it deleted the tables but still its constraints are found in the table 'DBA_OBJECTS'

so the user is still in the database without its tables but the constraints are found





Re: delete from 'dba_objects' table [message #155656 is a reply to message #155644] Tue, 17 January 2006 16:41 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
What you are talking is not possible.
When you drop a table, all constraints defined on the table are dropped.
>>but still its constraints are found in the table 'DBA_OBJECTS'
Post what you did. Post your sql.
You may be seeing the procedures etc. NOT constraints.
Constraints will not be reported in dba_objects.

Re: delete from 'dba_objects' table [message #155697 is a reply to message #155455] Wed, 18 January 2006 01:02 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

all i done is:

SELECT 'drop ' || object_type || ' ' || object_name || ' cascade constraints;'
FROM user_objects
WHERE object_type = 'TABLE';


after that i made a script of those table and then run it

thx all

Re: delete from 'dba_objects' table [message #155913 is a reply to message #155455] Thu, 19 January 2006 11:44 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

someone reply me plz
Re: delete from 'dba_objects' table [message #155919 is a reply to message #155913] Thu, 19 January 2006 12:07 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
As stated before ,
You need to post what you done and your output.
What you ask, is not possible. When you drop the object, all indexes and constraint that are defined on the object are DROPPED
and no constraints are reported in user_objects.

scott@9i >  select object_type,object_name from user_objects;

OBJECT_TYPE        OBJECT_NAME
------------------ --------------------
TABLE              DEPT
TABLE              EMP
TABLE              PLAN_TABLE
INDEX              SYS_C001698
INDEX              SYS_C001701
DATABASE LINK      MYDB

6 rows selected.

scott@9i > select table_name,constraint_name from user_constraints;

TABLE_NAME                     CONSTRAINT_NAME
------------------------------ ------------------------------
DEPT                           SYS_C001698
EMP                            SYS_C001699
EMP                            SYS_C001700
EMP                            SYS_C001701
EMP                            SYS_C001702

scott@9i > drop table EMP cascade constraints;

Table dropped.

scott@9i >  select object_type,object_name from user_objects;

OBJECT_TYPE        OBJECT_NAME
------------------ --------------------
TABLE              DEPT
TABLE              PLAN_TABLE
INDEX              SYS_C001698
DATABASE LINK      MYDB

scott@9i > select table_name,constraint_name from user_constraints;

TABLE_NAME                     CONSTRAINT_NAME
------------------------------ ------------------------------
DEPT                           SYS_C001698
Previous Topic: what is object_type operator???
Next Topic: how to check if my DB server is updated with all the patches
Goto Forum:
  


Current Time: Sat Jan 25 10:46:26 CST 2025