You can also refer to SAP Note : 2345568
https://launchpad.support.sap.com/#/notes/2345568/E
Symptom
1) While restoring you will get error
2) System Copy fails with error "Unable to load database <SID>
Cause
- The source database, where the dump was taken, is larger than the target database , where it is loaded
- The 'create database' statements are different between source (dump) and target (load).
Resolution :
To increase target database size , we need to check source database size for this execute load command with 'listonly=create_sql" this will generate a list of DDL command that contain data file size and log file size.
load database SID from "/backup/SID.dump_file" with listonly=create_sql
go
If the database already exist first you have to drop that database and also need to drop device layout for Data & Log files.
***************
Command to drop devices
sp_dropdevice <device name>
go
i.e sp_dropdevie ECD_data_001
go
***************
Command to Check size of DB
sp_helpdb ECD
go
***************
Below DDL's are generated from commands (in purple) & execute these command by order
load databae ECD from "/backup/ecd_dump.dmp" with listonly=create_sql
go
or
go >> Script_DDL.sql
check file in /sybase/<SID>/ --- directory
***************
Command to create new devices
DISK INIT
name = 'ECD_data_001'
, physname = '/sybase/ECD/sapdata_1/ECD_data_001.dat'
, size = '108G'
, directio = true
go
DISK INIT
name = 'ECD_log_001'
, physname = '/sybase/ECD/saplog_1/ECD_log_001.dat'
, size = '10G'
, directio = true
***************
Command to create database
go
CREATE DATABASE ECD
ON ECD_data_001 = '10G'
LOG ON ECD_log_001 = '10G'
WITH lob_compression = 100
, inrow_lob_length = 2000
, compression = page
, index_compression = page
go
***************
Command to alter database
ALTER DATABASE ECD
ON ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
go
***************
other execute ables
master..sp_dboption ECD, 'abort tran on log full', true
go
master..sp_dboption ECD, 'allow nulls by default', true
go
master..sp_dboption ECD, 'allow wide dol rows', true
go
master..sp_dboption ECD, 'ddl in tran', true
go
master..sp_dboption ECD, 'deferred table allocation', true
go
master..sp_dboption ECD, 'full logging for all', true
go
master..sp_dboption ECD, 'allow incremental dumps', true
go
master..sp_dboption ECD, 'deallocate first text page', true
go
master..sp_dboption ECD, 'allow db suspect on rollback error', true
**************************************************
Apply transaction logs if required and issue database online command
https://launchpad.support.sap.com/#/notes/2345568/E
Symptom
1) While restoring you will get error
Data on dump will not fit into current database. Need <xxx> Mbyte database
2) System Copy fails with error "Unable to load database <SID>
Cause
- The source database, where the dump was taken, is larger than the target database , where it is loaded
- The 'create database' statements are different between source (dump) and target (load).
Resolution :
To increase target database size , we need to check source database size for this execute load command with 'listonly=create_sql" this will generate a list of DDL command that contain data file size and log file size.
load database SID from "/backup/SID.dump_file" with listonly=create_sql
go
If the database already exist first you have to drop that database and also need to drop device layout for Data & Log files.
***************
Command to drop devices
sp_dropdevice <device name>
go
i.e sp_dropdevie ECD_data_001
go
***************
Command to Check size of DB
sp_helpdb ECD
go
***************
Below DDL's are generated from commands (in purple) & execute these command by order
load databae ECD from "/backup/ecd_dump.dmp" with listonly=create_sql
go
or
go >> Script_DDL.sql
check file in /sybase/<SID>/ --- directory
***************
Command to create new devices
DISK INIT
name = 'ECD_data_001'
, physname = '/sybase/ECD/sapdata_1/ECD_data_001.dat'
, size = '108G'
, directio = true
go
DISK INIT
name = 'ECD_log_001'
, physname = '/sybase/ECD/saplog_1/ECD_log_001.dat'
, size = '10G'
, directio = true
***************
Command to create database
go
CREATE DATABASE ECD
ON ECD_data_001 = '10G'
LOG ON ECD_log_001 = '10G'
WITH lob_compression = 100
, inrow_lob_length = 2000
, compression = page
, index_compression = page
go
***************
Command to alter database
ALTER DATABASE ECD
ON ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
, ECD_data_001 = '1G'
go
***************
other execute ables
master..sp_dboption ECD, 'abort tran on log full', true
go
master..sp_dboption ECD, 'allow nulls by default', true
go
master..sp_dboption ECD, 'allow wide dol rows', true
go
master..sp_dboption ECD, 'ddl in tran', true
go
master..sp_dboption ECD, 'deferred table allocation', true
go
master..sp_dboption ECD, 'full logging for all', true
go
master..sp_dboption ECD, 'allow incremental dumps', true
go
master..sp_dboption ECD, 'deallocate first text page', true
go
master..sp_dboption ECD, 'allow db suspect on rollback error', true
**************************************************
Apply transaction logs if required and issue database online command
No comments:
Post a Comment