Take down the application Tier - WordPress.com · Web viewConnect to rman as auxiliary and execute...

Post on 01-Mar-2020

4 views 0 download

transcript

Cloning Procedure for Single Instance (EBSTRN) from Production

1. Take the screenshot of current concurrent managers

 

 

2. Take down the application Tier

3. Check spfile location and name

4. Take down the database tier

5. Check context file location of apps tier

[oratrng@ebstdb02-mgmt ~]$ echo $CONTEXT_FILE/u01/app/oracle/product/11.2.0.3/dbhome_trn/dbhome_1/appsutil/ebstrn_ebstdb02-mgmt.xml[oratrng@ebstdb02-mgmt ~]$

6. Goto dbs location and move the current spfile as old

7. Create new pfile as initebstrn.ora with parameters

db_name='ebstrn'db_unique_name='ebstrn'

8. Login to GRID as oragrid

9. Goto DATA_EBST

10. Go to particular instance directory in my case its ebstrn/

11. Go to CONTROLFILE folder and delete the existing files

12. Go to DATAFILE folder and delete existing files

13. Go to ONLINELOG folder and delete existing files

14. Go to RECO_ESBT main folder and list the directories and move to your instance specific directory in my case its ebstrn

15. Go to ONLINELOG folder and delete existing files

16. Go to ARCHIVELOG folder and delete existing files

17. Go to particular directories and delete the files

18. Logout of ORAGRID

19. Start the database in nomount state it will by default take parameter file as spfile is moved

20. Connect to rman as auxiliary and execute the restore script make sure of white spaces and file paths in the script

21. Login to database and check the below

22. Now shut down the database and restore the original spfile which we renamed earlier and rename the one created now by RMAN

23. Start the database it will read spfile and take the parameters which we want as per our old environment

24. Run autoconfig on Database tier

APPS Tier:

1. Untar the PROD Backup

2. Change the permissions and the usernames as per the enivironment here appltrng

3. Export the Paths in the environment

export PERL5LIB= /u01/ebs_stg/stgbkp/ebstrn/apps/tech_st/10.1.3/perl/lib/5.8.3: /u01/ebs_stg/stgbkp/ebstrn/apps/tech_st/10.1.3/perl/lib/site_perl/5.8.3: /u01/ebs_stg/stgbkp/ebstrn/apps/apps_st/appl/au/12.0.0/perl: tech_st/10.1.3/Apache/Apache/mod_perl/lib/site_perl/5.8.3/i686-linux-thread-multi

&export PATH/u01/ebs_stg/stgbkp/ebstrn/apps/tech_st/10.1.3/perl/bin:$PATH

4. Run adcfgclone with old context file path

5. Run Autoconfig on appsTier.

6. Change Apps password, SYSTEM password

Note: After environment is received from HIS Team take down the apps Tier.

POST CLONING ACTIVITIES

1. Check the node name

SQL> select node_name from fnd_nodes;

2. Clean the nodes

exec fnd_conc_clone.setup_clean

SQL> exec fnd_conc_clone.setup_clean

PL/SQL procedure successfully completed.

SQL> commit;

3. Run Autoconfig on db Tier first and Apps Tier later

4. Check the nodes after running Autoconfig

SQL> select node_name from fnd_nodes;

5. Update the Target Nodes (change as per the nodes)

SQL> update FND_CONCURRENT_QUEUES set TARGET_NODE='EBSSTGAPP01' WHERE TARGET_NODE IN ('EBSPRDAPP02', 'EBSPRDAPP01');

SQL> update FND_CONCURRENT_QUEUES set node_name2=' ' WHERE node_name2 IN ('EBSPRDAPP02', 'EBSPRDAPP01');

SQL> update FND_CONCURRENT_QUEUES set node_name='EBSSTGAPP01' WHERE node_name IN ('EBSPRDAPP02', 'EBSPRDAPP01');

SQL> commit;

Commit complete.

SQL> exit

6. Manage the Temp Files

SQL> select * from v$tempfile;

SQL> SELECT PROPERTY_NAME, PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';

SQL> select TABLESPACE_NAME,FILE_NAME,BYTES/1024/1024 from dba_temp_files;

SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP2;

SQL> SELECT PROPERTY_NAME, PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';

SQL> SELECT a.INST_ID,b.TABLESPACE, b.segfile#, b.segblk#, ROUND ( ( ( b.blocks * p.VALUE ) / 1024 / 1024 ), 2 ) size_mb, a.SID , a.serial# , a.username , a.osuser , a.program , a.status FROM gv$session a , gv$sort_usage b , gv$process c , gv$parameter p WHERE p.NAME = 'db_block_size' AND a.saddr = b.session_addr AND a.paddr = c.addr ORDER BY b.TABLESPACE , b.segfile# , b.segblk# , b.blocks;

