table reorg process in prd

15
1. At first u have to check the file difference in PRD (10.33.1.14) and DR (10.44.1.15) 2. Then log in to mstsc /v 13.33.1.5 (staging server 2) 3. Go to XMANAGER-X browserspencerbkp 4. Then u can see the following window . 5. Then double click on nvgui.sh. You can see the following window.

Upload: sanu201982

Post on 30-Mar-2015

427 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Table reorg process in PRD

1. At first u have to check the file difference in PRD (10.33.1.14) and DR (10.44.1.15)2. Then log in to mstsc /v 13.33.1.5 (staging server 2)3. Go to XMANAGER-X browserspencerbkp4. Then u can see the following window .

5. Then double click on nvgui.sh. You can see the following window.

Page 2: Table reorg process in PRD

6. Click on job management.7. That time u can see two backup are running (BWRMAN and R3RMAN)8. Right click on the R3RMAN (but do not release the right click) and go to Abort job okok.9. Then u can see the following window.

Page 3: Table reorg process in PRD

10. After this stop the SCRIPT which is running on DR(10.44.1.15).root@PRCSTBY # crontab -e"/tmp/crontabOZaOL3" 21 lines, 969 characters#ident "@(#)root 1.21 04/03/23 SMI"## The root crontab should be used to perform accounting data collection.##10 3 * * * /usr/sbin/logadm15 3 * * 0 /usr/lib/fs/nfs/nfsfind30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean05 4 * * * /usr/bin/deltrg.sh#10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___# Start of lines added by SUNWscr20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/eventlog20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/DS20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/commandlog

Page 4: Table reorg process in PRD

# End of lines added by SUNWscr#1 * * * * /replication/repscript.sh#30 * * * * /usr/bin/missedfilecopy.sh 2>&1 >> /missed/log/alllogs#2,5,9,15,17,20,23,28,32,35,37,40,45,50,55 * * * * /usr/bin/umissedfilecopy.sh 2>&1 >> /emissed/log/alllogs#1 14,20,2,8 * * * /SCRIPT/HOME/secondary-rep.sh#30 8,16,23 * * * /SCRIPT/HOME/pri-rep-cleanup.sh#10 * * * * /usr/bin/missedfilecopy.sh~"/tmp/crontabOZaOL3" 21 lines, 968 characters

Then press Esc button I (inser mode)buttonOn the blue line delete the # then again press Esc button wq!(save changes)

11. Go to SAP LOGON in R3PRD and check the DB02 table space(below shows 531,904.00 MB=531.9GB) write down that free size to the table reorg excel sheet.

12. Then copy the table name ( ACCTIT,ACCTCR,ACCTHD,VBRK,EKPO LIKE THIS)which has to be reorg in a note pad(because if u directly copied to PRD session sometimes for the junk character the table reorg will start before u press enter, please copied to notepad then copy to PRD session).

Page 5: Table reorg process in PRD

13. Open a duplicate session of PRD (10.33.1.14)14. root@gwclprd # su - oragwp

Sun Microsystems Inc. SunOS 5.10 Generic January 2005gwclprd:oragwp 1% bashbash-3.00$ brspace -f tbreorg -t EKPO

15. After that the below output u can see….BR1001I BRSPACE 7.00 (28)BR1002I Start of BRSPACE processing: secpukph.tbr 2010-02-20 09.42.53BR0484I BRSPACE log file: /oracle/GWP/sapreorg/secpukph.tbr

BR0280I BRSPACE time stamp: 2010-02-20 09.42.58BR1009I Name of database instance: GWPBR1010I BRSPACE action ID: secpukphBR1011I BRSPACE function ID: tbrBR1012I BRSPACE function: tbreorg

BR0280I BRSPACE time stamp: 2010-02-20 09.43.14BR0657I Input menu 353 - please check/enter input values-------------------------------------------------------------------------------Options for reorganization of tables: SAPSR3.EKPO (degree 1)

1 ~ New destination tablespace (newts) ........ [] 2 ~ Separate index tablespace (indts) ......... [] 3 - Parallel threads (parallel) ............... [1] 4 ~ Table/index parallel degree (degree) ...... [] 5 - Create DDL statements (ddl) ............... [yes] 6 ~ Category of initial extent size (initial) . [] 7 ~ Sort by fields of index (sortind) ......... [] 8 - Table reorganization mode (mode) .......... [online]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help-------------------------------------------------------------------------------BR0662I Enter your choice:cBR0280I BRSPACE time stamp: 2010-02-20 09.44.04BR0663I Your choice: 'c'BR0259I Program execution will be continued...

BR0280I BRSPACE time stamp: 2010-02-20 09.44.04BR1108I Checking tables for reorganization...

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05

Page 6: Table reorg process in PRD

