For Oracle Apps 11i
Custom Schemas That Have Been Analyzed
=================================
Select Distinct Owner From Dba_Tables Where
Owner In ( Select Username Sname From Dba_Users Where Username Not
In('SCOTT','SYSTEM','SYS','DBSNMP','OUTLN','ORDSYS','MDSYS','OPS$ORIGOLD', 'AURORA$JIS$UTILITY$','PERFSTAT','AURORA$ORB$UNAUTHENTICATED', 'OEMADM','BOL_BILLING','RAC_ACCNT','BOL_DBA','XML','GIT_REPORTS','OSE$HTTP$ADMIN')
Minus
Select Distinct Upper(Oracle_Username) Sname
From Apps.Fnd_Oracle_Userid A, Apps.Fnd_Product_Installations B
Where A.Oracle_Id = B.Oracle_Id
Minus
Select Upper(Oracle_Username) Sname From Apps.Fnd_Oracle_Userid
Where Oracle_Id Between 900 And 999 And Read_Only_Flag = 'U'
)
And Nvl(Last_Analyzed, Sysdate-100) >= Sysdate-7
And Duration Is Null And Tablespace_Name Is Not Null And Temporary != 'Y'
And ( Iot_Type Is Null Or Iot_Type <> 'IOT_OVERFLOW')
Union
Select Distinct Owner From Dba_Indexes Where
Owner In ( Select Username Sname From Dba_Users Where Username Not
In('SCOTT','SYSTEM','SYS','DBSNMP','OUTLN','ORDSYS','MDSYS','OPS$ORIGOLD', 'AURORA$JIS$UTILITY$','PERFSTAT','AURORA$ORB$UNAUTHENTICATED', 'OEMADM','BOL_BILLING','RAC_ACCNT','BOL_DBA','XML','GIT_REPORTS','OSE$HTTP$ADMIN')
Minus
Select Distinct Upper(Oracle_Username) Sname
From Apps.Fnd_Oracle_Userid A, Apps.Fnd_Product_Installations B
Where A.Oracle_Id = B.Oracle_Id
Minus
Select Upper(Oracle_Username) Sname From Apps.Fnd_Oracle_Userid
Where Oracle_Id Between 900 And 999 And Read_Only_Flag = 'U'
)
And Nvl(Last_Analyzed, Sysdate-100) >= Sysdate-7
And Duration Is Null And Tablespace_Name Is Not Null And Temporary != 'Y'
And Index_Type Not In ('LOB','DOMAIN')
And Table_Name Not In('WWSEC_ENABLER_CONFIG_INFO$') ;
Custom Schemas That Have Not Been Analyzed
===================================
Select Distinct Owner From Dba_Tables Where
Owner In ( Select Username Sname From Dba_Users Where Username Not
In('SCOTT','SYSTEM','SYS','DBSNMP','OUTLN','ORDSYS','MDSYS','OPS$ORIGOLD', 'AURORA$JIS$UTILITY$','PERFSTAT','AURORA$ORB$UNAUTHENTICATED', 'OEMADM','BOL_BILLING','RAC_ACCNT','BOL_DBA','XML','GIT_REPORTS','OSE$HTTP$ADMIN')
Minus
Select Upper(Oracle_Username) Sname From Apps.Fnd_Oracle_Userid
Where Oracle_Id Between 900 And 999 And Read_Only_Flag = 'U'
Minus
Select Distinct Upper(Oracle_Username) Sname
From Apps.Fnd_Oracle_Userid A, Apps.Fnd_Product_Installations B
Where A.Oracle_Id = B.Oracle_Id
)
And Nvl(Last_Analyzed, Sysdate-100) < Sysdate-7
And Duration Is Null And Tablespace_Name Is Not Null And Temporary != 'Y'
And ( Iot_Type Is Null Or Iot_Type <> 'IOT_OVERFLOW')
Union
Select Distinct Owner From Dba_Indexes Where
Owner In ( Select Username Sname From Dba_Users Where Username Not
In('SCOTT','SYSTEM','SYS','DBSNMP','OUTLN','ORDSYS','MDSYS','OPS$ORIGOLD', 'AURORA$JIS$UTILITY$','PERFSTAT','AURORA$ORB$UNAUTHENTICATED', 'OEMADM','BOL_BILLING','RAC_ACCNT','BOL_DBA','XML','GIT_REPORTS','OSE$HTTP$ADMIN')
Minus
Select Upper(Oracle_Username) Sname From Apps.Fnd_Oracle_Userid
Where Oracle_Id Between 900 And 999 And Read_Only_Flag = 'U'
Minus
Select Distinct Upper(Oracle_Username) Sname
From Apps.Fnd_Oracle_Userid A, Apps.Fnd_Product_Installations B
Where A.Oracle_Id = B.Oracle_Id
)
And Nvl(Last_Analyzed, Sysdate-100) < Sysdate-7
And Duration Is Null And Tablespace_Name Is Not Null And Temporary != 'Y'
And Index_Type Not In ('LOB','DOMAIN')
And Table_Name Not In('WWSEC_ENABLER_CONFIG_INFO$')
order by 2 ;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment