[英]How to insert data from one table to another from two oracle database servers with public database link?
I am going to insert data from table2
to table1
and the two tables are in different database, different servers. 我将数据从
table2
插入到table1
,并且两个表位于不同的数据库,不同的服务器中。
There are public database links for both database. 这两个数据库都有公共数据库链接。 In the details of the public database links, there are names of owner, db_link, username and host.
在公共数据库链接的详细信息中,有所有者,db_link,用户名和主机的名称。
I want to ask how to use the public database links to insert the data from table2
to table1
, thanks. 我想问一下如何使用公共数据库链接将数据从
table2
插入table1
,谢谢。
I have tried something like 我已经尝试过类似的东西
INSERT INTO table1
SELECT 'xxxx, xxxx, xxxx', columns_from_table2
FROM table2@"db_link"
WHERE criteria;
but it prompts out an error message of 但它会提示一条错误消息
ORA-02019: connection description for remote database not found
02019. 00000 - "connection description for remote database not found"
I think you are not using the correct dblink. 我认为您没有使用正确的dblink。 Try this and tell me:
试试这个,告诉我:
select * from dual@"db_link" 从Dual @“ db_link”中选择*
select * from dba_db_links where db_link = "[your_db_link_name]" 从dba_db_links中选择*,其中db_link =“ [您的db_link_name]”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.