Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to backup users and roles?

Re: How to backup users and roles?

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Thu, 24 Aug 2000 14:52:15 GMT
Message-ID: <8o3cqk$m97$1@nnrp1.deja.com>

In article <39a52f56.3076924_at_news.newsguy.com>,   pleasenospam_at_nospam.com (Victor Kaminsky) wrote:
> Please, show me how to do it. I couldn't understand how to backup
> without data and why to use log. Sorry, I am not a DBA and my
> knowledge of IMP/EXP is very basic.
>
> What about the passwords?
>
> On Thu, 24 Aug 2000 08:29:45 +0200, Sybrand Bakker
> <postbus_at_sybrandb.demon.nl> wrote:
>
> >Apparently you are exporting in user mode.
> >Roles are exported in full database mode.
> >You could easily run a full database export without data, run an
> >import with show=y full=y log=<any filename> and edit <any filename>
> >to isolate the roles.
> >
> >Hth,
> >
> >Sybrand Bakker, Oracle DBA
> >

Sybrand will probably respond when he sees this but to do the export you would " exp full=y rows=n ". The rows=n stop data from being written to the exp file so it contains only object create information. The log parameter is so that Oracle records its actions and particually errors in a text file that you can review.

In the past you could then use the exp file made with rows=n with an imp full=y to bring in users, constaints, public synonyms etc... but a full imp will try to recreate tablespaces so if the target database does not have each and every tablespace in the exp you would use the indexfile parameter to get Oracle to write the object source code to a file rather than actually try to import anything. You can then edit the file to cut out the create text of interest. And the passwords are in the file in an encrypted form that imp can work with. I am guessing edit is an 8.1 parameter to do basically the same.

You should review the Utilities manual for imp and exp. With about an hours worth of reading you can learn most of what you need to know about imp and exp. Otherwise type imp help=y and exp help=y at the command line for the short version.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Aug 24 2000 - 09:52:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US