Use the View in Editor option in the Reorg Manager (or Partitioning Wizard) to run reorganization scripts interactively from the SQL Editor. As a script runs, you can monitor execution directly from the SQL Editor. You can also use the View in Editor option to open a script and review it before you schedule it.
Important: Live reorganization scripts and scripts that use FastCopy or parallel QSA processes cannot be run from the SQL Editor. They must be scheduled and run by QSA. These scripts contain commands that must be interpreted by QSA. To run a script in QSA, it must be scheduled (even when executed immediately).
To run scripts from the Editor
To run the script in single-step mode (one statement at a time), click Single Step in the toolbar or press F8 from the first statement. Repeat for each statement in the script.
Note: If the Connection dialog displays, enter the user name and password of an Oracle user with the DBA role or privileges for Space Manager. Then click OK to connect to your database.
Target tablespace options determine where objects are reorganized and whether they are relocated during reorganization. Objects can be left in their current tablespace or relocated to another tablespace.
When objects are left in place during a standard reorganization, they can be reorganized using free space in the current tablespace or free space in another tablespace on an interim basis. (Interim tablespaces are not used for live reorganizations.)
See also Target Tablespace Considerations for more information about how data movement method, space availability, and speed can factor into choosing a target tablespace.
Target tablespaces are selected on a global basis in the Target Tablespaces section in the Reorg Manager (see Select Global Reorganization Options). This means they are used for all tables and indexes included in a reorganization. However, you can override global target tablespace for individual objects in the Customize Object Allocations page. See Customize Object Allocations for more information.
One global target tablespace can be selected for tables and another selected for indexes. This allows you to locate tables and their indexes in different tablespaces in order to avoid table/index contention and improve I/O balancing. You can also select one global target tablespace to use for all LOBs and LOB indexes.
Use the Leave in Original Tablespace option to leave tables, indexes, and LOBs in their current tablespace during a reorganization. In a Standard Reorg, when you leave tables or LOBs in their current tablespace, you can choose whether to reorganize them using space in the current tablespace or space in another tablespace on an interim basis.
When you reorganize using space in the current tablespace, the following space requirements apply:
When you reorganize using space in an interim tablespace, the tablespace must have enough concurrent free space for all copy tables it will contain. All are created at the same time.
Use the Relocate to Tablespace option to move tables and indexes to a different tablespace during reorganization. The tablespace must have enough free space for copies of all tables and indexes to be relocated there.
Relocating objects when you reorganize optimizes database layout for efficient use of disk space, better I/O balancing, and improved query performance. For example, separating tables and indexes into different tablespaces distributes I/O requests among datafiles and disks for improved performance of index-based queries.
Use the following guidelines to relocate tables to locally managed tablespaces:
SAP objects should only be relocated to tablespaces that were created with SAP administrative tools. After relocating an SAP object with Space Manager, you should update the SAP ABAP Dictionary. This is recommended in SAP note 154193, “SAPDBA:reorganizations and ABAP-DDIC”.
To update the ABAP Dictionary, run the following SQL statement:
update sapr3.dd09l
set tabart = (select tabart
from sapr3.taora
where tabspace = '<tsp>')
where tabname = '<table>'
and as4local = 'A';
Important: Check SAP notes for the latest recommendations on reorganizing SAP objects using external applications.
As you select target tablespace options for a reorganization, consider the object types and datatypes being reorganized, the space available in the database and filesystem, the data movement method used, and the speed of different combinations of options.
Object type and datatype determine which data movement method can be used. If both SQL and FastCopy are used, space and speed can be considered in choosing target tablespace options.
Space availability and data movement method are a factors to consider when selecting target tablespace options:
Target Tablespace |
Space Required for SQL |
Space Required for FastCopy (DBMS_DataPump) |
---|---|---|
Current |
Space in current tablespace for original tables and indexes plus space for copy of largest table and its indexes. |
Concurrent space in filesystem for exported data of all tables being reorganized with FastCopy/DBMS_DataPump. |
Interim |
Concurrent space in interim tablespace for copies of all tables being reorganized in that tablespace. |
Interim tablespaces are not used by FastCopy. |
New |
Space in new tablespace for copies of all tables and indexes being relocated to that tablespace. |
Space in new tablespace for copies of all tables and indexes being relocated to that tablespace. |
Speed is another factor to consider when selecting target tablespace options. Different combinations of options vary in terms of the number of data moves required. Data moves can be one-way or two-way:
Rank |
Data Movement Method |
Target Tablespace |
---|---|---|
1 |
ALTER TABLE… MOVE (SQL) |
Current or new |
2 |
ALTER TABLE… MOVE (SQL) |
Interim |
3 |
CREATE TABLE AS SELECT (SQL) with Unrecoverable Mode option |
Current or new |
4 |
CREATE TABLE AS SELECT (SQL) without Unrecoverable Mode option |
Current or new |
5 |
CREATE TABLE AS SELECT (SQL) with Unrecoverable Mode option |
Interim |
6 |
CREATE TABLE AS SELECT (SQL) without Unrecoverable Mode option |
Interim |
7 |
CREATE TABLE and INSERT (SQL) |
Current or new |
8 |
CREATE TABLE and INSERT (SQL) |
Interim |
9 |
FastCopy |
New |
10 |
PL/SQL (used for SQL reorganizations of tables with LONGs) |
Current or new |
11 |
PL/SQL (used for SQL reorganizations of tables with LONGs) |
Interim |
12 |
FastCopy |
Current |
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. 이용 약관 개인정보 보호정책 Cookie Preference Center