If any sessions found kill them

SQL> ALTER DATABASE TEMPFILE '+DATA_EBST/ebstrn/datafile/temp01.dbf' DROP INCLUDING DATAFILES;

SQL> ALTER DATABASE TEMPFILE '+DATA_EBST/ebstrn/datafile/temp02.dbf' DROP INCLUDING DATAFILES;

SQL> DROP TABLESPACE TEMP1 INCLUDING CONTENTS AND DATAFILES;

7. Manage Redo Logfiles

SQL> select GROUP#,MEMBERS,THREAD# from v$log;

SQL> select GROUP#,MEMBER from v$logfile;

SQL> alter database disable thread 2;

SQL> alter database drop logfile group 7; (Delete all present in Thread 2)

8. Login to oragrid and delete the logfiles physically

[root@ebstdb02-mgmt ~]# su - oragrid[oragrid@ebstdb02-mgmt ~]$ asmcmdASMCMD> lsDATA_EBST/DBFS_DG/RECO_EBST/ASMCMD> cd DATA_EBST/ASMCMD> cd ebstrn/ASMCMD> cd ONLINELOG/ASMCMD> rm redo07a.log redo08a.log redo09a.log redo10a.log redo11a.log

redo12a.logASMCMD> exit[oragrid@ebstdb02-mgmt ~]$ exitlogout

9. Sizing the SGA,PGA

Resize the sga to 4gb and pga to 1gb.

10. Change DBSNMP user password

Alter user DBSNMP identified by dbsnmp3452;

11. Take some log switch and shut down the instance

12. Check the listener status and Start the instance

13. Compile invalid objects

SQL> @?/rdbms/admin/utlrp.sql

14. Clear Workflow mailers

 How To Purge E-Mail Notifications From The Workflow Queue So The E-Mail Is Not Sent [ID 372933.1] Procedure-  1)  Update the notifications you do not want sent, in the WF_NOTIFICATIONS table.  Check the WF_NOTIFICATIONS table.

 Records where status = 'OPEN' and mail_status = 'MAIL' are notifications that will have an e-mail notification sent.  select notification_id, status, mail_status, begin_date from WF_NOTIFICATIONSwhere status = 'OPEN' and mail_status = 'MAIL';  2)   Take backup of the workflow table create table  WF_NOTIFICATIONS_BAK1 as select * from wf_notifications; 3)  To update a notification so that it will not get e-mailed. Set the MAIL_STATUS = 'SENT'. The mailer will think the e-mail has already been sent and it will not send it again.. (Users can still reply to the notification from the worklist page in the applications).    update WF_NOTIFICATIONS set mail_status = 'SENT' where mail_status = 'MAIL';commit; update wf_notificationsset mail_status = 'SENT'where end_date is not nulland status = 'CLOSED'and MAIL_STATUS = 'MAIL';commit;  4)  Then run the script wfntfqup.sql to purge the WF_NOTIFICATION_OUT queue and rebuild it with data currently in the WF_NOTIFICATIONS table. This is what purges all notifications waiting in the queue to be sent.  It will then populate the queue with the current data in the wf_notifications table. Since you have changed the mail_status = 'SENT" it will not enqueue these messages again.. Only the ones where mail_status = 'MAIL' and status = 'OPEN' will be placed in the WF_NOTIFICATION_OUT queue and sent by the mailer.   select count(*) from wf_notification_out; create table wf_notification_out_bak1 as select * from wf_notification_out;

    sqlplus apps/apps_stg1 @$FND_TOP/patch/115/sql/wfntfqup.sql apps apps_stg1 applsys   [applstg1@ebsstgapp01 sql]$ SQL> select * from wf_notification_out; no rows selected SQL> create table wf_notification_out_bak as select * from wf_notification_out; Table created.

15. Change sysadmin password

FNDCPASS apps/apps_trn 0 Y system/system_trn USER SYSADMIN sysadmin_trn12

16. Start the APPS Tier and Stop the workflow notification mailer

17. After cloning decrease the managers as that of earlier environment

  

18. Stop the scheduled programs

1. HMC Daily Count of PMS-Oracle Staging Tables- As of Yesterday2. HMC PMS transaction stuck3. HMC Zero Cost Item Listing Report4. HMC Update Employees Supervisors5. HMC Facility Wise PR PO Report

19. Run cmclean.sql

20. Stop apps tier Run adadmin and compile apps schema.

21. Start the apps tier

22. Add catalog entries in tnsnames.ora file and start the listener

23. Connect to RMAN

rman TARGET / catalog rman/ebscat758@ebscatRMAN> register database;

database registered in recovery catalogstarting full resync of recovery catalogfull resync completeRMAN> show all;