Non Oracle Users Select | Copy Oracle Users | Oracle non internal users
SELECT 'CREATE USER '||u1.name||' IDENTIFIED BY VALUES '''||u1.password||''';'
From user$ u1, dba_users u2
where u1.name=u2.username
and ctime > (select created from dba_users where username = 'SYS')
-- and ctime > to_date('2008/03/12 01:10:11','yyyy/mm/dd hh24:mi:ss')
and name not in
( 'SPATIAL_CSW_ADMIN_USR', 'SPATIAL_WFS_ADMIN_USR', 'OJVMSYS','GSMADMIN_ROLE','GSM_POOLADMIN_ROLE','GSMCATUSER','GDS_CATALOG_SELECT','EM_EXPRESS_ALL','EM_EXPRESS_BASIC',
'RECOVERY_CATALOG_USER','OPTIMIZER_PROCESSING_RATE','XS_SESSION_ADMIN','XS_RESOURCE','PROVISIONER','XS_CACHE_ADMIN','XS_NAMESPACE_ADMIN',
'GSMUSER_ROLE','GSMUSER','CDB_DBA','PDB_DBA','GSMADMIN_INTERNAL','SYSKM','SYSDG','SYSBACKUP','AUDIT_VIEWER','AUDIT_ADMIN','AUDSYS','CAPTURE_ADMIN')
-- xdb -- other ?
and name not in ('AUTHENTICATEDUSER','ANONYMOUS','XDB','XDBADMIN','OLAP_XS_ADMIN','SPATIAL_CSW_ADMIN','CSW_USR_ROLE','WFS_USR_ROLE','SPATIAL_WFS_ADMIN','ORDDATA','ORDADMIN','XS$NULL','XDB_WEBSERVICES','XDB_WEBSERVICES_WITH_PUBLIC',
'XDB_WEBSERVICES_OVER_HTTP','XDB_SET_INVOKER','APPQOSSYS','HS_ADMIN_SELECT_ROLE','HS_ADMIN_EXECUTE_ROLE','ADM_PARALLEL_EXECUTE_TASK','DATAPUMP_IMP_FULL_DATABASE','DATAPUMP_EXP_FULL_DATABASE','DBFS_ROLE')
-- java
and name not in ('EJBCLIENT','JAVADEBUGPRIV','JAVASYSPRIV','JAVAIDPRIV','JAVAUSERPRIV','WM_ADMIN_ROLE','WMSYS','OEM_MONITOR','OEM_ADVISOR','DBSNMP')
and name not in ('DPUMP','DIP','DELETE_CATALOG_ROLE','DBA','CORP_SSO','CONNECT','CCLOG','AS_NAGIOS','AQ_USER_ROLE','AQ_ADMINISTRATOR_ROLE')
and name not in ('JMXSERVER','GLOBAL_AQ_USER_ROLE','HS_ADMIN_ROLE','SCHEDULER_ADMIN','RECOVERY_CATALOG_OWNER','ORACLE_OCM','GATHER_SYSTEM_STATISTICS','LOGSTDBY_ADMINISTRATOR','EXP_FULL_DATABASE','IMP_FULL_DATABASE','OUTLN','EXECUTE_CATALOG_ROLE','SELECT_CATALOG_ROLE','SYSTEM','RESOURCE','PUBLIC')
order by ctime desc
Komentarze
Prześlij komentarz