Translate

Step-by-step Cold Backup SAP DB refresh

Step-by-step Cold Backup

STEP 1: while source db is online do the following:
 -create backup of controlfile to trace
 “alter database backup controlfile to trace”.
 -create pfile from spfile
 SQL>create pfile from spfile
and push above two to target destination i.e. at $ORACLE_HOME/dbs directory.

STEP 2: Shutdown the source database


STEP 3: Copy all data files into the new directories on the new server.
You may change the file names if you want, but you must edit the controlfile to reflect the new data files
names on the new server.

    scp /u01/oradata/trgtdb/* newhost:/u01/oradata/dupdb
    scp /u01/oradata/trgtdb/* newhost:/u01/oradata/dupdb
    scp /u03/oradata/trgtdb/* newhost:/u03/oradata/dupdb
    scp /u04/oradata/trgtdb/* newhost:/u04/oradata/dupdb


STEP 4: start the source db:
STEP 5: Copy and Edit the Control file – Using the output syntax from STEP 1, modify the controlfile
creation script by changing the following:
This will put the create database syntax in the trace file directory.
The trace keyword tells oracle to generate a script containing a create controlfile command and
store it in the trace directory identified in the user_dump_dest parameter of the init.ora file.
It will look something like this:

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "PROD" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/u01/app/oracle/oradata/PROD/redo01.log'  SIZE 50M,
  GROUP 2 '/u01/app/oracle/oradata/PROD/redo02.log'  SIZE 50M,
  GROUP 3 '/u01/app/oracle/oradata/PROD/redo03.log'  SIZE 50M
-- STANDBY LOGFILE
DATAFILE
  '/u01/app/oracle/oradata/PROD/system01.dbf',
  '/u01/app/oracle/oradata/PROD/undotbs01.dbf',
  '/u01/app/oracle/oradata/PROD/sysaux01.dbf',
  '/u01/app/oracle/oradata/PROD/users01.dbf',
  '/u01/app/oracle/oradata/PROD/example01.dbf',
  '/u01/app/oracle/oradata/PROD/testtbs.dbf',
  '/u01/app/oracle/oradata/PROD/test02.dbf'
CHARACTER SET AL32UTF8
;


Old:

    CREATE CONTROLFILE REUSE DATABASE "PROD" NORESETLOGS

New:

    CREATE CONTROLFILE SET DATABASE "DUPDB" RESETLOGS


    

STEP 6: Re-names of the data files names that have changed.



CREATE CONTROLFILE SET DATABASE "DUPDB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '/u01/app/oracle/oradata/DUPDB/redo01.log'  SIZE 50M,
  GROUP 2 '/u01/app/oracle/oradata/DUPDB/redo02.log'  SIZE 50M,
  GROUP 3 '/u01/app/oracle/oradata/DUPDB/redo03.log'  SIZE 50M
-- STANDBY LOGFILE
DATAFILE
  '/u01/app/oracle/oradata/DUPDB/system01.dbf',
  '/u01/app/oracle/oradata/DUPDB/undotbs01.dbf',
  '/u01/app/oracle/oradata/DUPDB/sysaux01.dbf',
  '/u01/app/oracle/oradata/DUPDB/users01.dbf',
  '/u01/app/oracle/oradata/DUPDB/example01.dbf',
  '/u01/app/oracle/oradata/DUPDB/testtbs.dbf',
  '/u01/app/oracle/oradata/DUPDB/test02.dbf'
CHARACTER SET AL32UTF8
;

Save as db_create_controlfile.sql.

STEP 7: Create the bdump, udump and cdump directories

    cd $ORACLE_BASE/admin
    mkdir newlsq
    cd newlsq
    mkdir bdump
    mkdir udump
    mkdir cdump
    mkdir $ORACLE_BASE/oradata/dupdb
   


STEP 8: Copy-over the old init.ora file
 from the source db
 SQL>create pfile from spfile;

    scp $ORACLE_HOME/dbs/pfile newhost:$ORACLE_HOME/dbs/pfile
SETP 9: Edit init.ora file to reflect the duplicate database
 -controlfile path
 -dump file path
 -db_name

STEP 10: Start the target database with nomount option
 SQL>startup nomount pfile=' ';

     SQL>@db_create_controlfile.sql

STEP 11: Place the new database in archivelog mode.
STEP 12: Open the database with restlogs.


CREATING ORACLE PASSWORD File

d:\oracle\dpf\102\database\orapwd file=PWDDPF.ora password=dpfsap01 entries=20

How to calculate SAP/Oracle Performance parameter
http://gagankaushal.blogspot.nl/2009/03/how-to-calculate-saporacle-performance_22.html

1 comment:

Unknown said...

Hi,
Awesome useful information provides to us sap hana training institute provides hana online training with real time experts on
also with provides online server access
sap hana online training

Labels

sap hana hana database aws s4 hana hana db s4hana conversion steps sap hana azure bw4hana hana migration s4hana migration sap cloud migration steps sap hana migration steps sap hana migration to azure s4hana sap fiori fiori performance fiori erp s4 hana fiori sap fiori app sap fiori client sap fiori launchpad sap s4 hana fiori cisco ecc AI SAP AI abap dumps hana sap S/4HANA S/4HANA Conversion best sap ui5 & fiori training configuration database fiori tutorial on webide free sap ui5 & fiori training s/4 hana sap dumps sap fiori tutorial sap ui5 sap ui5 & fiori sap ui5 & fiori tutorial sara ui5cn 2367245 - Troubleshooting performance issues with SAP BPA Amazon free tier for SAP AWS setup Experience CALL_FUNCTION_NOT_FOUND CCMS Configuration and Use Create New Data Class in SAP (Oracle) Critical top SAP Abap dumps DHCP Clients Not Receiving IP Addresses Download Stack.xml HAN-DB HAN-DB-ENG High CPU Usage Due to Excessive Process Switching How To How to Start and Stop SAP Hana Tenant Database How to change SAP Hana Sql Output results are limited to 5000 Records How to perform SAP Dual Stack Split - Netweaver Inactive Objects in SAP Intercompany transactions in SAP AP / AR : Cross Company Code Transaction Interface Flapping Due to Duplex Mismatch KBA LOAD_PROGRAM_LOST MSSQL shrinking transaction log file Migrating to SAP hana database NAT Overload Causing Internet Access Failure Note 500235 - Network Diagnosis with NIPING OSPF Adjacency Not Forming PRINCE2 Foundation Sample Questions Preparing for S/4HANA Conversion and the MUST know items Push to Download Basket S/4HANA Migration Cockpit S/4JANA SAP BI Support Data Load Errors and Solutions SAP BI/BW Landscape SAP BPA SAP Basis SAP Basis Automation SAP Business Objects SAP CPS SAP Certification SAP FI Certification SAP FI Certification Sample Questions SAP HANA Admin - Cockpit SAP HANA DB Engines SAP HANA Database SAP HANA terminate session connection disconnect cancel kill hang stuck SAP Hana DB restore SAP Hana Numeric Error Codes SAP Landscape SAP Language installation SAP MM and Purchase Order Tables SAP Maintenance Planner SAP Note 500235 SAP R/3 Glossary SAP Readiness Check SAP S/4HANA 1709 Installation Files SAP S/4HANA 2023 SAP S/4HANA 2023 Installation SAP S/4HANA 2023 running SAP S/4HANA Installation SAP Scheduling SAP Solman 7.2 CHARM: SAP Support Package Stack Strategy SAP Support package SAP Upgrade SAP support stack upgrade SP stacks STORAGE_PARAMETERS_WRONG_SET SUSE/SLES/Kernel versions Setup of S/4hana 2023 TSV_TNEW_PAGE_ALLOC_FAILED TSV_TNEW_PAGE_ALLOC_FAILED error Transaction ID Unable to download an SAP Note Unix/Linux Command That Are Helpful For SAP Basis Upgrading SAP Kernel Without Downtime Upgrading windows server 2008 to windows server 2019 What is OSS Notes? SAP SNOTE Tutorial accounting agile ale idoc ale/edi archive FI documents audit auditing auditor aws aws cloud basic type bluefield approach ccms ccmsidb charm copilot datavard dbacockpit download sap note download snote edi idoc electronic data interchange enable sap archiving objects erpprep ffid firefighter fraud functional hana admin how to apply sap security note https://www.erpprep.com/ idoc install install sap fiori installation interfaces intermediate document internal control license key linux version materials management messsage niping test order type port prince2 agile prince2 agile practitioner purchasing quick info s4 hana sap abap dumps sap abbreviations sap activate certification sap activate project manager sap authorization sap aws sap brownfield sap ccms sap ccms configuration sap erp sap error sap grc sap greenfield sap internet demo system sap license sap maintenance certificate sap material management sap meaning sap mm sap mm consultant sap monthly security note sap netweaver sap network diagnostic sap niping sap note sap oss sap patch day sap performance sap performance issue sap purchase order sap s/4hana sap sales and distribution sap sap otc sap sd sap sd certification training sap sd course sap sd jobs sap sd module sap sd online training sap sd training sap sd tutorial sap sd tutorial for beginners sap security sap security note sap snote sap snote tutorial sap solution manager sap sql segregation of duties separation of duties sles slicense smc snote snote in sap system sod conflict solution manager solution maneger stop start hana database suse linux techie trex two step upgrade required waterfall