0

I want to delete a table from the database, which I know is not being used anywhere in our Java code-base. I was able to also delete it from our DB, but I'm not sure that this may not still pose some kind of problem. Maybe it can still be referenced from a Stored Procedure, or something of the like?

Or does the database actually guarantee that under any circumstance this will not be the case when deleting a table? In case it may be a problem, what would be the best way to search for this specific string in the db such as to find its possible usages?

Unfortunately I don't have dba access to this db.

Thanks

devoured elysium
  • 101,373
  • 131
  • 340
  • 557

2 Answers2

1

no such guarantee

but you can run this to find any reference to the table in a stored procedure, package or function

select * from dba_source where lower(text) like '%<tablename>%'
davegreen100
  • 2,055
  • 3
  • 13
  • 24
0

I think there are 2 reference of table you need to care about.

  1. Dependencies (in table browser, sql navigator/toad has, not sure about others)

  2. Dynamic sql call that table in procedure/function/package. Refer here

But those're not all, because some dynamic sql may use string concatenate

execute immediate 'select max(name) from customer_' || provinceCode into testName;
Community
  • 1
  • 1
Pham X. Bach
  • 5,284
  • 4
  • 28
  • 42