SQL Profile vs SQL Plan Management |

Sdílet
Vložit
  • čas přidán 8. 07. 2024
  • In this episode of daily DBA, I pick up 5 important #DBA related questions and give my answers! Do not forget to checkout BONUS QUESTION at the end of the video!
    00:00 Intro
    03:06 What is materilized view and how can I purge the MV logs?
    05:43 If locks are coming and releasing itself within 2-3 seconds, in this situation what we can do in oracle so locks does not occur even for few seconds.
    07:34 Hi Arun, what happens if password file is deleted from the standby server? Will there be an impact on standby sync with primary? How will we fix the issue?
    10:36 Scenario: we get complaint that one sql is taking long time for execution. When investigated and found that sql is using full table scan where it is fetching only 20% records. So we ran sql tuning advisory and fix sql profiles forcing optimizer to choose index. Finally issue got resolved query performance increased.
    Later, one user runs the same sql modifying the WHERE clause which fetches 80% of the records associated in the same table.
    Now what will optimizer do? Will it still use the same sql profiles which is fixed to it or it will skip sql profiles and chooses different plan?
    15:27 What is better option for sql performance: SQL Plan Management or SQL Profiles or Hint to improvise performance of a particular sql? Or, do you advice the application team to modify their SQLs and use logical operator instead of BETWEEN, AND, OR instead of IN?
    25:13 Bonus: Hi Arun, I wanted to know from your personal experience, what is one of the rarest of rare crisis situation a DBA can experience in real-time like site crash or anything that hardly any DBA sees in their entire career which most of the DBA's are scared of or the situation is very challenging.
    Website: www.dbagenesis.com/
    Facebook: / dbagenesis
    Instagram: / dbagenesis
    Twitter: / dbagenesis
  • Věda a technologie

