[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Oracle 10g - imp/exp then drop

Posted on 2011-05-03
13
Medium Priority
?
498 Views
Last Modified: 2012-06-27
Hi,

I want to first export a database and then drop it.

I want to do it using the SID but Im sure of the syntax to use.

Could anyone help?
SID: FRO8A

Tks,
Joao
0
Comment
Question by:joaotelles
  • 5
  • 4
  • 4
13 Comments
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35512436
What OS?
What is the question?

The syntax for export can be found with: exp help=Y

The easiest is: exp username/password@FRO8A full=Y file=FRO8A.dmp
0
 

Author Comment

by:joaotelles
ID: 35512455
Sorry.  OS: Solaris 10.

After the exp I want to drop the tables of FRO8A. Just not sure of the syntax.

0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35512481
Is FRO8A a schema, a database or both?

Drop just the tables or the entire schema and all objects?
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 74

Assisted Solution

by:sdstuber
sdstuber earned 336 total points
ID: 35512486
since its 10g you might want to consider expdp  (datapump) instead,  essentially same syntax

expdp  username/password@FR08A FULL=Y  dumpfile=fr08a.dmp


0
 

Author Comment

by:joaotelles
ID: 35512497
A database.

Drop the tables and the entire schema and all objects.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 35512516
>>>A database.
>>>Drop the tables and the entire schema and all objects.

That's sort of contraditing.

Do you really want to drop the entire database?

or just a schema (user and associated objects) within the database?
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35512521
I would probably use dbca (Database Configuration Assistant) to drop the database.
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35512530
There is also a drop database sql command if you prefer:

http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/recoscen.htm#CACFJHED
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 35512559
if use are just trying to drop a schema then


drop user THEUSERNAME cascade;


if you do

drop database;

then you will still need to do some extra cleanup  like pfile (but not spfile)
alert logs, trace files, etc.
0
 

Author Comment

by:joaotelles
ID: 35512581
sdstuber,

Sorry for the lack of information. I want to drop some users and its associated objects. Not the entire database.
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 336 total points
ID: 35512592
then as noted above...

for each user you want to drop...


drop user THEUSERNAME cascade;


0
 
LVL 78

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 164 total points
ID: 35512602
You can also add the specific users to either export and not do a FULL.
0
 

Author Closing Comment

by:joaotelles
ID: 35512623
Tks for the help
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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…
Suggested Courses
Course of the Month18 days, 13 hours left to enroll

834 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