Inactive sessions in Oracle












1















I would like to ask a question :



This is my environment :




  • Solaris Version 10; Sun OS Version 5.10

  • Oracle Version: 11g Enterprise x64 Edition.


When I am running this query :



select c.owner, c.object_name, c.object_type,b.sid, b.serial#, b.status, b.osuser, b.machine 
from v$locked_object a , v$session b, dba_objects c
where b.sid = a.session_id
and a.object_id = c.object_id;


Sometimes I get many status to be 'INACTIVE'.



What does this inactive mean?
Does this will make my db and application slow?
What are the affects of active and inactive status?










share|improve this question





























    1















    I would like to ask a question :



    This is my environment :




    • Solaris Version 10; Sun OS Version 5.10

    • Oracle Version: 11g Enterprise x64 Edition.


    When I am running this query :



    select c.owner, c.object_name, c.object_type,b.sid, b.serial#, b.status, b.osuser, b.machine 
    from v$locked_object a , v$session b, dba_objects c
    where b.sid = a.session_id
    and a.object_id = c.object_id;


    Sometimes I get many status to be 'INACTIVE'.



    What does this inactive mean?
    Does this will make my db and application slow?
    What are the affects of active and inactive status?










    share|improve this question



























      1












      1








      1








      I would like to ask a question :



      This is my environment :




      • Solaris Version 10; Sun OS Version 5.10

      • Oracle Version: 11g Enterprise x64 Edition.


      When I am running this query :



      select c.owner, c.object_name, c.object_type,b.sid, b.serial#, b.status, b.osuser, b.machine 
      from v$locked_object a , v$session b, dba_objects c
      where b.sid = a.session_id
      and a.object_id = c.object_id;


      Sometimes I get many status to be 'INACTIVE'.



      What does this inactive mean?
      Does this will make my db and application slow?
      What are the affects of active and inactive status?










      share|improve this question
















      I would like to ask a question :



      This is my environment :




      • Solaris Version 10; Sun OS Version 5.10

      • Oracle Version: 11g Enterprise x64 Edition.


      When I am running this query :



      select c.owner, c.object_name, c.object_type,b.sid, b.serial#, b.status, b.osuser, b.machine 
      from v$locked_object a , v$session b, dba_objects c
      where b.sid = a.session_id
      and a.object_id = c.object_id;


      Sometimes I get many status to be 'INACTIVE'.



      What does this inactive mean?
      Does this will make my db and application slow?
      What are the affects of active and inactive status?







      oracle oracle11g oracle-sqldeveloper database-administration






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 12 '14 at 9:32









      Trinimon

      12.1k93256




      12.1k93256










      asked Oct 12 '14 at 9:29









      Ali ImmamAli Immam

      6114




      6114
























          4 Answers
          4






          active

          oldest

          votes


















          1















          What does this inactive mean?




          Just before the oracle executable executes a read to get the next "command" that it should execute for its session, it will set its session's state to INACTIVE. After the read completes, it will set it to ACTIVE. It will remain in that state until it is done executing the requested work. Then it will do the whole thing all over again.




          Does this will make my db and application slow?




          Not necessarily. See the answer to your final question.




          What are the affects of active and inactive status?




          The consequences of a large number of sessions (ACTIVE or INACTIVE) are significant in two ways.



          The first is if the number is monotonically increasing, which would lead one to investigate the possibility that the application is leaking connections. I'm confident that such a catastrophe is not the case otherwise you would have mentioned it specifically.



          The second, where the number fluctuates within the declared upper bound, is more likely. According to Andrew Holdsworth and other prominent members of the RWP, some architects allow too many connections in the application's connection pool and they demonstrate what happens (response time and availability consequences) when it is too high. They also have a prescription for how to better define the connection pool's attributes and behavior.



          The essence of their argument is that by allowing a large number of connections in the pool, you allow them to all be busy at the same time. Rather than having the application tier queue transactions, the database server may have to play a primary role in queuing for low level resources like disk, CPU, network, and even other things like enqueues.



          Even if all the sessions are busy for only a short time and they're contending for various resources, the contention is wasteful and can repeat over and over and over again. It makes more sense to spend extra time devising a good user experience queueing model so that you don't waste resources on what is undoubtedly the most expensive (hardware and software licenses) tier in your architecture.






          share|improve this answer

































            0














            ACTIVE means the session is currently executing some SQL operations whereas INACTIVE means the opposite. Check out the ORACLE v$session documentation



            By nature, a high number of ACTIVE sessions will slow down the whole DBMS including your application. To what extent is hard to say - here you have to look at IO, CPU, etc. loads.



            Inactive sessions will have a low impact unless you exceed the maximum session number.






            share|improve this answer

































              0














              In simple words, an INACTIVE status in v$session means no SQL statement is being executed at the time you check in v$session.



              On other hand, if you see a lot of inactive sessions, then first check the last activity time for each session.



              What I suspect is that, they might be part of a connection pool, hence they might be getting used frequently. You shouldn't worry about it, since from an application connection perspective, the connection pool will take care of it. You might see such INACTIVE sessions for quite a long time.






              share|improve this answer































                0














                It does not at all suggest D/B is slow.



                Status INACTIVE means session is not executing any query now.
                ACTIVE means it's executing query.






                share|improve this answer























                  Your Answer






                  StackExchange.ifUsing("editor", function () {
                  StackExchange.using("externalEditor", function () {
                  StackExchange.using("snippets", function () {
                  StackExchange.snippets.init();
                  });
                  });
                  }, "code-snippets");

                  StackExchange.ready(function() {
                  var channelOptions = {
                  tags: "".split(" "),
                  id: "1"
                  };
                  initTagRenderer("".split(" "), "".split(" "), channelOptions);

                  StackExchange.using("externalEditor", function() {
                  // Have to fire editor after snippets, if snippets enabled
                  if (StackExchange.settings.snippets.snippetsEnabled) {
                  StackExchange.using("snippets", function() {
                  createEditor();
                  });
                  }
                  else {
                  createEditor();
                  }
                  });

                  function createEditor() {
                  StackExchange.prepareEditor({
                  heartbeatType: 'answer',
                  autoActivateHeartbeat: false,
                  convertImagesToLinks: true,
                  noModals: true,
                  showLowRepImageUploadWarning: true,
                  reputationToPostImages: 10,
                  bindNavPrevention: true,
                  postfix: "",
                  imageUploader: {
                  brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                  contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                  allowUrls: true
                  },
                  onDemand: true,
                  discardSelector: ".discard-answer"
                  ,immediatelyShowMarkdownHelp:true
                  });


                  }
                  });














                  draft saved

                  draft discarded


















                  StackExchange.ready(
                  function () {
                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26323678%2finactive-sessions-in-oracle%23new-answer', 'question_page');
                  }
                  );

                  Post as a guest















                  Required, but never shown

























                  4 Answers
                  4






                  active

                  oldest

                  votes








                  4 Answers
                  4






                  active

                  oldest

                  votes









                  active

                  oldest

                  votes






                  active

                  oldest

                  votes









                  1















                  What does this inactive mean?




                  Just before the oracle executable executes a read to get the next "command" that it should execute for its session, it will set its session's state to INACTIVE. After the read completes, it will set it to ACTIVE. It will remain in that state until it is done executing the requested work. Then it will do the whole thing all over again.




                  Does this will make my db and application slow?




                  Not necessarily. See the answer to your final question.




                  What are the affects of active and inactive status?




                  The consequences of a large number of sessions (ACTIVE or INACTIVE) are significant in two ways.



                  The first is if the number is monotonically increasing, which would lead one to investigate the possibility that the application is leaking connections. I'm confident that such a catastrophe is not the case otherwise you would have mentioned it specifically.



                  The second, where the number fluctuates within the declared upper bound, is more likely. According to Andrew Holdsworth and other prominent members of the RWP, some architects allow too many connections in the application's connection pool and they demonstrate what happens (response time and availability consequences) when it is too high. They also have a prescription for how to better define the connection pool's attributes and behavior.



                  The essence of their argument is that by allowing a large number of connections in the pool, you allow them to all be busy at the same time. Rather than having the application tier queue transactions, the database server may have to play a primary role in queuing for low level resources like disk, CPU, network, and even other things like enqueues.



                  Even if all the sessions are busy for only a short time and they're contending for various resources, the contention is wasteful and can repeat over and over and over again. It makes more sense to spend extra time devising a good user experience queueing model so that you don't waste resources on what is undoubtedly the most expensive (hardware and software licenses) tier in your architecture.






                  share|improve this answer






























                    1















                    What does this inactive mean?




                    Just before the oracle executable executes a read to get the next "command" that it should execute for its session, it will set its session's state to INACTIVE. After the read completes, it will set it to ACTIVE. It will remain in that state until it is done executing the requested work. Then it will do the whole thing all over again.




                    Does this will make my db and application slow?




                    Not necessarily. See the answer to your final question.




                    What are the affects of active and inactive status?




                    The consequences of a large number of sessions (ACTIVE or INACTIVE) are significant in two ways.



                    The first is if the number is monotonically increasing, which would lead one to investigate the possibility that the application is leaking connections. I'm confident that such a catastrophe is not the case otherwise you would have mentioned it specifically.



                    The second, where the number fluctuates within the declared upper bound, is more likely. According to Andrew Holdsworth and other prominent members of the RWP, some architects allow too many connections in the application's connection pool and they demonstrate what happens (response time and availability consequences) when it is too high. They also have a prescription for how to better define the connection pool's attributes and behavior.



                    The essence of their argument is that by allowing a large number of connections in the pool, you allow them to all be busy at the same time. Rather than having the application tier queue transactions, the database server may have to play a primary role in queuing for low level resources like disk, CPU, network, and even other things like enqueues.



                    Even if all the sessions are busy for only a short time and they're contending for various resources, the contention is wasteful and can repeat over and over and over again. It makes more sense to spend extra time devising a good user experience queueing model so that you don't waste resources on what is undoubtedly the most expensive (hardware and software licenses) tier in your architecture.






                    share|improve this answer




























                      1












                      1








                      1








                      What does this inactive mean?




                      Just before the oracle executable executes a read to get the next "command" that it should execute for its session, it will set its session's state to INACTIVE. After the read completes, it will set it to ACTIVE. It will remain in that state until it is done executing the requested work. Then it will do the whole thing all over again.




                      Does this will make my db and application slow?




                      Not necessarily. See the answer to your final question.




                      What are the affects of active and inactive status?




                      The consequences of a large number of sessions (ACTIVE or INACTIVE) are significant in two ways.



                      The first is if the number is monotonically increasing, which would lead one to investigate the possibility that the application is leaking connections. I'm confident that such a catastrophe is not the case otherwise you would have mentioned it specifically.



                      The second, where the number fluctuates within the declared upper bound, is more likely. According to Andrew Holdsworth and other prominent members of the RWP, some architects allow too many connections in the application's connection pool and they demonstrate what happens (response time and availability consequences) when it is too high. They also have a prescription for how to better define the connection pool's attributes and behavior.



                      The essence of their argument is that by allowing a large number of connections in the pool, you allow them to all be busy at the same time. Rather than having the application tier queue transactions, the database server may have to play a primary role in queuing for low level resources like disk, CPU, network, and even other things like enqueues.



                      Even if all the sessions are busy for only a short time and they're contending for various resources, the contention is wasteful and can repeat over and over and over again. It makes more sense to spend extra time devising a good user experience queueing model so that you don't waste resources on what is undoubtedly the most expensive (hardware and software licenses) tier in your architecture.






                      share|improve this answer
















                      What does this inactive mean?




                      Just before the oracle executable executes a read to get the next "command" that it should execute for its session, it will set its session's state to INACTIVE. After the read completes, it will set it to ACTIVE. It will remain in that state until it is done executing the requested work. Then it will do the whole thing all over again.




                      Does this will make my db and application slow?




                      Not necessarily. See the answer to your final question.




                      What are the affects of active and inactive status?




                      The consequences of a large number of sessions (ACTIVE or INACTIVE) are significant in two ways.



                      The first is if the number is monotonically increasing, which would lead one to investigate the possibility that the application is leaking connections. I'm confident that such a catastrophe is not the case otherwise you would have mentioned it specifically.



                      The second, where the number fluctuates within the declared upper bound, is more likely. According to Andrew Holdsworth and other prominent members of the RWP, some architects allow too many connections in the application's connection pool and they demonstrate what happens (response time and availability consequences) when it is too high. They also have a prescription for how to better define the connection pool's attributes and behavior.



                      The essence of their argument is that by allowing a large number of connections in the pool, you allow them to all be busy at the same time. Rather than having the application tier queue transactions, the database server may have to play a primary role in queuing for low level resources like disk, CPU, network, and even other things like enqueues.



                      Even if all the sessions are busy for only a short time and they're contending for various resources, the contention is wasteful and can repeat over and over and over again. It makes more sense to spend extra time devising a good user experience queueing model so that you don't waste resources on what is undoubtedly the most expensive (hardware and software licenses) tier in your architecture.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Sep 11 '18 at 3:10

























                      answered Jun 11 '18 at 16:41









                      jeff6times7jeff6times7

                      1,56111121




                      1,56111121

























                          0














                          ACTIVE means the session is currently executing some SQL operations whereas INACTIVE means the opposite. Check out the ORACLE v$session documentation



                          By nature, a high number of ACTIVE sessions will slow down the whole DBMS including your application. To what extent is hard to say - here you have to look at IO, CPU, etc. loads.



                          Inactive sessions will have a low impact unless you exceed the maximum session number.






                          share|improve this answer






























                            0














                            ACTIVE means the session is currently executing some SQL operations whereas INACTIVE means the opposite. Check out the ORACLE v$session documentation



                            By nature, a high number of ACTIVE sessions will slow down the whole DBMS including your application. To what extent is hard to say - here you have to look at IO, CPU, etc. loads.



                            Inactive sessions will have a low impact unless you exceed the maximum session number.






                            share|improve this answer




























                              0












                              0








                              0







                              ACTIVE means the session is currently executing some SQL operations whereas INACTIVE means the opposite. Check out the ORACLE v$session documentation



                              By nature, a high number of ACTIVE sessions will slow down the whole DBMS including your application. To what extent is hard to say - here you have to look at IO, CPU, etc. loads.



                              Inactive sessions will have a low impact unless you exceed the maximum session number.






                              share|improve this answer















                              ACTIVE means the session is currently executing some SQL operations whereas INACTIVE means the opposite. Check out the ORACLE v$session documentation



                              By nature, a high number of ACTIVE sessions will slow down the whole DBMS including your application. To what extent is hard to say - here you have to look at IO, CPU, etc. loads.



                              Inactive sessions will have a low impact unless you exceed the maximum session number.







                              share|improve this answer














                              share|improve this answer



                              share|improve this answer








                              edited Oct 12 '14 at 9:46

























                              answered Oct 12 '14 at 9:34









                              TrinimonTrinimon

                              12.1k93256




                              12.1k93256























                                  0














                                  In simple words, an INACTIVE status in v$session means no SQL statement is being executed at the time you check in v$session.



                                  On other hand, if you see a lot of inactive sessions, then first check the last activity time for each session.



                                  What I suspect is that, they might be part of a connection pool, hence they might be getting used frequently. You shouldn't worry about it, since from an application connection perspective, the connection pool will take care of it. You might see such INACTIVE sessions for quite a long time.






                                  share|improve this answer




























                                    0














                                    In simple words, an INACTIVE status in v$session means no SQL statement is being executed at the time you check in v$session.



                                    On other hand, if you see a lot of inactive sessions, then first check the last activity time for each session.



                                    What I suspect is that, they might be part of a connection pool, hence they might be getting used frequently. You shouldn't worry about it, since from an application connection perspective, the connection pool will take care of it. You might see such INACTIVE sessions for quite a long time.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      In simple words, an INACTIVE status in v$session means no SQL statement is being executed at the time you check in v$session.



                                      On other hand, if you see a lot of inactive sessions, then first check the last activity time for each session.



                                      What I suspect is that, they might be part of a connection pool, hence they might be getting used frequently. You shouldn't worry about it, since from an application connection perspective, the connection pool will take care of it. You might see such INACTIVE sessions for quite a long time.






                                      share|improve this answer













                                      In simple words, an INACTIVE status in v$session means no SQL statement is being executed at the time you check in v$session.



                                      On other hand, if you see a lot of inactive sessions, then first check the last activity time for each session.



                                      What I suspect is that, they might be part of a connection pool, hence they might be getting used frequently. You shouldn't worry about it, since from an application connection perspective, the connection pool will take care of it. You might see such INACTIVE sessions for quite a long time.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Oct 12 '14 at 9:58









                                      Lalit Kumar BLalit Kumar B

                                      34k85186




                                      34k85186























                                          0














                                          It does not at all suggest D/B is slow.



                                          Status INACTIVE means session is not executing any query now.
                                          ACTIVE means it's executing query.






                                          share|improve this answer




























                                            0














                                            It does not at all suggest D/B is slow.



                                            Status INACTIVE means session is not executing any query now.
                                            ACTIVE means it's executing query.






                                            share|improve this answer


























                                              0












                                              0








                                              0







                                              It does not at all suggest D/B is slow.



                                              Status INACTIVE means session is not executing any query now.
                                              ACTIVE means it's executing query.






                                              share|improve this answer













                                              It does not at all suggest D/B is slow.



                                              Status INACTIVE means session is not executing any query now.
                                              ACTIVE means it's executing query.







                                              share|improve this answer












                                              share|improve this answer



                                              share|improve this answer










                                              answered Oct 13 '14 at 5:05









                                              malay biswalmalay biswal

                                              211




                                              211






























                                                  draft saved

                                                  draft discarded




















































                                                  Thanks for contributing an answer to Stack Overflow!


                                                  • Please be sure to answer the question. Provide details and share your research!

                                                  But avoid



                                                  • Asking for help, clarification, or responding to other answers.

                                                  • Making statements based on opinion; back them up with references or personal experience.


                                                  To learn more, see our tips on writing great answers.




                                                  draft saved


                                                  draft discarded














                                                  StackExchange.ready(
                                                  function () {
                                                  StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26323678%2finactive-sessions-in-oracle%23new-answer', 'question_page');
                                                  }
                                                  );

                                                  Post as a guest















                                                  Required, but never shown





















































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown

































                                                  Required, but never shown














                                                  Required, but never shown












                                                  Required, but never shown







                                                  Required, but never shown







                                                  Popular posts from this blog

                                                  Full-time equivalent

                                                  さくらももこ

                                                  13 indicted, 8 arrested in Calif. drug cartel investigation