Home » RDBMS Server » Server Utilities » Help me with schema backup (Oracle 10g)
icon5.gif  Help me with schema backup [message #342802] Mon, 25 August 2008 02:57 Go to next message
dirki
Messages: 2
Registered: August 2008
Junior Member
Hi,

I am trying to backup the schema for one particular user. I use the Exp utility:


exp.exe login@server file=testdb.dmp owner=testdb

But when I use the Imp utilitiy to import the data the system
wants the user to be already there. Is it possible to backup
both user(+roles etc...) and schema in one go?

Many thanks for your help in advance,
Dirki
Re: Help me with schema backup [message #342806 is a reply to message #342802] Mon, 25 August 2008 03:16 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

EXPORT/IMPORT is not a backup method.

You can export SCHEMA level then all objects related to SCHEMA are exported.

when you import that SCHEMA level dumpfile then there is not requirement to same user must be created in database.

for eg:

DB1
DB2
I export user "a" from db1. and want to import in db2.

so it is not required "a" user must be exist in db2 prior import operation.

you can use FROMUSER= , TOUSER= parameter to specify which user exported dumpfile and which user import exported dumpfile.

hope this clear.
Re: Help me with schema backup [message #342811 is a reply to message #342806] Mon, 25 August 2008 03:39 Go to previous messageGo to next message
dirki
Messages: 2
Registered: August 2008
Junior Member

I understand the fromuser and touser parameters. But my exported schema data somehow relies on user roles of that user. So, I'd like to re-create exactly that user before importing data.

If Exp is not a valid backup method for a schema, what tool should I use instead?

Can I export a user and import him before re-creating the data?

Dirki
Re: Help me with schema backup [message #342817 is a reply to message #342811] Mon, 25 August 2008 04:03 Go to previous message
Michel Cadot
Messages: 68650
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
exp/imp cannot satisfy all your requirements.
You have to add other things to create the other objects (user, roles, privileges) for instance querying the dictionary table and/or using dbms_metadata package.

Regards
Michel
Previous Topic: SQL Loader
Next Topic: segment corruption--how to recover table??
Goto Forum:
  


Current Time: Sun May 12 17:35:00 CDT 2024