system copy on oracle
DESCRIPTION
Copy system on oracle data base.TRANSCRIPT
-
System Copy on Oracle Bettina Weissinger-Stelzel
June, 2013 Customer
-
2013 SAP AG. All rights reserved. 2 Customer
Disclaimer
The information in this presentation is confidential and proprietary to SAP and may not be disclosed without the permission of SAP. This presentation is not subject to your
license agreement or any other service or subscription agreement with SAP. SAP has no obligation to pursue any course of business outlined in this document or any
related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation and SAP's strategy and possible future
developments, products and/or platforms directions and functionality are all subject to change and may be changed by SAP at any time for any reason without notice. The
information on this document is not a commitment, promise or legal obligation to deliver any material, code or functionality. This document is provided without a warranty of
any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. This
document is for informational purposes and may not be incorporated into a contract. SAP assumes no responsibility for errors or omissions in this document, and shall have
no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of this document. This
limitation shall not apply in cases of intent or gross negligence. All forward-looking statements are subject to various risks and uncertainties that could cause actual results
to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they
should not be relied upon in making purchasing decisions.
-
2013 SAP AG. All rights reserved. 3 Customer
System Copy: Installation / System Copy Tools
System Provisioning Manager Installation / System Copy Tools based on NW
Product-independent, therefore only on SAP Service Marketplace (no longer on the installation master)
Might need to use additional DVDs, such as kernel DVD, SAP Note 1680045
New version every 3 months, patches as required always use the newest tools
http://service.sap.com/sltoolset -> Software Logistics Toolset 1.0 Software Provisioning Manager
-
2013 SAP AG. All rights reserved. 4 Customer
Installation / System Copy Tools
http://service.sap.com/sltoolset -> Software Logistics Toolset 1.0 Software Provisioning Manager
Guides are further down the page
Download the tools
-
2013 SAP AG. All rights reserved. 5 Customer
Definition System copy
Reasons for system copy:
For upgrade tests
Change of hardware or database
Unicode conversion
Refresh data of a development system
Types of system copy:
Homogeneous system copy OS or DB remain the same
Procedure: SAPinst with backup/restore or R3load
SAPinst + different copy procedure for DB
e.g. O2O, triple O, RMAN duplicate- or storage-based system copy
Heterogeneous system copy OS and / or DB different
Procedure: SAPinst with R3load or Oracle-specific procedure such as O2O
Triple O, RMAN duplicate for OS change
Unicode Conversion only ABAP
Homogeneous or heterogeneous system copy with Unicode conversion
-
2013 SAP AG. All rights reserved. 6 Customer
System Copy: ABAP Secure Store
As of Release 7.40 default in older versions optional (SAP Note 1639578)
SAPinst 7.40: DBConnect only via ABAP Secure Store
SAPinst < 7.40 can be activated in dialog (with 7.20 SAP kernel)
What is it? Encrypted storage for DB user with password
SAPUSER tables are no longer created
OPS$Users are required by BR*Tools and are therefore created by SAPinst. If a BR*Tools-specific Secure Store
is set up (SAP Note 1764043), the OPS$Users can be deleted. Remote_os_authent should be set to false.
Note for system copy, especially for backup/restore, SSFS_.DAT stores, for example, schema user and password
How can it be recognized? Environment variable and in DEFAULT.PFL.
RSEC_SSFS_DATAPATH=/usr/sap/QO1/SYS/global/security/rsecssfs/data
RSEC_SSFS_KEYPATH=/usr/sap/QO1/SYS/global/security/rsecssfs/key
rsdb_ssfs_connect=0 (inactive) or 1 (active)
-
2013 SAP AG. All rights reserved. 7 Customer
System Copy: Oracle Compression
Prerequisites:
Oracle 11.2.0.2 or higher
SAP Kernel 6.40 or higher. Caution: DDIC support as of 7.0x e.g. 700 SP21, see SAP Note 1436352
Software Provisioning Manager by sltoolset (SAP Service Marketplace) and newest versions of R3ldctl and R3load
Table compression (ACO):
SAPinst supports table compression at tablespace level for installation or system copy i.e. compress for OLTP can be
defined with SAPinst at tablespace (TSP) level
Table level with BR*Tools (BRSPACE 7.20 or higher)
Index compression:
No SAPinst support. Supported in BR*Tools or according to SAP Note 1109743
-
2013 SAP AG. All rights reserved. 8 Customer
System Copy SMIGR_CREATE_DDL
ABAP report executable on source system
Must be executed before every report on the source system
Generates R3load SQL files for Oracle partitions (BW systems)
Generates R3load SQL files for exception lists (table compression)
ABAP: copy as it is
Report determines SQL statements for compressed tables if TSP uncompressed or uncompressed tables if the TSPs are compressed.
Java: standard
So far there is no SAP DDIC information on the compression of tablespaces or tables
SAP Note 1436352 Oracle 11g Advanced Compression for SAP Systems
-
2013 SAP AG. All rights reserved. 9 Customer
Source system Procedure Target system
No ORACLE DB ORACLE, compression after copy with BR*Tools
ORACLE ORACLE
Uncompressed Uncompressed
TSP compression
TSP compression
Tables are
compressed
Tables are
compressed (TSP
uncompressed)
System Copy: Oracle Compression
Backup / restore or
R3load + manual check which TSPs are
compressed, then compress these again with
SAPinst for the target system
Standard system copy
(R3load)
Standard system copy
(R3load + backup/restore)
Backup / restore or
SMIGR_CREATE_DDL + standard system copy
(R3load)
-
2013 SAP AG. All rights reserved. 10 Customer
Source system Procedure Target system
Uncompressed TSP compression
Uncompressed
Tables compressed
Tables compressed Uncompressed
System Copy: Oracle Compression
Standard system copy (R3load) with TSP
compression during backup / restore after copy
compress tablespaces
No support in standard system copy (R3load),
Compression with BR*Tools (after copy) or with
manual workaround
Backup / restore + compress with BR*Tools after copy
No support in standard system copy (R3load), only
possible with workaround e.g. adapt .SQL
Backup /restore + after copy, uncompress with
BR*Tools
-
2013 SAP AG. All rights reserved. 11 Customer
System Copy: Oracle compression
Source system is not compressed -> target system compressed:
Tablespace level:
SAPinst + R3load coding takes account of objects that must not be compressed
negcpr: im DDLORA*TPL (generated from R3ldctl during export)
.
......
negtab: LICHECK MLICHECK negdat: LICHECK MLICHECK negind: LICHECK~0 MLICHECK~0 LICHECK^0 MLICHECK^0 negvie: negcpr: ARFCSSTATE ARFCSDATA ARFCRSTATE TRFCQDATA TRFCQIN TRFCQOUT TRFCQSTATE QRFCTRACE QRFCLOG NRIV
-
2013 SAP AG. All rights reserved. 12 Customer
System Copy: Oracle Compression
Source system uncompressed -> target system with individual compressed tables (idea):
SMIGR_CREATE_DDL (source system) R3load (target system)
BRTOOLS (source
system)
APPL1.SQL
ddl.sql
Manual
comparison of
files
APPL1.SQL
APPL0.SQL
USER.SQL
APPL1.TSK
Generates tables with
CREATE statement
APPL1.STR
Advantage: conversion long BLOB, as well as index compression, can also be performed
Disadvantage: manual comparison of SQL files very resource-intensive for many
tables
-
2013 SAP AG. All rights reserved. 13 Customer
System Copy: Oracle Compression
Generated DDL statements with compression using BR*Tools:
3 - Segment management ->
1 - Reorganize tables ->
6 ~ Table names (table) ............ [ARFCRSTATE]
-
2013 SAP AG. All rights reserved. 14 Customer
System Copy: Oracle Compression
Example: APPL1.SQL from SMIGR_CREATE_DDL
-
2013 SAP AG. All rights reserved. 15 Customer
System Copy: Oracle Compression
Example: ddl.sql generated by BRTOOLS
-
2013 SAP AG. All rights reserved. 16 Customer
System Copy: Oracle compression
Example: adapting .SQL files
Add generated DDL statements to .SQL files (observe sort order by table name), creating one .SQL file for the TABART of
each of the tables to be compressed -> R3load uses these SQL statements for the create.
-
2013 SAP AG. All rights reserved. 17 Customer
Index compression for a small number of indexes: determine the compression rate according to SAP Note 1109743, create new TPL
Assign these to the relevant package (can be done with configuration of the migration monitor using ddl_mapping file make sure the objects are in their own package).
crepky: CREATE UNIQUE INDEX &pri_key& ON &tab_name& ( &key_fld& /-, ) TABLESPACE &tablespace& STORAGE (INITIAL &init& NEXT &next& MINEXTENTS &minext& MAXEXTENTS &maxext& PCTINCREASE &pctinc& ) PARALLEL NOLOGGING COMPRESS COMPUTE STATISTICS ; ALTER INDEX &pri_key& NOPARALLEL LOGGING ; ALTER TABLE &tab_name& LOGGING
System Copy: Oracle Compression
-
2013 SAP AG. All rights reserved. 18 Customer
System Copy: Oracle Compression Additional Information
Should not be compressed:
Tables with more than 255 columns (Oracle requirement)
SAP pool tables (for example, ATAB, UTAB)
SAP cluster tables (for example, CDCLS, RFBLG)
INDX-type tables (for example, BALDAT, SOC3)
The ABAP source and ABAP load tables REPOSRC and REPOLOAD
The update tables VBHDR, VBDATA, VBMOD, and VBERROR
The RFC tables ARFCSSTATE, ARFCSDATA, ARFCRSTATE, TRFCQDATA, TRFCQIN
TRFCQOUT, TRFCQSTATE, QRFCTRACE, and QRFCLOG NRIV
SAP Note
SAP Note 1431296 LOB conversion and table compression with BRSPACE 7.20
-
2013 SAP AG. All rights reserved. 19 Customer
Determine the compressed tablespaces: Select tablespace_name, compression, compressed_for from dba_tablespaces;
Determine the compressed tables:
Select tables_name, compression, compressed_for from dba_tables;
Determine the index-like tables:
SELECT OWNER, TABLE_NAME FROM DBA_TAB_COLUMNS WHERE OWNER LIKE 'SAP% AND OWNER 'SYS AND OWNER 'SYSTEM AND TABLE_NAME NOT LIKE 'BIN$% AND COLUMN_NAME IN ('RELID', 'SRTF2', 'CLUSTR', 'CLUSTD') GROUP BY OWNER, TABLE_NAME
HAVING COUNT(*) = 4 ORDER BY OWNER, TABLE_NAME;
Determine the tables with LONG or LONG RAW:
Select table_name from dba_tab_columns where OWNER=SAPSR3 and data_type like LONG%;
Determine tables with > 255 columns:
SELECT TABLE_NAME FROM DBA_TAB_COLUMNS WHERE OWNER LIKE 'SAP%' GROUP BY TABLE_NAME
HAVING COUNT(*) > 254 ORDER BY TABLE_NAME;
System Copy: Oracle Compression some sql statements
-
2013 SAP AG. All rights reserved. 20 Customer
Check which tables have been compressed select a.table_name, b.compress_for, count (a.table_name) as columnAnz from dba_tab_columns a JOIN dba_tables b ON
a.table_name = b.table_name WHERE compress_for = 'OLTP' GROUP BY a.table_name, b.compress_for
HAVING count (a.table_name) > 255;
SAP Note 1438410 with script Segments_tables_CompressionExceptions
System Copy: Oracle Compression some sql statements
-
Questions?