Oracle documentation regarding full database export import operation [message #191693] |
Thu, 07 September 2006 15:26 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
In reading Oracle documentation in preparing to do a full export and import of a database to a duplicate database (there are other possibly preferred ways such as RMAN, but I have never tried the export import method), I came across the following comment in the Utilities Guide.
This is the 10gR2 database and documentation set, utilities guide chapter 19.
Points to Consider for Full Database Exports and Imports
A full database export and import can be a good way to replicate or clean up a database. However, to avoid problems be sure to keep the following points in mind:
Quote: | A full export does not export triggers owned by schema SYS. You must manually re-create SYS triggers either before or after the full import. Oracle recommends that you re-create them after the import in case they define actions that would impede progress of the import.
|
Is this true? Has anyone experienced this? If so, how would one recreate the triggers? No further mention of this issue is made in the Utilities Guide or in the Upgrade Guide (which in chapter 8 gives a list of procedures for upgrading a database using the export import method).
|
|
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #191876 is a reply to message #191872] |
Fri, 08 September 2006 08:02 |
kimant
Messages: 201 Registered: August 2006 Location: Denmark
|
Senior Member |
|
|
You should not worry.
Say You have two running database, A and B.
Sys's objects in A has information only relevant for A, and B for B.
The data in fx. sys.v$data_file should not be overwritten when You import. Bad example, but whould database B then tri to access A's datafiles?
(Yes, I know of control files, it's just a quick and dirty thought of example)
Do not worry about SYS. Oracle handles it perfectly!
,-)
Kim
|
|
|
Re: Oracle documentation regarding full database export import operation [message #191920 is a reply to message #191693] |
Fri, 08 September 2006 11:57 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Hmm...I still have doubts, based on the statement in the oracle docs quoted above. I have not done much of anything in the below database since installing it, but if I do:
MYDBA@orcl > select count(*) from dba_triggers where owner = 'SYS';
COUNT(*)
----------
13
1 row selected.
MYDBA@orcl > select trigger_name from dba_triggers where owner = 'SYS';
TRIGGER_NAME
------------------------------
AW_DROP_TRG
NO_VM_DROP
NO_VM_DROP_A
NO_VM_CREATE
NO_VM_ALTER
AURORA$SERVER$STARTUP
AURORA$SERVER$SHUTDOWN
CDC_ALTER_CTABLE_BEFORE
CDC_CREATE_CTABLE_AFTER
CDC_CREATE_CTABLE_BEFORE
CDC_DROP_CTABLE_BEFORE
OLAPISTARTUPTRIGGER
OLAPISHUTDOWNTRIGGER
13 rows selected.
MYDBA@orcl >
There are definitely triggers there. But the docs explicitly say, or so it seems to me, that these 13 triggers will not be exported. So I need to find out if this is true, and if so, how to correct it. If not though, then I'll ignore it as a documentation bug.
|
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #191934 is a reply to message #191693] |
Fri, 08 September 2006 14:46 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
My thoughts exactly on how to test it. What version was your test done in Mahesh?
I did the test in 10gR2 (10.2.0.1) on Windows and searched for 4 of the 13 triggers and found none of them in the import log file with the show option. My export was done with sys as sysdba, likewise with the import.
So..lets say you were doing the export import method to upgrade a database, or to duplicate a database for a test environment. How would one go about recreating these triggers? What would be the best way?
I wonder if there is anything else that does not get exported in a "full" export.
[Updated on: Fri, 08 September 2006 14:49] Report message to a moderator
|
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #192497 is a reply to message #191693] |
Tue, 12 September 2006 11:34 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Hmmm. So I've created the new database, done the export from the old database. Now I'm importing, and getting an error which halts the import session:
"ALTER SESSION SET CURRENT_SCHEMA= "XDB""
IMP-00003: ORACLE error 1435 encountered
ORA-01435: user does not exist
IMP-00000: Import terminated unsuccessfully
My thought/assumption is that this is one of the optional components that must not have been installed by simply running the create database statement to create the new DB?
I didn't precreate users, but did tablespaces. But I shouldn't _have_ to precreate the users, because I already noticed the import session taking care of various users for me.
So if I'm right, and error is due to not having the option that uses the XDB user installed (probably xml db?), how would one find a list in the database of all components installed in the old database so that I could generate the same list in the new database and compare and then know what needs to be installed?
As a side note, I'm posting my current version of instructions that I have written and followed for the export import procedure. Perhaps they will help others.
I'm thinking these are close to correct, but please let me know if you spot a problem. I'm thinking that I got the import error because I skipped the "install optional components" step.
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #192506 is a reply to message #191693] |
Tue, 12 September 2006 12:20 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Hmm...I found a list of user administrative accounts, burried in chapter 5 of the 10gR2 installation guide for windows.
I'd like to ignore the errors if I don't need the options, but the errors halt the import session completely, not allowing me to continue (even with ignore=y).
What I can't figure out yet is why the error. And when I check product_component_version from both databases, I get the same result (both database share the same home).
So..I'm still looking.
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #192518 is a reply to message #191693] |
Tue, 12 September 2006 13:07 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
Well, the thing is I don't want to just do a fromuser touser situation. I hear you....but I guess in my mind if I have a database called A, and I want to create a test database call ATEST, which is exactly like A, I should be able to follow the procedures (as outlined by Oracle) to do a full export import and a manual database creation. If there are 500 users in the database, Ishouldn't have to list them all on the fromuser param.
I did find out one more thing. The XDB user itself is not exported during a full database export! The docs don't mention this, they just mention sys triggers not being exported.
But when I do an import with the show to create a log, and search for a create user xdb, it is missing! Most every other user is included, including other system user accounts. But XDB for some reason is not there.
So I ran catqm and catxdbj to install xdb manually. This creates the user, among other things. Next it is time to do the import, now that the user will be essentially precreated.
|
|
|
|
|
Re: Oracle documentation regarding full database export import operation [message #193043 is a reply to message #193012] |
Thu, 14 September 2006 11:50 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
goudelly wrote on Thu, 14 September 2006 10:42 | Hi,
have you created any triggers or any others objects in SYS schema. As per the oracle standard you have to create the your objects in you own tablespace and own schema.
|
I have to tell you, I have seen quite a few posts by you in the last few days and I have to disagree with something you have said in each and every one of these postings. You should really check your facts before making some of these statements.
|
|
|
Re: Oracle documentation regarding full database export import operation [message #193303 is a reply to message #193043] |
Fri, 15 September 2006 10:39 |
goudelly
Messages: 52 Registered: August 2006 Location: India
|
Member |
|
|
Hi joy_division,
>I have to tell you, I have seen quite a few posts by you in the last few days and I have to disagree with something you have said in each and every one of these postings. You should really check your facts before making some of these statements.
Please tell where i was posted the wrong posting, i will correct my self.
Thanks,
|
|
|