Showing posts with label Archiving. Show all posts
Showing posts with label Archiving. Show all posts

SAPDBA: Archive mode

If you work with an Oracle database with an OPS configuration (see Oracle Databases and Parallel Server Option (OPS)), you can use the Select thread/instance option to choose the parallel instance for which you want to perform one of the possible operations.

You can change both the database mode (Toggle database log mode) and the archiving mode (Toggle automatic archival).

Prerequisites

LOCAL INSTANCE: C11
DATABASE LOG MODE: archivelog

SELECTED INSTANCE: C11
INSTANCE STATE: opened
AUTOMATIC ARCHIVAL: enabled

a

Toggle database log mode

b

Toggle automatic archival

c

Show all archive information

d

Show complete archive history

e

Select thread/instance

f

Refresh information

q

Return

Features

Use the option Show complete archive history to obtain an overview of the redo entries and answer the following questions:

  • Which online redo entries are affected?
  • Which of the offline redo entries are still in the archiving directory on disk?
  • Which of the files have already been archived to another volume?
  • Which redo entries are needed to make the backup consistent?

For each database instance the following information is displayed:

  • Last complete backup of the database (LAST FULL BACKUP) and the redo log files written during the backup (HAS BEGUN AND ENDED AT LOG: an interval of log sequence numbers is usually specified for an online backup).
  • Log sequence number of the offline and online redo log files (the offline redo logs are numbered starting with First_LOG, the current online redo log file is Curr_LOG)
  • Log sequence numbers of the offline redo log files that have already been archived (up to and including the file with the log sequence number SAVED_LOGS)

If an error situation occurs in the database, making a recovery necessary, you should view this information before starting the recovery.

To display an overview of the status of the archiving process in your database, use the option Show all archive information. If the local and selected instance correspond (particularly in the case of a non-OPS configuration), the following information appears:

  • LOCAL INSTANCE
  • : Name of the local instance (e.g. C11)
    LOCAL INSTANCE STATE: Status of the instance (for example, open, open for DBAs, mounted)
    DATABASE LOG MODE: Database mode (archivelog/noarchivelog)
    AUTOMATIC ARCHIVAL: Archiving mode (enabled/disabled)
  • MAX LOGSIZE
  • : Size of the individual online redo log files (SAP delivers the online redo log files with a size of 20 MB each).
  • Archive directory details:
  • LOG DIRECTORY (path), FREE SPACE (size of available freespace), LOGS ARCHIVED (number of offline redo log files).
  • Details for online redo log files:
  • ONLINE REDO LOGS (number of redo log files), ONLINE REDO GROUPS (redo log groups), OLDEST ONLINE LOG (log number of oldest online redo log file), NEXT TO ARCHIVE (log number of next online redo log file for archiving), CURRENT LOG (Number of the current online redo log file)
  • LOG STATUS
  • : O.K. or a warning ( danger of archiver stuck or archiver stuck).

If the local and selected instance do not match, the following appears:

  • Information on the local instance:
  • LOCAL INSTANCE, LOCAL INSTANCE STATE, DATABASE LOG MODE
  • Information on the selected parallel instance:
  • INSTANCE (THREAD), AUTOMATIC ARCHIVAL, NEXT TO ARCHIVE, CURRENT LOG, LOG STATUS

Archiving Parameters

The following parameters in the init.ora file control the archiving process:

Parameter

Note

log_archive_start = true

Preset by SAP

log_archive_dest = /

Part of the file name

log_archive_format = ORACLE default

Use the ORACLE default

The parameter log_archive_start = true causes the archive process to be started automatically when the database is started. The automatic archival mode is set to enabled.

The parameter log_archive_dest defines the archive directory of the online redo log files for archiving. It is delivered with the specification of the following SAP standard path (example for a single instance installation):

BS> /saparch/arch

See Environment Variables

Prerequisites

  • The corresponding archive directory (under UNIX:
  • saparch) must exist.
  • Make sure that the directory is not write-protected.
  • Make sure that the directory has enough free space. Otherwise, the archiving process cannot archive any log files and no further actions are possible on the database (Archiver Stuck).

The Oracle database interprets the string arch as the prefix of a file name that, together with an appended sequential number (log sequence number), names the offline redo log files.

You can archive these offline redo log files (online redo log files saved in the archive directory) with the SAP utility BRARCHIVE.
See
Archiving the Offline Redo Log Files.

Configuration with SAPDBA

When automatic archiving of the online redo log files is not active, you can activate it using the SAPDBA menu. To do this, choose Archive Mode ® Toggle automatic archival.
See
SAPDBA: Archive Mode.

