Search code examples
databaseoracle-databasedatabase-administrationoracle12csysdba

Why many tables ORACLE default 12c?


Creating a new database (basic and advanced), It's my first time dealing with Oracle, in which I do not know why so many tables, triggers, views and other objects when only wanted to create a relational data base empty.

Is there another way to do this or is there something I missed understand?

Thank you.

Capture:

default tables


Solution

  • Those objects are owned by SYS user. You could verify it using following query:

    SELECT * FROM DBA_OBJECTS WHERE OWNER = 'SYS';
    

    To see the objects owned by other users, see:

    SELECT * FROM DBA_OBJECTS WHERE OWNER <> 'SYS';
    

    You must have logged in as SYS AS SYSDBA, therefore able to view the objects owned by SYS user.

    Remember,

    • SYS/SYSDBA is special
    • Never ever use SYS (or SYSDBA) for general database purpose, but for administration/maintenance purpose (startup, shutdown, backup, recover)
    • SYS/SYSDBA is Oracle proprietary (try to open a SR/TAR starting with "i did that with SYS/SYSDBA" and you'll see the immediate answer)
    • SYS/SYSDBA does not act like any other user
    • When you use SYS/SYSDBA Oracle deactivates some code path and activates others
    • Whatever you do with SYS/SYSDBA will neither validate nor invalidate the same thing with any other user.

    NEVER EVER use SYS/SYSDBA for anything that can be done by another user. Use SYS/SYSDBA ONLY for something that can't be done by someone else.

    See this answer on AskTom by Tom Kyte.