Solved

script for Drop the list of give schema and Import the data for that list of schema.

Posted on 2012-03-30
5
433 Views
Last Modified: 2012-06-21
please provide me with the shell script to drop the schema and import the data from that  list of schema
Assume the dmp file was copied form production already
0
Comment
Question by:ajaybelde
[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
  • 3
  • 2
5 Comments
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37789729
I'm afraid you didn't provide anywhere near enough information.

First: classic impexp or the new datapump expdp/impdp?

A lot also depends if the export was a FULL or not.  Some imports do not re-create the schemas.  If you drop them you would need to re-create them before import.

What exactly are you wanting to do?
What type of export was performed?
What type of import do you want to do?
etc...
0
 

Expert Comment

by:edreamers
ID: 37819884
drop user <user name> cascade

create user <user name> identified by <user name>

grant dba to <user name>

then type
imp
in command prompt
give user name and password

then the path of your database backup

thats it.
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 37823118
>>grant dba to <user name>

I would not suggest this.  DBA is a very powerful role and should only be granted to users that need it.
0
 

Expert Comment

by:edreamers
ID: 37824843
you will need special role for importing data. normal user with limited access will not do this.
0
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 37824856
Yes, but not DBA.

This also assumes the user itself is doing the importing.  In this situation, I would import as a priviledged user and NOT give the user in question any 'special' roles.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
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.

734 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