• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

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

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
ajaybelde
Asked:
ajaybelde
  • 3
  • 2
1 Solution
 
slightwv (䄆 Netminder) Commented:
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
 
edreamersCommented:
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
 
slightwv (䄆 Netminder) Commented:
>>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
 
edreamersCommented:
you will need special role for importing data. normal user with limited access will not do this.
0
 
slightwv (䄆 Netminder) Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now