Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-30
5
Medium Priority
?
437 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
  • 3
  • 2
5 Comments
 
LVL 78

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 78

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 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 1500 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to take different types of Oracle backups using RMAN.

886 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