Find in this Blog
Saturday, February 13, 2021
How do you cancel a running backup in HANA
Thursday, November 12, 2020
447: backup could not be completed: [110203] Not all data could be written: Expected 4096 but transferred 0
EMC NOTWORKER 19X
====================
cat /nsr/applogs/nsrsapsv_GBP_2020_11_12.16_13_01_158295.log
* 447: backup could not be completed: [110203] Not all data could be written: Expected 4096 but transferred 0, [110515] Backint missing software version tag SQLSTATE: HY000
(pid = 158295) (11/12/20 16:12:48.511314) The '/usr/sap/GBP/HDB00/exe/hdbsql' program exited with error status 3.
The backup for 'GBP:SYSTEMDB' failed.
* 447: backup could not be completed: [110515] Backint missing software version tag, [110203] Not all data could be written: Expected 4096 but transferred 0 SQLSTATE: HY000
(pid = 158295) (11/12/20 16:13:01.315609) The '/usr/sap/GBP/HDB00/exe/hdbsql' program exited with error status 3.
The backup for 'GBP:GBP' failed.
(pid = 158295) (11/12/20 16:13:01.315876) At least one of the database backups failed.
(pid = 158295) (11/12/20 16:13:01.316048) NMSAP full backup failed.
Saturday, October 13, 2018
ORA-01159: file is not from same database as previous files - wrong database id
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)
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
datadomain
=========================
ddboost show stats interval 2 =
=========================
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.
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>
Saturday, March 17, 2018
CLI recover from EMC networker media server
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...
"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.
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'
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; 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'
1. Shutdown immediate
SQL> Shutdown immediate
- - UNDO_MANAGEMENT=AUTO
- UNDO_TABLESPACE=OLD_UNDOTS
- - UNDO_MANAGEMENT=MANUAL
- _ALLOW_RESETLOGS_CORRUPTION = TRUE
- _ALLOW_ERROR_SIMULATION = TRUE
$ 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.
6. Create new UNDO Tablespace
SQL> Create UNDO tablespace NEW_UNDOTS datafile '/u02/undo01.dbf' size 2048M;
SQL> alter tablespace OLD_UNDOTS offline;
SQL> alter tablespace NEW_UNDOTS ;
SQL> shutdown immediate;
- + 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
SQL> startup
SQL> alter system set undo_tablespace=NEW_UNDOTS;
SQL> drop tablespace OLD_UNDOTS including contents and datafiles;
14. Good Luck
Wednesday, July 13, 2016
[110026] The state 'ManagerSnapshotExists' of the BackupManager does not allow the requested operation SQLSTATE: HY000
select BACKUP_ID from "SYS"."M_BACKUP_CATALOG" where entry_type_name ='complete data backup' and state_name = 'running' order by sys_start_time desc
Execute this comment if any backup running cancel it.
Go tho this SNOTE:
1703435 - Generating a copy of a running instance with database snapshots
Comment: As of SAP HANA Support Package Stack 07, the procedure described in this SAP Note for copying a database is no longer recommended. For more information about the recommended database copy procedure, as well as about storage snapshots, see the SAP HANA Administration Guide.
The system landscapes of the source and target database have to be compatible. This means that the number of nodes and the number and types of services (such as index server) have to match.
The source database must be running, the target database must be offline.
You have to be logged on to the source database with a user who has the BACKUP ADMIN privilege.
To duplicate a running SAP HANA database using a copy of the data area, you have to use a database snapshot. A database snapshot is a consistent state that is saved to the data area of the database.
Creating a snapshot
To create a database snapshot in a running SAP HANA database, use the following SQL command:
BACKUP DATA CREATE SNAPSHOT
Take into account that only one database snapshot at a time can exist in an SAP HANA database. This also means that you cannot create a data backup if a database snapshot exists in the SAP HANA database.
If a snapshot already exists, or if a backup is currently running, when you execute the command, the system issues the error message "general error: Backup error: The state 'ManagerSnapshotExists' of the BackupManager does not allow the requested operation".
Removing a snapshot
To remove a database snapshot from a running SAP HANA database, use the following SQL command:
BACKUP DATA DROP SNAPSHOT
If no snapshot exists, calling this command leads to the error message "general error: Backup error: The state 'ManagerIdle' of the BackupManager does not allow the requested operation".
Activating a snapshot
To activate the consistent state that you saved in a database snapshot in the target database, use the following commands:
hdbnsutil -useSnapshot
and
hdbnsutil -convertTopology
hdbnsutil -useSnapshot replaces the current dataset by the dataset that is stored in the database snapshot.
If there is no database snapshot, calling hdbnsutil leads to an error message.
hdbnsutil -convertTopology carries out the required adjustments in the internal structures to the target system.
The database snapshot is removed during activation. As a result, it is neither required nor possible to manually remove the database snapshot in the target database.
Procedure to create a copy of a database using a database snapshot
1. In the source database, create a snapshot using the following SQL command:
BACKUP DATA CREATE SNAPSHOT
2. Copy all the files from the data area of the source database to the respective directory on the target database.
The directory name of the data area is defined in the configuration parameter basepath_datavolumes (in the configuration file global.ini, section persistence).
You have to make sure that the operating system user <SID>adm of the target database has read and write access to the files in the data area of the target database after copying.
3. Delete the snapshot in the source database using the following SQL command:
BACKUP DATA DROP SNAPSHOT
4. In the target database, delete existing file and log backup files.
The directory name for data backup files is defined in the configuration parameter basepath_databackup; the directory name for log backup files is defined in the configuration parameter basepath_logbackup. Both parameters are in the section persistence of the configuration file global.ini.
If in the directory -d $DIR_INSTANCE/../SYS/global/hdb/metadata
the file BackupCatalog.xml exists, delete it.
5. Execute the following commands in a command line environment of the target database:
hdbnsutil -useSnapshot
hdbnsutil -convertTopology
6. Start the target database.
Take into account:
After you activate a database snapshot in the target database, carry out a data backup as soon as possible because a recovery is not possible otherwise.
If a permanent license is installed in the source database, you have to install a new license in the target database.