Fix SQL Plan in Oracle |

Sdílet
Vložit
  • čas přidán 21. 07. 2024
  • In this episode of daily DBA, I pick up 6 important #DBA related questions and give my answers! Do not forget to checkout BONUS QUESTION at the end of the video!
    00:00 Intro
    02:13 Client is upgrading OS from OEL 6 to OEL 7. They want us to upgrade the DB also from 11g to 12c. How should I proceed further?
    09:01 How to fix the plan for an sql in database?
    12:46 How to mining data using redo log files?
    16:00 I generally see ORA-19804: cannot reclaim 67108864 bytes disk space from 10737418240 bytes limit. Error in all the production database backups. What to do?
    17:54 What is use of snapshot controlfile. How rman uses snapshot controlfile with recovery catalog and without recovery catalog.
    21:06 Can you please explain about types of protection modes in dataguard and their purpose?
    Bonus Question
    26:28 What are the prerequisits for becoming a DBA?
    Website: www.dbagenesis.com/
    Facebook: / dbagenesis
    Instagram: / dbagenesis
    Twitter: / dbagenesis
  • Věda a technologie

Komentáře • 45

  • @pankaj00771
    @pankaj00771 Před 2 lety +1

    Hi Arun, Loved the way you describe the questions,thanks.

  • @avid2395
    @avid2395 Před 4 lety +3

    As per my suggestion for bigger(in TB) size database migration data guard is good option & also datagurd is free with enterprise edition bundle license. we can save downtime in migration using dataguard. Please clear if i am wrong.

  • @nagarjunag9596
    @nagarjunag9596 Před 4 lety +1

    Appriciate your efforts

  • @MehnaazSiddiquims
    @MehnaazSiddiquims Před rokem +1

    Hi Arun, thankyou so much for sharing the amazing knowledge 😊

  • @pankaj00771
    @pankaj00771 Před 2 lety

    Hi Arun,In Oracle 12c database in my prod database FRA is not releasing Flashback Logs(after retention window over) ,what would be the issue? Nothing major in alerting ,it's causing issue in alarming alerts via OEM

  • @mallikarjunasharmap5581
    @mallikarjunasharmap5581 Před 3 lety +1

    one if the archive log deleted on Primary database without backp . How to restore the archive log . is there any impact to the DR database

  • @nishakicooking1236
    @nishakicooking1236 Před 4 lety +1

    If the application side slow so what I have to do

  • @MurthyJn
    @MurthyJn Před 4 lety +1

    If database size is more than 50TB then? also when we upgrade the OS what are the components need to take the backup.

    • @dbagenesis
      @dbagenesis  Před 4 lety

      What do you think about what components backup you must take?

  • @SANDATA764
    @SANDATA764 Před 4 lety +1

    Sir please try to talk about Data guard vs golden gate.
    Because in the next couple of weeks we need to setup a new server installed on 12cR2.

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Have you looked at below video: czcams.com/video/89jYzLNddHs/video.html

  • @sivakumarayachitula6469
    @sivakumarayachitula6469 Před 4 lety +1

    Can you tell me how cursors work actually in shared sql area...I am confused why and when the same sql Id will be having its child cursors and version counts??
    Sometimes when I try to migrate the base line from one environmnt to another it is confusing me which plan do i actually need to migrate because I see two r three plans for the same sql id but with its child cursors having different sql plans.

    • @dbagenesis
      @dbagenesis  Před 4 lety +1

      Picked up your question for upcoming episode!

    • @tlondi
      @tlondi Před 4 lety

      High version count and child cursors for the same query could point to an application design issue. You may have designed application to use literals instead of bind variables. In your scenario there’s a bit of work to be done at application design level first.

  • @SaifPathanSimplyIndian
    @SaifPathanSimplyIndian Před 4 lety +1

    QUESTION: HOW TO CHOSE WHEN TO DO INDEXING ON A TABLE AND ON WHICH ATTRIBUTE/PARAMETER OF TABLE?

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Create index on columns which application team uses in where clause.

  • @aqeebjaveed3230
    @aqeebjaveed3230 Před 4 lety +1

    Difference between integrated capture and classic capture in golden gate? In integrated capture do we need to create the logminer database in source database or Oracle uses logminer mechanism ?

    • @rennybabu8686
      @rennybabu8686 Před 4 lety

      Classic capture (resides outside DB) directly reads from the redo/archive logs, Integrated Capture is registered within the Oracle db and GG reads using internal Stream/Logminer APIs to read the logs and writes the changes as LCRs.

    • @dbagenesis
      @dbagenesis  Před 4 lety +1

      Hi Renny, we try not to allow viewers to promote other website courses. If you do so, we will be banning you from commenting on any of our videos. Request you to maintain our channel guidelines!
      Though we will never stop you to share your knowledge and expertise with fellow DBAs. All the best!

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Good one, picked it up for upcoming episode !!

    • @aqeebjaveed3230
      @aqeebjaveed3230 Před 4 lety

      Thank you sir for picking up.

  • @SANDATA764
    @SANDATA764 Před 4 lety +1

    Your effort is pretty awesome
    Thanks

  • @nihalnadaf8126
    @nihalnadaf8126 Před 4 lety +1

    Hi arun,
    In our dataguard setup, one of database having 1 archivelog gap all the time, will added standby redolog also and started recovery in real time apply but still 1 log gap is there. what the reason behind this..?

    • @srinivasaraov6343
      @srinivasaraov6343 Před 4 lety +1

      Please confirm SRL's and ORL's having same size on both primary and standby databases.

    • @nihalnadaf8126
      @nihalnadaf8126 Před 4 lety

      @@srinivasaraov6343 Both logs having same size.

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Depends, looks like it needs to be investigated. You will have to look into both primary and standby alert logs to identify whats going on.
      Also check, sometimes when you enable MRP, you can delay the log apply. See if you have something like that when you enable MRP.

  • @andelakshmipathi2389
    @andelakshmipathi2389 Před 4 lety +1

    Hi sir
    Can you explain SQL tuning advisor how to run and how to analyze

    • @nishanthajay
      @nishanthajay Před 4 lety

      You can utilise DBMS_SQLTUNE package for tuning your query or can get the help of OEM. I'd still suggest to go through manual steps ;)
      3 tasks had to be done,
      DBMS_SQLTUNE_*create_tuning_task(
      DBMS_SQLTUNE_*execute_tuning_task(
      DBMS_SQLTUNE_*report_tuning_task(

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Sure, have a look at below article:
      support.dbagenesis.com/knowledge-base/automatic-sql-tuning-in-oracle/

  • @mahmudurkhan5754
    @mahmudurkhan5754 Před 4 lety +1

    Sir, when database will use full table scan and when they use the index? Is there anything I need to enable for full table a scan?

    • @nishanthajay
      @nishanthajay Před 4 lety +1

      There are many criteria's on which index is not being used (I presume u mean to say index present for the column but still not been used). Gathering statistics on the table or baselining a plan for the query if index was already being used might help.
      You could try using index within hint to see if the index is being utilised as well, For ex, select /*+ INDEX (TABLE Index_name) */ * from table where column=condition;

    • @dbagenesis
      @dbagenesis  Před 4 lety +1

      Many reasons, so when optimizer is going for full table scan, that means there could be couple of reasons for IGNORING THE INDEX:
      1. Index needs to be rebuild
      2. Full table scan is less costly compared to Index scan
      You do not need to enable anything, its just if you want to force Index scan when query is going for full table scan, then you use HINTS. And, vice versa as well.

    • @mahmudurkhan5754
      @mahmudurkhan5754 Před 4 lety +1

      @@nishanthajay thank you sir

    • @mahmudurkhan5754
      @mahmudurkhan5754 Před 4 lety

      @@dbagenesis thank you sir

    • @dbapreacher5133
      @dbapreacher5133 Před 4 lety

      1.u can collect table&&indexes statistics and Histogram. to be a DBA ,2.u should know which is best execution plan access the table with lowest cost from the cbo 3.When necessary using hint /+ */ to stabilize the execution plan. good luck.

  • @cocplayer00
    @cocplayer00 Před 4 lety +1

    Sir,
    Why we go database mount restrict before dropping database

    • @dbagenesis
      @dbagenesis  Před 4 lety

      What do you think why Oracle implemented it?

    • @cocplayer00
      @cocplayer00 Před 4 lety

      So that except user who have restrict privelege cant access database.

  • @maheshj3340
    @maheshj3340 Před 4 lety +2

    Sir, how to fix plan for SQL?

    • @dbagenesis
      @dbagenesis  Před 4 lety

      There are 1000 ways, depends on type of SQL, performance problem and what you are trying to achieve.

  • @AJ-gb4tw
    @AJ-gb4tw Před 4 lety +1

    You have wasted more than 2 minutes in the beginning

    • @dbagenesis
      @dbagenesis  Před 4 lety +2

      I do have plans to waste more time in future.. Stop watching our videos and watch some prank videos instead