Komentáře • 46

  • @alwaysjunu
    @alwaysjunu Před 4 lety +12

    If standby db loses or deleted its password file it will impact the shipping of archived to standby from prod . Solution is to copy the password file from prod to standby.

  • @kuchbhikaho2121
    @kuchbhikaho2121 Před 3 lety

    I am so addicted to all of your videos, specially in my mind I am happy with some of the concepts are so correct and same as you are explaining and at the same time few of the areas I am correcting as you are giving more and correct clarity.
    Thanks Arun for so calm, composed, confident in explaining all these DBA related areas.

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

    Most Awaited topic SQL profile 👍🏻

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

    Thanks Arun for picking the bonus appreciated

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

    Regarding the password file in dataguard. It is not only required during the duplication process but the 'fal_server' parameter requires it to connect to the primary db. FYI : When MRP finds that an archive log is missing during media recovery, it sends the fal_client information to the server identified by fal_server and requests fal_server to resend the file again.

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

    Heartly thanks for Kindle books.. it's asome....

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

    very good explanation about SQL Profile .... Thanks Sir

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

    Yes we have seen that there is gap in log shipping due to the password file corruption on standby database.

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

    Yes, we create bcp the way you explained using rman clone i.e connecting to source db rman and auxiliary instance and yes if password file is lost or not same on both the sides , bcp will be out of sync.

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

    Thanks arun

  • @bharathkumar-ds8cd
    @bharathkumar-ds8cd Před 4 lety +2

    Nice explanation arun

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

    Thank you.

  • @Mrpro119
    @Mrpro119 Před 4 lety

    Nice presentation ......

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

    Hi Arun,
    We have seen password corruption in standby causing problem in log shipping from primary. Dest basically gets errors out stating Oracle not available (if done defer/enable)

  • @ashaganesan4090
    @ashaganesan4090 Před 3 lety +2

    Arun bro.. I have cleared a technical interview today one and only because of you.. by learning from your videos.. I am so grateful to you..

    • @dbagenesis
      @dbagenesis  Před 3 lety

      Keep it up Asha, I love when our DBA community grows.. Congratulations! 🎉

    • @ashaganesan4090
      @ashaganesan4090 Před 3 lety

      @@dbagenesis Thank you very much 😊

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

    Exactly Junaid Jamal...I face this issue...my syncing process stops...I need to copy the password file from Production to Standby..it started syncing.

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

    Hello Arun,
    Can you pls tell what is a base line?

  • @scooby990
    @scooby990 Před 3 lety

    Is there a licensing limit to the number of pdb's for a cdb or number of cdb's?

  • @chetan19891
    @chetan19891 Před 3 lety

    the scenario related to RMAN catalog upgrade .. I researched on it but didn't find the solution. Could you please provide correct scenario.. some error code will help to narrow down the research.. most common solutions I got was to run upgrade catalog and make sure that version of RMAN client and catalog schema is compatible.

  • @himanigrover2581
    @himanigrover2581 Před 3 lety

    It regarding the sql profile. When the user will change the sql and add another condition in where clause, it will change the sql_id of that sql and the sql profile earlier created on a different sql if will simply not work. Isn’t it?

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

    ORA-02019: connection description for remote database not found in Oracle.
    What could be the issue?

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

    Please explain partitions

  • @RameshKumar-dy2ez
    @RameshKumar-dy2ez Před 4 lety

    Hi Arun, I have a question ,can we run tunning advisor in standby db ,,, as we have few jobs running on standby db as well..

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Yes, you can run it. This is called as remote sql tuning. Read about it .. You will have to use database_link_to parameter

  • @mohitjain2192
    @mohitjain2192 Před 2 lety

    Shipping of archivelogs won't happen and sync will be impacted in case password file is not there.

  • @viralmody6316
    @viralmody6316 Před 2 lety

    Is it possible to force an old execution plan for an SQL to be used by the optimizer incase the old plan performed better than current execution plan ?

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

    @Arun - You told deleting password file wont impact sync
    But what if the SYS password on primary is changed and we don't change it on standby ? - Will it impact sync ?

    • @dbagenesis
      @dbagenesis  Před 4 lety

      I was confirming it with other experienced DBA as I was not sure about it. Its mandatory to have it, simple.

    • @chakradharsasanapuri7328
      @chakradharsasanapuri7328 Před 3 lety

      If we change sys password at primary n not copy, it breaks replication break

  • @himanshugarg4846
    @himanshugarg4846 Před 4 lety

    Hi arun
    What do u mean by additional statistics inside the SQL Profiles what are that statistics.?

    • @dbagenesis
      @dbagenesis  Před 4 lety

      Why not you research same and respond to this comment?

    • @himanshugarg4846
      @himanshugarg4846 Před 4 lety

      @@dbagenesis I have already check but did not get any specific answer.

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

    U were just blabbering on the sql profile part rather than coming straight to answer. And you didn't even answer it correctly. I could see 2-3 pauses on that part maybe u were googling the answer.

    • @dbagenesis
      @dbagenesis  Před 3 lety

      yahoo not google 😂

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

      You are right Mayuresh.... I think if there is change in WHERE clause then the SQL stmt is also changed and it will be treated as a new query by Oracle engine, then there is no point to follow the old SQL query profile.
      Secondly its the most common scenario, if you change the password file in Standby DB log file shipping stops and Primary will not be in sync with Standby.
      Third if someone ask query is running slow, don't point towards application team without analyzing anything. Here person wants to know what all should be analyzed to find root cause.
      Sorry to say Arun.. Your technical round is not cleared.

    • @Zaid_Alam
      @Zaid_Alam Před 10 měsíci

      @@techlearner2447 technical round not clear 😂😂😂

  • @pradeepvijayaraghavan7323

    Hi , i have seen your video and feel like you are too aggressive about your words (especially i felt when you said others that they dont know 100%). Always pointing others that they do not know anything. Nobody in this world knows everything including me. You dont know anything what I know and vice versa. so the choice of words is important brother when you are teaching something.