Home » SQL & PL/SQL » SQL & PL/SQL » Long and DbLink
Long and DbLink [message #201732] Mon, 06 November 2006 09:29 Go to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Hi there,
i'm using Oracle 10g and i'm trying to pass data between two databases using dblinks.
Does anyone know how to pass long datatype? Thanks in advance.

Best Regards,
Giulio
Re: Long and DbLink [message #201734 is a reply to message #201732] Mon, 06 November 2006 09:34 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
What do you mean by "pass" the long ? Pass it how ? As a parameter in a stored proc ? Using an insert statement to the table on the remote DB ?
Re: Long and DbLink [message #201740 is a reply to message #201732] Mon, 06 November 2006 09:51 Go to previous messageGo to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Hi,
what i mean is that i want to pass long fields using:
insert into local_table
Select *
from local_table@remote_db

If it's not possible using this sintax, please describe me another solution. Thanks a lot

Bye,
Giulio
Re: Long and DbLink [message #201741 is a reply to message #201740] Mon, 06 November 2006 09:54 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi
Oracle Version ?

try this.
COPY command.
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#CHDEAEDE

Hope this helps
Mohammad Taj.
Re: Long and DbLink [message #201746 is a reply to message #201732] Mon, 06 November 2006 10:09 Go to previous messageGo to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Hi,
DB Version:
Oracle Database 10g Enterprise Edition Release 10.1.0.5.0
SQL*Plus: Release 10.1.0.5.0

I'm not able to launch the command specified in the document.

Bye,
Giulio
Re: Long and DbLink [message #201748 is a reply to message #201746] Mon, 06 November 2006 10:13 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Are you got any error.
if yes plz. post here.
and no
see documentation for example.

Here is a sample COPY command:

COPY FROM HR@BOSTONDB -
TO TODD@CHICAGODB -
CREATE NEWDEPT (DEPARTMENT_ID, DEPARTMENT_NAME, CITY) -
USING SELECT * FROM EMP_DETAILS_VIEW


hope this helps
Mohammad Taj

[Updated on: Mon, 06 November 2006 10:13]

Report message to a moderator

Re: Long and DbLink [message #201752 is a reply to message #201748] Mon, 06 November 2006 10:20 Go to previous messageGo to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

I fi want to copy in the local database what i have to write after the string TO??
COPY FROM HR@BOSTONDB -
TO ????
CREATE NEWDEPT (DEPARTMENT_ID, DEPARTMENT_NAME, CITY) -
USING SELECT * FROM EMP_DETAILS_VIEW

The character "-" are necessary?

Thanks a lot.
Re: Long and DbLink [message #201753 is a reply to message #201752] Mon, 06 November 2006 10:26 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

I think yes.

plz. try on ur test enviourment.
icon10.gif  Re: Long and DbLink [message #201754 is a reply to message #201753] Mon, 06 November 2006 10:37 Go to previous messageGo to next message
gdottorini
Messages: 23
Registered: November 2006
Location: Napoli
Junior Member

Ok. Ok. Ok.
It runs very well: i've confused the tnsnames string with a dblink connection.
Now everything works fine.
The correct string, as said by Mohammad Taj, is
COPY FROM [user]/[pwd]@[connect_string] -
INSERT ALLEGATI_TRAD -
USING SELECT * FROM allegati_trad

This is for copying from a remote database to a local database in which we are connected.
Thanks a lot.

Best Regards,
Giulio Dottorini
Re: Long and DbLink [message #201761 is a reply to message #201754] Mon, 06 November 2006 10:50 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

You're Welcome
Previous Topic: TNS-12560 TNS Prototcol adapter error
Next Topic: Oracle 9i - returning a procedure success/failure value to UNIX
Goto Forum:
  


Current Time: Mon Dec 05 08:50:15 CST 2016

Total time taken to generate the page: 0.10256 seconds