728x90
-- [호기심]drop user 시, user 정보도 쓰레기통(dba_recyclebin)에 남아 있을까 ?
-- [확인결과]쓰레기통(dba_recyclebin)엔 유저는 없고, object 가 있음, 결과적으로 삭제 유저 정보는 없음
SQL> select BANNER_FULL from v$version ;
BANNER_FULL
--------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.14.0.0.0
SQL>
SQL> select table_name from dba_tables where owner='SCOTT'
TABLE_NAME
--------------------------------------------------------------------------------
MULTI_COLUMNS
MULTI_COLUMNS2
TEST_INTERIM2
TEST
TEST_INTERIM
MLOG$_TEST
RUPD$_TEST
EMP
DEPT
BONUS
SALGRADE
DUMMY
T1
T2
14 rows selected.
SQL> create user test_user identified by test_user default tablespace users temporary tablespace temp ;
User created.
SQL> grant connect, resource to test_user ;
Grant succeeded.
SQL> grant select on scott.t1 to test_user ;
Grant succeeded.
SQL> conn test_user/test_user
Connected.
SQL> select count(*) from scott.t1 ;
COUNT(*)
----------
0
SQL> conn scott/oracle123
Connected.
SQL> show user
USER is "SCOTT"
SQL> drop user test_user ;
User dropped.
SQL> select username from dba_users order by username ;
USERNAME
--------------------------------------------------------------------------------
ANONYMOUS
APPQOSSYS
AUDSYS
BI
DBSFWUSER
DBSNMP
DIP
GGSYS
GSMADMIN_INTERNAL
GSMCATUSER
GSMUSER
HR
IX
OE
ORACLE_OCM
OUTLN
PM
REMOTE_SCHEDULER_AGENT
SCOTT
SH
SYS
SYS$UMF
SYSBACKUP
SYSDG
SYSKM
SYSRAC
SYSTEM
WMSYS
XDB
XS$NULL
30 rows selected.
-- 남아 있지 않음
SQL>
SQL> conn as sysdba
Enter user-name: sys
Enter password:
Connected.
SQL> show user
USER is "SYS"
SQL> col KSPPINM format a30
col KSPPSTVL format a30
col KSPPSTDF format a30
set linesize 150SQL> SQL> SQL>
SQL>
SQL> select a.ksppinm, b.ksppstvl, b.ksppstdf
from x$ksppi a, x$ksppcv b
where a.indx = b.indx
and a.ksppinm = 'recyclebin'
order by a.ksppinm ; 2 3 4 5
KSPPINM KSPPSTVL KSPPSTDF
------------------------------ ------------------------------ ------------------------------
recyclebin on TRUE
-- 쓰레기통 활성화
SQL> set linesize 180
SQL> col owner for a30
SQL> col object_name for a30
SQL> set linesize 180
QL> select owner, object_name, DROPTIME from dba_recyclebin order by DROPTIME ;
OWNER OBJECT_NAME DROPTIME
------------------------------ ------------------------------ -------------------
SCOTT SYS_IL0000023985C00004$$ 2022-04-09:19:25:28
SCOTT SYS_LOB0000023985C00004$$ 2022-04-09:19:25:28
SCOTT BIN$3Db5LdJGG27gUzKJqMCuCg==$0 2022-04-09:19:25:28
SCOTT BIN$3Db5LdJHG27gUzKJqMCuCg==$0 2022-04-09:19:25:28
SCOTT BIN$3Db5LdJJG27gUzKJqMCuCg==$0 2022-04-09:19:25:28
SCOTT BIN$3Db5LdJKG27gUzKJqMCuCg==$0 2022-04-09:19:25:28
SCOTT BIN$3Db5LdJNG27gUzKJqMCuCg==$0 2022-04-09:19:27:30
SCOTT BIN$3Db5LdJOG27gUzKJqMCuCg==$0 2022-04-09:19:27:30
SCOTT SYS_IL0000024160C00004$$ 2022-04-09:19:28:57
SCOTT SYS_LOB0000024160C00004$$ 2022-04-09:19:28:57
SCOTT BIN$3Db5LdJPG27gUzKJqMCuCg==$0 2022-04-09:19:28:57
SCOTT BIN$3Db5LdJQG27gUzKJqMCuCg==$0 2022-04-09:19:28:57
SCOTT BIN$3HM2J+XMGWXgUzKJqMBfHg==$0 2022-04-12:19:06:16
SCOTT BIN$3HM2J+XNGWXgUzKJqMBfHg==$0 2022-04-12:19:06:16
SCOTT BIN$3HM2J+XPGWXgUzKJqMBfHg==$0 2022-04-12:19:06:16
SCOTT BIN$3HM2J+XQGWXgUzKJqMBfHg==$0 2022-04-12:19:06:16
16 rows selected.
SQL>
16 rows selected.
SQL>
-- 쓰레기통엔 유저는 없고, object 가 있음 , 결과적으로 삭제 유저 정보는 없음