Wednesday, February 24, 2016

Startup/Shutdown Oracle Enterprise Manager Cloud Control.

[oracle@bcbldb01 ~]$ $OMS_HOME/bin/emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down
[oracle@bcbldb01 ~]$
[oracle@bcbldb01 ~]$
[oracle@bcbldb01 ~]$
[oracle@bcbldb01 ~]$ $AGENT_HOME/bin/emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Stopping agent .... stopped.
[oracle@bcbldb01 ~]$
[oracle@bcbldb01 ~]$
[oracle@bcbldb01 ~]$ $OMS_HOME/bin/emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up
[oracle@bcbldb01 ~]$ $AGENT_HOME/bin/emctl start agent

Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Starting agent ............................................................................. started.
[oracle@bcbldb01 ~]$

Saturday, February 13, 2016

ORA-10631: SHRINK clause should not be specified for this object

Cause : If your table contain function based Index you will get this error. 

Solution: Check your tables that contain relay function based index. Drop function based index and recreate index after Shrink completed.

SQL> ALTER TABLE ACCOUNTS ENABLE ROW MOVEMENT;

Table altered.

SQL> ALTER TABLE ACCOUNTS SHRINK SPACE;
ALTER TABLE ACCOUNTS SHRINK SPACE
*
ERROR at line 1:
ORA-10631: SHRINK clause should not be specified for this object


SQL> SELECT INDEX_NAME, INDEX_TYPE
FROM DBA_INDEXES
WHERE OWNER = 'CBS'
AND TABLE_NAME = 'ACCOUNTS';

INDEX_NAME                     INDEX_TYPE
------------------------------ ---------------------------
IDX_ACCOUNTS_ACTNUM_DATE       NORMAL
IDX_ACCOUNTS_GL   FUNCTION-BASED NORMAL
SYS_C00482673                  NORMAL

SQL> DROP INDEX IDX_ACCOUNTS_GL   ;

Index dropped.

SQL> ALTER TABLE ACCOUNTS SHRINK SPACE;

Table altered.

SQL>