Solved

Oracle data migration from 1 environment to other

Posted on 2011-09-07
9
260 Views
Last Modified: 2012-08-14
Experts,

I have a set of tables for which the data needs to copied to another environment.  
Here are the key points:

1. I do not want to copy the entire data, it will be driven by a set of instructions from screen and related master and detail tables (around 20 in number) we should be able to migrate to another environment.

2.  We can safely assume its plain insert and there will not be any violation of constraints

3.  This process should be done seamlessly as its repetitive process (done from screen ref point 1) , via a stored procedure or something better - experts i need your suggesstion here

4.  There will not be any provision for DB Links, ideally because we want to demonstrate there is no overhead except the same table structure should reside in the environments.

5.  Dont mind if its takes time in loading the data, but it should ideally be done in background when user initiates action from screen and may be reads config files to find target db, without invoking command prompt or any process that can be called from java.

6.  Do not want to have third party tools
0
Comment
Question by:ajexpert
  • 4
  • 4
9 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36502272
With those restrictions, the only thing I can think of was mentioned in your tags for the question:  data pump.

Assuming you have already considered it have you discounted it or are you just looking for possible alternatives?

0
 
LVL 5

Assisted Solution

by:anand_20703
anand_20703 earned 50 total points
ID: 36502288
This activity is called Integration/Interfacing one application with other.
Flow can be like this
1) 1st environment application, in the form / sreen, 1 group window need to be available.
That group consists of those 20 tables list. And individual or group click option should be available. By clicking on this, an export of these tables to .CSV should be performed based on the partial selection of data. For this, in the code, Oracle SQL commands can be used to generated the .CSV output.

2) .CSV file should be generated in a folder which is NFS mounted(this is a network mount in unix systems to avoid FTP. But it has its own security/technical related good and bad. Consult System Admin)
So with this, no need to separately transfer the files to 2nd environment. Seamless.

3) 2nd Environment application Screen/Form. 1 group window or individuval table window should be available along with import button. When clicked, in the background, it should use sqlloader or insert commands to load the data. This should be handled in the code.

Note : Formatting of the .CSV file should also be handled to import. It need to be aligned properly so that import will be successfully  completed.

Scope of work : Developer/Sql programmer,Application Owner who understands the application and is useful to developer to complete this interfacing.
Clue : In Oracle ERP environment, this approach is popular with concurrent request


0
 
LVL 14

Author Comment

by:ajexpert
ID: 36502455
Can datapump be inoked from plsql procedure or java?
0
 
LVL 76

Accepted Solution

by:
slightwv (䄆 Netminder) earned 450 total points
ID: 36502584
Yes.

Oracle Data Pump is made up of the following distinct parts:

•The command-line clients expdp and impdp
 
These client make calls to the DBMS_DATAPUMP package to perform Oracle Data Pump operations (see "PL/SQL Packages").
 
•The DBMS_DATAPUMP PL/SQL package, also known as the Data Pump API
 
This API provides high-speed import and export functionality.
 
•The DBMS_METADATA PL/SQL package, also known as the Metadata API
 
This API, which stores object definitions in XML, is used by all processes that load and unload metadata.


http://download.oracle.com/docs/cd/E11882_01/server.112/e16508/cncptdba.htm#CNCPT1277
0
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.

 
LVL 14

Author Comment

by:ajexpert
ID: 36503896
@slightwv:

I have to look into the documentation and the link you provided.  Thanks a lot.

Just a quick question as I have to submit the approach as soon as I can.

I want expdp and impdp to be FULLY controlled from PL/SQL program.  Is it possible?

Thanks a lot
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36503934
The docs will confirm this but I think datapump does everything inside the database no matter what initiates it.

The command line actually creates a database job internal to the database.

This means you can do things like close down the window and reconnect to an existing job from another window to check status.

I've never used the PL/SQL APIs but I believe you can do everything you need to do with them.
0
 
LVL 14

Author Comment

by:ajexpert
ID: 36503998
what matters to me is invoking.  If datapump can be done in PL/SQL, I am more than happy.

I do not want to check the status because, the number of records are few < 10,000 also, I do not care about the time it takes to export or import.

I can write SQL statements on target table in another environment to see if its ready for next operation

Again, everything should be in PL/SQL without any calls which invokes command line utility

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 36504011
Sorry if I confused you with my last post.

I was trying to point out that datapump does everything inside the database no matter how you access it.

>> If datapump can be done in PL/SQL

Yes.
0
 
LVL 14

Author Closing Comment

by:ajexpert
ID: 36932128
Welll, we have changed the focus to other important tasks, but I will go with slightwv's approach and will try to implement it in PL/SQL

Thanks anand_20703 for your comment as well
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

Suggested Solutions

Title # Comments Views Activity
ORA-12560: TNS:protocol adapter error 8 89
history tablespace temp usage 2 31
Maintaining Oracle Managed Accounts 2 30
'G_F01' is not a procedure or is undefined 3 13
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to take different types of Oracle backups using RMAN.

863 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

25 Experts available now in Live!

Get 1:1 Help Now