sql - Oracle drop user check -


db: oracle11gr2

os: linux

i want drop user1 oracle user locked few weeks now.

i can run "drop user user1 cascade;" drop user before dropping want confirm nobody else using or used objects after user locked.

  1. how verify in oracle nobody accessing or have accessed user1 objects in last month or so?
  2. is there db query/view available can use make sure it's safe run drop command?

thanks

ideally, have enabled auditing of accesses on various objects when locked account , left in place long need feel comfortable. month may sufficient there may quarterly or annual processes need consider.

assuming didn't enable auditing @ time , don't want enable auditing , wait month, there less complete approaches may able use (with understanding approaches going provide less certainty).

  • you can query v$segment_statistics joined v$statname @ variety of statistics table segments. "db block gets" , "consistent gets", example, show how many times process did current or consistent read on block in table. won't tell did reads-- background job gathers statistics, example, might read data table. tables should accumulate data since database last restarted may longer or shorter time period you're interested in. can list of available statistics in oracle documentation fine-tune want for.
  • you can query dba_hist_seg_stat rather v$segment_statistics. break out statistics time period tell when reads , writes happened. won't tell did them. requires licensed use awr (otherwise querying table may violate license , create issue if you're ever audited).
  • you can @ dba_dependencies see if objects depend on objects owned user in question. work stored objects (views, procedures, etc.). won't capture information sql statements submitted applications or ad hoc queries issued users.

if don't want enable auditing , wait appropriate period, may better served revoking privileges on user1 objects whatever roles/ users have them rather dropping objects outright. way if blows lack of privileges, it's relatively easy restore privilege without getting object(s) backup. create trigger on permission denied error told request coming from.


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -