Solved

Connecting for single sql

Posted on 2014-01-26
2
251 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

929 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now