25

Is there a way to configure the directory SQL Developer uses to save SQL scripts?

When I do ... File, New, SQL File ... the directory is always set to the \AppData\Roaming\ for my user.

I'd like to set the default to a directory in my dev source code tree.

Journeyman Geek
  • 133,878
SteveC
  • 2,193

6 Answers6

25

Change it in Tools > Preferences > Database > Worksheet parameters. You can browse to a new location under "Select default path to look for scripts"

Can also change the Export Data so that it defaults to somewhere else. Go to Tools>Preferences>Database>Export and Browse to the location you want to export to for "Directory".

Line
  • 113
  • 6
Boonedox
  • 351
3

Found it ...

In the Choose Directory dialog, the left hand side has a number of commonly used short cuts, e.g. Desktop, Documents, but you can also have your own directories in there

SteveC
  • 2,193
3

There is a post about this in OTN, and AlexAnd's solution opens the specified folder when I do File => Open.

The post is @

https://community.oracle.com/message/9733247#9733247

AlexAnd is saying that locate "\sqldeveloper\sqldeveloper\bin\sqldeveloper.conf" and simply add "AddVMOption -Dide.user.dir=" (where " is the full folder path that you like to use) to that file.

The disadvantage of this solution is that it will also move your settings folders to the specified folder (for me it was about 34MB), I use drop box to keep my queries so that is a wasted space.

0

The suggestion in Oracle community discussion have helped https://community.oracle.com/tech/developers/discussion/720852/change-default-file-locations

Adding below option in sqldeveloper.conf

AddVMOption -Dide.user.dir=<<c:\..\..\path_to_save_files>>
Vignesh
  • 101
-1

You can as well create a folder anywhere you want to use as your default, create a sql developer shortcut on desktop and right click on it> choose properties and under the target field, paste the path of the folder which you want to use as your default for saving sql files.

-1

On SQL Developer on macOS click on the menu Oracle SQL Developer > Preferences...

then expand Database > Worksheet

then in the option Select default path to look for scripts

enter your desider default path, for example /Users/your-username/scripts-folder

Now, when you open the menu File > Open the first suggested location on the left will be the one you chose.

You can also display the Files pane clicking on the menu View > Files so you can easily access your chosen folder below the My Computer folder. (remember to click on the refresh button after you change your SQL Developer Preferences, so your folder appears below the MyComputer folder.