BR1112I Number of tables selected/skipped for reorganization: 1/0

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR0370I Directory /oracle/GWP/sapreorg/secpukph created

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR1101I Starting online table reorganization...BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR1124I Starting online reorganization of table SAPSR3.EKPO ...

16. After starting the reorg of table space lots of archive log will create. For that u have to start move the archive log to zipfile ,zipfile1,zipfile2,zipfile3,zipfile4.

root@gwclprd # pwd

/oracle/GWP/oraarch

root@gwclprd # ls -lrth |head

total 62410464

drwxr-xr-x 2 oragwp dba 8.0K Mar 26 2008 lost+found

-rw-r----- 1 oragwp dba 98M Feb 20 08:01 GWParch1_655900_597122479.dbf

-rw-r----- 1 oragwp dba 95M Feb 20 08:01 GWParch1_655901_597122479.dbf

-rw-r----- 1 oragwp dba 95M Feb 20 08:02 GWParch1_655902_597122479.dbf

-rw-r----- 1 oragwp dba 97M Feb 20 08:02 GWParch1_655903_597122479.dbf

-rw-r----- 1 oragwp dba 94M Feb 20 08:02 GWParch1_655904_597122479.dbf

-rw-r----- 1 oragwp dba 96M Feb 20 08:03 GWParch1_655905_597122479.dbf

-rw-r----- 1 oragwp dba 98M Feb 20 08:03 GWParch1_655906_597122479.dbf

-rw-r----- 1 oragwp dba 94M Feb 20 08:07 GWParch1_655907_597122479.dbf

root@gwclprd # pwd

/oracle/GWP/oraarch

root@gwclprd # mv GWParch1_6559*.dbf /oracle/GWP/sapbackup/zipfile

zipfile/ zipfile1/ zipfile2/ zipfile3/ zipfile4/

root@gwclprd # mv GWParch1_6559*.dbf /oracle/GWP/sapbackup/zipfile

Page 7: Table reorg process in PRD

root@gwclprd #

17. After moving file in zipfile, zip all the files where u move (/oracle/GWP/sapbackup/zipfile). See the output below:Before zipping the files , Copy autozip.sh to the zipfile/zipfile1/zipfile2/zipfile3/zipfile4

root@gwclprd # bashroot@gwclprd # cd /oracle/GWP/sapbackup/zipfileroot@gwclprd # pwd/oracle/GWP/sapbackup/zipfileroot@gwclprd # sh autozip.sh

18. After zipping all the file copy those file to DR site(10.44.1.15)

root@gwclprd # pwd/oracle/GWP/sapbackup/zipfileroot@gwclprd # scp GWParch1*.gz 10.45.1.3:/oracle/GWP/oraarch/GWParch1_655900_5971 26% |******* | 5592 KB 00:31 ETA

19. When the copy is running check in DR site(10.44.1.15)root@PRCSTBY #cd /oracle/GWP/oraarchroot@PRCSTBY #pwd/oracle/GWP/oraarch root@PRCSTBY #ls –lrt-rw-r----- 1 root root 22014747 Feb 20 14:45 GWParch1_655900_597122479.dbf.gz-rw-r----- 1 root root 21552005 Feb 20 14:46 GWParch1_655901_597122479.dbf.gz-rw-r----- 1 root root 21404007 Feb 20 14:47 GWParch1_655902_597122479.dbf.gz-rw-r----- 1 root root 21315431 Feb 20 14:47 GWParch1_655903_597122479.dbf.gz-rw-r----- 1 root root 21396406 Feb 20 14:48 GWParch1_655904_597122479.dbf.gz-rw-r----- 1 root root 21637334 Feb 20 14:49 GWParch1_655905_597122479.dbf.gz-rw-r----- 1 root root 22712603 Feb 20 14:50 GWParch1_655906_597122479.dbf.gz-rw-r----- 1 root root 17833984 Feb 20 14:50 GWParch1_655907_597122479.dbf.gz

20. After copying run unzip command and permission change commend.

root@PRCSTBY # chown oragwp:dba *.dbf

root@PRCSTBY # sh autounzip.sh

20. And apply archive log to DR side by side.

Page 8: Table reorg process in PRD

21. After complete the reorg of table following output will show,

login: rootPassword:Last login: Sat Feb 20 08:40:41 from 10.33.1.5Sun Microsystems Inc. SunOS 5.10 Generic January 2005You have mail.Sourcing //.profile-EIS.....root@gwclprd # bashroot@gwclprd # su - oragwpSun Microsystems Inc. SunOS 5.10 Generic January 2005gwclprd:oragwp 1% bashbash-3.00$ brspace -f tbreorg -t EKPOBR1001I BRSPACE 7.00 (28)BR1002I Start of BRSPACE processing: secpukph.tbr 2010-02-20 09.42.53BR0484I BRSPACE log file: /oracle/GWP/sapreorg/secpukph.tbr

