Tuesday 1 November 2016

How to stop/start Weblogic component


Step 1: Check the status of Weblogic component using following command

[oracle@said bin]$ cd /u01/oracle/middleware/asinst_1/bin
[oracle@said bin]$ ./opmnctl status all

Processes in Instance: asinst_1
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
emagent_asinst_1                 | EMAGENT            |    2223 | Alive
RptSvr_said_asinst_1       | ReportsServerComp~ |    2758 | Alive
forms                            | FormsRuntime       |   22446 | Alive

Step 2: Stop  Weblogic component using following command


[oracle@said bin]$ ./opmnctl stopproc ias-component=RptSvr_said_asinst_1
opmnctl stopproc: stopping opmn managed processes...
[oracle@said bin]$ ./opmnctl status all

Processes in Instance: asinst_1
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
emagent_asinst_1                 | EMAGENT            |    2223 | Alive
RptSvr_said_asinst_1       | ReportsServerComp~ |     N/A | Down
forms                            | FormsRuntime       |   22578 | Alive



Step 3: Start  Weblogic component using following command

[oracle@said bin]$ ./opmnctl startproc ias-component=RptSvr_said_asinst_1
opmnctl startproc: starting opmn managed processes...
[oracle@said bin]$ ./opmnctl status all

Processes in Instance: asinst_1
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status
---------------------------------+--------------------+---------+---------
emagent_asinst_1                 | EMAGENT            |    2223 | Alive
RptSvr_said_asinst_1       | ReportsServerComp~ |   22669 | Alive
forms                            | FormsRuntime       |   22662 | Alive
forms                            | FormsRuntime       |   22657 | Alive
forms                            | FormsRuntime       |   22578 | Alive
forms                            | FormsRuntime       |   22570 | Alive

Thursday 13 October 2016

Banglar Tajmahal

Wednesday 12 October 2016

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

SQL> ALTER TABLE SAID.STFACMAS
ADD (OVRDUE_APP VARCHAR2 (1 BYTE) DEFAULT 'N');

ERROR at line 1:
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired


Reason:

The error message says it all: the table is being used right now, probably by a transaction, so getting an exclusive lock on the table may be next to impossible. Of course, the rows of the table are not locked forever. When sessions perform commit the locks on those rows are released, but before that unlock period gets very far, other sessions may update some other rows of the table—and thus the slice of time to get the exclusive lock on the table vanishes. In a typical business environment, the window for locking the table exclusively does open periodically, but the DBA may not be able to perform the alter command exactly at that time.


Solution

In Oracle Database 11g, there is a better option: the DDL Wait option.

SQL> alter session set ddl_lock_timeout = 10;

Session altered.

Now, when a DDL statement in the session does not get the exclusive lock, it will not error out.
Instead, it will wait for 10 seconds. In that 10 seconds, it continually re-tries the DDL operation
until it's successful or the time expires, whichever comes first.

SQL> ALTER TABLE SAID.STFACMAS
ADD (OVRDUE_APP VARCHAR2 (1 BYTE) DEFAULT 'N');