Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: create dblink with & in password??
Another option, if you need to use sql*plus variables in the same command where you want to use a text string that contains '&' is to use the SET ESCAPE ON sqlplus command. The default escape character is '\'. Prefacing the & with a '\' will cause sql*plus not to evaluate it as a variable.
set escape on
accept dblink_name prompt 'Enter the dblink name: '
accept using_string prompt 'Enter the using string: '
create database link &&dblink_name
connect to scott identified by "ti\&ger"
using '&&using_string';
-- Bob Swisshelm Eli Lilly and Company swisshelm_at_lilly.comReceived on Sun Jan 12 1997 - 00:00:00 CST