Find in this Blog

Showing posts with label Restore. Show all posts
Showing posts with label Restore. Show all posts

Saturday, January 7, 2023

EMC-NETWOKER backinit HANA BACKUP RESTORE 19.X HANA 2.>=0

 

EMC-NETWOKER backinit HANA BACKUP RESTORE 19.X HANA 2.>=0

 

This Blog explain the restore steps of using backint from Dell EMC netwoker software

Expample:

Source machine name: s4hhdb1
Source Bakup pool: S4HPRD
Source tenant DB: SH1
Target machine name: testdbr2
Backup media server name: emcbackup137
Target tenant DB: SH1

FQDN= yoonus.local

 

The following  Changes to be made in source client GUI.. login Networker
> select source> modify the property t go to global2 add target machine host name, IP FQDN for full permission of access ( Full Permission= *@* )

 

Changes in Target machine (.utl)Files

Go to Target machine ( initSID.utl) file location and edit the file /usr/sap/TST/SYS/global/hdb/opt

 

##NSR_CLIENT=testdbr2.yoonus.local( target)
NSR_SERVER=emcbkp137.yoonus.local
NSR_CLIENT=s4hhdb1.yoonus.local ( source Client name)
NSR_RECOVER_POOL=S4HPRD (update source machine backup pool, the backup which need to restore from)
NSR_PARALLELISM=20
NSR_DEBUG_LEVEL=9
NSR_DPRINTF=true
NSR_DIAGNOSTIC_DEST = /nsr/applogs ( keep more space for this path)
NSR_DATA_VOLUME_POOL=TEST (optional)

 

Opt Location Files: /usr/sap/SID/SYS/global/hdb/opt
Following files should be in opt location: ( give full permission)
hdbbackint
initSID.utl
nsrsapsv.cfg

 

(nsrsapsv file details)

DATABASES=SYSTEMDB,TST (tenantdb)
HANA_BIN=/usr/sap/TST/HDB00/exe
HANA_DYNAMIC_PREFIX=FALSE
HANA_INSTANCE=00
HANA_MDC=TRUE
HANA_SID=TST
TENANT_ADMIN=FALSE

 

 

CHANGES IN HANA STUDIO SOURCE AND TARGET

Apply the below parameters based on respective source and target( HANA parameter in studio)

Global.ini>>backup>>

Catalog_backup_parameter_file = /usr/sap/SID/SYS/global/hdb/opt/initSID.utl
Catalog_backup_using_backint= true
Data_backup_parameter_file= /usr/sap/SID/SYS/global/hdb/opt/initSID.utl
Log_backup_parameter_file= /usr/sap/SID/SYS/global/hdb/opt/initSID.utl
Log_bakup_using_backint= true
Parallel_data_backup_backint_channels= ( based on sessions you need for fast restore)

 

HANA STUDIO CONSOLE STEPS
——————————

Restore select as tenant database

select :Recover the database a specific data backup

select: Search for the backup catalog in backinit only

Tick: Backinit system copy

SH2@SH2

DB will restart

after it will fetch the available backup logs to select and restore.

Friday, January 10, 2020

ORA-04024: self-deadlock detected while trying to mutex pin cursor 0xC1F2B19A8, ORA-01092: ORACLE instance terminated. Disconnection forced

Restoring Issue: Generated below error


ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-04024: self-deadlock detected while trying to mutex pin cursor 0xC272AF8B8
Process ID: 5473
Session ID: 384 Serial number: 35520


Reason:

It is a know  bug in Release 12.1.0.2.0. 

To clear this please apply below "_fix_control" parameter in SP file  and start restore again with new file , because once  you applied the logs,  recreating log file sequence will be changed , it will prompt the non generated archive file, avoid that restore your file from scratch and create control file again and try to recover.

SQL> alter system set “_fix_control”=’9550277:ON’;

This is the required Fix control parameter  but apply along with below Fix control parameter.

ALTER SYSTEM SET "_fix_control"=
"20107874:OFF",
"20355502:8",
"22540411:ON",
"7324224:OFF",
"7168184:OFF",
"8937971:ON",
"13077335:ON",
"13627489:ON",
"14255600:ON",
"14595273:ON",
"18405517:2",
"5099019:ON",
"5705630:ON",
"6055658:OFF",
"6120483:OFF",
"6399597:ON",
"6430500:ON",
"6440977:ON",
"6626018:ON",
"6972291:ON",
"7658097:ON",
"9196440:ON",
"9495669:ON",

