We by default don’t store certain things in your SQLcl HISTORY list – like CONNECTs. For obvious reasons, it’s best not to store certain things, either for convenience or for security.

Here’s how that is controlled.

SET HISTORY BLACKLIST command1, command2, …, commandN

An example:

A few settings here of interest other than the blacklist...
A few settings here of interest other than the blacklist…

So I previously added ALTER to the list, and just now added DESC. And then I ran a few commands that use those blacklisted commands.

Now let’s check our HISTORY.

Only the select on dual is listed.
Only the select on dual is listed.

Note: we changed how the blacklisting is managed from when the Early Adopter was running.

Where is this file stored?

Same place we store your ALIAS list of commands…it’s per OS user, not per install of SQLcl.

On *NIX/OSX they're in your $HOME/.sqlcl folder.
On *NIX/OSX they’re in your $HOME/.sqlcl folder.


I'm a Master Product Manager at Oracle for Oracle SQL Developer. My mission is to help you and your company be more efficient with our database tools.


  1. Jeff,

    Let’s say that I’d like to have the following (for example) as my default history blacklist settings (as a DBA running sqlcl on my database server, I’d like show and connect strings to be in my history… if you are logged in as the oracle OS user, you already have all the keys to the kingdom):

    set history blacklist history clear

    Without putting the above in my glogin.sql or login.sql (which would break SQL/Plus with an ORA error since SQL/Plus would give a “SP2-0268: history option not a valid number”) is there a way for me to make these settings persistent for only SQLcl and not for SQL/Plus?



    • thatjeffsmith

      yes, put your login.sql someplace sqlplus will never see it…like in the directory with the exe/sh

    • thatjeffsmith

      No, I’m a firm believer in letting the database handle security, and if the natives misbehave, then they’re asked to not come visit the database anymore.

  2. Jim Campbell Reply

    Practical, thoughtful feature. Well Done. Could it be implemented universally throughout the shop, maybe store the aliases.xml file on a shared protected network drive? Thanks you are a great resource.

    • thatjeffsmith

      Could be…but why not just have a versioned file that folks can periodically pull down as updates are made available?

Write A Comment