Solved

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

Posted on 2012-03-30
5
434 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

630 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