Start a new topic

Open multiple tabs for the same files

There has been a similar question in the past, but that didn't address the actual issue, only told that it's the way it is:

 

In version 9 you can not open multiple editors of the same file. If you want to run the query in multiple SQL Commanders, you will need to copy/paste into the new editor.


https://support.dbvis.com/support/discussions/topics/1000076676


So why am I not allowed to open and execute the same file in multiple tabs with  at least multiple different databases?


That's exactly the use case I have now and simply copy&pasting the SQL of one editor to the other doesn't work, because I'm including other files using a relative path. DbVisualizer resolves those paths based on the path associated with the file opened in a tab or relative to the current working dir, which is the installation directory. Of course my paths are not relative to that, so things fail:

 

@run loid_to_hash.sql;
@run divide_keep_and_redundant.sql;

   

Path does not exist or can not be accessed C:\Program Files\DbVisualizer\loid_to_hash.sql
Path does not exist or can not be accessed C:\Program Files\DbVisualizer\divide_keep_and_redundant.sql

 It would be really great to restore that feature when it was available already. Thanks! 


Hi Thorsten, 


Have you checked that you can fully qualify the references to files in the @run statement? There is also the @cd command to change directory in advance of running with @run.


Ex:


@cd C:\ScriptFolder;
@run loid_to_hash.sql;
@run C:\ScriptFolder\divide_keep_and_redundant.sql;


If this is not sufficient, please clarify the use case as I may have missed something. 


Regards


Roger

Using absolute paths in the script doesn't work, because it's maintained using SVN and checked out at multiple different places for various reasons. An absolute path would break execution at all places other than one.


The use case is simply to run the same script concurrently against different databases on different hosts, because it's a long running one, I'm not editing it in this case etc. So I don't see to many reasons to not simply allow me to have it open multiple times. If it could be open open multiple times, I wouldn't need to Copy&Paste it results somewhere to compare that between the different executions etc.


The current behaviour simply makes things pretty difficult in my opinion.

Login or Signup to post a comment