Configuration with SVRMGR

After starting up an instance, you can also use the Oracle program SQLDBA to start and stop the archiving process.

Command for starting the ARCH process:

SVRMGR> connect internal

SVRMGR> alter system archive log start;

SVRMGR> archive log list

When enabled appears in the automatic archival display, this means you have correctly activated the automatic archiving.

Archiving IDocs

Definition
The archiving object IDOC serves for archiving IDocs. It consists of
the IDoc data base tables:
Table Description
EDIDC contains the IDoc control record
EDID4 contains the IDoc data records
EDIDS contains the IDoc status records
and the archiving class IDOC as part of the function group EDIA.

Archiving Profile Change Records

You can archive change records for all changes to profiles.
Object Definition
The archiving object US_PROF is used to archive change records for changes to authorization
profiles from table USRH10.
Technical Information
Unless you are archiving very many change records, an archiving run should have no significant
effect on the performance of your system. A profile change record requires between 0.5 and 1
KB (uncompressed).
Dependencies
Archiving profile change records does not have any effect on other archivable data. There are no
particular dependencies or relationships between profile change records and other archivable
data.
Archiving Criterion and Retention Requirements
SAP recommends a retention period of 10 years for all user and authorization change records.
Change records are archived according to the date that you specify. All records older than the
date specified are archived. Old archives are not automatically deleted.
Log
The log files generated by archiving and deleting records are stored in the SAP spool system.
The archiving log records the number of change records archived. The delete log lists the change
records that were deleted after the archiving session.
Creating an Archive File
Choose Tools  Administration  User maintenance. and then Manual maintenance  Edit
authorizations manually (transaction SU03), then Utilities  Archive and read, and select the
archive function.
The archiving function calls the standard archiving interface, where the correct archiving object is
already specified.
You need only specify (or create) an appropriate report variant, specify the start time and printing
specifications for the background processing of the report, and schedule the report with Create
job.
See also the documentation on the archiving procedure in general. You will find this
documentation in the first section of this document.
Executing the Deletion Program
You must explicitly delete archived records after an archiving session has been successfully
completed. Be sure to check the archiving log to be sure that the archiving session has been
completed successfully. Also, be sure that you specify the same date for the deletion program.
Otherwise, too many or too few change records will be deleted

Archiving Authorization Change Records

You can archive change records for all changes to authorizations.
Object Definition
The archiving object US_AUTH is used to archive change records for changes to authorizations
from table USRH12.
Technical Information
Unless you are archiving very many change records, an archiving run should have no significant
effect on the performance of your system. An authorization change record requires about 100
bytes (uncompressed).
Dependencies
Archiving authorization change records does not have any effect on other archivable data. There
are no particular dependencies or relationships between authorization change records and other
archivable data.
Archiving Criterion and Retention Requirements
SAP recommends a retention period of 10 years for all user and authorization change records.
Change records are archived according to the date that you specify. All records older than the
date specified are archived. Old archives are not automatically deleted.
Log
The log files generated by archiving and deleting records are stored in the SAP spool system.
The archiving log records the number of change records archived. The delete log lists the change
records that were deleted after the archiving session.
Creating an Archive File
Choose Tools ---> Administration ---> User maintenance. and then Manual maintenance---> Edit
authorizations manually (transaction SU03), then Utilities ---> Archive and read, and select the
archive function.
The archiving function calls the standard archiving interface, where the correct archiving object is
already specified.
You need only specify (or create) an appropriate report variant, specify the start time and printing
specifications for the background processing of the report, and schedule the report with Create
job.
See also the documentation on the archiving procedure in general. You will find this
documentation in the first section of this document.
Executing the Deletion Program
You must explicitly delete archived records after an archiving session has been successfully
completed. Be sure to check the archiving log to be sure that the archiving session has been
completed successfully. Also, be sure that you specify the same date for the deletion program.
Otherwise, too many or too few change records will be deleted

Archiving User Change Records

