Monday, July 17, 2023

UNLOCK STATS ON TABLES, INDEXES, PARTITION, MATERIALIZED VIEW, SCHEMA

Unlock tables stats

BEGIN

  DBMS_STATS.UNLOCK_TABLE_STATS(ownname => 'schema_name', tabname => 'table_name');

END;

/

Unlock Index Stats 

BEGIN

  DBMS_STATS.UNLOCK_INDEX_STATS(ownname => 'schema_name', indname => 'index_name');

END;

/

Unlock Partition Stats

BEGIN

  DBMS_STATS.UNLOCK_PARTITION_STATS(ownname => 'schema_name', tabname => 'table_name', partname => 'partition_name');

END;

/

Unlock Materialized View Stats 

BEGIN

  DBMS_STATS.UNLOCK_MVIEW_STATS(ownname => 'schema_name', mvname => 'materialized_view_name');

END;

/

Unlock Schema Stats

BEGIN

  DBMS_STATS.UNLOCK_SCHEMA_STATS(ownname => 'schema_name');

END;

/

 

No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...