When running queries in SQL Developer and using the character &
in my literals, a popup appears asking me to provide a variable. I then execute SET DEFINE OFF
; and I can run my query for the rest of the session.
Is there any way to configure Oracle so it can never ask for manual variables when containing the &
character?
CodePudding user response:
Create a text file on your PC which contains set define off
and any other set-up instructions you might want.
Then in SQL developer, go to the Tools menu and pick the Preferences... option. In the panel on the left click on Database.
Then either type the path to the file you created, or click Browse and navigate to the file in the 'Select connection startup script' dialog that appears.
That script will then be run every time you connect to any database.
CodePudding user response:
Put SET DEFINE OFF
into
- login.sql (so that it works for you only, i.e. use user profile file), or
- glogin.sql (so that its affect is global, i.e. use site profile file)