7 Replies Latest reply on Feb 26, 2015 8:42 PM by Gary Graham-Oracle

    sql developer 4.1 ea - dragNdrop to wrong connection

    Sven W.

      1. I disconnect all my currently active connections

      2. I open connection with a worksheet  (XXX_BETA)

      3. I drag and drop a file (pks or pkb) to this worksheet. The file opens a new tab with a different connection (XXX_ALPHA)! This new connection is now open too. But I doN't want the file to deploy there.

       

      Why does it not reuse the existing connection? Btw. both connections do have the same packages. It could be that I opened this package or this file priviously in ALPHA. But now I want to deploy it in BETA. This is pretty surprising and potentially dangerous.

        • 1. Re: sql developer 4.1 ea - dragNdrop to wrong connection
          thatJeffSmith-Oracle

          Hmmm, do you have 'Link stored procedures to files' enabled in the Code Editor preferences ?

           

          Is this different behavior than what you see in 4.0.3?

          1 person found this helpful
          • 2. Re: sql developer 4.1 ea - dragNdrop to wrong connection
            Sven W.

            Yes. Link stored procedures to files is enabled.

             

            My previous developer version was 3.2. So I can't compare with 4.0.3.

            And I remember it differently there.

             

            I now disabled the Code Editor preferences switch.

            This seems to work. I now open the same file without any connection. This is ok.

            • 3. Re: sql developer 4.1 ea - dragNdrop to wrong connection
              Gary Graham-Oracle

              And if you really wanted to use Link Stored Procedures to Files, it would be best to use it conjunction with some source code management software where you presumably will maintain separate copies of the source for each deployment schema.

              • 4. Re: sql developer 4.1 ea - dragNdrop to wrong connection
                Sven W.

                We do this already. In fact I dragged the file from one local svn repository to sql developer.

                Problem is when the tool starts to make intelligent guesses and guesses wrong and then opens the wrong connection.

                Which version should be deployed into which system should still be responsibility of the developer.

                 

                Also the deployment schema and the database are identical between out ALPHA and BETA environment.

                But the edition (which is added via tns to the connection) differs.

                 

                What I would like to do, is to drag the file to a worksheet. And then it should open with the same connection as that worksheet currently has.

                Regardless what kind of file it is.

                • 5. Re: sql developer 4.1 ea - dragNdrop to wrong connection
                  Gary Graham-Oracle

                  So sounds like there should be some enhancement requests logged...

                  1. With Link Stored Procedures to Files turned on, SQL Developer should be able to distinguished between editions of same db/schema.

                  2, With Link Stored Procedures to Files turned off, SQL Developer should default connection of DnD file to that of target worksheet.

                   

                  Are those ERs you could get logged via Oracle Support?  Always best if a customer does it.

                  • 6. Re: sql developer 4.1 ea - dragNdrop to wrong connection
                    Sven W.

                    Gary Graham-Oracle wrote:

                     

                    So sounds like there should be some enhancement requests logged...

                    1. With Link Stored Procedures to Files turned on, SQL Developer should be able to distinguished between editions of same db/schema.

                    2, With Link Stored Procedures to Files turned off, SQL Developer should default connection of DnD file to that of target worksheet.

                     

                    Are those ERs you could get logged via Oracle Support?  Always best if a customer does it.

                    about 1. I don't fully understand how "Link Stored Procedures to Files" is supposed to work.

                     

                    From the Help Center:

                    Link Stored Procedures to Files: If this option is enabled (checked), then every time you compile a file-based PL/SQL module, SQL Developer associates the database source with the file-based one. Subsequently, during a debugging session, whenever a reference to a PL/SQL module is made, SQL Developer checks its internal database and file-based source associations; and if it is able to find a file-based source with the specified name, it opens it. This setting is of interest to users who keep their PL/SQL code in a source control system.

                     

                    If this option is disabled, then during a debugging session SQL Developer always opens the procedure residing in the database, and does not check the file system.

                     

                    This is pretty much tied to debugging it seems. But it is interesting. Now when I think about it I might give it a try. At first the behaviour was surprising.

                    And yes, it should be able to distinguish between editions.

                     

                    For this current project our development process  is pretty pragmatic. We develop directly in the database (Edition ALPHA) and this automatically checked into svn in regular intervals. At night an automatical deployment is made to the first test stage (Edition BETA). This works reasonbly well with a small developer team.

                     

                    2. Yes. Same connection as the target tab has (could be a worksheet or maybe some other thing like table).

                     

                    As for having an ER logged. I doubt it, but I will try.

                    • 7. Re: sql developer 4.1 ea - dragNdrop to wrong connection
                      Gary Graham-Oracle

                      about 1. I don't fully understand how "Link Stored Procedures to Files" is supposed to work.

                      If it is on, then (ignoring the extra debugging help info) compiling (whether for debug or not) associates the file with its connection.  If it is off, then all the associations get deleted.  Turn it on again and see that your files are no longer associated with their last compilation connection.  If you wish to re-associate a file, that requires doing another compile.

                      1 person found this helpful