sam2929
asked on
ORA-02449 error
Trying to drop a table
drop table test
getting
ORA-02449 error
unique/primary keys in table refrenced by foreign keys
How can i fund all the refrences for test1 and then want to disable them.
drop table test
getting
ORA-02449 error
unique/primary keys in table refrenced by foreign keys
How can i fund all the refrences for test1 and then want to disable them.
I would just generate the DDL and look at the constraints:
select dbms_metadata.get_ddl('TAB LE','TEST' ) from dual;
select dbms_metadata.get_ddl('TAB
ASKER
select dbms_metadata.get_ddl('TAB LE','Curre ncy_Type_D im') from dual;
i am getting ORA-31603 and ora-06512 error and yes table do exist there
i am getting ORA-31603 and ora-06512 error and yes table do exist there
Objects in Oracle are converted to UPPER case:
select dbms_metadata.get_ddl('TAB LE','CURRE NCY_TYPE_D IM') from dual;
select dbms_metadata.get_ddl('TAB
If this isn't a 'test' table, are you sure you want to drop it if there are constraints on it?
If you recreate it, you will need to rebuild all the constraints to make sure everything is back to the way it was.
If you recreate it, you will need to rebuild all the constraints to make sure everything is back to the way it was.
ASKER
i don't want to drop any constraint all i want is to see all constraints related to that table in other tables
If this is just a test system you may consider dropping the constraints as well:
drop table test cascade constraints;
(be careful)
<edit>
Never mind, did not see your last post as I posted this one.
drop table test cascade constraints;
(be careful)
<edit>
Never mind, did not see your last post as I posted this one.
Then use the SQL posted by johnsone. I didn't run it but it looks good to me.
ASKER
select dbms_metadata.get_ddl('TAB LE','CURRE NCY_TYPE_D IM') from dual;
i get no result but i know this table have constraints to fact tables
i get no result but i know this table have constraints to fact tables
ASKER
SELECT constraint_name
--constraint_owner
FROM dba_constraints
WHERE
constraint_type IN ( 'P', 'U' )
AND table_name = 'Currency_Type_Dim'
no result it dn't like --constraint_owner
--constraint_owner
FROM dba_constraints
WHERE
constraint_type IN ( 'P', 'U' )
AND table_name = 'Currency_Type_Dim'
no result it dn't like --constraint_owner
>>i get no result but i know this table have constraints to fact tables
That just generates the DDL for the TABLE. It would have constraints to other tables not what constraints on other tables have to it.
I guess I missed the actual question here.
Use johnsone's SQL.
That just generates the DDL for the TABLE. It would have constraints to other tables not what constraints on other tables have to it.
I guess I missed the actual question here.
Use johnsone's SQL.
>>AND table_name = 'Currency_Type_Dim'
Again: OBJECT_NAMES in UPPER case.
Again: OBJECT_NAMES in UPPER case.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This query should get you the names of the constraints that are referencing the primary key.
Open in new window