[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

application schema

Posted on 2014-02-25
7
Medium Priority
?
433 Views
Last Modified: 2014-06-09
I want sort out only the application schema from the database..

Do you find any mistakes in this..

SYS@sprefuat1> l
  1  select distinct
  2     owner
  3  from
  4     dba_segments
  5  where
  6     owner not in (
  7* 'SYSTEM', 'XDB', 'SYS', 'TSMSYS', 'MDSYS', 'EXFSYS', 'WMSYS', 'ORDSYS', 'OUTLN', 'DBSNMP')
SYS@sprefuat1> a  order by 1
  7* 'SYSTEM', 'XDB', 'SYS', 'TSMSYS', 'MDSYS', 'EXFSYS', 'WMSYS', 'ORDSYS', 'OUTLN', 'DBSNMP') order by 1
SYS@sprefuat1> /

OWNER
------------------------------
AUGEAS
BLS
CAPIQ
CAPIQ_INCR
CGS_ETL_USER
COMPUSTAT
COMUTIL
COMUTIL_ARCHIVE
COMUTIL_CDC
COMUTIL_USER
CREDITSCOPE

OWNER
------------------------------
CTXSYS
DCT
DMSYS
DROOLS_REPO
DSP_CACHE
EMMA
EXCEPTION_REP
EXPERIAN
FDIC
FINMASTER
FINMASTER_ETL_USER

OWNER
------------------------------
FIN_MASTER
FIN_METADATA
FTIDC
GLOBALINSIGHT
GLPMETA
GLP_ADMIN
KLCA
LDAP
MARKIT
NCUA
PERFSTAT

OWNER
------------------------------
PFAD
PRECISEG
PRECISEH
QUANT
REF_ETL_USER
REUTERS
SPAINBANKS_AEB
SPAINBANKS_CECA
SPINDEXSERVICES
SYSMAN
TOYOKEIZAI

OWNER
------------------------------
TULLETT
WKSYS
WK_TEST

47 rows selected.


Please give me more clear script if this is wrong
0
Comment
Question by:thomasliju
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1200 total points
ID: 39885997
try this...

    SELECT DISTINCT owner
    FROM dba_segments
   WHERE owner NOT IN ('ANONYMOUS',
                       'AURORA$JIS$UTILITY$',
                       'AURORA$ORB$UNAUTHENTICATED',
                       'CTXSYS',
                       'DBSNMP',
                       'DIP',
                       'DMSYS',
                       'DVF',
                       'DVSYS',
                       'EXFSYS',
                       'LBACSYS',
                       'MDDATA',
                       'MDSYS',
                       'MGMT_VIEW',
                       'OAS_PUBLIC',
                       'ODM',
                       'ODM_MTR',
                       'ORDPLUGINS',
                       'ORDSYS',
                       'OSE$HTTP$ADMIN',
                       'OUTLN',
                       'PERFSTAT',
                       'REPADMIN',
                       'RMAN',
                       'SCOTT',
                       'SI_INFORMTN_SCHEMA',
                       'SYS',
                       'SYSMAN',
                       'SYSTEM',
                       'TRACESVR',
                       'TSMSYS',
                       'WEBSYS',
                       'WKPROXY',
                       'WKSYS',
                       'WKSYS',
                       'WKUSER',
                       'WK_TEST',
                       'WMSYS',
                       'XDB')
     AND owner NOT LIKE 'APEX\_%' ESCAPE '\'
ORDER BY 1
0
 
LVL 29

Assisted Solution

by:MikeOM_DBA
MikeOM_DBA earned 400 total points
ID: 39886135
Found some more:

APPQOSSYS
OLAPSYS  
OPS$ORACLE
ORACLE_OCM
OWBSYS      
OWBSYS_AUDIT
SPATIAL_CSW_ADMIN_USR
SPATIAL_WFS_ADMIN_USR
SYSMAN
SYSMAN_APM
SYSMAN_MDS
SYSMAN_OPSS
SYSMAN_RO
XS$NULL
0
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 400 total points
ID: 39886163
I would use DBA_OBJECTS and not DBA_SEGMENTS.  Should be a smaller view to select from, and I have seen applications where multiple schemas are used and some only have PL/SQL objects and nothing that takes up storage.
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 1200 total points
ID: 39886169
yep, an ever growing list...

here's a new version with the above plus a few more I've found since then...


