Solved

Best strategy and way of doing a oracle meta data cloning

Posted on 2014-11-27
10
214 Views
Last Modified: 2014-12-14
Hello experts,

I have a database running live application, I need to create a meta data clone of this database to another oracle database, so my question is what are the best way of going forward to this? and also how to do this? is RMAN is good way of doing it or is it even possible with RMAN to do metadata back of the tables and procedures etc.

I don't need the actual data but the metadata like tables, views, store procedures etc.

database is: oracle 10G
os: sun sparc


thanks for help
0
Comment
Question by:hi4ppl
  • 4
  • 4
  • 2
10 Comments
 
LVL 34

Accepted Solution

by:
johnsone earned 500 total points
ID: 40468838
I don't think you could do what you are asking for with RMAN.

The best utility would be either expdp or exp.

The documentation for those can be found here -> http://docs.oracle.com/cd/B19306_01/server.102/b14215/toc.htm

For expdp, you would be looking at the CONTENT=METDATA_ONLY parameter.

For exp, you would be looking at the ROWS=N parameter.

expdp is the newer utility, which I believe was released with 10G, exp is the older utility.  If you are already comfortable with one of them use it.  If you don't know either, learn the new one.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40469981
THe problem is that the server is live never stop so I have to get hot back up of meta data, will that effect performance in the background if so ... how to make an SSH script to get the back up automatically at mid night
0
 
LVL 34

Expert Comment

by:johnsone
ID: 40470291
Why can't you get that while the system is up and running?  It is only hitting the dictionary tables, so user impact would be pretty minimal.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 40470374
you can only do it with a live database
if you switch off the database, you can't extract anything

on any other computer
install the full admin oracle client and then expdp and exp are also installed
setup the tnsnames.ora in that local client
and you can export all the metadata from that remote computer
you don't  even need to get on the sparc server. you can even do it from a windows laptop (or a mac)
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40471220
Thanks for replay, for expdp, CONTENT=METDATA_ONLY,does this export all procedure and scripts or it only export the tables and view?... as my goal is to export those also what my goal is to have exactly the same copy of database, tables, procedures etc on the second machine...

and I would love to see a command example :D thanks
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 34

Expert Comment

by:johnsone
ID: 40471502
It should export everything except table data.

As for a command example, there are many in the documentation link that I provided.  If you read through the information on the CONTENT parameter, there is actually an example right in the documentation on how to use it.
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40484466
Hi,

okay I will try this tomorrow and update here .

regards
0
 
LVL 1

Author Comment

by:hi4ppl
ID: 40485365
Hi,

I used metata only option but it will not export table space command, I have to recreate all table spaces manually? I used in test environment I have not done it in live system as of yet but yeah that is the issue, it will not export the tablespace names
0
 
LVL 34

Expert Comment

by:johnsone
ID: 40485419
Did you include FULL=Y as a parameter?  If so, it should do the tablespace creates.  If not, try INCLUDE=TABLESPACE in your command line.
0
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 40486331
consider you only want metdata ...i'd precreate the tablespaces yourself
> after the import they won't be holding data anyway

you could have a 10TB source database,
  and a 1GB new database after import

providing the initial extents of the tables are left as 64Kb
of the deferred_segment creation is left on
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

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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.

932 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

12 Experts available now in Live!

Get 1:1 Help Now