Sunteți pe pagina 1din 9

1) Reporting the Violations

==========================
adchk.sql ( calls ad_zd_prep.initialize; )
----------
a) /home/sstomar/nzdt/diverma/zd/create_table.sh
b) sqlplus apps/apps @/home/sstomar/nzdt/diverma/zd/adzdprps.pls
c) sqlplus apps/apps @/home/sstomar/nzdt/diverma/zd/adzdprpb.pls
d) sqlplus apps/apps @/home/sstomar/nzdt/diverma/zd/adchk.sql

---------------------------------------------------------

-- For NZDT scripts : Login to system as ORA use ( ssh - ORA user)
-- And run scripts SYSTEM user or SYSDBA

2) Preparing and enabling EBS DB for Editions.


=========================================
2.1)
-- Create ad_zd_ddl_handler
-- Grants permission to APPS
--
/home/sstomar/nzdt/diverma/zd/init/init.sh
2.2)
--
-- Invokes to ad_zd_prep.execSqls('&&1', &2 , &3 ) ;
--
/home/sstomar/nzdt/diverma/zd/execsqls.sql
2.3)
-- get more detail about it
-- run pearl run_execsql.pl <parameters >

perl /home/diverma/public_html/zd/run_execsql.pl 10 UPTIME

----------- Dinesh email -------------------


Enable Editions
1. Shutdown APPS services
$ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
2. Wait for all services to get stop. The below command should not return
any APPS process.
ps -ef | grep `whoami`
3. Login as Oracle user and run :
/home/diverma/public_html/zd/init/init.sh
4. To run all the ddls in Autoskip mode.
Run "sqlplus apps/apps" and run update statement :
update ad_zd_ddl_handler set autoskip ='Y';
commit;
If you wish to "not" to run in AutoSkip mode then omit this step.
5. Run :
/home/diverma/public_html/zd/run_execsql.pl 40 UPTIME
Where 40 is the number of workers and UPTIME is the phase.
The workers shall be running in background and if run in Autoskip mode
then it should complete in 15 minutes.
I shall be listing the sql commands to monitor the flow below.
6. Once All the sqlplus sessions complete and their are no jobs in UPTIME
phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to next step.
7. Run :
/home/diverma/public_html/zd/run_execsql.pl 8 DOWNTIME
It should take 15-30 minutes.
Once All the sqlplus sessions complete and their are no jobs in DOWNTIM
E phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to next step.
8. Run :
/home/diverma/public_html/zd/run_execsql.pl 40 CLEANUP
It should take 5 minutes.
Once All the sqlplus sessions complete and their are no jobs in CLEANUP
phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to next step.
9. Run sqlplus / as sysdba and run
exec apps.ad_zd_prep.enable_editions;
To enable all users to use editions.

If you want to report check of any violations run :


sqlplus apps/apps @ /home/diverma/public_html/zd/adchk.sql
which shall create "adchk.txt".

Details about monitoring.


-------------------------
Use sql to monitor the number of unassigned, successful and failure jobs a
s APPS user:
select phase, executed , count(*) from ad_zd_ddl_handler group by phase, e
xecuted order by 1 ,2 ,3;
The value of executed column has following meanings:
'N' - Not assigned
'S' - Successfully executed.
'F' - Failed.

As of now I haven't written the sql to see which task is running but from
DB side you can run :
select sql_fulltext from v$sql where sql_id in ( select sql_id from v$
session where osuser= '<Oracle Username>' );
select message from v$session_longops where sofar<>TOTALWORK;
To check which sql db is running.
If workers are not running in Autoskip mode then if their are failures for
a utility then all workers shall
come out and either you need to fix the issue and mark those ddl either as
'Not assigned'
(if you want to re-run them) or mark 'AUTOSKIP' ='Y' if you want to skip t
hat DDL.
And then re-run : /home/diverma/public_html/zd/run_execsql.pl to invoke wo
rkers.
To skip all failed tasks
update ad_zd_ddl_handler set autoskip = 'Y' where executed = 'F';
commit;
To skip a particular task :
update ad_zd_ddl_handler set autoskip = 'Y' where executed = 'F' where ddl
_id = <ddl_id>;
commit;
To know what all tasks have failed and what error, run :
set long 300
select sql,error from ad_zd_ddl_handler where executed = 'F' order by util
ity_id, batch_id, ddl_id;
Important note: I am creating simple views instead of Materialized views s
ince the latter is not able to finish in infinite time. If you want to create MV
s then :
uncomment line : 173 and 178
comment line :174
in /home/diverma/public_html/zd/adzdprpb.pls

---------------------------- similar more ------------------------------


Sorry, forgot to mention the data dictionary fixes which
has to be run as sysdba in step 5

/* Workaround for BUG 9361114 */