SELECT *
  FROM dba_objects  -- or dba_segments if you only want objects that consume space
 WHERE owner NOT IN ('ANONYMOUS',
                        'APPQOSSYS',
                        'AURORA$JIS$UTILITY$',
                        'AURORA$ORB$UNAUTHENTICATED',
                        'AWR_STAGE',
                        'BI',
                        'CSMIG',
                        'CTXSYS',
                        'DBSNMP',
                        'DIP',
                        'DMSYS',
                        'DVF',
                        'DVSYS',
                        'EXFSYS',
                        'FLOWS_FILES',
                        'HR',
                        'IX',
                        'LBACSYS',
                        'MDDATA',
                        'MDSYS',
                        'MGMT_VIEW',
                        'OAS_PUBLIC',
                        'ODM',
                        'ODM_MTR',
                        'OE',
                        'OLAPDBA',
                        'OLAPSVR',
                        'OLAPSYS',
                        'ORACLE_OCM',
                        'ORDDATA',
                        'ORDPLUGINS',
                        'ORDSYS',
                        'OSE$HTTP$ADMIN',
                        'OUTLN',
                        'OWBSYS',
                        'OWBSYS_AUDIT',
                        'PERFSTAT',
                        'PM',
                        'QS',
                        'QS_ADM',
                        'QS_CB',
                        'QS_CBADM',
                        'QS_CS',
                        'QS_ES',
                        'QS_OS',
                        'QS_WS',
                        'REPADMIN',
                        'RMAN',
                        'SCOTT',
                        'SH',
                        'SI_INFORMTN_SCHEMA',
                        'SPATIAL_CSW_ADMIN_USR',
                        'SPATIAL_WFS_ADMIN_USR',
                        'SYS',
                        'SYSMAN',
                        'SYSMAN_APM',
                        'SYSMAN_MDS',
                        'SYSMAN_OPSS',
                        'SYSMAN_RO',
                        'SYSTEM',
                        'TRACESVR',
                        'TSMSYS',
                        'WEBSYS',
                        'WKPROXY',
                        'WKSYS',
                        'WKUSER',
                        'WK_TEST',
                        'WMSYS',
                        'XDB',
                        'XS$NULL')
   AND owner NOT LIKE 'APEX\_%' ESCAPE '\'
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 1200 total points
ID: 39886217
another way, perhaps better if you have permissions

SELECT *
  FROM dba_objects  -- or dba_segments if you only want objects that consume space
 WHERE owner not in (select user_name from sys.default_pwd$)


or better yet -  combine them


SELECT *
  FROM dba_objects  -- or dba_segments if you only want objects that consume space
 WHERE owner NOT IN ('ANONYMOUS',
                        'APPQOSSYS',
                        'AURORA$JIS$UTILITY$',
                        'AURORA$ORB$UNAUTHENTICATED',
                        'AWR_STAGE',
                        'BI',
                        'CSMIG',
                        'CTXSYS',
                        'DBSNMP',
                        'DIP',
                        'DMSYS',
                        'DVF',
                        'DVSYS',
                        'EXFSYS',
                        'FLOWS_FILES',
                        'HR',
                        'IX',
                        'LBACSYS',
                        'MDDATA',
                        'MDSYS',
                        'MGMT_VIEW',
                        'OAS_PUBLIC',
                        'ODM',
                        'ODM_MTR',
                        'OE',
                        'OLAPDBA',
                        'OLAPSVR',
                        'OLAPSYS',
                        'ORACLE_OCM',
                        'ORDDATA',
                        'ORDPLUGINS',
                        'ORDSYS',
                        'OSE$HTTP$ADMIN',
                        'OUTLN',
                        'OWBSYS',
                        'OWBSYS_AUDIT',
                        'PERFSTAT',
                        'PM',
                        'QS',
                        'QS_ADM',
                        'QS_CB',
                        'QS_CBADM',
                        'QS_CS',
                        'QS_ES',
                        'QS_OS',
                        'QS_WS',
                        'REPADMIN',
                        'RMAN',
                        'SCOTT',
                        'SH',
                        'SI_INFORMTN_SCHEMA',
                        'SPATIAL_CSW_ADMIN_USR',
                        'SPATIAL_WFS_ADMIN_USR',
                        'SYS',
                        'SYSMAN',
                        'SYSMAN_APM',
                        'SYSMAN_MDS',
                        'SYSMAN_OPSS',
                        'SYSMAN_RO',
                        'SYSTEM',
                        'TRACESVR',
                        'TSMSYS',
                        'WEBSYS',
                        'WKPROXY',
                        'WKSYS',
                        'WKUSER',
                        'WK_TEST',
                        'WMSYS',
                        'XDB',
                        'XS$NULL')
   AND owner NOT LIKE 'APEX\_%' ESCAPE '\'
   AND owner not in (select user_name from sys.default_pwd$)
0
 
LVL 23

Expert Comment

by:Steve Wales
ID: 40121505
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question