With the new --conceal command line option, you can hide your input during an isql session. The --conceal option is useful when entering sensitive information, such as passwords. The syntax for the --conceal option is:
isql --conceal [':?' | 'wildcard']
wildcard, a 32-byte variable, specifies the character string that triggers isql to prompt you for input during an isql session. For every wildcard that isql reads, isql displays a prompt that accepts your input but does not echo the input to the screen. The default wildcard is :?.
--conceal is silently ignored in
batch mode.
In an isql session, the default prompt label is either the default wildcard :? or the value of wildcard. You can customize the prompt label by providing a one-word character string with a maximum length of 80 characters, after a wildcard. If you specify a prompt label that is more than one word, the characters after the first word are ignored.
Double wildcards such as :?:? specify that isql needs to prompt you twice for the same input. The second prompt requests you to confirm your first input. If you use a double wildcard, the second prompt label starts with Confirm.
In an isql session, isql recognizes :? or
the value of wildcard as wildcards only when
these characters are placed at the beginning of an isql line.
Example 1 Changes password without displaying the password entered. This example uses “old” and “new” as prompt labels:
$ isql -Uguest -Pguest -Smyase --conceal 1> sp_password 2> :? old 3> , 4> :?:? new 5> go
old new Confirm new Password correctly set. (return status = 0)
Example 2 Changes password without displaying the password entered. This example uses the default wildcard as the prompt label:
$ isql -Uguest -Pguest -Smyase --conceal 1> sp_password 2> :? 3> , 4> :?:? 5> go
:? :? Confirm :? Password correctly set. (return status = 0)
Example 3 Activates a role for the current user. This example uses a custom wildcard and the prompt labels “role” and “password:”
$ isql -UmyAccount --conceal '*' Password: 1> set role 2> * role 3> with passwd 4> ** password 5> on 6> go
role password Confirm password 1>