update user$ set spare1 = 0 where spare1 IS NULL
/
commit
/
delete from obj$ o
where o.type# = 88
and not exists (select 1 from obj$ oi where oi.obj# = o.da
taobj#)
/
commit
/
alter system flush shared_pool
/
grant create any edition, drop any edition to APPS;
grant alter database to APPS;
grant execute on sys.dbms_service to APPS;
grant drop any synonym to APPS;
grant execute on sys.dbms_prvtaqim to SYSTEM;
grant execute on sys.dbms_aqadm_sys to SYSTEM;
grant execute on sys.utl_recomp to SYSTEM;
Regards
Dinesh Verma

On 11/17/2010 12:48 PM, Dinesh Verma wrote:


> Hi All
>
> How to create environment for ZDT
>
> 1. Create a flexclone from template IT_AZX7D212_R1212_XB7_
TMP_RWS1002NAP
> 2. Shutdown APPS services
>
> $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
>
> 3. Download http://www-apps.us.oracle.com:1100/ad/12.0/dev
/diverma/public_html/zd/appldbpatch.sh
>
> wget http://www-apps.us.oracle.com:1100/ad/12.0/dev/di
verma/public_html/zd/appldbpatch.sh
>
> 4. Run
>
> sh appldbpatch.sh <ARU USERNAME> <ARU PASSWORD>
>
> 5. Login as sysdba and run the following update statements
to correct data dictionary issues.
>
> 6. Change init.ora file to change SGA size to 3 GB
> 7. Recompile all schemas with dbms_utlrecomp package using
parallel slaves at 10.
> 8. Start APPS services
>
> $ADMIN_SCRIPTS_HOME/adstrtal.sh apps/apps
>
>
>
> Enable Editions
>
> 1. Shutdown APPS services
> $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps
> 2. Wait for all services to get stop. The below command sh
ould not return any APPS process.
> ps -ef | grep `whoami`
> 3. Login as Oracle user and run :
> /home/diverma/public_html/zd/init/init.sh
> 4. To run all the ddls in Autoskip mode.
> Run "sqlplus apps/apps" and run update statement :
> update ad_zd_ddl_handler set autoskip ='Y';
> commit;
>
> If you wish to "not" to run in AutoSkip mode then omit
this step.
>
> 5. Run :
> /home/diverma/public_html/zd/run_execsql.pl 40 UPTIME
> Where 40 is the number of workers and UPTIME is the pha
se.
>
> The workers shall be running in background and if run i
n Autoskip mode then it should complete in 15 minutes.
>
> I shall be listing the sql commands to monitor the flow
below.
>
> 6. Once All the sqlplus sessions complete and their are no
jobs in UPTIME phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to n
ext step.
>
> 7. Run :
> /home/diverma/public_html/zd/run_execsql.pl 8 DOWNTIME
>
> It should take 15-30 minutes.
>
> Once All the sqlplus sessions complete and their are no
jobs in DOWNTIME phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to
next step.
>
> 8. Run :
> /home/diverma/public_html/zd/run_execsql.pl 40 CLEANUP
>
> It should take 5 minutes.
>
> Once All the sqlplus sessions complete and their are no
jobs in CLEANUP phase with executed column of AD_ZD_DDL_HANDLER as 'N' move to
next step.
>
> 9. Run sqlplus / as sysdba and run
> exec apps.ad_zd_prep.enable_editions;
> To enable all users to use editions.
>
>
>
> If you want to report check of any violations run :
> sqlplus apps/apps @ /home/diverma/public_html/zd/adchk.sql
> which shall create "adchk.txt".
>
>
> Details about monitoring.
> -------------------------
>
> Use sql to monitor the number of unassigned, successful an
d failure jobs as APPS user:
>
> select phase, executed , count(*) from ad_zd_ddl_handler g
roup by phase, executed order by 1 ,2 ,3;
>
> The value of executed column has following meanings:
> 'N' - Not assigned
> 'S' - Successfully executed.
> 'F' - Failed.
>
>
> As of now I haven't written the sql to see which task is r
unning but from DB side you can run :
> select sql_fulltext from v$sql where sql_id in ( select sq
l_id from v$session where osuser= '<Oracle Username>' );
> select message from v$session_longops where sofar<>TOTALWO
RK;
> To check which sql db is running.
>
> If workers are not running in Autoskip mode then if their
are failures for a utility then all workers shall come out and either you need t
o fix the issue and mark those ddl either as 'Not assigned' (if you want to re-r
un them) or mark 'AUTOSKIP' ='Y' if you want to skip that DDL.
> And then re-run : /home/diverma/public_html/zd/run_execsql
.pl to invoke workers.
>
> To skip all failed tasks
> update ad_zd_ddl_handler set autoskip = 'Y' where executed
= 'F';
> commit;
>
> To skip a particular task :
> update ad_zd_ddl_handler set autoskip = 'Y' where executed
= 'F' where ddl_id = <ddl_id>;
> commit;
>
>
> To know what all tasks have failed and what error, run :
> set long 300
> select sql,error from ad_zd_ddl_handler where executed = '
F' order by utility_id, batch_id, ddl_id;
>
> Important note: I am creating simple views instead of Mate
rialized views since the latter is not able to finish in infinite time. If you w
ant to create MVs then :
> uncomment line : 173 and 178
> comment line :174
> in /home/diverma/public_html/zd/adzdprpb.pls
>
>
>
>
> The environment now is prepared for creating editions. Tho
se working on XDF/ODF/LOADER can templatize the environment and use the template
henceforth.
>
>
>
> Regards
> Dinesh Verma
3) OPEN issues
============
1) No column aliases in the definition of view-SQL for
functions ( i.e. SUM(), COUNT() ...) , It works fine for materialized view
2) DROPING and Creating Materialized view HANGING the system
3) For Evolve-Types, to use Sandeep's Query, use same DDLs as object evolved ,
can be fetched from SOURCE$ table .

4) In AQs we can not add columns directly, so we have to enable the trace to m
aks any kind of exceptions being thrown from DB
-- Enable Trace
-- Add a Queue
--

================================================================================
================
OPEN Issues
---------
1) CTXSYS indexesx
2) Objects PL/SQL packages belong to CTXSYS schema
-------------
- Hot patching Detail?
-

---- new script at Dinesh Home which just takes the rows only for that utility_i
d instead of querying all (cursor) all the rows.

S-ar putea să vă placă și