All Forums Database
Sethu_85 5 posts Joined 08/09
14 Aug 2009
How to fetch the data from one server and insert in to other server in SQL Assistance?

Hi, How to fetch the data from one server and insert in to other server in SQL Assistance? e.gIf my source table and target table is in same server, i can do the following Insert into retail.test_table_TgtSelect * from retail.test_table_srcHow can i do the above, if my source table and target table are different servers without any ETL job?Can we do it using stored procedures? Please help me to get the syntax...

gander_ss 74 posts Joined 02/07
17 Aug 2009

Won't be possible using stored procedure..You need to go for scripting which will inturn call fastload or mload.

Sethu_85 5 posts Joined 08/09
18 Aug 2009

HI Subhash, In Oracle we can do that using DBLINK,is there any thing like that in Teradata?

Raja_KT 1246 posts Joined 07/09
18 Aug 2009

Hi,As far as I know, there is no dblink in teradata like in oracle. but work arounds are always there.... :)Fastexport ...ftp....and then mload or tpump..... :). Anyone who knows better please suggest. Hope I can speak to Teradata soon :)Thanks and regards,Raja

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

sachinzgupta 1 post Joined 08/09
29 Aug 2009

You can export the results in text file from Teradata SQL assistant from Source server.SELECT * FROM ABC;Log-in to the target server and import the results from file while running the command belowINSERT INTO TABLE ABC VALUES('?','?','?'); --Assuming there are 3 character columns.** Exporting and importing option is available in the File menu of Teradata assistant

ANIMESH.DUTTA 35 posts Joined 05/09
31 Aug 2009

Raja is correct - there is no option in Teradata to load data from one server to another.If data volume is less, then you can use the same process as mentioned by Sachin.But in this case - you've to do manually everytime - dynamically it's not possible.Better to export & then import [ here also you may face some problem :-) ]Similar case I had to do in my current project - I've tried this option - but delimiter is always causes problem.As we had a option to use ETL tool - we went for that to load - it was easy.If any solutions found - please post...Regards,ANIMESH DUTTA

Animesh Dutta
Teradata Certified Master

Karam 75 posts Joined 07/09
25 Sep 2009

three solutions:1.Do EXPORT/IMPORT using SQL assistant.2.Do FASTEXPORT/FASTLOAD from source to target system.3.Do source table backup and then restore it on the target system.

You must sign in to leave a comment.