![]() | ![]() | |
![]() | ![]() |
17 October 2009
14 October 2009
Oracle: Sql to find table and column comments
Select t.table_name,tc.comments table_comments,c.column_name,data_type,cc.comments column_comments
from user_tables t, user_tab_columns c,user_tab_comments tc,user_col_comments cc
where t.table_name = c.table_name
and t.table_name = tc.table_name(+)
and c.table_name = cc.table_name (+)
and c.column_name = cc.column_name (+)
order by table_name,column_id
from user_tables t, user_tab_columns c,user_tab_comments tc,user_col_comments cc
where t.table_name = c.table_name
and t.table_name = tc.table_name(+)
and c.table_name = cc.table_name (+)
and c.column_name = cc.column_name (+)
order by table_name,column_id
09 October 2009
enq: TM - contention
It took me a while to resolve this issue on my database. Every single resource on the Net pointed to "missing indexes on foreign key columns", but I found it was due to another session locking my database.
The following query gave me a list of blocking sessions. Once I killed those sessions,
"enq: TM - contention" went away.
Select v.sid,s.blocking_session, s.event, v.type,v.lmode,v.request,o.object_name, o.object_type
from v$lock v ,dba_objects o, v$session s
where v.id1 = o.object_id
and v.sid = s.sid
and owner ="Put_your_Owner_Name_Here"
The following query gave me a list of blocking sessions. Once I killed those sessions,
"enq: TM - contention" went away.
Select v.sid,s.blocking_session, s.event, v.type,v.lmode,v.request,o.object_name, o.object_type
from v$lock v ,dba_objects o, v$session s
where v.id1 = o.object_id
and v.sid = s.sid
and owner ="Put_your_Owner_Name_Here"
07 October 2009
05 October 2009
ORA-39149: cannot link privileged user to non-privileged user
When you use Network_link parameter to import a database dump, you will get the error
"ORA-39149: cannot link privileged user to non-privileged user", if the EXP_FULL_DATABASE privilege is missing on the source schema.
Log in as SYS/System and grant the following privilege.
Grant EXP_FULL_DATABASE TO schema_owner;
"ORA-39149: cannot link privileged user to non-privileged user", if the EXP_FULL_DATABASE privilege is missing on the source schema.
Log in as SYS/System and grant the following privilege.
Grant EXP_FULL_DATABASE TO schema_owner;
Subscribe to:
Comments (Atom)



