Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: create dblink with & in password??

Re: create dblink with & in password??

From: Barry P. Grove <barry_grove_at_mindlink.bc.ca>
Date: 1997/01/05
Message-ID: <32D08145.7899@mindlink.bc.ca>#1/1

George Dau wrote:
>
> G'day Oraclers,
> The SQL Language Reference Manual says on pages 2-9, then shows in an example on
> 2-10 that I can use an & in an object if I double quote the name.
>
> Doesnt work with a database link under Oracle 7.2.2. Here is my script:
>
> #!/bin/sh
> sqlplus system/manager <<EOSQL
> create database link oen.prod
> connect to oen identified by "safety&1st"
> using 'T:bcscost1:OENP';
> exit;
> EOSQL
>
> This produces:
>
> bcstail1:/u02/home/oracle/admin/OEND/adhoc>./dblink.sh
>
> SQL*Plus: Release 3.2.2.0.0 - Production on Mon Jan 6 10:29:38 1997
>
> Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.
>
>
> Connected to:
> Oracle7 Server Release 7.2.2.4.0 - Production Release
> With the distributed, replication and parallel query options
> PL/SQL Release 2.2.2.3.0 - Production
>
> SQL> 2 3 Enter value for 1st: old 2: connect to oen identified by
> "safety&1st"
> new 2: connect to oen identified by "safetyexit;"
>
> Database link created.
>
> SQL> Disconnected from Oracle7 Server Release 7.2.2.4.0 - Production Release
> With the distributed, replication and parallel query options
> PL/SQL Release 2.2.2.3.0 - Production
>
> It has infact created the link, but obviously the password is wrong. The book
> says I should be able to do this. Any ideas?
>
> TIA
> George Dau
> gedau_at_mim.com.au

Hi George,

The "&" is SQL*Plus's macro variable resolution character, the "&lst" in your password is trying to be resolved as a variable (assumed to be created by DEFINE or ACCEPT). You can prevent resolution by using the   SET DEFINE {& | c | OFF | ON}
command like
  SET DEFINE OFF
before creating your database link.

Hope this helps....

-- 
Barry P. Grove                                  BCTEL  (604)432-4468
barry_grove_at_mindlink.bc.ca                      Human Resources Consulting
Developer, Oracle DBA, Unix Sysadmin            6-3777 Kingsway, Burnaby, BC
Received on Sun Jan 05 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US