Hello,
In order investiguate on issues, we need to copy production database in another environment.
The customer want to create a task to copy the database every day and maintain the two environments with the same data.
We are using RMAN to copy the Oracle database and then we run a SQL script to set some specific values differents on the two environments (mainly obects in the following tables: DialogDatabase, Hardware, JobServer, Server).
Finally we have to run database compilation with database compiler to generate an other database id, before use the second environment.
In order to have a complete automatical procedure, we want to run this last step within a script.
This is why we are looking for information to run database compilation within script.
We found an initial response by analyzing sql request (in v$sql system view)
Generate a new database id:
declare
v_newPK nvarchar2(38) := newid();
begin
update dialogdatabase set ...
Run database compilation with a stored procedure:
BEGIN vid_CompileDatabase(); END;
We are really grateful for any help on the subject. ![]()
Serge