-
Problem on owner change in EXP/IMP process, Urgent!!
WINDOWS 2000 ORACLE9I
I found the following problem when tranfering Schema A to B,
EXP SYSTEM/AAA@DB1 OWNER=A FILE=A
IMP SYSTEM/BBB@DB2 FROMUSER=A TOUSER=B FILE=A
There is no object in USER B before import, and no error reported in EXP/IMP.
But when checking the TRIGGERS in USER B, I found the TABEL/VIEW OWNER of some triggers are still A.
What's the problem,pls advise.
THANKS
-
check out those triggers code,
Could it be possible that inside the triggers, you are using the full schema name like .???
Is that your question? I am not totally clear about your question
-
A code example: in User A
CREATE OR REPLACE TRIGGER A.TRG1
AFTER INSERT ON A.TABLE1
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
After import to user B, it should be:
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON B.TABLE1
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
The problem is , the code is below after import to B
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON A.TABLE1 --the owner is still B
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
-
FOR CORRECTION.
A code example: in User A
CREATE OR REPLACE TRIGGER A.TRG1
AFTER INSERT ON A.TABLE1
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
After import to user B, it should be:
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON B.TABLE1
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
The problem is , the code is below after import to B
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON A.TABLE1 --the owner is still A
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
-
of course, that's not a problem, that's how it works, import DOES not modify your code
-
i don't mean change of code, BUT the ownership of the objects should be changed from A to B after ---
EXP SYSTEM/AAA@DB1 OWNER=A FILE=A
IMP SYSTEM/BBB@DB2 FROMUSER=A TOUSER=B FILE=A
Right?
-
Originally posted by yanliu73
After import to user B, it should be:
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON B.TABLE1
CREATE OR REPLACE TRIGGER B.TRG1
AFTER INSERT ON A.TABLE1
that's code, you dont expect import to change that do you?!
-
pando,
I got your point, I guess my problem is caused by using the full schema notation when define trigger's base table,as mentioned by seazodiac. the following code should not cause the problem.
CREATE OR REPLACE TRIGGER A.TRG1
AFTER INSERT ON TABLE1
FOR EACH ROW
DECLARE
...
BEGIN
...
END ;
/
I will do some test, and check the result.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|