Oracle PL SQL interview question | oracle pragma autonomous transaction real time use case

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024

Комментарии • 110

  • @GautamKumar-ci4rz
    @GautamKumar-ci4rz 4 года назад +18

    Hi Siva, I don't have words to thank you. I got new job in this covid situation by listening to your videos. Just want to say that you are doing a fantastic job . God bless you always .

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      My pleasure, thank you 🙏, All the best 👍🌸🌸

  • @nareshreddy6450
    @nareshreddy6450 4 года назад +6

    What a explanation sir. You are king of SQL $ PLSQL it's my opinion sir .....

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      😄😄 not sure whether I deserve this comment, however thanks for your comments 👍💐

  • @devanaidu9406
    @devanaidu9406 4 года назад +4

    Hi Sir, you are the best faculty for SQL and PLSQ sir, I have never seen this kind of explanation,thanks a lot for sharing your knowledge us..with free of cost..you are kind person..thank u sir.. please Keep continue sir 😊

    • @SivaAcademy
      @SivaAcademy  4 года назад

      🙏 its my pleasure, not sure whether I deserve this comment, however thanks for your comment. Always I try my level best to post best free educational videos here, please stay tuned 👍💐💙

    • @sansurvase2
      @sansurvase2 2 года назад

      Agree

  • @venkatapothuri3703
    @venkatapothuri3703 3 года назад +1

    Thanks to Siva Academy folks making these videos, they are crystal clear..
    If we need to million rows to get inserted .. and a couple of thousand rows fails.. how do we capture the INSERT STATEMENTS which gets failed besides the SQL errors and error msgs you have explained ?

    • @SivaAcademy
      @SivaAcademy  3 года назад

      Thank you, you can check ORACLE ERROR LOG TABLE concept

  • @RaxTubeYou
    @RaxTubeYou 6 месяцев назад

    Amazing videos , you are really clear, informative and excellent at explaining the details without so much confusion. Brilliant thanks

  • @swamivivekananda-cyclonicm8781
    @swamivivekananda-cyclonicm8781 2 года назад

    Awesome. Superb. Undisputedly you deserve most KPM Award - (Knowledge per Minute. Award)

  • @nk2506
    @nk2506 3 года назад +2

    @siva academy: You are doing amazing work and helping us to understand concepts clearly. Thanks a lot
    I have a question on using pragma autonomous transaction in triggers. Please explain in what scenarios we need to use commit in triggers

  • @anupdeshmukh2051
    @anupdeshmukh2051 4 года назад +1

    Very informative, keep it up and provide us more and more knowledgable videos.

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Welcome 🙏💐, please stay tuned for more videos

  • @vinu2791
    @vinu2791 4 года назад +1

    Hi Siva,
    Thanks for the transparent covering of the topics. I would request you to Share the reference link like in this video you indicated to go through 13 Part 1 & Part 2. If you tell the same link has been given in the description, it will be easy for the users to navigate the supporting videos..!!

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Hi Vinodh,
      Added the links in the description, normally for every video i used to give, i forgot to add for this video, please check the description now,
      Thanks,
      Siva

  • @rameshramajayam9751
    @rameshramajayam9751 2 года назад

    Great Explanation.... Awesome ...Keep Upload more videos ..

  • @shashank2004
    @shashank2004 4 года назад +1

    As always awsome explanation... I am eagerly awaiting your performance tuning videos

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Yeah, I know I have been telling you from long ago 🙂, will be starting soon, please stay tuned 👍💐

  • @Pintukalia12
    @Pintukalia12 4 года назад +1

    Best videos ever i seen

  • @sairamtheexplorer
    @sairamtheexplorer 4 года назад

    Thanks for the very useful interview questions, these were the questions I faced in my initial stage,but at that time, I missed your videos.
    Anyway very informative and useful.Thank You :)

  • @devashishbiswas2867
    @devashishbiswas2867 8 месяцев назад

    Thanks for the wonderful explanation!

  • @deepakvadivel4479
    @deepakvadivel4479 2 года назад

    like ur way of teaching very good ...

  • @karthiarumugam4666
    @karthiarumugam4666 3 года назад

    No words to say about your videos. Very very useful and clearly explained what is expected by everyone and interviewer...I have not seen these kind of videos ever before...
    Any plan to upload Unix videos?

  • @arijitroy7253
    @arijitroy7253 3 года назад

    Thnx a lot buddy for such a lucid explanation. Could u pls explain further what oracle internally does when we use pragma in triggers having commit/pragma in a function containing DML Being used in a select query.
    Thanks.

  • @mohammadfazil971
    @mohammadfazil971 4 года назад

    Super siva sir.. Will wait for your upcoming videos..

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Welcome, please stay tuned 👍💐

  • @sonukumar-nx8tt
    @sonukumar-nx8tt 3 года назад

    Great explanation 👌

  • @rahitbasu460
    @rahitbasu460 4 месяца назад

    Thank you so much sir..please share some Functional video on oracle Finance module

  • @rajivshivaraman6476
    @rajivshivaraman6476 4 года назад

    Thank You So Much Siva Sir 🙏......Very clear explanation.

  • @sivapalanisamy8989
    @sivapalanisamy8989 2 года назад

    Keep up good work. Please post videos for Oracle Apex. Thanks in advance.

  • @dkoothan360
    @dkoothan360 4 года назад

    Great sir.. Aswome explanation...I'm requesting you to kindly post video for how to debug the procedure which has more than 3k line nd calling different procedures... Thanks in advance...

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Sure bro, please stay tuned I will add it to upcoming videos

  • @akshaykodekal8483
    @akshaykodekal8483 3 года назад

    how to delete entry in trigger , which is created with help of pragma autonomous transcation
    for ex-
    trying to delete a record frm emps table , but got error saying - trigger error whiich has pragma autonomous transcation along with commit

  • @shekharrohit1
    @shekharrohit1 4 года назад

    Thank you for explaining all topics in such a simple way, if you could please share videos on Regexp topic as well.

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Welcome, I am yet to post on regular expression, please stay tuned 👍

  • @iswaryarajendran2022
    @iswaryarajendran2022 4 года назад

    Very neat explanation 👌

  • @omkarreddy9596
    @omkarreddy9596 4 месяца назад

    i have a doubt but what happen if commit will allowed in trigger and why oracle will restrict commit or rollback.

  • @mondemlanshmi
    @mondemlanshmi 2 года назад

    Best exploration tqq

  • @prema716
    @prema716 3 года назад

    hi siva,
    i have an doubt while roll back at last moment after came from pragma our actual correct value also rollbacked. In our insert statement values 1 and 100 are correct right.then if we do rollback all values are deleted.how we avoid this

  • @patrikmelichercik7709
    @patrikmelichercik7709 4 года назад

    hi Siva,what is the the usage of commit inside the trigger if it is not allowed without pragma autonomous transaction

  • @bharatgidh1585
    @bharatgidh1585 Год назад

    Hi Siva, Thank you for explaining the concepts very easily. Just one question regarding the example where we have created a procedure to insert into error_log, why we have not used DECLARE section ? I am getting compile error while trying to add declare section.
    can you please guide on this?

    • @SivaAcademy
      @SivaAcademy  Год назад

      Hi bro, can you please paste your code here

  • @suraj454
    @suraj454 4 года назад

    Simply best...

  • @abdulmazid7615
    @abdulmazid7615 6 месяцев назад

    Dear sir can we have videos on performance tuning? Like hints etc?

  • @garjeshital219
    @garjeshital219 6 месяцев назад

    Can you please post a video on real time usage of each index.
    If i have to create index on Gender, Marital status, Age then which index should be used.
    Also what is difference between Primary key and Unique not null key

  • @YenagantiSrikanth
    @YenagantiSrikanth 2 года назад

    We can write this also na, why do we need pragma specifically..
    CREATE TABLE T (SAL NUMBER);
    CREATE TABLE PF_LOG_ERR (ERROR_NO NUMBER, ERROR_MSG VARCHAR2(100));
    DECLARE
    lv_error_no NUMBER;
    lv_error_msg VARCHAR2(100);
    BEGIN
    INSERT INTO T VALUES('10000');
    INSERT INTO T VALUES('20100');
    INSERT INTO T VALUES('20000$');
    INSERT INTO T VALUES('35980');
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    lv_error_no :=sqlcode;
    lv_error_msg := SQLERRM(lv_error_no);
    ROLLBACK;
    --PR_ERROR_LOG(lv_error_no,lv_error_msg);
    INSERT INTO PF_LOG_ERR VALUES (lv_error_no, lv_error_msg);
    COMMIT;
    END;
    /
    Please help on this.

  • @shilpapangerkar8098
    @shilpapangerkar8098 3 года назад

    Hello Sir, as you showed the commit can be written in a trigger by using pragma autonomous transaction, can we call procedure using pragma autonomous transaction , as i was asked if procedures can be called in trigger? thanks

  • @kaviyarajk5663
    @kaviyarajk5663 4 года назад

    good bro..nice explanation..please post the table partitioning in oracle 11g examples and type of partitioning...

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Sure please stay tuned I will cover in upcoming videos

  • @rajashriwatve3533
    @rajashriwatve3533 4 года назад

    Thanks for these helpful video series... Can you also put video for Performance Tuning

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Sure please stay tuned 👍 starting soon

  • @haris4437
    @haris4437 4 года назад

    For the first use case of autonomous transaction, can we do this in the exception block, pls confirm ..rollback then insert into log table then commit

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Yes, thas possible, however in real time we wont use like that, because mostly the transaction would be handled in the calling API

    • @haris4437
      @haris4437 4 года назад

      @@SivaAcademy thanks! for the response

  • @suraj454
    @suraj454 4 года назад

    Very useful...

  • @moviemaRKer
    @moviemaRKer 3 года назад

    Hi Siva, Huge applause to all your content in this Channel. I have a doubt here at (5:33) you have created a procedure to insert error logs, But why should that procedure be "autonomous ". Even the normal procedure with Commit gives the same results right??

    • @SivaAcademy
      @SivaAcademy  3 года назад

      Yes bro, basically to roll back the complete transaction happened within the procedure and to capture only the error

  • @chandrababubollu4508
    @chandrababubollu4508 4 года назад

    Very useful

  • @nivethasomasundaram8871
    @nivethasomasundaram8871 3 года назад

    Hi siva. I have a question..What will happen if we do not issue commit/rollback when pragma autonomous transaction is declared

    • @SivaAcademy
      @SivaAcademy  3 года назад +1

      We will get run time error during execution

  • @masalhemant4255
    @masalhemant4255 4 года назад

    great......

  • @randyregins
    @randyregins 4 года назад

    Great Bro

  • @harshalburkule1204
    @harshalburkule1204 2 года назад

    Hi Sir, I like all your video going one by one.
    My question is that can we create table through function if yes then how to create..
    Please help me...

    • @SivaAcademy
      @SivaAcademy  2 года назад +1

      Yes we can, using dynamic sql., however not recommended to create using function, instead, we use procedure to create the same,

  • @madhan.muthusamy
    @madhan.muthusamy 4 года назад

    In exception, can I put rollback before insert, will it execute??

  • @anshumankumar4993
    @anshumankumar4993 4 месяца назад

    Trigger is auto commit .. why do you need commit or rollback inside trigger ?? any use case where commit is required inside trigger?

  • @lispyleon2948
    @lispyleon2948 4 года назад

    try to put video about REST AND SOAP

  • @rambiradar7828
    @rambiradar7828 2 года назад

    Can we not write the PRAGMA autonomous_transaction block in exception part instead of writing into another procedure ?

  • @chinnaraomaroji3315
    @chinnaraomaroji3315 3 года назад

    Hi sir, please explain performance tuning videos

  • @vijaykumar-vx8dp
    @vijaykumar-vx8dp Год назад

    If commit is mention in pragma procedure what will happen

  • @jagadishdogga4886
    @jagadishdogga4886 4 года назад

    Can we use pragma autonmous transaction for mutating table error in triggers

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Yes, I will post an example on mutating trigger+autonomus transaction, please stay tuned

  • @pritammishra9850
    @pritammishra9850 4 года назад

    The best faculty of SQL plsql...sir I need some basic programming practice of plsql...
    And have some query about my project....how can I contact u

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Thank you 🙏💐, you can drop mail to Siva.k.academy@gmail.com

  • @vishwas22khare
    @vishwas22khare 4 года назад

    Sir but rollback at the end cancel valid + invalid both transaction ,what if I need to roll back only invalid transaction.

    • @SivaAcademy
      @SivaAcademy  4 года назад

      Invalid transaction (third insert in the video) never get inserted at all, it will throw the error and comes to exception handling section

  • @pvinayak96
    @pvinayak96 Год назад

    Can't we use rollback first and then insert into error_log instead of pragma autonomous_transaction?
    For example,
    EXECEPTION
    WHEN OTHERS THEN
    rollback;
    insert into error_log values ();
    END;

  • @kaleeswari628
    @kaleeswari628 4 года назад

    Hi Siva .I need one help.
    Can you please tell me how to debug plsql package having more than 10000 lines..thanks in advance

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Sure please stay tuned, I will explain in upcoming videos

  • @SujitKumar-wg7sz
    @SujitKumar-wg7sz 4 года назад

    Sir what will happen if we didn't mention rollback in exception section, does two values inserted successfully

    • @SivaAcademy
      @SivaAcademy  4 года назад +2

      Yes, first two values will be inserted, if you commit, it will be saved, you can try by putting commit instead of rollback

    • @jagadishdogga4886
      @jagadishdogga4886 4 года назад

      Then what will happen to fourth record

    • @SivaAcademy
      @SivaAcademy  4 года назад

      If any exception happen, control will go to exception block, it won't execute subsequent records, you can look into exception handling videos posted earlier

    • @SujitKumar-wg7sz
      @SujitKumar-wg7sz 4 года назад

      @@SivaAcademy sir actually I want to know if I didn't mention either commit or rollback in exception section and exception occur , then what will happen

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Then also first two records will be inserted, but till you commit the session before disconnecting it won't be saved permanently. Only on commit execution in the session, the changes made will be saved, will explain specifically about this scenario soon, please stay tuned.

  • @shashank2004
    @shashank2004 4 года назад

    I want to insert 10 records in a table. Received error in 7th row, expecting 7th row to be skipped and handled in exception block and stored in error log table . However remaining records to be loaded into table Please let me know how it can be achieved?

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Hi Shashank, Search for Oracle DML error log tables, this is what exactly you are looking for, was preparing content some time back, but yet to post this, will try to post by next week with examples

    • @shashank2004
      @shashank2004 4 года назад +1

      @@SivaAcademy thanks bro

  • @mobilelaptop4025
    @mobilelaptop4025 4 года назад

    Only 20 questions links in your blogspot

    • @SivaAcademy
      @SivaAcademy  4 года назад +1

      Yeah I will try to update soon, please stay tuned

  • @VijayKumar-eq2te
    @VijayKumar-eq2te 3 года назад

    hi sir send pdf notes , for reference

  • @subhashisoracle3944
    @subhashisoracle3944 4 года назад

    SKYESS