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: EXPORT / IMPORT Connect String

Re: EXPORT / IMPORT Connect String

From: Kjetil Skotheim <kjetil.skotheim_at_usit.uio.no>
Date: Fri, 02 Nov 2001 15:30:38 GMT
Message-ID: <1103_1004715038@f3bpc14>


On Thu, 1 Nov 2001 18:32:43 -0600, "Harry Cage" <reply_at_thru.news> wrote:
> I would like to use a full Net*8 connect string on my NT 8.1.7 system for
> export and import command lines. I can do this with SQL*Plus, but with
> export or import I get an error.An example is...
>
> exp
> /@(description=(address=(protocol=tcp)(host=servx)(port=1521))(connect_data=
> (sid=dbsid))) full=y rows=n file=t.exp log=t.rpt
> LRM-00116: syntax error at 'address' following '('
>
> Does anyone know if this should work? I can't find any reference to it
> anywhere, but expected that a full connect string should work as well as a
> connect identifier.

I had the excact same problem some time ago. The solution I found was to use environment variables with a \ before each = when using imp and exp. In my shell (tip: download and use cygwin if on NT to get a real shell) I use two environment variables for each database:

echo $DB
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db.host.com)(PORT=1521))(CONNECT_DATA=(SID=DB))) echo $DBie
(DESCRIPTION\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=db.host.com)(PORT\=1521))(CONNECT_DATA\=(SID\=DB)))

Use $DB for sqlplus and $DBie for imp and exp: sqlplus scott/tiger@$DB
exp scott/tiger@$DBie file=... tables=\(a b c\) ...

Instead of $DBie you can of course type the whole thing each time. But you migth have to type a \ before each ( and ). And \ or \\ before each =.

Kjetil Received on Fri Nov 02 2001 - 09:30:38 CST

Original text of this message

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