質問

How can one copy data from one database to another database in DB2...?

In Oracle one can do this by creating database links as below

create public database link remote using 'orcl222'

where orcl222 is the source database

INSERT INTO test_rowid (ID, NAME)
SELECT ID, NAME    
FROM rsext.test_rowid@remote

Can someone please tell me how can i do this in DB2?

役に立ちましたか?

解決

You can use several methods:

  • Export / LOAD or IMPORT
  • Use federation to create a wrapper and a nickname, and then just perform an insert select. (Needs special license)
  • Writing an external Stored Procedure (C or Java) that connects to the remote database.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top