Suggestion: Open in existing instance

Simon

Member
We open files in PL/SQL Developer via the command line due to our source control. The problem is that a new instance of PL/SQL Developer is created every time we open a file which is undesirable. What we would like to see is a command line switch that will force the passed file to open in an existing instance of PL/SQL Developer.

The only downside would be the possibility of opening a package for one database into an instance that was logged into another database. This could then lead to the compilation of something into the wrong database. Perhaps a requirement of this proposed command line switch would be to specify the database name that the file belongs to. If an instance logged into this database exists then the file would be opened there otherwise a new instance would be created with the database name set.
 
This is the default behavior of PL/SQL Developer. If an instance is open, then opening a PL/SQL Developer file from the Windows Explorer will pass it to that instance. Can you verify if this works correctly in the Windows Explorer? If it does, the problem may be related to your source control system.
 
Thank you for your reply.

We are not seeing that behaviour here.

Take a Package Body file (.bdy). A new instance of PL/SQL Developer opens every time the following command is executed from a DOS prompt:

Code:
"C:\Program Files\PLSQL Developer\plsqldev.exe" "C:\my_package.bdy"
In Windows explorer please note that .bdy files are not associated with PL/SQL Developer automatically so a default association was created when first attempting to open this type of file. When done, the behaviour is the same as via the command line; a new instance of PL/SQL Developer opens every time the file is opened (double-clicked).

We have tried this with fresh installs of PL/SQL Developer on Windows XP and Windows 2000.

Please let me know if any more information is required.
 
If you want to open the files from the command line then make sure that the extensions are associated with PL/SQL Developer. You should then be able to type the following in the command prompt.

Code:
start my_package.bdy
This reuses the PL/SQL Developer instance in my setup.

Bo Pedersen
 
Thank you Bo.

I have tried your suggestion without success. Calling "start" still opens a new instance every time.

However, I have now solved this by deleting the original bdy file association and recreating it using this method:
  • Windows File Options Dialog
  • File Types tab
  • New
  • File Extension: bdy
  • Advanced >>
  • Associated File Type: PL/SQL Developer file
The previous, non-functioning association was created by Windows when double-clicking on a bdy file and then selecting PL/SQL Developer from the application list.

This operation could be avoided if PL/SQL Developer created all associations automatically (perhaps optionally) when installed.
 
The association of extensions to PL/SQL Developer can be set in the Preferences -> Files -> Extensions.

There is a set of default extensions and you can add your own. Remember to push the Register Filetypes button.

In the command prompt, you can also just type 'my_package.bdy'.

Bo Pedersen
 
Thank you Bo. I never thought to look in the preferences as associations are usually part of installation.

This resolves the issue.
 
Back
Top