"9550277:ON" scope=spfile;


Thanks
Yoonus



Saturday, October 13, 2018

ORA-01159: file is not from same database as previous files - wrong database id

SQL> @E:\yoonus.sql
ORACLE instance started.

Total System Global Area 1358954496 bytes
Fixed Size                  2077456 bytes
Variable Size             687869168 bytes
Database Buffers          654311424 bytes
Redo Buffers               14696448 bytes
CREATE CONTROLFILE REUSE DATABASE "GEP" NORESETLOGS  ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01159: file is not from same database as previous files - wrong database id
ORA-01517: log member: 'E:\ORACLE\GEP\ORIGLOGA\LOG_G11M1.DBF'



SOLUTION:

Change the control file value from :( if you are using newly installed system's log file change as follows)

CREATE CONTROLFILE REUSE DATABASE "GEP" NORESETLOGS  ARCHIVELOG  to

CREATE CONTROLFILE REUSE SET DATABASE "GEP" RESETLOGS  ARCHIVELOG


SQL> @E:\yoonus.sql
ORACLE instance started.

Total System Global Area 1358954496 bytes
Fixed Size                  2077456 bytes
Variable Size             687869168 bytes
Database Buffers          654311424 bytes
Redo Buffers               14696448 bytes

Control file created.

SQL>

Thanks
Yoonus

ORA-01166: file number 255 is larger than MAXDATAFILES (254)

SQL> @E:\yoonus.sql
ORACLE instance started.

Total System Global Area 1358954496 bytes
Fixed Size                  2077456 bytes
Variable Size             687869168 bytes
Database Buffers          654311424 bytes
Redo Buffers               14696448 bytes
CREATE CONTROLFILE REUSE DATABASE "GEP" NORESETLOGS  ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01166: file number 255 is larger than MAXDATAFILES (254)
ORA-01110: data file 255: 'X:\GEPDB1010\SR3.DATA226'


Solution:

Edit the control file and increase the number of MAXDATAFILE VALUES



STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "GEP" NORESETLOGS  ARCHIVELOG
    MAXLOGFILES 255
    MAXLOGMEMBERS 3
    MAXDATAFILES 254 increase to more than your data files count
    MAXINSTANCES 50
    MAXLOGHISTORY 1168
LOGFILE
  GROUP 1 (
    'E:\ORACLE\GEP\ORIGLOGA\LOG_G11M1.DBF',
    'E:\ORACLE\GEP\MIRRLOGA\LOG_G11M2.DBF'
  ) SIZE 50M,
  GROUP 2 (
    'E:\ORACLE\GEP\ORIGLOGB\LOG_G12M1.DBF',
    'E:\ORACLE\GEP\MIRRLOGB\LOG_G12M2.DBF'


Thanks
Yoonus

Tuesday, April 3, 2018

brrestore from EMC Networker and DataDomain

BRRESTORE from Networker software: ORACLE DATABASE.
Scenario explaining how to restore using backup from EMC DD& Netwroker using BRrestore.  Database should be backed up using backnit tools from EMC. The backup should be completed successfully at the application level as well as database level. User can check the backup status using TXN db12 and verify the status.
Source system and target system should be the same database and patch level as well OS also. (recommended) try to keep the same drive as source system.
On the target machine EMC networker backup should be configure and backed up before restoring the source.
STEP1:
initSID.utl File must be created while configuring the backup to the target machine. Edit the  “initSID.utl” file and add the following parameter. Normally the file located in to % ORACLE_HOME% database folder
NSR_NWPATH = C:\Program Files\EMC NetWorker\nsr\bin\
NSR_DEVICE_INTERFACE=DATA_DOMAIN
NSR_RECOVER_POOL = GEP2018
client = eccsapgrp.TEST.local 
server = backupsrvr.TEST.local
debug_level=9
verbose=TRUE
#NSR_DPRINTF=TRUE
Above parameter details:
NSR_NWPATH= networker installed path in target machine
NSR_RECOVER_POOL = source system data backup pool

Client= sources system hostname  FQN if configured.
Server = networker backup server(media server)


Save the file after adding the parameter, in to same location.File should have read and write access to the ora_dba user and sapSIDadm user.
TOTAL FILE details below.

###########################################################################
#
# This is the <init>.utl file.
#
# This file contains settings for the NetWorker Module for SAP with
# Oracle (a.k.a. NMSAP).
#
# Note: Comments have a "#" in the first column.
#
###########################################################################

# Default Value: 8
# Valid Values: > 0 integer
# Number of simultaneous savesets/savestreams to send to server.
# Be sure your server and devices are configured to support at least
# as many streams.
#
# parallelism = 8
parallelism = 30

# Default Value: no
# Valid Values: no/yes
# Group saveset by file system
# If set to 'yes', savesets parameter will be ignored
#
# ss_group_by_fs = yes
ss_group_by_fs = FALSE

# Additional configuration options.
# These are optional fields.
#
NSR_NWPATH = C:\Program Files\EMC NetWorker\nsr\bin\
NSR_DEVICE_INTERFACE=DATA_DOMAIN
NSR_RECOVER_POOL = GEP2018
client = eccsapgrp.geepas.local
server = backupsrvr.geepas.local
debug_level=9
verbose=TRUE
#NSR_DPRINTF=TRUE


STEP 2:
Copy xxx.anf file to the %sapdata_home%\sapbackup. .anf file either located in to source system %sapdata_home%\sapbackup – folder or into the backup location where you backed up last backup.
Brrestore will perform the restore based on .anf file.
Once place the .anf file into the sapbackup folder open cmd with administrative right and run the below scrip:
You must edit the script based on the file location and .anf file name.
brrestore -p C:\oracle\GEP\102\database\initGEP.sap -d util_file -r C:\oracle\GEP\102\database\initGEP.utl -m full -b beybvnzl.anf -m full -m all=X:\restore -c force
Above script I am restoring all 6TB database data file in to the X: drive\restore folder. In this scenario all data file will be restored into the X:\restore folder without parent and subfolder. Once restore complete you can see the logs into the same sapbackup folder with file extension .rsb.


datadomain
=========================
ddboost show stats interval 2      =
=========================

Once all data file completely restored into the drive you need to restore archive logs from the backup location.
STEP3:
After that create control file using control file script.

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "GEP" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 255
    MAXLOGMEMBERS 3
    MAXDATAFILES 508
    MAXINSTANCES 50
    MAXLOGHISTORY 93484
LOGFILE
  GROUP 1 (
    'E:\ORACLE\GEP\ORIGLOGA\LOG_G11M1.DBF',
    'F:\ORACLE\GEP\MIRRLOGA\LOG_G11M2.DBF'
  ) SIZE 150M,
  GROUP 2 (
    'E:\ORACLE\GEP\ORIGLOGB\LOG_G12M1.DBF',
    'F:\ORACLE\GEP\MIRRLOGB\LOG_G12M2.DBF'
  ) SIZE 150M,
  GROUP 3 (
    'E:\ORACLE\GEP\ORIGLOGA\LOG_G13M1.DBF',
    'F:\ORACLE\GEP\MIRRLOGA\LOG_G13M2.DBF'
  ) SIZE 150M,
  GROUP 4 (
    'E:\ORACLE\GEP\ORIGLOGB\LOG_G14M1.DBF',
    'F:\ORACLE\GEP\MIRRLOGB\LOG_G14M2.DBF'
  ) SIZE 150M
-- STANDBY LOGFILE
DATAFILE
  'X:\restore\SYSTEM.DATA1',
  'X:\restore\UNDO.DATA1',
  'X:\restore\SYSAUX.DATA1',
  'X:\restore\SR3.DATA1',
  'X:\restore\SR3.DATA2',
  'X:\restore\SR3.DATA3'
CHARACTER SET UTF8
;

SQL> @h:\geP.sql
ORACLE instance started.
Total System Global Area 1.0452E+10 bytes
Fixed Size                  2094864 bytes
Variable Size            5268048112 bytes
Database Buffers         5167382528 bytes
Redo Buffers               14680064 bytes
Control file created.


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQ
L> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'H:\GED\V\ORACLE\GED\SAPDATA1\SYSTEM_1\SYSTEM.DATA1'

SQL> recover database using backup controlfile;
ORA-00279: change 3368505684 generated at 03/11/2018 18:30:18 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF
ORA-00280: change 3368505684 for thread 1 is in sequence #51014

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF
ORA-00279: change 3368506852 generated at 03/11/2018 18:38:41 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51015_713190785.DBF
ORA-00280: change 3368506852 for thread 1 is in sequence #51015
ORA-00278: log file 'G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF' no
longer needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 3368506852 generated at 03/11/2018 18:38:41 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51015_713190785.DBF
ORA-00280: change 3368506852 for thread 1 is in sequence #51015

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> alter database open resetlogs;
Database altered.
SQL>


>.RSB file output

BR0401I BRRESTORE 7.20 (29)
BR0405I Start of file restore: reyebtvf.rsb 2018-04-02 17.16.43
BR0484I BRRESTORE log file: H:\oracle\GEP\sapbackup\reyebtvf.rsb

BR0101I Parameters

Name                           Value

oracle_sid                     GEP
oracle_home                    C:\oracle\GEP\102
oracle_profile                 C:\oracle\GEP\102\database\initGEP.ora
sapdata_home                   H:\oracle\GEP
sap_profile                    C:\oracle\GEP\102\database\initGEP.sap
recov_interval                 30
restore_mode                   ALL=X:\restore
backup_dev_type                util_file
util_par_file                  C:\oracle\GEP\102\database\initGEP.utl
system_info                    gepadm TESTGEP Windows 6.0 Build 6001 Service Pack 1 AMD64
oracle_info                    GEP 10.2.0.5.0
make_info                      NTAMD64 OCI_10201_SHARE Jan 16 2013
command_line                   brrestore -p C:\oracle\GEP\102\database\initGEP.sap -d util_file -r C:\oracle\GEP\102\database\initGEP.utl -m full -b beybvnzl.anf -m full -m all=X:\restore -c force

BR0460W Termination message not found in H:\oracle\GEP\sapbackup\beybvnzl.anf - log file incomplete (this is OK if the log file has been restored)

BR0456I Probably the database must be recovered due to restore from online backup

BR0280I BRRESTORE time stamp: 2018-04-02 17.16.43
BR0407I Restore of database: GEP
BR0408I BRRESTORE action ID: reyebtvf
BR0409I BRRESTORE function ID: rsb
BR0449I Restore mode: ALL=X:\restore
BR0419I Files will be restored from backup: beybvnzl.anf 2018-03-21 21.00.49
BR0416I 296 files found to restore, total size 5933436.313 MB
BR0421I Restore device type: util_file
BR0134I Unattended mode with 'force' active - no operator confirmation allowed

BR0280I BRRESTORE time stamp: 2018-04-02 17.16.43
BR0229I Calling backup utility with function 'restore'...
BR0278I Command output of 'C:\usr\sap\GEP\SYS\exe\uc\NTAMD64\backint.exe -u GEP -f restore -i H:\oracle\GEP\sapbackup\.reyebtvf.lst -t file -p C:\oracle\GEP\102\database\initGEP.utl -c':

BR0280I BRRESTORE time stamp: 2018-04-03 05.02.11
#FILE..... L:\ORACLE\GEP\SAPDATA3\SR3_246\SR3.DATA246  X:\restore\SR3.DATA246
#RESTORED. 1521651712

BR0280I BRRESTORE time stamp: 2018-04-03 05.02.11
BR0374I 96 of 96 files restored by backup utility
BR0230I Backup utility called successfully

BR0406I End of file restore: reyebtvf.rsb 2018-04-03 05.02.11
BR0280I BRRESTORE time stamp: 2018-04-03 05.02.11
BR0403I BRRESTORE completed successfully with warnings

Saturday, March 17, 2018

CLI recover from EMC networker media server

Test Scenario: GEPARCH1_1538190_819962162.DBF  missing File cannot find in DD by browsing NW client

Login to NW Media server:

CHECK THE MISSIGN FILE NAME  FROM DD  CMD blow
========================
C:\logs>mminfo -avot -q client=eccsapgrp.xxxx.local -r name,ssid,ssid(50),savetime,ssbrowse,ssretent,volume | findstr GEPARCH1_1538190_819962162.DBF

Check the Date n time

C:\logs>nsrinfo -X all -n all eccsapgrp.geepas.local | findstr GEPARCH1_1538190_819962162.DBF

output:

G:\oracle\GEP\oraarch\GEPARCH1_1538190_819962162.DBF, date=1520641855 3/10/2018 4:30:55 AM

C:\logs>mminfo -avot -q client=eccsapgrp.geepas.local -r name,ssid,ssid(50),savetime,ssbrowse,ssretent,volume,nsavetime | findstr 15206418

output:
backint:GEP                    1235429127 1235429127                                        3/10/2018 4/10/2018 4/10/2018 GEPONLINE2017.00

Recover particular file:GEPARCH1_1538190_819962162.DBF 

C:\logs>recover -d C:\logs -S 1235429127 G:\oracle\GEP\oraarch\GEPARCH1_1538190_819962162.DBF
Recovering a subset of 26 files within / into C:\logs
Recover start time: 3/17/2018 3:34:34 PM
Requesting 1 recover session(s) from server.
libDDBoost version: major: 3, minor: 0, patch: 1, engineering: 1, build: 459919
C:\logs\G\oracle\GEP\oraarch\GEPARCH1_1538190_819962162.DBF
C:\logs\G\oracle\GEP\oraarch\
C:\logs\G\oracle\GEP\
C:\logs\G\oracle\
C:\logs\G\
Received 5 matching file(s) from NSR server `backupsrvr.geepas.local'
Recover completion time: 3/17/2018 3:35:38 PM


Thanks
Yoonus

Monday, March 12, 2018

HETROGENEOUSE SAP/ORACLE ONLINE DATABASE RESTORE...

RESTORING ONLINE DATABASE backup  TO DIFFRENT SID . WITH ARCHIVE LOGS.

"This scenario, my source system sid is GED and target system sid is GEP"
 
eg: RESTORE GED DATABSE TO GEP SYSTEM
RESTORE ALL DATA FILE INTO  THE DRIVE ANY LOCATION AND CREATE CONTROL FILE SCRIPT AS YOU RESTORED THE FILE.
IF RESTORING TO DIFFRENT SID  CHANGE THE FOLLOWING VALUES IN PARAMETER

init(SID).ora{FILE:\DATABASE\}
log_archive_dest_1='LOCATION=G:\oracle\GEP\oraarch\GEDarch'  (orginal archive file name was 'GEParch' but I am restoring GED db sid , so it will prompt  the archvie file name starting with GEParch since your target system installed as GEP sid and path defined as GEParch)
If your data files numbers morethan 256 COUNT  please increase the number of  'db_files' IN [parameter ]


Control file creation scripts as follows:
=====================
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "GEP" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 255
    MAXLOGMEMBERS 3
    MAXDATAFILES 254
    MAXINSTANCES 50
    MAXLOGHISTORY 5842
LOGFILE
  GROUP 1 (
    'H:\GED\V\oracle\GED\ORIGLOGA\LOG_G11M1.DBF',
    'H:\GED\V\oracle\GED\MIRRLOGA\LOG_G11M2.DBF'
  ) SIZE 50M,
  GROUP 2 (
    'H:\GED\V\oracle\GED\ORIGLOGB\LOG_G12M1.DBF',
    'H:\GED\V\oracle\GED\MIRRLOGB\LOG_G12M2.DBF'
  ) SIZE 50M,
  GROUP 3 (
    'H:\GED\V\oracle\GED\ORIGLOGA\LOG_G13M1.DBF',
    'H:\GED\V\oracle\GED\MIRRLOGA\LOG_G13M2.DBF'
  ) SIZE 50M,
  GROUP 4 (
    'H:\GED\V\oracle\GED\ORIGLOGB\LOG_G14M1.DBF',
    'H:\GED\V\oracle\GED\MIRRLOGB\LOG_G14M2.DBF'
  ) SIZE 50M
-- STANDBY LOGFILE
DATAFILE
  'H:\GED\V\oracle\GED\SAPDATA1\SYSTEM_1\SYSTEM.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA1\UNDO_1\UNDO.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA1\SYSAUX_1\SYSAUX.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_1\SR3.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_2\SR3.DATA2',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_3\SR3.DATA3',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_4\SR3.DATA4',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_5\SR3.DATA5',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_6\SR3.DATA6',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_7\SR3.DATA7',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_8\SR3.DATA8',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_9\SR3.DATA9',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_10\SR3.DATA10',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_11\SR3.DATA11',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_12\SR3.DATA12',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_13\SR3.DATA13',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_14\SR3.DATA14',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_15\SR3.DATA15',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_16\SR3.DATA16',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_1\SR3701.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_2\SR3701.DATA2',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_3\SR3701.DATA3',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_4\SR3701.DATA4',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_5\SR3701.DATA5',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_6\SR3701.DATA6',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_7\SR3701.DATA7',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_8\SR3701.DATA8',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_9\SR3701.DATA9',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_10\SR3701.DATA10',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_11\SR3701.DATA11',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_12\SR3701.DATA12',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_13\SR3701.DATA13',
  'H:\GED\V\oracle\GED\SAPDATA3\SR3701_14\SR3701.DATA14',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3USR_1\SR3USR.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_1\SR3701X.DATA1',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_2\SR3701X.DATA2',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_3\SR3701X.DATA3',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_4\SR3701X.DATA4',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_5\SR3701X.DATA5',
  'H:\GED\V\oracle\GED\SAPDATA1\SYSAUX_2\SYSAUX.DATA2',
  'H:\GED\V\oracle\GED\SAPDATA1\SYSTEM_2\SYSTEM.DATA2',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_6\SR3701X.DATA6',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_7\SR3701X.DATA7',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_17\SR3.DATA17',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_18\SR3.DATA18',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_19\SR3.DATA19',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_8\SR3701X.DATA8',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_20\SR3.DATA20',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_21\SR3.DATA21',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_22\SR3.DATA22',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_23\SR3.DATA23',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_24\SR3.DATA24',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_25\SR3.DATA25',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_26\SR3.DATA26',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_27\SR3.DATA27',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_28\SR3.DATA28',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_29\SR3.DATA29',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_30\SR3.DATA30',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_31\SR3.DATA31',
  'H:\GED\V\oracle\GED\SAPDATA4\SR3701X_9\SR3701X.DATA9',
  'H:\GED\V\oracle\GED\SAPDATA2\SR3_32\SR3.DATA32'
CHARACTER SET UTF8;
================================================================
restore using below commands
SQL> @h:\ged.sql
ORACLE instance started.
Total System Global Area 1.0452E+10 bytes
Fixed Size                  2094864 bytes
Variable Size            5268048112 bytes
Database Buffers         5167382528 bytes
Redo Buffers               14680064 bytes
Control file created.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

SQL> alter database open resetlogs;

alter database open resetlogs
*
ERROR at line 1:
ORA-01195: online backup of file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'H:\GED\V\ORACLE\GED\SAPDATA1\SYSTEM_1\SYSTEM.DATA1'

SQL> recover database using backup controlfile;
ORA-00279: change 3368505684 generated at 03/11/2018 18:30:18 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF
ORA-00280: change 3368505684 for thread 1 is in sequence #51014

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF
ORA-00279: change 3368506852 generated at 03/11/2018 18:38:41 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51015_713190785.DBF
ORA-00280: change 3368506852 for thread 1 is in sequence #51015
ORA-00278: log file 'G:\ORACLE\GEP\ORAARCH\GEDARCH1_51014_713190785.DBF' no
longer needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 3368506852 generated at 03/11/2018 18:38:41 needed for thread
1
ORA-00289: suggestion : G:\ORACLE\GEP\ORAARCH\GEDARCH1_51015_713190785.DBF
ORA-00280: change 3368506852 for thread 1 is in sequence #51015

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> alter database open resetlogs;
Database altered.
SQL>

For update SAP user Login  Follow the below link:

https://wrongcodes.blogspot.com/2015/07/ops-user-id-creation-after-backup.html




THANKS
YOONUS CHANGOTH
https://www.linkedin.com/in/yoonusabdulla/
 

Thursday, May 11, 2017

Recover the Database without Archive Log







Recover the Database without Archive Log



When we did a cloning/recover the database with noarchivelog mode, we got the problem that some datafile need to be recover. It will be difficulty since no archivelog that can help us to recover it. Otherwise we can copy all datafiles from offline backup of the source database. But it will takes time to copy/ftp/restore especially if the database size are hundreds GB or even TB. But there is a solution to recover the database with noarchivelog mode, please check this out : 
When we did a cloning, startup nomount :  

$ sqlplus '/as sysdba' 
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Apr 13 13:54:43 2010 
Copyright (c) 1982, 2007, Oracle. All Rights Reserved. 
Connected to an idle instance. 
SQL> startup nomount pfile=initMYDB.ora
ORACLE instance started. 
Total System Global Area 5251268608 bytes
Fixed Size 2091368 bytes
Variable Size 1040189080 bytes
Database Buffers 4194304000 bytes
Redo Buffers 14684160 bytes 

 


Create New control File:
      
SQL> @createctl.sql 
Control file created. 
Since the cloning come from offline backup and the SID in target db as same as source db so
we don’t need to resetlogs, but the one of datafile need to recover : 

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/u01/system01.dbf' 
 Try To recover, but we don’t have the archivelog file that needed : 

SQL> recover database using backup controlfile until cancel;
ORA-00279: change 5991183372639 generated at 04/13/2010 13:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/arch1_1125_714320021.dbf
ORA-00280: change 5991183372639 for thread 1 is in sequence #1125 
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf' 
ORA-01112: media recovery not started 
Try to open resetlogs, we still got the same error  
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf' 
To fix this issue :
1. Shutdown immediate 
     
SQL> Shutdown immediate 
2. Remark the parameter in initMYDB.ora:   
    - UNDO_MANAGEMENT=AUTO - UNDO_TABLESPACE=OLD_UNDOTS
3. Add the parameter in initMYDB.ora :          
    - UNDO_MANAGEMENT=MANUAL - _ALLOW_RESETLOGS_CORRUPTION = TRUE - _ALLOW_ERROR_SIMULATION = TRUE
4. Startup database with new init.ora :          
$ sqlplus '/as sysdba' 
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Apr 13 16:06:56 2010 
Copyright (c) 1982, 2007, Oracle. All Rights Reserved. 
Connected to an idle instance. 
SQL> startup mount pfile=initMYDB.ora
ORACLE instance started. 
Total System Global Area 5251268608 bytes
Fixed Size 2091368 bytes
Variable Size 1040189080 bytes
Database Buffers 4194304000 bytes
Redo Buffers 14684160 bytes
Database mounted.
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 5991183372639 generated at 04/13/2010 13:51:42 needed for
thread 1
ORA-00289: suggestion :
/u02/db/10.2.0/dbs/arch1_1125_714320021.dbf
ORA-00280: change 5991183372639 for thread 1 is in sequence #1125 
Specify log: {=suggested | filename | AUTO | CANCEL}
cancel
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/u01/system01.dbf' 
ORA-01112: media recovery not started 
SQL> alter database open resetlogs; 
Database altered. 
5. Now the database already startup with Manual undo management.
6. Create new UNDO Tablespace 
  
SQL> Create UNDO tablespace NEW_UNDOTS datafile '/u02/undo01.dbf' size 2048M; 
7. Take offline the OLD Undo Tablespace :   
 
 
 

SQL> alter tablespace OLD_UNDOTS offline; 
8. Take online the NEW Undo Tablespace :   
SQL> alter tablespace NEW_UNDOTS ; 
9. Shutdown the database :       
SQL> shutdown immediate; 
10. Edit the initMYDB.ora :   
    + Remark the parameter :
    - UNDO_MANAGEMENT=MANUAL
    - _ALLOW_RESETLOGS_CORRUPTION = TRUE
    - _ALLOW_ERROR_SIMULATION = TRUE
        + Add and edit the parameter : 
    UNDO_MANAGEMENT=AUTO
    UNDO_TABLESPACE=NEW_UNDOTS  
11. Startup the database : 
 

SQL> startup 
12. The database will startup with the NEW Undo tablespace, change the default undo tablespace :  
 
 

SQL> alter system set undo_tablespace=NEW_UNDOTS; 
13. Then we can drop the OLD Undo tablespace :    
SQL> drop tablespace OLD_UNDOTS including contents and datafiles;

14. Good Luck ;)