| 0 comments ]

LPAR1 PROD DB – ACQ1 DMP BACKUP LOCATION:-
·        Production Database Backup job is executed by operator daily after batch job completed.
Database Backup job was located at /export/home/orabkup.
Main Script name:-oramain
Sub-Script name: - BCKALLDB
·        The Backup Job will be housekeep those existing backup files before it proceed to the backup.
·        The backup will be stored at below location:-
/ata2/EXPDMP/

/export/home/orabkup/EXP > ls -lrt /*/EXPDMP/acq*  /*/EXPDMP/expallacq.log
-rw-r-----   1 orabkup  dba       142828160 Jun 06 19:22 /ata2/EXPDMP/acqgrp01.dmp.gz
-rw-r-----   1 orabkup  dba       140601272 Jun 06 19:23 /ata2/EXPDMP/acqgrp02.dmp.gz
-rw-r-----   1 orabkup  dba       175322424 Jun 06 19:24 /ata2/EXPDMP/acqgrp03.dmp.gz
-rw-r-----   1 orabkup  dba       299426662 Jun 06 19:25 /ata2/EXPDMP/acqgrp04.dmp.gz
-rw-r-----   1 orabkup  dba       229430165 Jun 06 19:26 /ata2/EXPDMP/acqgrp05.dmp.gz
-rw-r-----   1 orabkup  dba       386247009 Jun 06 19:28 /ata2/EXPDMP/acqgrp06.dmp.gz
-rw-r-----   1 orabkup  dba       545863608 Jun 06 19:29 /ata2/EXPDMP/acqgrp07.dmp.gz
-rw-r-----   1 orabkup  dba       437091817 Jun 06 19:30 /ata2/EXPDMP/acqgrp08.dmp.gz
-rw-r-----   1 orabkup  dba       239622550 Jun 06 19:31 /ata2/EXPDMP/acqgrp09.dmp.gz
-rw-r-----   1 orabkup  dba       316071138 Jun 06 19:33 /ata2/EXPDMP/acqgrp10.dmp.gz
-rw-r-----   1 orabkup  dba       413829409 Jun 06 19:34 /ata2/EXPDMP/acqgrp11.dmp.gz
-rw-r-----   1 orabkup  dba           76285 Jun 06 19:35 /ata2/EXPDMP/expallacq.log
-rw-r-----   1 orabkup  dba       157802121 Jun 06 19:35 /ata2/EXPDMP/acqgrp12.dmp.gz
/export/home/orabkup/EXP >
When the Management has declared the Disaster Recovery Simulation Date & Business Date, you should start to backup the production DB dmp files in to safe location. Please refer to below steps.

  • Due to ftp process may take 1-2 days to be completed, you should move the production backup (Refer DR business Date) into safe place to avoid the daily backup being housekeep.
Login as oracle
cd /ata1/DRPREPARE

Execute below job:-
01_JSAFEDMP 

  • Once the Prod DB dmp files being moved to the safe place /ata1/ DRBCKUP, you may proceed to run the ftp job in background. FTP process may take about 1-2 days to be completed and it will cause the DR server getting slower, please acknowledge the applications team when you are running ftp process for DR purpose.
cd /ata1/DRPREPARE and execute below command:-

nohup sh 02_JFTP-01-03 -print  /ata1/DRPREPARE/LOGS/JFTP-01-03.log &   [Press Enter]
nohup sh 02_JFTP-04-06 -print  /ata1/DRPREPARE/LOGS/JFTP-04-06.log &   [Press Enter]
nohup sh 02_JFTP-07-09 -print  /ata1/DRPREPARE/LOGS/JFTP-07-09.log &   [Press Enter]
nohup sh 02_JFTP-10-15 -print  /ata1/DRPREPARE/LOGS/JFTP-10-15.log &   [Press Enter]
  • When the ftp process has completed, check all the dmp files and ensure all the required dmp files are in place at DR server.
ls -lrt /*/ACQDMP/acqgrp*    /*/ACQDMP/ expallacq.log

  • Unzip the /*/ACQDMP/acqgrp*.dmp.gz
EXAMPLE:-
gunzip /*/ACQDMP/acqgrp*.dmp.gz


 In order to perform DR DB restorations please follow the following steps accordingly.

