This discussion is archived
9 Replies Latest reply: Nov 15, 2012 5:14 AM by EdStevens RSS

Log File in Oracle

936666 Newbie
Currently Being Moderated
Where is the log file in Oracle database
In MS SQL Server there is concept like MDF LDF NDF
where is MDF is data file ,LDF is log file ,NDF is Secondary file

how to differentiate data file and log file

Thanks!
  • 1. Re: Log File in Oracle
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    Well if you tell us what is you database version first it will be better

    -Post DB Version
    -Post OS version
  • 2. Re: Log File in Oracle
    Osama_Mustafa Oracle ACE
    Currently Being Moderated
    if you have database 11g
    SQL>  show parameter background
     
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    background_core_dump                 string      partial
    background_dump_dest                 string      /oracle/app/oracle/diag/rdbms/ORCL/ORCL/trace
    then
    SQL> !ls -ltr /oracle/app/oracle/diag/rdbms/ORCL/ORCL/trace/al*
    10g :

    $ORACLE_BASE/admin/orcl/bdump/al*
  • 3. Re: Log File in Oracle
    936666 Newbie
    Currently Being Moderated
    DB version Oracle Database 11g Enterprise Edition Release 11.2.0.1.0


    OS version Win 2003 & 32-bit

    Thanks!

    Edited by: 933663 on Nov 15, 2012 1:17 AM
  • 4. Re: Log File in Oracle
    JohnWatson Guru
    Currently Being Moderated
    Closest analogy:
    MDF is your data dictionary, in system tablespace; NDFs are your user data in your non-system tablespaces; LDFs are your online ligfiles.
  • 5. Re: Log File in Oracle
    UweHesse Expert
    Currently Being Moderated
    An Oracle Database is a completely different animal than MS SQL Server.
    Don't expect that you can transfer much DBA knowledge from one to the other.

    I strongly recommend that you go through the Concepts Guide here:
    http://docs.oracle.com/cd/E11882_01/server.112/e25789/toc.htm

    Kind regards
    Uwe Hesse

    "Don't believe it, test it!"
    http://uhesse.com
  • 6. Re: Log File in Oracle
    936666 Newbie
    Currently Being Moderated
    Closest analogy:
    MDF is your data dictionary, in system tablespace; NDFs are your user data in your non-system tablespaces; LDFs are your online ligfiles.
    Ok where will be the path of online logfiles in this case.
    will it reduce when i truncate table.
    can i take online logfile backup alone.
  • 7. Re: Log File in Oracle
    JohnWatson Guru
    Currently Being Moderated
    933663 wrote:
    Closest analogy:
    MDF is your data dictionary, in system tablespace; NDFs are your user data in your non-system tablespaces; LDFs are your online ligfiles.
    Ok where will be the path of online logfiles in this case.
    select member from v$logfile;
    will it reduce when i truncate table.
    no
    can i take online logfile backup alone.
    you can't back up online logs.

    Better close this topic, and take an introductory DBA course.
  • 8. Re: Log File in Oracle
    936666 Newbie
    Currently Being Moderated
    .
  • 9. Re: Log File in Oracle
    EdStevens Guru
    Currently Being Moderated
    933663 wrote:
    Closest analogy:
    MDF is your data dictionary, in system tablespace; NDFs are your user data in your non-system tablespaces; LDFs are your online ligfiles.
    Ok where will be the path of online logfiles in this case.
    will it reduce when i truncate table.
    can i take online logfile backup alone.
    Again, you are trying to apply SQL Server concepts to Oracle. The similarities between the two products begin AND END with "SELECT * FROM EMP;". The very term "database" has a vastly different meaning between the two products.

    First of all, when you use the generic term 'logfile', in the Oracle world that is usually taken to mean the online redo logs. These logs aren't what you seem to think they are. They are fixed size files that contain a sequential list of change vectors. Ther are a minimum of two of them. When an online log file is filled (remember, it is a fixed, pre-defined size) writing of the change vectors switches to the next log file, and (if properly configured) the just-filled one is copied to an archived redo log. Truncating table does not reduce the redo logs, it simply writes another change vector to them.

    Again, you simply cannot apply SQL Server concepts to Oracle ... and vice versa. I won't get into the quasi-religious war of relative merits of each. At the end of the day you just have to accept that they are vastly different products, and you have to approach each with that firmly in mind.


    You really, REALLY, REALLY need to spend a little time in the Concepts Manual. In fact ....

    =================================================
    Learning how to look things up in the documentation is time well spent investing in your career. To that end, you should drop everything else you are doing and do the following:

    Go to tahiti.oracle.com.

    Drill down to your product and version.

    <b><i><u>BOOKMARK THAT LOCATION</u></i></b>

    Spend a few minutes just getting familiar with what is available here. Take special note of the "books" and "search" tabs. Under the "books" tab (for 10.x) or the "Master Book List" link (for 11.x) you will find the complete documentation library.

    Spend a few minutes just getting familiar with what <b><i><u>kind</u></i></b> of documentation is available there by simply browsing the titles under the "Books" tab.

    Open the Reference Manual and spend a few minutes looking through the table of contents to get familiar with what <b><i><u>kind</u></i></b> of information is available there.

    Do the same with the SQL Reference Manual.

    Do the same with the Utilities manual.

    You don't have to read the above in depth. They are <b><i><u>reference</b></i></u> manuals. Just get familiar with <b><i><u>what</b></i></u> is there to <b><i><u>be</b></i></u> referenced. Ninety percent of the questions asked on this forum can be answered in less than 5 minutes by simply searching one of the above manuals.

    Then set yourself a plan to dig deeper.
    - Read a chapter a day from the Concepts Manual.
    - Take a look in your alert log. One of the first things listed at startup is the initialization parms with non-default values. Read up on each one of them (listed in your alert log) in the Reference Manual.
    - Take a look at your listener.ora, tnsnames.ora, and sqlnet.ora files. Go to the Network Administrators manual and read up on everything you see in those files.
    - When you have finished reading the Concepts Manual, do it again.

    Give a man a fish and he eats for a day. Teach a man to fish and he eats for a lifetime.

    =================================

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points