You can archive change records for the following changes to user master records:
--> Authorization changes and changes to other user characteristics
--> Changes to user passwords
Object Definition
The archiving object US_USER is used to archive password change records from table USRH04.
The object US_PASS archives records of changes to user master records other than password
changes.
For example, authorization changes are recorded in a user master record. These recordings are
stored in the USRH02 table.
Technical Information
Unless you are archiving very many change records, an archiving run should have no significant
effect on the performance of your system. The user change records require the following memory
space (uncompressed):
--> US_PASS password change records: 300 bytes
-->US_USER user change records: 100 bytes
Dependencies
When you archive user change records, it does not have any effect on other archivable data.
There are no particular dependencies or relationships between user change records and other
archivable data.
Archiving Criterion and Retention Requirements
SAP recommends a retention period of 10 years for all user and authorization change records.
Change records are archived according to the date that you specify. All records older than the
date specified are archived. Old archives are not automatically deleted.
Log
The log files generated by archiving and deleting records are stored in the SAP spool system.
The archiving log records the number of change records archived. The delete log lists the change
records that were deleted after the archiving session.
Creating an Archive File
Choose Tools --> Administration --> User maintenance. Then choose Users --> Environment -->
Archive and read and then the required archiving function.
The archiving function calls the standard archiving interface, where the correct archiving object is
already specified.
You need only specify (or create) an appropriate report variant, specify the start time and printing
specifications for the background processing of the report, and schedule the report with Create
job.
See also the documentation on the archiving procedure in general. You will find this
documentation in the first section of this document.
Executing the Deletion Program
You must explicitly delete archived records after an archiving session has been successfully
completed. Be sure to check the archiving log to be sure that the archiving session has been
completed successfully. Also, be sure that you specify the same date for the deletion program.
Otherwise, too many or too few change records will be deleted.

Deletion of Vendor Consignment Records

Steps for Deletion of Consignment Records:
To delete the Consignment Record, use transaction MSK2 or menu-path:
Logistics - Materials Management - Material Master - Special Stock - Vendor Consignment - Change and select the data of the record you want to be deleted.

To start the archiving:
Process, follow the menu path:
Logistics - Materials Management –Material - Master - Other - Reorganization - Special Stock – Choose to select the records to delete and
Logistics - Materials Management - Material Master - Other - Reorganization - Special Stock - Reorganize to create archive file.

Create Archive File: Consignment Record: Data selection
a) Select Action: Archive and enter a new Variant, for example: Z_CONS_SELE_01, press 'Maintain'
b) On selection screen enter the data range (Vendor, Material, etc.) you want to archive.
c) Select the 'Create Output File' if you want the selected records outputted
d) Press the green back-arrow and enter the description of this new variantt on the screen which follows.
e) Save the variantt which brings you again to the selection screen. Press green the back arrow again.
f) To start archiving process (batch-job), press the 'Start Date' button and select the time when you want to start this process. Select 'Immediate' for instant processing and press the 'Save' button on the bottom of the 'Start Time' window.
g) Select the 'Spool Parameter' button and save entries. Eventually enter a valid printer to have the result outputted.
h) You are ready now to start the process. Press the 'Start' button and monitor the success with the 'Job Overview' button
You can also go the 'fast path' by using transaction SE38, program MMREO002 for selecting the data to archive. For large data archiving, use the background jobs and run those during off-peak times. Create Archive File: Consignment Record:

Archiving process:
a) Select Action: Archive and enter a new Variant, for example: Z_CONS_ARCH_01, press 'Maintain'
b) On selection screen, select the 'Sequential Dataset' if you selected data as described in the Data Selection step, otherwise enter the material number and plant for the deletion of a single record.
c) Select the fields 'Consignment' and 'Special Stock' and Test mode, if you want to try out first.
** This applies for SAP systems prior to release 3.1H: Select also the flag called 'BATCHES'. The SAP program MMREO020 has a bug which can be worked around with this selection. Without selecting 'BATCHES', the archived records cannot be deleted. For systems with applied Hotpackages for 3.1H this workaround is not necessary
d) Press the green back-arrow and enter the description of this new variantt on the screen which follows.
e) Save the variantt which brings you again to the selection screen. Press green back arrow again.
f) To start archiving process (batch-job), press the 'Start Date' button and select the time when you want to start this process. Select 'Immediate' for instant processing and press the 'Save' button on the bottom of the 'Start Time' window.
g) Select the 'Spool Parameter' button and save entries. Eventually enter a valid printer to have the result outputted.
h) You are ready now to start the process. Press the 'Start' button and monitor the success with the 'Job Overview' button
You can also go the 'fast path' by using transaction SE38, program MMREO020 for selecting the data to archive. For large data archiving, use the background jobs and run those during off-peak times. If you run the program online, you will see a confirmation on the status bar telling 'New Archive file created:....'

Delete Archived Records: Info Record
a) Follow the menu path: Tools - Administration - Administration - Archiving
b) Select the Object Name MM_SPSTOCK for consignment / Special Stock
c) Select the menu button 'Delete'
d) Select the menu button: 'Archive Selection'
e) Click the archive created in previous step
f) Select Start Date for process and Spool Parameters for output
g) Submit selection.
h) Check status by pressing the Job Overview button