1.)    TURNOFF archive log mode for DR ACQ1.
EXAMPLE:
Telnet 10.96.21.17
Connect to LPAR1 DR DB ACQ1
Logon as oracle
export ORACLE_SID=ACQ1
/export/home/oracle/oracle9.2.0 [ACQ1]>> sqlplus 'sys as sysdba'

SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 7 14:33:28 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production

SQL>

Check the Archive Log Mode:-
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /disk5/ARCHIVELOG
Oldest online log sequence     2463
Next log sequence to archive   2465
Current log sequence           2465

To turn off the Archive Log Mode, execute below command accordingly.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.

Total System Global Area 2148831320 bytes
Fixed Size                   745560 bytes
Variable Size            1811939328 bytes
Database Buffers          335544320 bytes
Redo Buffers                 602112 bytes
Database mounted.


SQL> Alter database noarchivelog;
 
Database altered.

SQL> Alter database open;

Database altered.

SQL>
2.)    Telnet to DR server 10.96.21.17
3.)    Connect to DR DB ACQ1 database.
Logon as oracle
Export ORACLE_SID=ACQ1

EXAMPLE:-
/export/home/oracle/oracle9.2.0 [ACQ]>> export ORACLE_SID=ACQ1
/export/home/oracle/oracle9.2.0 [ACQ1]>> sqlplus 'prod_usr'

SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 7 14:36:50 2010

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter password:

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production

SQL> select table_name from user_tables;

  • Drop all the OLD tables from DR ACQ1 database.
  • Before Import DB, you have to alter the parameter file, ensure the dmp files location is correct and the tables name is accordingly to the Backup tables’ name.
  • The import parameter file is located at /ata2/script/impdb and the parameter file is impallacq.par
  • Those lines that are highlighted in red, you may need to ensure it pointed to the correct location.
  • Those lines that are highlighted in green, you may need to alter as per the production backup table list which is located at /ata1/ACQDMP/ and the prod table name is expallacq.log

userid=prod_usr/itec9830
BUFFER=1000
FILESIZE=2048000000
FILE=/ata1/ACQDMP/acqgrp01.dmp,
/ata1/ACQDMP/acqgrp02.dmp, \
/ata1/ACQDMP/acqgrp03.dmp, \
/ata1/ACQDMP/acqgrp04.dmp, \
/ata2/ACQDMP/acqgrp05.dmp, \
/ata2/ACQDMP/acqgrp06.dmp, \
/ata2/ACQDMP/acqgrp07.dmp, \
/ata2/ACQDMP/acqgrp08.dmp, \
/disk21/ACQDMP/acqgrp09.dmp, \
/disk21/ACQDMP/acqgrp10.dmp, \
/disk21/ACQDMP/acqgrp11.dmp
IGNORE=Y
GRANTS=N
STATISTICS=NONE
LOG=/ata2/script/impdb/impallacq<import_date>.log
TABLES=(ASE007DK    , \
ASE009DK    , \
ASE010DK    , \
ASE011DK    , \
ASE012DK    , \
ASE013DK    , \
ASE015DK    , \
ASE016DK    , \
ASE018DK    , \
.
.
.
TPICANO     , \
TPMERTRX    , \
TSE006DK)
     
4.)    execute below command to run the backup into background
EXAMPLE:-
telnet 10.96.21.17
Logon oracle
 /ata2/script/impdb
nohup imp parfile=impallacq.par  & [press enter]
or
nohup sh impallacq.sh &  [press enter]
See below output example:-
/ata2/script/impdb [ACQ1]>> nohup imp parfile=impallacq.par  &
Sending nohup output to nohup.out.
[1]     1597548
/ata2/script/impdb [ACQ1]>>

/ata2/script/impdb [ACQ1]>> nohup sh impallacq.sh &
[1]     1183920
/ata2/script/impdb [ACQ1]>> Sending nohup output to nohup.out.
/ata2/script/impdb [ACQ1]>>

You may tail the log and check to ensure the imp is running in progress without error:-
See below output example:-
/ata2/script/impdb [ACQ1]>> tail -f nohup.out
JServer Release 9.2.0.5.0 - Production

