4 Replies Latest reply on Oct 29, 2013 3:17 PM by makel

    Blocked by query

    makel

      Hi,

       

      Is there an easy way to use the database object tree (e.g. to select and open a database object) while a query is running in the same connection?  I am working on some queries which take up to 3 hours to complete, and while they are running I can't use the tree view in the "Connections" window because it's waiting for the query to finish.  The only solution I know is to open another instance of SQL Developer.  Am I missing something?

       

      By coincidence, I've just found myself blocked from editing a package (can't even copy to the clipboard) while running an ALL_SOURCE search in the Find Object window.  Why is SQL Developer so miserly with connections?  I know there's a cost associated with a database connection, but in a development environment it's usually accepted that developers will use multiple connections.

       

      thanks,

       

      Makel

       

      Message was edited at 14:34

        • 1. Re: Blocked by query
          thatJeffSmith-Oracle

          When you're about to run your 3hr query, open an unshared worksheet first.

          http://www.thatjeffsmith.com/archive/2011/11/sql-developer-quick-tip-connection-busy-spawn-a-new-worksheet/

           

          What version are you running? The Find Object window was optimized in version 4 to not block other operations I believe...

           

          Jeff

          1 person found this helpful
          • 2. Re: Blocked by query
            Why is SQL Developer so miserly with connections?  I know there's a cost associated with a database connection, but in a development environment it's usually accepted that developers will use multiple connections.

            Based only on what you posted is is NOT Sql Developer that is miserly with connections. It is YOU!

            . . .while a query is running in the same connection?

            Your dad buys ONE screwdriver. Now your brother is using that screwdriver to put together that new bookcase.

             

            Why can't you use that SAME screwdriver at the SAME time as your brother? Seems pretty simple to understand to me. The screwdriver can only do ONE THING AT A TIME!

             

            Solution - either buy/borrow another screwdriver or wait until your brother is done.

            I know there's a cost associated with a database connection, but in a development environment it's usually accepted that developers will use multiple connections.

            So go ahead and create a new connection; create SEVERAL new connections. What's stopping you?

             

            A connection represents a session and can only be used for one thing at a time. If a connection is being used it can't be used for something else without canceling or interrupting what it is already being used for. So the operation either needs to be canceled or a new/different connection needs to be made.

             

            It is easy for YOU to create extra connections because YOU know that you might want to do more than one thing at a time.

             

            Solve your problem the easy way; set up as many connections as you like so you have them available when you need them.

            • 3. Re: Blocked by query
              makel

              I would use a different simile: the toolbox is locked by a key.  The key is tied to the screwdriver.  If my brother is using the screwdriver, I can't open the toolbox.  If I know in advance that my brother will be using the screwdriver for a while, I can copy the key.  Otherwise I just have to wait.

               

              I would suggest, in lower case, that the key shouldn't be tied to the screwdriver.

              • 4. Re: Blocked by query
                makel

                Thanks for the update - I'm using v3.2.20.09, so that figures.