Solved

Connecting for single sql

Posted on 2014-01-26
2
253 Views
Last Modified: 2014-02-05
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
Comment
Question by:sakthikumar
2 Comments
 
LVL 12

Accepted Solution

by:
praveencpk earned 500 total points
ID: 39809906
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
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 39810820
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to recover a database from a user managed backup

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question