The doubt about full db recovery via exp/imp [message #605129] |
Tue, 07 January 2014 08:54 |
|
lylklb
Messages: 12 Registered: January 2014
|
Junior Member |
|
|
http://docs.oracle.com/cd/A87860_01/doc/server.817/a76955/ch02.htm#26295
To restore a set of objects, you must first import the most recent incremental export file to import the system objects (i.e. specify INCTYPE=SYSTEM for the export). Then you must import the export files in chronological order, based on their export time (i.e. specify INCTYPE=RESTORE for the import).
An incremental export extracts only tables that have changed since the last incremental, cumulative, or complete export. Therefore, an import from an incremental export file imports the table definition and all of its data, not just the changed rows.
It is important to note that, because importing an incremental export file imports new versions of existing objects, existing objects are dropped before new ones are imported. This behavior differs from a normal import. During a normal import, objects are not dropped and an error is usually generated if the object already exists.
1. Import the most recent incremental export file (specify INCTYPE=SYSTEM for the export) or cumulative export file, if no incremental exports have been taken.
2. Import the most recent complete export file.
3. Import all cumulative export files after the last complete export.
4. Import all incremental export files after the last cumulative export.
For example, if you have:
one complete export called X1
two cumulative exports called C1 and C2
three incremental exports called I1, I2, and I3
then you should import in the following order:
IMP system/manager INCTYPE=SYSTEM FULL=Y FILE=I3
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=X1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=C1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=C2
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I2
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I3
Notes:
1)You import the last incremental export file twice; once at the beginning to import the most recent version of the system objects, and once at the end to apply the most recent changes made to the user data and objects.
2)When restoring tables with this method, you should drop the tables from the database (if they exist) before starting the import sequence. This step prevents you from importing duplicate rows.
The following questions are my doubt:
1)Why must firstly & individually recovery system objects (but not import both system objects and user objects at the same end time ) ?!
2)Why must import system objects via the most recent incremental export file I3(because it is possible that there was no change for the system objects in I3, but only existed change in the previous some incremental/cumulative export file such as either I1 or C1、and might even only in complete export file
X1) !?
|
|
|
|
|
|
|
|
|
Re: The doubt about full db recovery via exp/imp [message #605454 is a reply to message #605449] |
Thu, 09 January 2014 09:16 |
gazzag
Messages: 1119 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
Essentially you have to create a blank database then:
1. Create the required tablespaces
2. Create the required schemas
3. Import your dump file
Look into the SHOW=Y option of the import as this will help you determine what you need to pre-create before the import.
Good luck.
-g
|
|
|
|
|
|
Re: The doubt about full db recovery via exp/imp [message #605788 is a reply to message #605129] |
Tue, 14 January 2014 10:31 |
tim2boles
Messages: 38 Registered: August 2008 Location: Clarksburg, WV
|
Member |
|
|
Quote:The following questions are my doubt:
1)Why must firstly & individually recovery system objects (but not import both system objects and user objects at the same end time ) ?!
Interesting that you left off the rest of the text in your original posting.
http://docs.oracle.com/cd/A87860_01/doc/server.817/a76955/ch02.htm#26295
Quote:This step imports the correct system objects (for example, users, object types, and so forth) for the database.
You have to have the users, objects and so forth that might have been added so that your imports of those objects will work. You can not do them both, because the import may not have imported the system objects before attempts to import the objects that depend on those definitions. So system objects first.
Quote:
2)Why must import system objects via the most recent incremental export file I3(because it is possible that there was no change for the system objects in I3, but only existed change in the previous some incremental/cumulative export file such as either I1 or C1、and might even only in complete export file
X1) !?
I believe that the way that information and system tables are handled differently than "user" tables. http://docs.oracle.com/cd/A87860_01/doc/server.817/a76955/ch01.htm#17642
Quote:
In addition to the base tables and data, the following data is exported:
All system objects (including tablespace definitions, rollback segment definitions, and user privileges, but not including temporary segments)
Information about dropped objects
Clusters, tables, views, procedures, functions, dimensions, and synonyms created since the last export
All type definitions
Note: Export does not export grants on data dictionary views for security reasons that affect Import. If such grants were exported, access privileges would be changed and the user would not be aware of this. Also, not forcing grants on import allows the user more flexibility to set up appropriate grants on import.
|
|
|
Re: The doubt about full db recovery via exp/imp [message #605870 is a reply to message #605788] |
Wed, 15 January 2014 08:17 |
|
lylklb
Messages: 12 Registered: January 2014
|
Junior Member |
|
|
Anyway, thanks very much to tim2boles !!!
1. I can accept & realize your explanation for the first question !
2. Would be there any other information or explanation for the system objects within an incremental/cumulative export ?
Notes: at least the documents of Oracle do not make sure the principle of an incremental/cumulative export for the system objects vs user objects(table & data)!
[Updated on: Wed, 15 January 2014 08:20] Report message to a moderator
|
|
|
|