[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Oracle database exports and imports question

Posted on 2013-01-08
10
Medium Priority
?
365 Views
Last Modified: 2013-01-10
I need to learn how to do database exports and imports at user level and full ones.

Can someone guide me through the process?

I also need to learn how to clone a database using expdp/impdp
0
Comment
Question by:YZlat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 23

Accepted Solution

by:
Steve Wales earned 2000 total points
ID: 38755453
Good article here on this:

http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php

Cloning a database via export/import can be easy or hard depending on a few factors.

Does your clone database already exist?
Are there a lot of foreign key constraints (had problems in the past with this, haven't tried recently to see if it's better)

Personally, I've found it to be much faster to do a restore from backup when cloning a database.  Not only does it get the job done (usually faster unless it's a very small database), you also get to test your backups while you're at it.
0
 
LVL 35

Author Comment

by:YZlat
ID: 38755833
I am just running throught the process for learning purposes. I have a test database on one server.
0
 
LVL 23

Assisted Solution

by:Steve Wales
Steve Wales earned 2000 total points
ID: 38755898
OK then for ease of use:

Create another empty database much like your first one (users, tablespaces etc).

Export as per the article above from the first database.
Import as per the article above into the second database.

If you want to do it more than once, you will need to take action to decide what to do with any existing tables.   Check the TABLE_EXISTS_ACTION option in the parameters for impdp.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 35

Author Comment

by:YZlat
ID: 38756099
I just tried to run full export on my db and got permissions errors. What permissions does a user need to run a full database export?
0
 
LVL 23

Assisted Solution

by:Steve Wales
Steve Wales earned 2000 total points
ID: 38756153
See: http://docs.oracle.com/cd/E11882_01/server.112/e22490/original_export.htm#SUTIL2641

"To export tables owned by another user, you must have the EXP_FULL_DATABASE role enabled. This role is granted to all database administrators (DBAs).

If you do not have the system privileges contained in the EXP_FULL_DATABASE role, then you cannot export objects contained in another user's schema. For example, you cannot export a table in another user's schema, even if you created a synonym for it."
0
 
LVL 35

Author Comment

by:YZlat
ID: 38756288
so most likely I cannot do that as an oracle user or as myself?
0
 
LVL 23

Assisted Solution

by:Steve Wales
Steve Wales earned 2000 total points
ID: 38756309
Guess that depends if you have DBA access or not.

If you're not the DBA, you can only export objects owned by you.

If you have DBA access (or the EXP_FULL_DATABASE privilege) on the user you connect to the database as, then you can.

Do you have an account you can run expdp as that has the required privs?
0
 
LVL 35

Author Comment

by:YZlat
ID: 38756355
OK, both exports worked for me, I just have to do imports now.

What about database cloning?
0
 
LVL 23

Assisted Solution

by:Steve Wales
Steve Wales earned 2000 total points
ID: 38760522
I see you've opened a new question on this topic, hadn't had a chance to respond to this yet, will let that part of the question be answered in the new topic.

As mentioned above (and in the replies to the new question) an import isn't a "clone" - you need to have an existing database to import into.
0
 
LVL 35

Author Closing Comment

by:YZlat
ID: 38762812
Thanks for all your help!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

656 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