BR0280I BRSPACE time stamp: 2010-02-20 09.42.58BR1009I Name of database instance: GWPBR1010I BRSPACE action ID: secpukphBR1011I BRSPACE function ID: tbrBR1012I BRSPACE function: tbreorg

BR0280I BRSPACE time stamp: 2010-02-20 09.43.14BR0657I Input menu 353 - please check/enter input values-------------------------------------------------------------------------------Options for reorganization of tables: SAPSR3.EKPO (degree 1)

1 ~ New destination tablespace (newts) ........ [] 2 ~ Separate index tablespace (indts) ......... [] 3 - Parallel threads (parallel) ............... [1] 4 ~ Table/index parallel degree (degree) ...... [] 5 - Create DDL statements (ddl) ............... [yes] 6 ~ Category of initial extent size (initial) . [] 7 ~ Sort by fields of index (sortind) ......... [] 8 - Table reorganization mode (mode) .......... [online]

Standard keys: c - cont, b - back, s - stop, r - refr, h - help-------------------------------------------------------------------------------BR0662I Enter your choice:cBR0280I BRSPACE time stamp: 2010-02-20 09.44.04BR0663I Your choice: 'c'BR0259I Program execution will be continued...

BR0280I BRSPACE time stamp: 2010-02-20 09.44.04

Page 9: Table reorg process in PRD

BR1108I Checking tables for reorganization...

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR1112I Number of tables selected/skipped for reorganization: 1/0

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR0370I Directory /oracle/GWP/sapreorg/secpukph created

BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR1101I Starting online table reorganization...BR0280I BRSPACE time stamp: 2010-02-20 09.44.05BR1124I Starting online reorganization of table SAPSR3.EKPO ...BR0280I BRSPACE time stamp: 2010-02-20 15.35.29BR1200I Drop of interim table SAPSR3.EKPO#$ waiting due to active cursor...BR0280I BRSPACE time stamp: 2010-02-20 15.37.34BR1200I Drop of interim table SAPSR3.EKPO#$ waiting due to active cursor...BR0280I BRSPACE time stamp: 2010-02-20 15.39.40BR1200I Drop of interim table SAPSR3.EKPO#$ waiting due to active cursor...BR0280I BRSPACE time stamp: 2010-02-20 15.41.43BR1200I Drop of interim table SAPSR3.EKPO#$ waiting due to active cursor...BR0280I BRSPACE time stamp: 2010-02-20 15.44.17BR1105I Table SAPSR3.EKPO reorganized successfully

BR0280I BRSPACE time stamp: 2010-02-20 15.44.17BR1141I 1 of 1 table processed - 76837900 of 76837900 rows doneBR0204I Percentage done: 100.00%, estimated end time: 15:44BR0001I **************************************************

BR0280I BRSPACE time stamp: 2010-02-20 15.44.17BR1102I Number of tables reorganized successfully: 1

BR0280I BRSPACE time stamp: 2010-02-20 15.44.17BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:cBR0280I BRSPACE time stamp: 2010-02-20 15.48.06BR0257I Your reply: 'c'BR0259I Program execution will be continued...

BR0280I BRSPACE time stamp: 2010-02-20 15.48.06BR1022I Number of tables processed: 1BR1003I BRSPACE function 'tbreorg' completed

BR1008I End of BRSPACE processing: secpukph.tbr 2010-02-20 15.48.06BR0280I BRSPACE time stamp: 2010-02-20 15.48.07BR1005I BRSPACE completed successfully

Page 10: Table reorg process in PRD

22. Go to DB02 and refresh Table space.23. Start the script

