Converse agora com nosso suporte
Chat com o suporte

Space Manager with LiveReorg 9.1 - User Guide

Smart Start for Space Manager Collect Statistics Profile DML Activity Manage Storage Reorganize Objects with Reorg Manager Partition Tables with the Partitioning Wizard Run and Monitor Scripts Run Reports Options Troubleshooting Administration Functions Appendix About Us

Populate the Find Long LONGs table

begin

quest_spc_find_long.execute (schema=>'SCHEMA', include_sys=>'NO', tablename=>'TABLENAME');

end;

/

The Find Long LONGs procedure can scan an entire database, a certain schema, or a certain table. You specify what to scan using the parameters described below. When no parameters are used, the procedure scans the entire database (with the exception of SYS and SYSTEM objects):

  • schema—Use this parameter if you want to scan a certain schema.
  • include_sys - [yes | no]—Set this parameter to yes if you want to scan SYS and SYSTEM objects. If you do not want to scan these objects, omit the parameter or set it to no.
  • tablename—Use this parameter if you want to scan a table with a certain name. To scan all tables with a certain name, use the tablename parameter on its own, without the schema parameter. To scan a certain table in a certain schema, use the schema parameter along with the tablename parameter.

To populate the Find Long LONGs table

  1. Select File | New Script to open the SQL Editor.
  2. Run the Find Long LONGs Execute procedure for all tables in a database, for a certain schema, or for a certain table using parameters as follows:

    • To scan all tables in a database, run the procedure using no parameters or all parameters (if you don’t use any parameters, SYS and SYSTEM tables are excluded by default):

      begin

      quest_spc_find_long.execute;

      end;

      /

      or

      begin

      quest_spc_find_long.execute (schema=>'ALL', include_sys=>'NO', tablename=>'ALL');

      end;

      /

    • To scan all tables in a certain schema, run the procedure using the schema parameter:

      begin

      quest_spc_find_long.execute (schema => 'SCHEMA');

      end;

      /

    • To scan all tables with a certain name, run the procedure using only the tablename parameter:

      begin

      quest_spc_find_long.execute (tablename=> 'TABLENAME');

      end;

      /

    • To scan a certain table in a certain schema, run the procedure using the schema and tablename parameters:

      begin

      quest_spc_find_long.execute (schema=>'SCHEMA', tablename=> 'TABLENAME');

      end;

      /

      Tip: To include SYS and SYSTEM tables in a scan, run the procedure with the include_sys parameter set to YES as follows: include_sys=>'YES'

Messages for the Find Long LONGs Package

To provide you with feedback on the results of a scan, the Find Long LONGs procedure includes several messages. When a messages applies, it is displayed at the bottom of the SQL Editor after a scan is complete.

When a scan finds one or more tables with long LONGs, the following message alerts you to this and recommends that you check the Find Long LONGs table to identify these tables:

“ORA-20120: Longs that cannot be reorganized with PL/SQL found. Check QUEST_SPC_LONG_TABLES to see which tables cannot be reorganized using PL/SQL. These tables will have a YES value in the MUST_USE_FASTCOPY column. Fastcopy (or DBMS_DataPump) needs to be used.”

When a scan does not find any tables with long LONGs, the following message is displayed:

“ORA-20121: No tables with long LONG columns found”

When one or more tables is not accessible during a scan, the following message alerts you to this (a table is not accessible if its tablespace is offline):

“ORA-20122: Table(s) not accessible to scan”

Query the Find Long LONGs table

You can query the Find Long LONGs table to identify tables that contain long LONGs. This information is displayed in the MUST_USE_FASTCOPY results column in the Results tab of the SQL Editor:

  • YES is displayed for tables with LONG or LONG RAW columns that are larger than 32,760 bytes (long LONGs). These tables must be reorganized with FastCopy (or DBMS_DataPump). (YES is also displayed for empty tables.)
  • NO is displayed for tables with LONG or LONG RAW columns that are 32,760 bytes or less in size. These tables can be reorganized with either FastCopy/DBMS_DataPump or SQL (PL/SQL is used).

Please note that the Find Long LONGs table only contains data on tables that have been scanned with the Find Long LONGs procedure.

Note: To identify tables with long LONGs from reorg wizards, check the Long LONG Columns field in Customize Object Allocations windows. This field displays Yes for tables that contain long LONGs, No for tables that do not contain long LONGs, and Unknown for tables that contain LONGs but have not been scanned with the Find Long LONGs procedure. The information displayed is based on data in the Find Long LONGs table.

How to query the Find Long LONGs table

  1. Select File | New Script to open the SQL Editor.
  2. Query the QUEST_SPC_LONG_TABLES table with a SELECT statement as follows:

    • To find all records in the Find Long LONGs table, run:

      Select * from quest_spc_long_tables;

    • To find records only for tables that contain LONGs > 32K, run:

      Select * from quest_spc_long_tables where MUST_USE_FASTCOPY = ‘YES’;

    • To find records only for tables that contain LONGS < 32K, run:

      Select * from quest_spc_long_tables where MUST_USE_FASTCOPY = ‘NO’;

  3. View results of the query in the Result tab of the SQL Editor. The MUST_USE_FASTCOPY column identifies which tables contain long LONGs:

    • YES is displayed for tables with LONG or LONG RAW columns that are larger than 32,760 bytes (long LONGs). These tables must be reorganized with FastCopy (or DBMS_DataPump). (YES is also displayed for empty tables.)
    • NO is displayed for tables with LONG or LONG RAW columns that are 32,760 bytes or less in size. These tables can be reorganized with either FastCopy/DBMS_DataPump or SQL (PL/SQL is used).

 

Related Topics

Defragment Tablespaces and Coalesce Free Space

Defragment Tablespaces

Options for defragmenting a tablespace allow you to merge free extents that are scattered throughout a tablespace. These include free extents that are next to each other and free extents that are separated by data extents. After a tablespace is defragmented, all free space is contiguous and coalesced into larger extents.

Tip: To check the degree of fragmentation in a tablespace, use a Datafile Map. See Monitor Datafile Storage for more information.

The sections that follow cover how to defragment a tablespace during a standard reorganization with Reorg Manager. The basic steps are to include all tablespace objects and select an interim tablespace as the target tablespace. Please note that a defragment option is not displayed in the Reorg Manager interface.

Selecting all objects and the interim option causes a tablespace to be defragmented as follows:

  1. All data is moved out of the tablespace on a temporary basis.
  2. All objects in the tablespace are dropped.
  3. All free space in the tablespace is coalesced.
  4. All objects in the tablespace are recreated and repopulated with data.

Note: Be aware that if objects remain in a tablespace during reorganization, the tablespace is not completely defragmented. Also note that it should not be dropped and recreated. See Empty a Tablespace Before You Defragment for more information.

 

Related Topics

Defragment with an Interim Tablespace

Empty a Tablespace Before You Defragment

Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação