`
Jack Wu
  • 浏览: 891942 次
  • 来自: ...
社区版块
存档分类
最新评论

BASIS-如何删除SAP在用户修改表结构时创建的临时表

阅读更多

当用户修改表结构时,sap会自动创建临时表,临时表的名称为:'QCM' +表名。这个临时表用于先将需要改变结构的表数据保存下来,当新表结构完成后,系统会将临时表的数据拷贝回数据表。

临时表在sap3.0版本前始终保存在数据库中,3.0以后版本只有在数据拷贝不成功时才保存在数据库中,否则会自动删除。

如果要删除这些临时表,用户可以执行Tcode:se14->Extras ® Invalid temp. table 进行查询和删除。

注意:当你要进行系统拷贝时,你必须在"export", 必须从系统中删除这些QCM表,否则导入会出错.

sap关于修改表结构时发生的操作说明如下:

Conversion Process 

Table TAB was changed in the ABAP Dictionary. At this time the length of a field (Field 3) was reduced from 60 to 30 places. The ABAP Dictionary therefore contains an active version (where the field has a length of 60 places) and a revised version (where the field only has a length of 30 places) of the table.

The active version of the table is created in the database, that is Field 3 currently has 60 places in the database. Two secondary indexes that were also created in the database are defined in the ABAP Dictionary for the table. The table already contains data.

Reducing the length of a field results in a table conversion. The table is converted in a series of 7 steps.

Step 1: Set Lock

The table is locked against further structural changes. This lock mechanism prevents a new structural change from being made before the conversion has finished correctly.

All the views that use the table are deleted from the database.

Step 2: Rename Table

The table is renamed in the database. All indexes on the table are deleted. The name of the new table consists of the prefix QCM and the table name. The name of the temporary table for table TAB is thus QCMTAB. If in the database a table named QCMTAB already exists (for example, from a previous conversion attempt), this table is deleted before renaming the table.

This graphic is explained in the accompanying text

Step 3: Activating Tables

The revised version of the table is activated in the ABAP Dictionary. Thus the ABAP Dictionary contains only one active version of table TAB, in which field 3 has a length of 30.

The table TAB is created in the database with its new structure under the name QCM8TAB. In addition, the primary index of the table is created in the database. The structure of database table QCM8TAB thus corresponds to the structure of table TAB in the ABAP Dictionary after this step. The database table does not, however, contain any data.

This graphic is explained in the accompanying text

Step 4: Reload Data

The data is copied from table QCMTAB to table QCM8TAB (with the ABAP command MOVE-CORRESPONDING). After this step, the data is present in both tables, requiring additional space. Before converting large tables, you should therefore check whether the relevant tablespace has enough space left.

You can find information about how existing entries are handled in a field when the field type changes in the ABAP documentation about the MOVE-CORRESPONDING statement.

When you copy data from table QCMTAB into table QCM8TAB, a database commit is stored after 16 MB. The conversion process therefore needs 16 MB of resources in the rollback segment.

This graphic is explained in the accompanying text

When the length of a field is reduced, the extra places are truncated when the field is reloaded. When the length of a key is reduced and there are several records whose new key cannot be distinguished, only one of these records can be reloaded. In general it is not possible to determine in advance which record this will be. In such a case, you should clean up the data of the table before conversion.

Step 5: Delete the QCM Table

The data in table QCMTAB is no longer required at the end of the conversion. The table is therefore deleted, provided that all records could be copied from table QCMTAB into table QCM8TAB. If duplicate records appeared in table QCM8TAB, for example, because the key of table TAB was shortened, table QCMTAB is kept for safety reasons.

Step 6: Rename Table and Create Secondary Indexes

Table QCM8TAB is renamed to TAB. The secondary indexes on the table defined in the ABAP Dictionary are newly created in the database. The views on the table that were deleted in the first step are also newly created in the database.

Step 7: Remove the Lock

The lock set at the beginning of the conversion is removed.

This graphic is explained in the accompanying text

Note

The table data is only consistent again once Step 4 has been completed. For this reason, programs must not access the table while the conversion is running. Otherwise a program could behave incorrectly when reading the table since some of the records were not yet copied back from the temporary table. For this reason conversions may not be running during production. At least all the applications that use the table to be converted must be deactivated.

If the conversion terminates, the table stays locked is a reset log is written. Each successful step of the conversion is recorded in this reset log. The restart log is deleted together with the lock when the conversion has been completed. If the conversion terminates (see

You must clean up terminated conversions!

Programs that access tables might otherwise not execute correctly. You must find out why the conversion terminated (for example overflow of the corresponding tablespace) and correct it. You must then continue the terminated conversion (see
Conversion Problems), you can find the place where the conversion terminated in the reset log (last step to be executed).Continuing Terminated Conversions).

 

The following example shows the steps necessary for a conversion

Initial Situation

分享到:
评论

相关推荐

    sap-basis-certification-questions-sap-basis-interview-questions-answers-and-explanations

    在进行 SAP Basis 的面试准备时,面试官通常会关注应聘者对 SAP Basis 的基础知识和实践经验的理解。例如: - **问题示例**:“请简要介绍 SAP Basis 并解释它的主要功能。” - **答案示例**:“SAP Basis 是 SAP ...

    SAP-Basis-日常维护(basis经典教程

    SAP-Basis-日常维护(basis经典教程SAP-Basis-日常维护(basis经典教程SAP-Basis-日常维护(basis经典教程

    BASIS手册-监控SAP表空间.pdf

    在查看表空间信息时,SAP系统管理员需要选择需要监控的表空间,然后双击该表空间可以查看详细的信息。 九、判断表空间是否需要扩展 根据表空间的使用情况和性能信息,SAP系统管理员可以判断表空间是否需要扩展。...

    SAP系统BASIS标准手册

    ### SAP系统BASIS标准手册知识点解析 #### 一、重启SAP生产服务器操作手册 在企业级应用环境中,SAP系统的稳定运行至关重要。当遇到系统故障或进行必要的维护时,重启SAP生产服务器是一项常见但又十分重要的操作。...

    SAP BASIS PA教材

    ### SAP BASIS PA 教材详解 #### 一、课程概览 SAP BASIS PA 教程,即SAP NetWeaver PA(Performance Architecture),是一门针对SAP NetWeaver架构性能管理和优化的专业培训课程。本课程旨在帮助学员深入了解SAP ...

    BC305--SAP BASIS

    ### SAP PA 教程 BC305:SAP BASIS 高级系统管理 #### 概述 本教程BC305旨在为高级SAP R/3系统管理员提供深入的指导和实践经验,帮助他们掌握SAP BASIS的核心概念和技术。通过本教程的学习,学员将能够更加熟练地...

    SAP BASIS Tcode大全

    SAP BASIS是SAP系统运行的基石,负责系统的整体运行和维护工作。在SAP系统中,事务码(Transaction Code)是用于访问具体功能和应用的唯一代码。对于从事SAP BASIS运维的工作人员来说,掌握常用的事务码是基本要求。...

    sap basis培训资料

    - SAP Security:用户管理、角色创建、授权对象理解。 - Single Sign-On(SSO):实现身份验证和访问控制的方法。 9. **备份与恢复策略**: - SAP备份:数据库备份、系统备份、事务日志备份。 - 恢复技术:如何...

    SAP日常运维BASIS

    SAP日常运维BASIS

    sap basis 操作指南

    - 在这里可以创建和修改 **操作模式** 和 **实例** 设置。 2. **启动和停止 SAP 系统**: - 本部分内容提供了在 Windows NT 环境下启动 SAP R/3 系统的具体步骤。 - 包括设置环境变量、启动数据库服务、启动...

    sap basis 权限分配步骤

    在 SAP 系统中,BASIS 是一个关键的组件,负责系统管理和技术支持。权限分配是 BASIS 管理员的重要职责之一,确保每个用户只能访问他们工作所需的特定功能和数据,以维持系统的安全性和合规性。以下将详细介绍 SAP ...

    SAP-BASIS-日常使用事务代码.doc

    SAP BASIS 系统管理员的日常使用事务代码 SAP BASIS 系统管理员需要掌握的日常使用事务代码包括: 1. DB02:反省表空间状况,包含表跟索引的最大扩展跟下次扩展,反省丧掉的索引等。 2. DB12:反省全部备份形态...

    sap-basis-tool-kit

    很实用的文档,对basis讲的很详细,并且内容非常全面

    SAP Basis系列手册 - PI篇

    通过以上对《SAP Basis系列手册 - PI篇》内容的详述,我们可以看到PI不仅在Basis层面上具有丰富的配置选项,而且在实际业务应用场景中展现出了强大的集成能力。对于希望深入了解PI功能的企业和IT专业人员而言,这份...

    sap basis常用操作详解

    ### SAP Basis 常用操作详解 #### SAP 架构:R/2 与 R/3 的对比 在 SAP 的发展历史中,从 R/2 到 R/3 是一个重要的转变。R/2 主要基于主机架构,而 R/3 采用了客户端/服务器三层架构。这种变化使得 SAP 的系统能够...

    SAP basis 基础介绍

    SAP BASIS 基础介绍 SAP BASIS 是 SAP 系统的基础组件,负责提供基础设施和技术支持,确保 SAP 系统的稳定运行。SAP BASIS 由多个组件组成,包括操作系统、数据库管理系统、应用服务器、网关服务器、消息服务器、...

Global site tag (gtag.js) - Google Analytics