Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Build an exact copy of a database using export / import
Let me
rephrase that first sentence... A full export is supposed to allow you to
recreate your base entirely at the point of export. A bit different from a
"full recovery" which means all transactions to the point of failure
recovered... Sorry for the mistype.
--Chris <FONT face=Arial
size=2>Chris.Bowes_at_Kosa.com
<FONT face="Times New Roman"
size=2>-----Original Message-----From: Bowes, Chris
[mailto:Chris.Bowes_at_kosa.com]Sent: Wednesday, May 30, 2001 4:08
PMTo: Multiple recipients of list ORACLE-LSubject: RE:
Build an exact copy of a database using export / import
A full export is supposed to allow for a full recovery.
Thus, if you do a full export, the import will try to create all the
tablespaces that existed when you exported. That is the first item in
the export file (see below). However, if you create the tablespaces you
want and don't allow (via file naming convention) the ones you don't want
created, you can get the import to just create the tablespaces you want
created. For example, the first tablespace in the excerpt below is
the TEMPORARY tablespace. If I did this on a server where
/salxha2/u01/oradata/swims did not exist, then the create will fail and
as long as ignore=y is set, the import will continue. When import
sees that a tablespace doesn't exist for a table it is supposed to create and
import, it will use the default tablespace of the importer it is connected as
(usually the owner of the object).
Other options include logging into svrmgrl or sqlplus as sys
and dropping the tablespaces that you don't want as they are created by the
import or editting the export file. I know some people have successfully
editted an export file, however, I haven't been able too. I always get
an invalid marker message or something like that.
As far as some grants not coming across, items created by sys
will not be exported as they are expected to be there before the import (via
the dictionary scripts). So if you have sys granting directly to a user
(say granting select on v$_lock), then you'll need to do a script that runs as
the import is running to fix those problems. If it isn't grants from sys
failing, then make sure the user that granted the options still has the power
to grant (ie the "WITH GRANT OPTION" and/or "WITH ADMIN OPTION" authorities in
place) when you do the export. Otherwise the create/alter user that
import does will not grant the powers to that user that it used when it made
the grants and when it comes time for that user to grant permissions, it may
fail due to "insufficient privs".
Hope this helps...
<FONT
size=2>--------------------------------------------------------------------------------^C^AEXPORT:V07.03.04 DSYS
size=2>Mon May 28 14:28: 32 2001 <FONT
IDENTIFIED BY VALUES 'xxxxxxxxxxxxxxxxx' DEFAULT TABLESPACE <FONTsize=2> "USERS" TEMPORARY TABLESPACE "TEMPORARY" ..... GRANT "MONITORER" TO "xx" WITH
size=2>---------------------------------------------------------------------------
--Chris Chris.Bowes_at_Kosa.com
-----Original Message----- From: Kevin
Kostyszyn [<A
href="mailto:kevin_at_dulcian.com">mailto:kevin_at_dulcian.com] <FONT
size=2>Sent: Wednesday, May 30, 2001 12:57 PM To:
Multiple recipients of list ORACLE-L Subject: RE:
Build an exact copy of a database using export / import
Well, depending on the size of the db and some other network
stuff, I do the following. I shut down the real
db, copy all of the data files, controlfiles and init
file to a machine with Oracle on it. Then you can <FONT
size=2>create the service (NT), alter any of the datafiles if necessary
(on different logical drive) then you can just bring
that bad boy up. Then I just give it a different
alias, works for me.
However, what do you mean it creates new tablespaces, I have
never seen that happen, it just fails miserably for me
if the tablespaces don't exist. You could do the full
export, create a new user on the new machine and grant <FONT
size=2>"become any user" to the new user. I believe that then the
import would work, I've done it before. Sorry I
don't have more, brain is still a littel soft from the
weekend. Kev
-----Original Message----- L.
Sent: Wednesday, May 30, 2001 12:26 PM <FONT
size=2>To: Multiple recipients of list ORACLE-L
When I build a new test database I create the database and run
all the required Oracle scripts. Then I do a
full import of a production export. This works pretty
well but I miss some of the grants and The full import <FONT
size=2>wants to create tablespaces that I may or may not want created. I
get a lot of errors on system objects. Does
anyone have the proper steps to create an exact copy
of a production database using export / import?
Thanks! Ron Smith <FONT
size=2>Database Administration rlsmith_at_kmg.com
![]() |
![]() |