Monday 18 February 2019

All Oracle RAC commands

# adding a datafile in asm/rac
===============================
alter tablespace abc add datafile '+DATA' size 4000M;

# resizing a datafile in asm/rac
=================================
alter database datafile '+DATA/vigp/datafile/abc.337.735734779' resize 4500m;


To check all diskgroups and total and free space in each giskgroups;
===================================================
SQL> select name,total_mb,free_mb,state from v$asm_diskgroup;

NAME                             TOTAL_MB    FREE_MB STATE
------------------------------ ---------- ---------- -----------
OCR_VOTE                            17263      16867 MOUNTED
ARCH                                34524      27696 MOUNTED
DATA                              2382220    1464356 MOUNTED


To check cluster services are up or not
======================================
ps -ef|grep d.bin


TO modify the spfile use below command.
=======================================
srvctl modify database -d erppgrt1 -p '+ERPDEVT1_DATA/ERPDEVT1/PARAMETERFILE/spfile.715.811079031'


To check the configuation of the database
============================
srvctl config database -d ERPDEVT1


To count the number of datafiles in asm
========================================
grid@tsgsq4914 $ asmcmd ls -l +ERPDEVT1_DATA/ERPDEVT1/DATAFILE/* |wc -l
    1247
grid@tsgsq4914 $


To check the diskgroup
+++++++++++++++++++++
ASMCMD> lsdg ERPDEVT1_DATA
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576   1514516    23749                0           23749              0             N  ERPDEVT1_DATA/
ASMCMD>

SQL> select NAME,GROUP_NUMBER,TOTAL_MB,USABLE_FILE_MB,FREE_MB from V$ASM_DISKGROUP where name like '%ERPDEVT1%';

NAME                           GROUP_NUMBER   TOTAL_MB USABLE_FILE_MB    FREE_MB
------------------------------ ------------ ---------- -------------- ----------
ERPDEVT1_ACFS                            40     219144           2795       2795
ERPDEVT1_ARCH                            41      32771           5292       5292
ERPDEVT1_DATA                            42    1514516          23749      23749



Lists information about current Oracle ASM clients from the V$ASM_CLIENT view.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

SQL> select GROUP_NUMBER,DB_NAME,STATUS from V$ASM_CLIENT;

GROUP_NUMBER DB_NAME  STATUS
------------ -------- ------------
          42 ERPDEVT1 CONNECTED
          41 ERPDEVT1 CONNECTED

SQL>


ASMCMD> lsct ERPDEVT1_DATA
DB_Name   Status     Software_Version  Compatible_version  Instance_Name  Disk_Group
ERPDEVT1  CONNECTED        11.2.0.2.0          11.2.0.0.0  ERPDEVT1      ERPDEVT1_DATA
ASMCMD>


to check how many disk are there in the disk group
=====================================================

-G diskgroup    - Specifies the disk group that contains the open disks

lsod -G ERPDEVT1_DATA
Instance Process                      OSPID Path
2        oracle@cssdd (DBW0)      10560 /dev/rdsk/c0t60060E8016012500000101250000A3C4d0s0
2        oracle@cssdd (DBW0)      10560 /dev/rdsk/c0t60060E8016012500000101250000A3DDd0s0
2        oracle@cssdd (DBW0)      10560 /dev/rdsk/c0t60060E8016012500000101250000A3E5d0s0



The example shows disk space used in the  directory in data, including all of the directories under the DATAFILE directory.
==================================================================

ASMCMD> du ERPDEVT1/DATAFILE
Used_MB      Mirror_used_MB
1463070             1463070

  ORASMCMD> du DATAFILE
Used_MB      Mirror_used_MB
1463070             1463070
ASMCMD>


How to use find command in asmcmd prompt
============================================
ASMCMD> find ERPDEVT1_DATA undo*
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.354.786964749
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.666.786960981
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.719.786962615
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.730.786963069
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.734.786962497
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.735.786962661
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.738.786962991
ASMCMD>

or
grid@csssd $ asmcmd find ERPDEVT1_DATA undo*
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.290.844340797
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.299.844343459
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.380.844342391
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.596.844347911
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.640.844338441
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.734.844340941
+ERPDEVT1_DATA/ERPDEVT1/DATAFILE/UNDOTBS.803.844340967
grid@csssd $



To list disks of a specific diskgroup, say, ERPDEVT1_DATA, you can use the -d flag as shown below
=======================================================

  ASMCMD> lsdsk -t -G ERPDEVT1_DATA
Create_Date  Mount_Date  Repair_Timer  Path
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3C4d0s0
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3DCd0s0
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3DDd0s0
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3DEd0s0
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3E4d0s0
15-MAY-12    28-MAY-12   0             /dev/rdsk/c0t60060E8016012500000101250000A3E5d0s0
ASMCMD>


Displays the Oracle Restart configuration information for the Oracle ASM instance.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
oracle@csssd $ srvctl config asm -a

ASM home: /opt/oracle/product/grid/11.2.0.3
ASM listener: LISTENER
ASM is enabled.

An example of this command to display configuration and enabled/disabled status for the database with the DB_UNIQUE_ID orcl is:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
oracle@csssd $ srvctl config database -d erpdevt1 -a
Database unique name: erpdevt1
Database name:
Oracle home: /erpdevt1/oracle/11.2.0
Oracle user: oracle
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: erpdevt1
Database instances: erpdevt11,erpdevt12
Disk Groups: ERPDEVT1_DATA,ERPDEVT1_ARCH
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
oracle@csssd $


To check disk group status
++++++++++++++++++++++++++
oracle@csssd5906 $    srvctl status diskgroup -g ERPDEVT1_DATA
Disk Group ERPDEVT1_DATA is running on csssd5930,csssd5908,csssd5932,csssd5906,csssd5990,csssd599


Checking where scan listener is running
++++++++++++++++++++++++++++++++++++++++
oracle@csssd5906 $ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node csssd5906
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node csssd5930
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node csssd5992


To check all the nodes in the cluster
+++++++++++++++++++++++++++++++++++
csssd5906 > olsnodes -n
csssd5906       1
csssd5908       2
csssd5930       3
csssd5932       4
csssd5990       5
csssd5992       6


csssd5906 > ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       9548
         Available space (kbytes) :     252572
         ID                       :  771726667
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

         Cluster registry integrity check succeeded

         Logical corruption check succeeded

To check the disk timeout
+++++++++++++++++++++++++++
csssd5906 > csssd5906 > crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.

To check the miscount
+++++++++++++++++++++++++++
csssd5906 > crsctl get css misscount
CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.


Status of all instances and services
=====================================
$ srvctl status database -d orcl
Instance orcl1 is running on node node1
Instance orcl2 is running on node ndoe2


Status of a single instance
====================================
$ srvctl status instance -d orcl -i orcl2
Instance orcl2 is running on node node2

Status of node applications on a particular node
================================================
$ srvctl status nodeapps -n node1
VIP is running on node: node1
GSD is running on node: node1
Listener is running on node: node1
ONS daemon is running on node: node1


Status of an ASM instance
===============================
$ srvctl status asm -n node1
ASM instance +ASM1 is running on node node1.


List all configured databases
================================
$ srvctl config database
orcl


Display configuration for our RAC database
==============================================
$ srvctl config database -d orcl
node1 orcl1 /u01/app/oracle/product/10.1.0/db_1
node2 orcl2 /u01/app/oracle/product/10.1.0/db_1


Display all services for the specified cluster database
=====================================================
$ srvctl config service -d orcl
orcltest PREF: orcl2 orcl1 AVAIL:


Display the configuration for node applications - (VIP, GSD, ONS, Listener)
==========================================================
$ srvctl config nodeapps -n node1 -a -g -s -l
VIP exists.: /vip-linux1/192.168.101.5/255.255.255.0/eth0:eth1
GSD exists.
ONS daemon exists.
Listener exists.


Display the configuration for the ASM instance(s)
========================================================
$ srvctl config asm -n node1
+ASM1 /u01/app/oracle/product/10.1.0/db_1



How to check scan status
++++++++++++++++++++++++
srvctl status scan


Check config of scan
+++++++++++++++++++
srvctl config scan


Starting scan listener
++++++++++++++++++++++
$GRID_HOME/bin/srvctl start scan_listener

Relocate Scan
++++++++++++++
srvctl relocate scan -i 1 -n csssddbuat01 -- (cssddbuat01 is a new node name where u want to reallocate scan 1)

Start Cluster services on bi1
+++++++++++++++++++++++++++++++
crsctl start cluster -n oraclebi1

Stop resource
++++++++++++++
crsctl stop resource ora.crsd

start resource
++++++++++++++
crsctl start resource ora.crsd


Stop diskgroups and ASM instance
+++++++++++++++++++++++++++++
srvctl stop diskgroup -g data
srvctl stop diskgroup -g backup
srvctl stop asm



csssd5906 > ocrconfig -showbackup

csssd5906     2013/11/22 21:13:32     /opt/oracle/product/grid/11.2.0.3/cdata/er

csssd5906     2013/11/22 17:13:26     /opt/oracle/product/grid/11.2.0.3/cdata/er

csssd5906     2013/11/22 13:13:22     /opt/oracle/product/grid/11.2.0.3/cdata/er

csssd5906     2013/11/21 13:12:57     /opt/oracle/product/grid/11.2.0.3/cdata/er

csssd5906     2013/11/15 13:09:55     /opt/oracle/product/grid/11.2.0.3/cdata/er
PROT-25: Manual backups for the Oracle Cluster Registry are not available

To know cluster Name
+++++++++++++++++++++++++++
csssd5906 > olsnodes -c
csssd12

To check CRS status
+++++++++++++++++++++++++++
csssd5906 > crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online.

To check cluster status
+++++++++++++++++++++++
csssd5906 > crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
csssd5906 >


How to go for help on olsnode
+++++++++++++++++++++++++++++++
$ ./olsnodes -h
Usage: olsnodes [ [-n] [-i] [-s] [-t] [<node> | -l [-p]] | [-c] ] [-g] [-v]
where
-n print node number with the node name
-p print private interconnect address for the local node
-i print virtual IP address with the node name
<node> print information for the specified node
-l print information for the local node
-s print node status - active or inactive
-t print node type - pinned or unpinned
-g turn on logging
-v Run in debug mode; use at direction of Oracle Support only.
-c print clusterware name




To find cluster node status/print node status - active or inactive
========================
[root@csssd5933 ~]# olsnodes -s
csssd5911       Active
csssd5913       Active
csssd5931       Active
csssd5933       Active

To find virtual IP address
======================
[root@csssd5933 ~]# olsnodes -i
csssd5911       csssd5911-vip
csssd5913       csssd5913-vip
csssd5931       csssd5931-vip
csssd5933       csssd5933-vip

To find print information for the local node
============================================
[root@csssd5933 cpu]# olsnodes -l
csssd5933
[root@csssd5933 cpu]#


To find nodes are pinned/unpinned
================================
[root@csssd5933 ~]# olsnodes -t
csssd5911       Unpinned
csssd5913       Unpinned
csssd5931       Unpinned
csssd5933       Unpinned
[root@csssd5933 ~]

Relocate resource to other node
=================================
[root@csssd5911 grid]#  crsctl relocate resource appcssd2.appvip -n csssd5933 -f
CRS-2673: Attempting to stop 'appcssd2_em_agent' on 'csssd5911'
CRS-2677: Stop of 'appcssd2_em_agent' on 'csssd5911' succeeded
CRS-2673: Attempting to stop 'appcssd2.appvip' on 'csssd5911'


Stop particular resource in RAC and check status
==============================
grid@csssd5906 $ crsctl stop res erpdevt1_conc_mgr
CRS-2673: Attempting to stop 'erpdevt1_conc_mgr' on 'csssd5932'
CRS-2677: Stop of 'erpdevt1_conc_mgr' on 'csssd5932' succeeded

grid@csssd5906 $ crsctl status res erpdevt1_conc_mgr
NAME=erpdevt1_conc_mgr
TYPE=conc_mgr
TARGET=OFFLINE
STATE=OFFLINE

Register Node Manager in windows server

Most of the time , i have faced registering the node manager in windows server because while registering node manager in windows it accept the unix slash instead of  slash "\"



Here are the steps to register the node manager in windows server.

Go to cmd
d:
cd
D:\u01\oracle\Middleware\oracle_common\common\bin
wlst.cmd
connect('wlstest', 'admin4test', 't3://10.0.101.22:7005')
nmEnroll('D:\u01\oracle\Middleware\user_projects\domains\base_domain','D:\u01\oracle\Middleware\user_projects\domains\base_domain\nodemanager')
disconnect()
exit()


Moving datafile in oracle database 12c OR storage migration


Storage migration or moving data files to the other location got much easier in oracle database 12c.
We can move the data files online without shutting down the database that is one of the feature of oracle database 12c and it is much benefited to DBA's and business as it does not require down time.

Example

ALTER DATABASE MOVE DATAFILE '/proddata2/undo05.dbf' TO '/u03/oradata/undo05.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/undo02.dbf' TO '/u03/oradata/undo02.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/undo03.dbf' TO '/u03/oradata/undo03.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/undo04.dbf' TO '/u03/oradata/undo04.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/undo05.dbf' TO '/u03/oradata/undo05.dbf';



ALTER DATABASE MOVE DATAFILE '/proddata4/a_archive01.dbf' TO '/u02/oradata/a_archive01.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/a_archive02.dbf' TO '/u02/oradata/a_archive02.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/a_archive03.dbf' TO '/u02/oradata/a_archive03.dbf';
ALTER DATABASE MOVE DATAFILE '/proddata4/a_archive04.dbf' TO '/u02/oradata/a_archive04.dbf';


How to send an email along with attachment from linux server

ls awrrpt_1_11663_11664.html awrrpt_1_11664_11665.html

echo "Attached file to oracle SR" | mailx -s "SUBJECT" -a "LOCATION_REFNUM_DATA2.htm" -a "2ndfile2.htm" SKALVAKUNTLA@abc.COM

echo "AWR Report from 7 to 8 " | mailx -s "SUBJECT" -a "awrrpt_1_11677_11678.html" SKolluri@abc.com

RMAN-04005: error from target database+ORA-12154: TNS:could not resolve the connect identifier specified

Issue

$ rman target sys/indsystem@prod auxiliary sys/indsystem@TEST

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Feb 5 22:30:25 2019

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-12154: TNS:could not resolve the connect identifier specified


Unable to connect to the target database because of the password file is missing from the target database or clone instance.


Solution
orapwd file=orapwTEST password=Indsystem 

How to check telnet port is working from linux

[applprod@indprod log]$ nc -v imapoutlook.abc.com 993
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connected to 30.110.92.50:993.
^C
[applprod@indprod log]$ nc -v smtp.abc.com 587
Ncat: Version 6.40 ( http://nmap.org/ncat )
Ncat: Connected to 30.110.92.50:587.

Rename the undo datafile in oracle database 11gr2

1)shutdown the database cleanly

shutdown immediate

2)Move the undo datafiles

[oracle@induatdb induat]$ ls -ldh /u02/oracle/datafiles/induat/undotbs01.dbf /u03/oracle/datafiles/undotbs01.dbf
ls: cannot access /u03/oracle/datafiles/undotbs01.dbf: No such file or directory
-rw-r-----. 1 oracle oinstall 11G Feb 12 15:11 /u02/oracle/datafiles/induat/undotbs01.dbf

[oracle@induatdb induat]$ mv /u02/oracle/datafiles/induat/undotbs01.dbf /u03/oracle/datafiles/undotbs01.dbf

[oracle@induatdb induat]$ ls -ldh /u02/oracle/datafiles/induat/undotbs01.dbf /u03/oracle/datafiles/undotbs01.dbf
ls: cannot access /u02/oracle/datafiles/induat/undotbs01.dbf: No such file or directory
-rw-r-----. 1 oracle oinstall 11G Feb 12 15:11 /u03/oracle/datafiles/undotbs01.dbf
[oracle@induatdb induat]$



3)Startup the database in mount stage

SQL> startup mount
ORACLE instance started.
Total System Global Area 5344731136 bytes
Fixed Size                  2262656 bytes
Variable Size            1040189824 bytes
Database Buffers         4294967296 bytes
Redo Buffers                7311360 bytes
Database mounted.

4)Rename the database file at SQL level
SQL> ALTER DATABASE RENAME FILE '/u02/oracle/datafiles/induat/undotbs01.dbf' TO '/u03/oracle/datafiles/undotbs01.dbf';
Database altered.

5)Open the database
SQL> alter database open;
Database altered.

Sunday 17 February 2019

Check that your system has enough resources to start a concurrent manager process Contact your

Issue
+++

Check that your system has enough resources to start a concurrent manager process. Contact your : 08-NOV-2018 14:12:40
Starting STANDARD Concurrent Manager               : 08-NOV-2018 14:12:40

CONC-SM TNS FAIL
Routine AFPEIM encountered an error while starting concurrent manager STANDARD with library /u03/PROD/apps/apps_st/appl/fnd/12.0.0/bin/FNDLIBR.

Check that your system has enough resources to start a concurrent manager process. Contact your : 08-NOV-2018 14:12:41

Starting Internal Concurrent Manager Concurrent Manager : 08-NOV-2018 14:12:41
CONC-SM TNS FAIL
 : ICM failed to start for target ABPROD.  Review ICM log files for additional information.
                     Process monitor session ended : 08-NOV-2018 14:12:41



Solution
+++++
SQL>  select unique(node_name) from fnd_concurrent_queues;

NODE_NAME
--------------------------------------------------------------------------------
ABPROD
EBSTEST

SQL> update fnd_concurrent_queues set node_name='EBSTEST' where node_name='ABPROD';

43 rows updated.

SQL> commit;

Commit complete.

SQL>


How to configure Java webstart for oracle forms 12c


Customer wants to use java webstart instead of java plugin how can the same be implemented in forms12c


Java webstart can be use as semi browser.its mean that you can access the forms application using ICON or URL.


1) Configuring Webutil For Java WebStart (JavaWS) (Doc ID 2083540.1)


1) Go to $ORACLE_HOME/forms/java

2) Take the backup of extensions.jnlp file

cp -pr extensions.jnlp extensions.jnlp_11feb2019


  1. Edit extensions.jnlp file located forms\java directory. (Please make a backup first)
  2. Uncomment the reference to jacob.jar
        From : <!-- <jar href="jacob.jar"/> -->
           To : <jar href="jacob.jar"/>
  3. Save the file.
  4. Run Forms application using Java WebStart again.

Note :In order to run the Forms application using the Java Webstart, please run the application URL as http://hostname:portno/forms/frmservlet?config=webstart.


Follow below note to create a shortcut icon to access the forms 12c application.
2) How to create a shortcut for Forms Webstart (Doc ID 2320647.1)


There are two options to create a shortcut when using Forms with Webstart:

1) On client side, go to:
Control Panel -> Java
General -> View
Show -> Applications


OR

2) Use command line :

"C:\Program Files (x86)\Java\jre1.8.0_144\bin\javaws.exe" -import -system -shortcut http://hostname:port/forms/frmservlet?config=WEBSTART

Note: Client machine needs to allow the Shortcut creation
Check in Control Panel -> Java -> Advanced
 


3) How to Run Forms 12c without a Browser Using Java Web Start (JWS) (Doc ID 2139095.1)

Autoconfig was failing on adgendbc.sh with Invalid Host error


Issue
++++

Unique constraint error (00001) is OK if key already exists
Invalid Host
Invalid Host

ADD call failed with exit code 1

Trying to update information ...

Invalid Host
Invalid Host

UPDATE call failed with exit code 1
Updating parameters:  fnd_jdbc_buffer_min=1 fnd_jdbc_buffer_max=5 fnd_jdbc_buffer_decay_interval=300
Invalid Host
Invalid Host

Updating parameters:  fnd_jdbc_buffer_decay_size=5 fnd_jdbc_usable_check=false fnd_jdbc_context_check=true
Invalid Host
Invalid Host

Updating parameters:  fnd_jdbc_plsql_reset=false
Invalid Host
Invalid Host

DBC generation failed with exit code 1

Updating Server Security Authentication
Invalid Host
java.sql.SQLException: Io exception: Invalid number format for port number
Database connection to jdbc:oracle:thin:@host_name:port_number:database failed
Updating Server Security Authentication failed with exit code 1
adgendbc.sh exiting with status 1
ERRORCODE = 1 ERRORCODE_END
.end std out.


Cause:
------- 
Server name was unresolvable due to which .dbc file wasn't generated under $FND_SECURE. In my case, it was issue with my server name which was unresolvable through DNS.

Solution:
-----------
In my case wrong domain name is assigned to the ebs hostname.

root@csddebsdev.csddtest.com # hostname csddebsdev.csdddev.com


After correcting domain name, I could able to run autoconfig successfully.

weblogic.management.ManagementException: Unable to obtain lock on oacore_server1.lok

Issue
++++
++++
-d64 -Xms512m -Xmx512m -XX:CompileThreshold=8000 -XX:PermSize=128m -XX:MaxPermSize=256m -Djava.security.policy=/u01/prod/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic.policy -Xverify:none -da -Dplatform.home=/u01/prod/fs1/FMW_Home/wlserver_10.3 -Dwls.home=/u01/prod/fs1/FMW_Home/wlserver_10.3/server -Dweblogic.home=/u01/prod/fs1/FMW_Home/wlserver_10.3/server -Dcommon.components.home=/u01/prod/fs1/FMW_Home/oracle_common -Djrf.version=11.1.1 -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Ddomain.home=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD -Doracle.server.config.dir=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/config/fmwconfig/servers/AdminServer -Doracle.domain.config.dir=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/config/fmwconfig -Digf.arisidbeans.carmlloc=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/config/fmwconfig/carml -Digf.arisidstack.home=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/config/fmwconfig/arisidprovider -Doracle.security.jps.config=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/config/fmwconfig/jps-config.xml -Doracle.deployed.app.dir=/u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/servers/AdminServer/tmp/_WL_user -Doracle.deployed.app.ext=/- -Dweblogic.alternateTypesDirectory=/u01/prod/fs1/FMW_Home/oracle_common/modules/oracle.ossoiap_11.1.1,/u01/prod/fs1/FMW_Home/oracle_common/modules/oracle.oamprovider_11.1.1 -Djava.protocol.handler.pkgs=oracle.mds.net.protocol -Dweblogic.jdbc.remoteEnabled=false -Dportlet.oracle.home=/u01/prod/fs1/FMW_Home/oracle_common -Dem.oracle.home=/u01/prod/fs1/FMW_Home/oracle_common -Dweblogic.management.discover=true -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/u01/prod/fs1/FMW_Home/patch_wls1036/profiles/default/sysext_manifest_classpath -Dweblogic.resourcepool.max_test_wait_secs=0 -Dweblogic.Name=oacore_server1 -Dweblogic.management.server=http://acgprodapp1.acg.com:7001 -Djava.library.path=/u01/prod/fs1/FMW_Home/webtier/jdk/jre/lib/sparcv9:/u01/prod/fs1/FMW_Home/webtier/jdk/jre/lib/sparcv9/native_threads:/u01/prod/fs1/EBSapps/appl/cz/12.0.0/bin64:/u01/prod/fs1/EBSapps/appl/sht/12.0.0/lib64:${LD_LIBRARY_PATH:=}:/u01/prod/fs1/EBSapps/10.1.2/lib:/u01/prod/fs1/EBSapps/10.1.2/lib32:/usr/dt/lib:/usr/openwin/lib:/u01/prod/fs1/FMW_Home/webtier/jdk/jre/lib/sparcv9:/u01/prod/fs1/FMW_Home/webtier/jdk/jre/lib/sparcv9/native_threads:/u01/prod/fs1/EBSapps/appl/sht/12.0.0/lib64:/u01/prod/fs1/EBSapps/appl/sht/12.0.0/lib:/u01/prod/fs1/FMW_Home/patch_wls1036/profiles/default/native:/u01/prod/fs1/FMW_Home/wlserver_10.3/server/native/solaris/sparc64:/u01/prod/fs1/FMW_Home/wlserver_10.3/server/native/solaris/sparc64/oci920_8::/u01/prod/fs1/FMW_Home/webtier/lib:/u01/prod/fs1/FMW_Home/webtier/lib32:/u01/prod/fs1/EBSapps/appl/cz/12.0.0/bin64:/u01/prod/fs1/EBSapps/appl/iby/12.0.0/bin:/u01/prod/fs1/EBSapps/appl/pon/12.0.0/bin64:/u01/prod/fs1/EBSapps/appl/sht/12.0.0/lib64:/u01/prod/fs1/EBSapps/appl/sht/12.0.0/lib -DserverType=wlx



weblogic.management.ManagementException: Unable to obtain lock on /u01/prod/fs1/FMW_Home/user_projects/domains/EBS_domain_PROD/servers/oacore_server1/tmp/oacore_server1.lok. Server may already be running
        at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:206)
        at weblogic.management.internal.ServerLocks.getServerLock(ServerLocks.java:67)
        at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:74)
        at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:462)
        at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:167)
        at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:881)
        at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:568)
        at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:469)
        at weblogic.Server.main(Server.java:71)

>
<Oct 30, 2018 10:36:34 AM AST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
<Oct 30, 2018 10:36:34 AM AST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
<Oct 30, 2018 10:36:34 AM AST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
<Oct 30, 2018 10:36:35 AM> <FINEST> <NodeManager> <Waiting for the process to die: 10418>
<Oct 30, 2018 10:36:35 AM> <INFO> <NodeManager> <Server failed during startup so will not be restarted>
<Oct 30, 2018 10:36:35 AM> <FINEST> <NodeManager> <runMonitor returned, setting finished=true and notifying waiters>




Solution : oacore service was already running , kill all OS processes and remove oacore_server1.lok file.Start the services and it will come up smoothly.

Sunday 3 February 2019

Solaris : Screen commands

Screen command creates a virtual emulation of tty display.

Most useful scenario for screen command is while applying long running patch.When we lose the ssh connection over network, we can reattach the session if we were running task under screen.

To start screen session:
$ screen


To detach screen and go back to normal ssh session
$ ctrl+a  +d

To list screen sessions
$ screen -ls


To reattach SCREEN session
$ screen -r


To reattach specific SCREEN session
$ screen -r <session-id>


To start screen session and assign session name to it
$ screen -S <session-name>


java.rmi.NoSuchObjectException: The object identified by: '296' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.

Unable  to start the weblogic server in Oracle application 12.2

Issue
++++
Starting WLS Admin Server...
<Sep 16, 2018 7:48:29 PM AST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
Refer /u02/TEST/fs1/inst/apps/TEST_gpdddsrv/logs/appl/admin/log/adadminsrvctl.txt for details

AdminServer logs are located at /u02/TEST/fs1/FMW_Home/user_projects/domains/EBS_domain_TEST/servers/AdminServer/logs

adadminsrvctl.sh: exiting with status 0

adadminsrvctl.sh: check the logfile /u02/TEST/fs1/inst/apps/TEST_gpdddsrv/logs/appl/admin/log/adadminsrvctl.txt for more information ...


.end std out.
java.rmi.NoSuchObjectException: The object identified by: '296' could not be found.  Either it was has not been exported or it has been collected by the distributed garbage collector.
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
        at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
        at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.getMBeanCount(Unknown Source)
        at weblogic.management.remote.common.RMIConnectionWrapper$11.run(ClientProviderBase.java:785)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
        at weblogic.security.Security.runAs(Security.java:61)
        at weblogic.management.remote.common.RMIConnectionWrapper.getMBeanCount(ClientProviderBase.java:783)
        at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getMBeanCount(RMIConnector.java:883)
        at oracle.apps.ad.util.WLUtil.forceShutDownServer(WLUtil.java:1799)
        at oracle.apps.ad.tools.configuration.EBSProvisioner.ebs_nmrestart_adminsrv(EBSProvisioner.java:4282)
        at oracle.apps.ad.tools.configuration.EBSProvisioner.ebs_nmstart_adminsrv(EBSProvisioner.java:4191)
        at oracle.apps.ad.tools.configuration.EBSProvisioner.ebs_nmstart_adminsrv(EBSProvisioner.java:4385)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at oracle.apps.ad.tools.configuration.EBSProvisioner.main(EBSProvisioner.java:9676)

.end err out.



Solution
Weblogic.nodemanager.NMException / java.rmi.NoSuchObjectException While Starting AdminServer (Doc ID 2335354.1)

CAUSE

Under DOMAIN_HOME/servers/AdminServer/nodemanager directory, there is a file called startup-copy.properties file.
This file has ADMIN_URL parameter. Adminserver does not need ADMIN_URL parameter defined in start-up.properties. If it is present, then it results in the error.
 

SOLUTION

  1. Make sure nodemanager.properties has StartScriptEnabled=true and StartScriptName=startWebLogic.sh
  2. Under DOMAIN_HOME/servers/AdminServer/nodemanager directory, make sure none of the files have ADMIN_URL parameter.