Re: Copy command

From: Ken Friday <ken_friday_at_pleasantco.com>
Date: 1998/02/02
Message-ID: <01bd300a$7d3407d0$8859a8c0_at_04653>#1/1


Hi,

I think you're confusing TNS entries with database links. TNS entries generally point to a database on a server. dblinks use TNS but also provide user/passwd (and associated authorities) to facilitate inter database communication.

You can use the dblinks with standard SQL to copy data between the two (e.g. insert into tab_at_linkname select * from localtable). But; the "copy" command in SQL*Plus is really more like a C pgm with connections to two databases reading from one and writing to the other.

Ken F.

Nigam <nigam.desai_at_cellnet.com> wrote in article <34d262d7.23010056_at_news>...
> All,
> HELP!! Desparate help needed - have to implement this in the
> Production database
>
> I am using the Copy command in Sql*Plus to copy data between tables
> which belong to the same user, same tablespace, etc. In other words ,
> it is a local copy. I do this to migrate data from the old database
> structure to a new structure.
>
> First, I used
>
> Copy Insert <new_table> Using Select * from <old_table>
>
> It said, have to use one of From or To
>
> So,
>
> Copy from user/pwd Insert <new_table> Using Select * from <old_table>
>
> It said, have to specify the _at_database specification
>
> So, I created an entry in tnsnames.ora, create a public database link
> from the Oracle user to itself. When I use this database link to
> describe a table or select from a table as in
>
> desc table_at_dblink or select * from table_at_dblink
>
> it works fine.
>
> But when I used,
>
> copy from user/pwd_at_dblink to user/pwd_at_dblink -
> Insert new_table-
> Using Select * from old_table;
>
> It gave ORA-12154
>
> Array fetch/bind size is 15. (arraysize is 15)
> Will commit when done. (copycommit is 0)
> Maximum long size is 80. (long is 80)
>
> ERROR:
> ORA-12154: TNS:could not resolve service name
>
>
> I have to get this done NOW. Please help!
>
>
> Thanks a lot,
>
> Nigam
>
Received on Mon Feb 02 1998 - 00:00:00 CET

Original text of this message