Skip to Main Content

SQLcl - Question about alias in SQLcl

daniel_haukeJan 23 2019 — edited Jan 25 2019

Hi everybody,

i was able to create my own alias definiton in my login.sql file (located in our $SQLPATH).

When i login into sql i can see those alias after typing the command alias.

Later i changed the name of some of these alias. After doing this and logging in back again in sql, i can see the new alias and the old alias which are no longer present in the login.sql file.

Here is the content of my login.sql file:

SET sqlprompt "_user '@' _connect_identifier >"

SET sqlformat ansiconsole

define _EDITOR=inline

SET pagesize 25

alias instance_info=select instance_name,host_name,status from v$instance;

alias archivelog_mode=archive log list;

And here is the output of the command alias in sql:

SYS @ orcl_db >alias

archivelog_mode

archivelogmode

instance_info

instanceinfo

Can anyone provide me a hint how to refresh the list of alias after doing such an change in the login.sql?

Greetings Daniel

Comments
Post Details
Added on Jan 23 2019
4 comments
673 views