Export file created by EXPORT:V09.02.00 via direct path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
. importing PROD_USR's objects into PROD_USR
. . importing table                     "ASE007DK"        326 rows imported
. . importing table                     "ASE009DK"         42 rows imported
. . importing table                     "ASE010DK"        166 rows imported
. . importing table                     "ASE011DK"        975 rows imported
. . importing table                     "ASE012DK"      89241 rows imported
. . importing table                     "ASE013DK"     145959 rows imported
. . importing table                     "ASE015DK"          0 rows imported
. . importing table                     "ASE016DK"         76 rows imported
. . importing table                     "ASE018DK"         12 rows imported
. . importing table                     "ASE021DK"          0 rows imported
. . importing table                      "FAJCIPM"      29267 rows imported
. . importing table                      "FAJCSEQ"          1 rows imported
. . importing table                      "FAMCIPM"
5.)    Grant privileges.
grant select,update,delete, insert on to user1,user2;
grant select on to inq_usr;
grant select on to user1,user2;

6.)    Important update devp LPAR1 ACQ1 table RSE006DK > set password last change date to future date. If the Password last change date is expired date the system will keep popping up the Change Password screen.
EXAMPLE:-
SQL> desc rse006dk;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 VG_XRSE006_HDR_USER_ID                    NOT NULL CHAR(8)
 VG_QRSE006_CREATE_TIMESTAMP               NOT NULL NUMBER(17)
 VG_QRSE006_UPDATE_TIMESTAMP               NOT NULL NUMBER(17)
 VG_XRSE006_USER_ID                        NOT NULL CHAR(8)
 VG_XRSE006_GROUP_ID                       NOT NULL CHAR(8)
 VG_XRSE006_DEPT_ID                        NOT NULL CHAR(2)
 VG_XRSE006_USER_NAME                      NOT NULL CHAR(30)
 VG_XRSE006_PASSWORD                       NOT NULL CHAR(8)
 VG_9RSE006_LOGON_LOCK                     NOT NULL NUMBER(1)
 VG_9RSE006_ALLOWABLE_SESSION              NOT NULL NUMBER(2)
 VG_9RSE006_PW_LAST_CHG_DATE               NOT NULL NUMBER(8)
 VG_NRSE006_LOGON_SESSION                  NOT NULL NUMBER(4)
 VG_NRSE006_LOGON_ATTEMPTED                NOT NULL NUMBER(4)
 VG_QRSE006_L_LGN_TIMESTAMP                NOT NULL NUMBER(17)
 VG_QRSE006_F_LGN_TIMESTAMP                NOT NULL NUMBER(17)
 VG_9RSE006_PW_COUNTER                     NOT NULL NUMBER(3)
 VG_XRSE006_USER_STATUS                    NOT NULL CHAR(1)
 VG_9RSE006_EXPIRY_DATE                    NOT NULL NUMBER(8)
 VG_9RSE006_DISABLE                        NOT NULL NUMBER(1)
 VG_9RSE006_ACCESS_GROUP                   NOT NULL NUMBER(2)
 VG_9RSE006_BROKER_ID                      NOT NULL NUMBER(4)
 VG_9RSE006_BROKER_BRANCH                  NOT NULL NUMBER(3)
 VG_XRSE006_L_LGN_TERM                     NOT NULL CHAR(8)
 VG_9RSE006_FI_CODE                        NOT NULL NUMBER(6)
 VG_XRSE006_DIS_RT_PRI                     NOT NULL CHAR(1)
 VG_XRSE006_ORACLE_USR_ID                  NOT NULL CHAR(8)
 VG_XRSE006_ORACLE_SID                     NOT NULL CHAR(5)
 VG_9RSE006_LOC_ACCESS_GRP                 NOT NULL NUMBER(2)

SQL> select VG_9RSE006_PW_LAST_CHG_DATE from rse006dk where VG_XRSE006_GROUP_ID='ITGRP6' and VG_XRSE006_USER_ID='NATALIE';

VG_9RSE006_PW_LAST_CHG_DATE
---------------------------
                   20090901
Below example are updating 1 record.
SQL> update rse006dk set VG_9RSE006_PW_LAST_CHG_DATE=20100901 where VG_XRSE006_GROUP_ID='ITGRP6' and VG_XRSE006_USER_ID='NATALIE';

Below example are updating all record.
SQL> update rse006dk set VG_9RSE006_PW_LAST_CHG_DATE=20100901;

0 comments

Post a Comment