login: rootPassword:Last login: Thu Feb 18 10:37:16 from 172.16.0.71Sun Microsystems Inc. SunOS 5.10 Generic January 2005You have new mail.Sourcing //.profile-EIS.....root@PRCSTBY # bashroot@PRCSTBY # ls -ltrh /oracle/GWP/oraarch/ | headtotal 272116642-rwxrwxrwx 1 oragwp dba 47 Oct 6 10:51 autounzip.sh-rw-r----- 1 oragwp dba 93M Feb 17 16:35 GWParch1_653200_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:36 GWParch1_653201_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:38 GWParch1_653202_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:39 GWParch1_653203_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:41 GWParch1_653204_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:42 GWParch1_653205_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:44 GWParch1_653206_597122479.dbf-rw-r----- 1 oragwp dba 93M Feb 17 16:45 GWParch1_653207_597122479.dbfroot@PRCSTBY # ls -ltrh /oracle/GWP/oraarch/ | tail-rw-r----- 1 oragwp dba 95M Feb 18 11:02 GWParch1_654390_597122479.dbf-rw-r----- 1 oragwp dba 97M Feb 18 11:04 GWParch1_654391_597122479.dbf-rw-r----- 1 oragwp dba 97M Feb 18 11:05 GWParch1_654392_597122479.dbf-rw-r----- 1 oragwp dba 95M Feb 18 11:06 GWParch1_654393_597122479.dbf-rw-r----- 1 oragwp dba 97M Feb 18 11:07 GWParch1_654394_597122479.dbf-rw-r----- 1 oragwp dba 96M Feb 18 11:09 GWParch1_654395_597122479.dbf-rw-r----- 1 oragwp dba 96M Feb 18 11:10 GWParch1_654396_597122479.dbf-rw-r----- 1 oragwp dba 97M Feb 18 11:11 GWParch1_654397_597122479.dbf-rw-r----- 1 oragwp dba 96M Feb 18 11:13 GWParch1_654398_597122479.dbf-rw-r----- 1 oragwp dba 96M Feb 18 11:14 GWParch1_654399_597122479.dbfroot@PRCSTBY # cd /emissed/root@PRCSTBY # lsFILESMISSED.old OLDFILES stageNEWFILES logroot@PRCSTBY # ls -ltotal 5800-rw-r--r-- 1 root root 300 Feb 17 09:24 FILESMISSED.old-rw-r--r-- 1 root root 260 Feb 17 06:02 NEWFILES-rw-r--r-- 1 root root 260 Feb 17 09:24 OLDFILESdrwxr-xr-x 2 root root 512 Feb 14 12:28 log

Page 11: Table reorg process in PRD

drwxr-xr-x 2 root root 2954752 Feb 17 09:23 stageroot@PRCSTBY # cat OLDFILESGWParch1_652695_597122479GWParch1_652696_597122479GWParch1_652697_597122479GWParch1_652698_597122479GWParch1_652699_597122479GWParch1_652700_597122479GWParch1_652701_597122479GWParch1_652702_597122479GWParch1_652703_597122479GWParch1_652704_597122479root@PRCSTBY # lsFILESMISSED.old OLDFILES stageNEWFILES logroot@PRCSTBY # rm OLDFILESroot@PRCSTBY # rm FILESMISSED.oldroot@PRCSTBY # rm NEWFILESroot@PRCSTBY # ls log/FILESMISSED alllogsroot@PRCSTBY # ls log/FILESMISSEDlog/FILESMISSEDroot@PRCSTBY # lslog stageroot@PRCSTBY # crontab -e"/tmp/crontabOZaOL3" 21 lines, 969 characters#ident "@(#)root 1.21 04/03/23 SMI"## The root crontab should be used to perform accounting data collection.##10 3 * * * /usr/sbin/logadm15 3 * * 0 /usr/lib/fs/nfs/nfsfind30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean05 4 * * * /usr/bin/deltrg.sh#10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___# Start of lines added by SUNWscr20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/eventlog20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/DS20 4 * * 0 /usr/cluster/lib/sc/newcleventlog /var/cluster/logs/commandlog# End of lines added by SUNWscr#1 * * * * /replication/repscript.sh

Page 12: Table reorg process in PRD

#30 * * * * /usr/bin/missedfilecopy.sh 2>&1 >> /missed/log/alllogs2,5,9,15,17,20,23,28,32,35,37,40,45,50,55 * * * * /usr/bin/umissedfilecopy.sh 2>&1 >> /emissed/log/alllogs#1 14,20,2,8 * * * /SCRIPT/HOME/secondary-rep.sh#30 8,16,23 * * * /SCRIPT/HOME/pri-rep-cleanup.sh#10 * * * * /usr/bin/missedfilecopy.sh~"/tmp/crontabOZaOL3" 21 lines, 968 charactersroot@PRCSTBY #root@PRCSTBY #root@PRCSTBY #root@PRCSTBY #root@PRCSTBY #root@PRCSTBY # dateThu Feb 18 14:02:15 IST 2010root@PRCSTBY #

root@PRCSTBY # ps -ef | grep umiss root 28467 28447 0 14:03:37 pts/4 0:00 grep umissroot@PRCSTBY # ps -ef | grep umiss root 28490 28447 0 14:05:03 pts/4 0:00 grep umiss root 28471 28470 0 14:05:01 ? 0:00 /bin/ksh /usr/bin/umissedfilecopy.sh root 28470 23693 0 14:05:01 ? 0:00 sh -c /usr/bin/umissedfilecopy.sh 2>&1 >> /emissed/log/alllogs

Now go to insert mode and delete the #(Green line)and press Esc+wq!

24. Start R3RMAN .25. Don’t forget to fill up the excel sheet.