• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

Connecting for single sql

I just have the idea like below. Please let me know if this is feasible.
insert into et_hn_nomns
connect opctjad_dba/opctjad_dba@dprdt;
select * from et_hn_nomns


I want to insert into a table in one database by selecting from a table in another database.

Can this be accomplished by any way, with out using DBLink.
0
sakthikumar
Asked:
sakthikumar
1 Solution
 
Praveen Kumar ChandrashekatrDatabase Analysist Senior Commented:
Yes it can be done through copy command but it is deprecated as of Oracle 10g , here is the syntax for using the same.

COPY FROM HR@BOSTONDB -
TO HR@BOSTONDB -
INSERT EMPLOYEE_COPY2 -
USING SELECT * FROM EMPLOYEE_COPY

http://docs.oracle.com/cd/B28359_01/server.111/b31189/apb.htm#i641251

You can use data pump export for exporting the table data from source Database and importing it to target database.

here is the reference doc for expdp/impdp
http://docs.oracle.com/cd/E11882_01/server.112/e23633/expimp.htm#UPGRD52674
0
 
Naveen KumarProduction Manager / Application Support ManagerCommented:
If you can't use the copy command for any other reason like db links, then may be you can try expdp and impdp to export/import the data into the required tables.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now