Avatar of lium1
lium1

asked on 

Data Migration

I need to copy all the objects and data from production database in Oracle 11gR2 to development database in Oracle 11gR2.
What will be the best way to accomplish that in steps by steps if you can provide!

Thanks in advance,
Maurice
Oracle Database

Avatar of undefined
Last Comment
Mark Geerlings
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

When you say "all objects" do you mean the entire database with all tablespaces files, etc or a just the schemas with tables and data with indexes etc...?

If everything, I would probably use RMAN duplicate.  Then you can restore it to a different server and rename the instance.

If just the tables, indexes and data, I would look at export/import.

There are examples of each in the online documentation and on the web.

Step by step is really difficult because no two systems are the same.  What works in one will likely need to be modified in another.
Avatar of Electivo
Electivo

Hi,

Please, can you provide more informations?

Do you want to export:

- one schema object?
- one full schema?
- all schemas?
- entire tablespaces?
- or entire database?

Thanks
ElectivoJr
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

You have two options:
1, clone the database
2. export and import the database

Which option is best for you?  That depends.  Cloning is usually faster and simpler, but it may require some downtime for the production system, especially if that is not running in archivelog mode.  The export/import process usually takes longer, but it gives you the flexibility to exclude some objects if you want to.  And, this option does not require any production downtime.

Can you give us some more information including:
1. How often do you need this (one time only, or repeated at some interval)?
2. How large is your database (size of the datafiles on disk)?
3. Do you have SAN or NAS storage that includes "snapshot" capability?
4, What is you Oracle server O/S?
5. What is your Oracle database version?
6. Do you use RMAN or ASM?
Avatar of lium1
lium1

ASKER

Do I need to have dba privileges to run RMAN?
>>Do I need to have dba privileges to run RMAN?

You will be performing a database backup so you'll need more than just normal user permissions.

You actually need different permissions.  RMAN runs at the OS  You will need SYSDBA or SYSOPER at least.
Avatar of lium1
lium1

ASKER

This will be for one time only and downtime for the production system is not an issue here.
I need to import or migrate the schemas with tables and data with indexes.
If the schema is relatively small, go export/import.  I personally wouldn't want to deal with terabyte sized export files.

If the schema is on the large size and occupies a high percentage of space consumed in the database, I would look at rman duplication.
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Either the clone process or the export/import process can get all of your "schemas with tables and data with indexes" plus users, views, PL\SQL objects, etc.  I agree with slightwv's suggestion to use export/import if your database is "small" and use a clone process if your database is "large".

Where is the boundary between a "small" and "large" database these days?  That depends on your server and storage hardware.  If your total database size is just a few Gb or less, that is definitely small.  If your DB size is 1Tb or more, I would say that is large.  If your DB size is somewhere between 5Gb and 1Tb, you can choose what looks the easiest for you.

For the export/import approach, you will have to create the development instance *AND* have a disk and directory structure available there that is identical to the source database *OR* you will have to create the tablespace(s) manually and pass a parameter to impdp so it will use the tablespace(s) that you created manually.
Just thought of another deciding factor:
with export/import ALL indexes will be rebuilt as part of the import process.  If you have a lot of indexes and any special ones like Oracle Text, they might take a lot of time to rebuild.

If you have this, then I might go with cloning for a smaller database.
Avatar of lium1
lium1

ASKER

Can I do export and import without sysdba or sysoper privileges?
Since I have no access to dba tables such as dba_data_files, log_files, temp_files, I don't know the size of database, but I know it is not that big.
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Yes, the export/import option usually takes longer than a clone.  But, it can result in a system with *MUCH* better performance.  This depends on the application though and on whether a lot of deletes have been done, or a lot of updates that changed indexed values or that added a lot of bytes per record.
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Mark Geerlings
Mark Geerlings
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo