I exported a database schema from one server using SQL Developer (Tools-> Database Export). It generated a script, but I have problems executing it on another server.
The schema has a number of triggers/procedures and I got an error (ORA-00942: table or view does not exist) creating the first multi-statement trigger(or sp). It works properly if I execute each CREATE TRIGGER separately, but it’s quite a tedious process …
I believe it is because of the semicolon between statements in the trigger body, but I don’t know how to make it work. What is the right way to execute the script?
[UPDATE]
Just in case if someone else has a similar problem, don’t forget to switch to a newly created schema ALTER SESSION SET CURRENT_SCHEMA=NEW_SCHEMA_NAME; in the beginning of import script.
Just in case if someone else has a similar problem, don’t forget to switch to a newly created schema ALTER SESSION SET CURRENT_SCHEMA=NEW_SCHEMA_NAME; in the beginning of import script.