Thursday, January 24, 2019

How to know oracle database instance status | Oracle Database instance is running or not | Instance name | Instance status



This post will help you to know the status of oracle database instance. So you can find the database instance is running or not. 


After completing this post study you will get the answer of below questions.
  • How to know oracle database instance status?
  • Oracle Database instance is running or not
  • How to find Instance name?



Run this below query:

SQL> select instance_name, STATUS, DATABASE_STATUS, TO_CHAR(startup_time, 'DD-MON-YY HH:MM:SS AM') startedate from v$instance;


How to know oracle database instance status?





Output will be like this:

INSTANCE_NAME     STATUS       DATABASE_STATUS      STARTDATE
---------------- ------------ ----------------- -----------------------------------------------------
NEW                              OPEN          ACTIVE                    24-JAN-19 10:01:15 AM



How to know oracle database instance status? 






Note: you can use this query to get individual output.
For-example:




Run below query to know the instance name only. 

SQL> select instance_name from v$instance; 

output:            INSTANCE_NAME
                        ----------------
                         NEW


How to know oracle database instance name?



 if you have any question then feel free to comments. 

 

You can find me on Fiverr & LinkedIn


Saturday, January 19, 2019

how to check cpu info in linux | cpu info in Linux | Check CPU info in Linux




This post will help you to check your cpu info in Linux. 

Use this below command and you will get all info of your cpu in linux.

$ cat /proc/cpuinfo

I'm showing to you whats happening in my system when I run it. 
Note: My system configuration is core i5 with 8GB RAM. 
====================
[appsdba@reyaz ~]$ cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 0
cpu cores    : 6
apicid        : 0
initial apicid    : 0
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 1
cpu cores    : 6
apicid        : 2
initial apicid    : 2
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 2
cpu cores    : 6
apicid        : 4
initial apicid    : 4
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 3
cpu cores    : 6
apicid        : 6
initial apicid    : 6
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 4
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 4
cpu cores    : 6
apicid        : 8
initial apicid    : 8
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

processor    : 5
vendor_id    : GenuineIntel
cpu family    : 6
model        : 158
model name    : Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
stepping    : 10
microcode    : 0x96
cpu MHz        : 2801.000
cache size    : 9216 KB
physical id    : 0
siblings    : 6
core id        : 5
cpu cores    : 6
apicid        : 10
initial apicid    : 10
fpu        : yes
fpu_exception    : yes
cpuid level    : 22
wp        : yes
flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap
bogomips    : 5609.70
clflush size    : 64
cache_alignment    : 64
address sizes    : 39 bits physical, 48 bits virtual
power management:

[appsdba@reyaz ~]$  

====================== 

 

You can find me on Fiverr & LinkedIn

How to Start / Stop services in Oracle Applications R12

This post will teach you How to Start/Stop services in Oracle Applications R12. 


In this post I'll show all step according to my system and path. you should match with your system.

At first know the step to start / stop services in Oracle Applications R12

Steps to start services:
  • Listener start 
  • Database start
  • Applications start

Scripts to start services: 
  •  Listener = addlnctl.sh
  • Database = addbctl.sh
  • Applications = adstrtal.sh

Command to start services:
  • Listener = $ sh addlnctl.sh start NEW
  • Database =  $ sh addbctl.sh start
  • Applications =  $ sh adstrtal.sh

Steps to stop services:
  • Applications stop
  • Database stop
  • Listener stop

 Scripts to stop services:
  • Applications = adstpall.sh
  • Database = addbctl.sh
  • Listener = addlnctl.sh

Command to stop services:
  • Listener = $ sh addlnctl.sh stop NEW
  • Database =  $ sh addbctl.sh stop immediate NEW
  • Applications =  $ sh adstpall.sh




So, we should start listener first, then Database and finally Applications.
And we should stop Application first, then database and finally listener.


Some important note: 
in this post .......
  • SID = NEW
  • user = appsdba
  • hostname = reyaz 
  • exiting with status 0 = no error




Let's start service up of Listener: 

[appsdba@reyaz NEW_reyaz]$ cd /u01/DB/12.1.0/appsutil/scripts/NEW_reyaz/

[appsdba@reyaz NEW_reyaz]$ ls
adautocfg.sh  addbctl.sh   adexecsql.pl  adpreclone.pl  adstrtdb.sql
adchknls.pl   addlnctl.sh  adlsnodes.sh  adstopdb.sql



 Run script
addlnctl.sh

===================

[appsdba@reyaz NEW_reyaz]$ sh addlnctl.sh start NEW
Logfile: /u01/DB/12.1.0/appsutil/log/NEW_reyaz/addlnctl.txt

You are running addlnctl.sh version 120.4


Starting listener process NEW ...


LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 19-JAN-2019 13:55:20

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Starting /u01/DB/12.1.0/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.1.0.2.0 - Production
System parameter file is /u01/DB/12.1.0/network/admin/NEW_reyaz/listener.ora
Log messages written to /u01/DB/12.1.0/admin/NEW_reyaz/diag/tnslsnr/reyaz/new/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=reyaz.ksrm.com)(PORT=1522)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=reyaz.ksrm.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     NEW
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                19-JAN-2019 13:55:21
Uptime                    0 days 0 hr. 0 min. 5 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/DB/12.1.0/network/admin/NEW_reyaz/listener.ora
Listener Log File         /u01/DB/12.1.0/admin/NEW_reyaz/diag/tnslsnr/reyaz/new/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=reyaz.ksrm.com)(PORT=1522)))
The listener supports no services
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/DB/12.1.0/appsutil/log/NEW_reyaz/addlnctl.txt for more information ...  

[appsdba@reyaz NEW_reyaz]$

Done, Listener is up now. Next step is Database start.
========================================== 


Let's start service up of Database:



[appsdba@reyaz NEW_reyaz]$ cd /u01/DB/12.1.0/appsutil/scripts/NEW_reyaz/

[appsdba@reyaz NEW_reyaz]$ ls
adautocfg.sh  addbctl.sh   adexecsql.pl  adpreclone.pl  adstrtdb.sql
adchknls.pl   addlnctl.sh  adlsnodes.sh  adstopdb.sql



 Run script addbctl.sh
===================

[appsdba@reyaz NEW_reyaz]$ sh addbctl.sh start

You are running addbctl.sh version 120.1


Starting the database NEW ...


SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 19 13:55:36 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 2147483648 bytes
Fixed Size            3712904 bytes
Variable Size          704645240 bytes
Database Buffers     1426063360 bytes
Redo Buffers           13062144 bytes
Database mounted.
Database opened.
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

addbctl.sh: exiting with status 0

[appsdba@reyaz NEW_reyaz]$


Done, Database is up now, Next step is Applications
================================================





Let's start service up of Applications:



[appsdba@reyaz NEW_reyaz]$ cd /u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts

[appsdba@reyaz scripts]$ ls
adadminsrvctl.sh  adcmctl.sh          adnodemgrctl.sh  adstrtal.sh       java.sh      mwactlwrpr.sh
adalnctl.sh       adexecsql.pl        adopmnctl.sh     cz64bitengine.pl  jtffmctl.sh  pon64bitengine.pl
adapcctl.sh       adformsrvctl.sh     adpreclone.pl    gsmstart.sh       msc
adautocfg.sh      admanagedsrvctl.sh  adstpall.sh      ieo               mwactl.sh
[appsdba@reyaz scripts]$



 Run script adstrtal.sh
===================
[appsdba@reyaz scripts]$ sh adstrtal.sh

You are running adstrtal.sh version 120.24.12020000.11


Enter the APPS username: apps

Enter the APPS password:
Enter the WebLogic Server password:

The logfile for this session is located at /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adstrtal.log

Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/jtffmctl.sh start
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running jtffmctl.sh version 120.3.12020000.4

Validating Fulfillment patch level via /u01/APPS/fs1/EBSapps/comn/java/classes
Fulfillment patch level validated.
Starting Fulfillment Server for NEW on port 9301 ...

jtffmctl.sh: exiting with status 0


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adopmnctl.sh start
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running adopmnctl.sh version 120.0.12020000.2

Starting Oracle Process Manager (OPMN) ...

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adopmnctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adapcctl.sh start
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running adapcctl.sh version 120.0.12020000.6

Starting OPMN managed Oracle HTTP Server (OHS) instance ...

adapcctl.sh: exiting with status 0

adapcctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adapcctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adnodemgrctl.sh start -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running adnodemgrctl.sh version 120.11.12020000.12


Calling txkChkEBSDependecies.pl to perform dependency checks for ALL MANAGED SERVERS
Perl script txkChkEBSDependecies.pl got executed successfully


Starting the Node Manager...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adnodemgrctl.txt for details

NodeManager log is located at /u01/APPS/fs1/FMW_Home/wlserver_10.3/common/nodemanager/nmHome1

adnodemgrctl.sh: exiting with status 0

adnodemgrctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adnodemgrctl.txt for more information ... 


.end std out.
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
*** Log File = /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/rgf/TXK/txkChkEBSDependecies_Sat_Jan_19_14_46_43_2019/txkChkEBSDependecies_Sat_Jan_19_14_46_43_2019.log

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adalnctl.sh start
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

adalnctl.sh version 120.3.12020000.4

Checking for FNDFS executable.
Starting listener process APPS_NEW.

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adalnctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adcmctl.sh start
Timeout specified in context file: 1000 second(s)

script returned:
****************************************************

You are running adcmctl.sh version 120.19.12020000.7

Starting concurrent manager for NEW ...
Starting NEW_0119@NEW Internal Concurrent Manager
Default printer is noprint

adcmctl.sh: exiting with status 0


adcmctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adcmctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adadminsrvctl.sh start -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running adadminsrvctl.sh version 120.10.12020000.10

Starting WLS Admin Server...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adadminsrvctl.txt for details

AdminServer logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/AdminServer/logs

adadminsrvctl.sh: exiting with status 0

adadminsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adadminsrvctl.txt for more information ... 


.end std out.

.end err out.

****************************************************





Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh start forms_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Starting forms_server1...

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/forms_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adformsctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh start oacore_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Starting oacore_server1...

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/oacore_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoacorectl.txt for more information ... 


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh start oafm_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Starting oafm_server1...

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/oafm_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoafmctl.txt for more information ... 


.end std out.

.end err out.

****************************************************



All enabled services for this node are started.

adstrtal.sh: Exiting with status 0

adstrtal.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adstrtal.log for more information ... 

You have new mail in /var/spool/mail/appsdba
[appsdba@reyaz scripts]$


Done, Applications are now up, 
==============================================





Service stop Applications:



[appsdba@reyaz NEW_reyaz]$ cd /u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts

[appsdba@reyaz scripts]$ ls
adadminsrvctl.sh  adcmctl.sh          adnodemgrctl.sh  adstrtal.sh       java.sh      mwactlwrpr.sh
adalnctl.sh       adexecsql.pl        adopmnctl.sh     cz64bitengine.pl  jtffmctl.sh  pon64bitengine.pl
adapcctl.sh       adformsrvctl.sh     adpreclone.pl    gsmstart.sh       msc
adautocfg.sh      admanagedsrvctl.sh  adstpall.sh      ieo               mwactl.sh
[appsdba@reyaz scripts]$



 Run script adstpall.sh
===================
[appsdba@reyaz scripts]$ sh adstpall.sh

You are running adstpall.sh version 120.22.12020000.7


Enter the APPS username: apps

Enter the APPS password:
Enter the WebLogic Server password:

The logfile for this session is located at /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adstpall.log


Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adapcctl.sh stop
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running adapcctl.sh version 120.0.12020000.6

Stopping OPMN managed Oracle HTTP Server (OHS) instance ...

adapcctl.sh: exiting with status 0
adapcctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adapcctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adcmctl.sh stop
Timeout specified in context file: 1000 second(s)

script returned:
****************************************************

You are running adcmctl.sh version 120.19.12020000.7

Shutting down concurrent managers for NEW ...
ORACLE Password:
Submitted request 2572606 for CONCURRENT FND SHUTDOWN


adcmctl.sh: exiting with status 0


adcmctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adcmctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/jtffmctl.sh stop
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running jtffmctl.sh version 120.3.12020000.4

Shutting down Fulfillment Server for NEW on port 9301 ...

jtffmctl.sh: exiting with status 0


.end std out.

.end err out.

****************************************************




Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adopmnctl.sh stop
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

You are running adopmnctl.sh version 120.0.12020000.2

Stopping Oracle Process Manager (OPMN)  and the managed processes ...
opmnctl stopall: stopping opmn and all managed processes...

adopmnctl.sh: exiting with status 0

adopmnctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adopmnctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh abort oafm_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Stopping oafm_server1...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoafmctl.txt for details

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/oafm_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoafmctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh abort forms_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Stopping forms_server1...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adformsctl.txt for details

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/forms_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adformsctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/admanagedsrvctl.sh abort oacore_server1 -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running admanagedsrvctl.sh version 120.14.12020000.11

Stopping oacore_server1...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoacorectl.txt for details

Server specific logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/oacore_server1/logs

admanagedsrvctl.sh: exiting with status 0

admanagedsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adoacorectl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adalnctl.sh stop
Timeout specified in context file: 100 second(s)

script returned:
****************************************************

adalnctl.sh version 120.3.12020000.4

Shutting down listener process APPS_NEW.

adalnctl.sh: exiting with status 0


adalnctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adalnctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adadminsrvctl.sh stop -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running adadminsrvctl.sh version 120.10.12020000.10

Stopping WLS Admin Server...
Refer /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adadminsrvctl.txt for details

AdminServer logs are located at /u01/APPS/fs1/FMW_Home/user_projects/domains/EBS_domain_NEW/servers/AdminServer/logs

adadminsrvctl.sh: exiting with status 0

adadminsrvctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adadminsrvctl.txt for more information ...


.end std out.

.end err out.

****************************************************



Executing service control script:
/u01/APPS/fs1/inst/apps/NEW_reyaz/admin/scripts/adnodemgrctl.sh stop -nopromptmsg
Timeout specified in context file: -1 second(s)

script returned:
****************************************************

You are running adnodemgrctl.sh version 120.11.12020000.12


NodeManager log is located at /u01/APPS/fs1/FMW_Home/wlserver_10.3/common/nodemanager/nmHome1

adnodemgrctl.sh: exiting with status 0

adnodemgrctl.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adnodemgrctl.txt for more information ...


.end std out.

.end err out.

****************************************************



All enabled services on this node are stopped.

adstpall.sh:Exiting with status 0

adstpall.sh: check the logfile /u01/APPS/fs1/inst/apps/NEW_reyaz/logs/appl/admin/log/adstpall.log for more information ...

[appsdba@reyaz scripts]$


Done, Applications are down now, Next step to down database. 
=========================================


Service stop Database:


[appsdba@reyaz NEW_reyaz]$ cd /u01/DB/12.1.0/appsutil/scripts/NEW_reyaz/

[appsdba@reyaz NEW_reyaz]$ ls
adautocfg.sh  addbctl.sh   adexecsql.pl  adpreclone.pl  adstrtdb.sql
adchknls.pl   addlnctl.sh  adlsnodes.sh  adstopdb.sql



 Run script addbctl.sh
===================

[appsdba@reyaz NEW_reyaz]$ sh addbctl.sh stop immediate NEW

You are running addbctl.sh version 120.1


Shutting down database NEW ...


SQL*Plus: Release 12.1.0.2.0 Production on Sat Jan 19 15:27:00 2019

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected.
Database closed.
Database dismounted.
ORACLE instance shut down.
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

addbctl.sh: exiting with status 0

[appsdba@reyaz NEW_reyaz]$ 


Done, Database is down now, Next step to down Listener,
========================================


Service stop Listener: 
[appsdba@reyaz NEW_reyaz]$ cd /u01/DB/12.1.0/appsutil/scripts/NEW_reyaz/

[appsdba@reyaz NEW_reyaz]$ ls
adautocfg.sh  addbctl.sh   adexecsql.pl  adpreclone.pl  adstrtdb.sql
adchknls.pl   addlnctl.sh  adlsnodes.sh  adstopdb.sql



  

Run script addlnctl.sh
===================
 [appsdba@reyaz NEW_reyaz]$ sh addlnctl.sh stop NEW
Logfile: /u01/DB/12.1.0/appsutil/log/NEW_reyaz/addlnctl.txt

You are running addlnctl.sh version 120.4


Shutting down listener process NEW ...


LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 19-JAN-2019 15:30:36

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=reyaz.ksrm.com)(PORT=1522)))
The command completed successfully

addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/DB/12.1.0/appsutil/log/NEW_reyaz/addlnctl.txt for more information ... 

[appsdba@reyaz NEW_reyaz]$ 


Done, All services are down now.
=======================================

 

You can find me on Fiverr & LinkedIn

Thursday, January 17, 2019

How to recover a root password in linux RHEL 7 | How to reset a root password in Linux | Forget root password in RHEL 7

How to recover a root password
How to reset a root password
Forget root password




In this post we will learn how to recover a root password in RHEL 7 system. If you forgot your root password then this post will help you to recover or reset the root password. Please follow all steps as shown as below. Hope it will work for you. 


Note: Here in this post I have added all the things that I tested in my system. It worked for me when I forgot my root password. 

 

Step:01
=========
Press e on your keyboard when booting starting



Step:02
========
Use your arrow keys to move to the Linux16 line




Step:03
=======
Using your del key or your backspace key, remove rhgb quiet and replace with the following:

rd.break enforcing=0






Step:04
=======
Press Ctrl-x to start.




Step:05
=======
Remount the hard drive with read-write access:

# mount –o remount,rw /sysroot

 

Step:06
=======
Run chroot to access the system:

# chroot /sysroot

 

Step:07
=======
You can now change the root password:

# passwd

 

Step:08
=======
Type the new root password twice when prompted. If you are successful, you should see a message that reads "all authentication tokens updated successfully."

 

Type exit twice to reboot the system.

 


Step:09
=======
Log in as root and restore the SELinux label to the /etc/shadow file.

# restorecon -v /etc/shadow

Turn SELinux back to enforcing mode:

# setenforce 1



Done.

 

You can find me on Fiverr & LinkedIn

How to configure IP address in Linux | How to add an IP address in Linux | How to change IP address in Linux

How to configure IP address in Linux 
How to add an IP address in Linux 
How to change IP address in Linux





To configure an IP address or to change an IP address or to add an IP address please follow below details. 

In this post I'm showing command and images according to my system. 


Steps: 
[root@reyaz ~]# ifconfig

[root@reyaz ~]# vi /etc/sysconfig/network-scripts/p8p1
Edit as below

TYPE=Ethernet
BOOTPROTO=none
IPADDR0=192.168.20.234
PREFIX0=22
GATEWAY0=192.168.20.1
DNS1=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME="
p8p11"

UUID=43ff9b45-9de4-4e2e-ae09-254d6bb3e060
ONBOOT=yes


save and exit

[root@reyaz ~]# systemctl restart network 

Done



At first check your ether name by using the Linux command "ifconfig"



Then open the file where all info is stored for your network (ether)
 [root@reyaz ~]# vi /etc/sysconfig/network-scripts/p8p1



Then edit "NAME" line and "IPADDR" line according to my steps and image

After that save and exit. 

Now restart your system Network.


Check again by command   "ifconfig"

Done.
  

 

You can find me on Fiverr & LinkedIn

How to delete a user in Linux | How to remove a user in Linux



How to delete a user in Linux
How to remove a user in Linux


To delete a user you must have root access. Then use this linux command 

[root@reyaz ~]# userdel test01

Note: By using this linux command you deleted only the user not deleted the user home directory.
see below image that showing we used command to delete the user but user home directory still now present. It's not deleted. 




To delete a user home directory you should use the linux command  "rm -rf /home/test01"
Now see the below image.



In this above image there is no test01 user home directory. 


Steps: 
[root@reyaz ~]# userdel test01
[root@reyaz ~]# ls /home/
applmgr  appsdba  oracle  oracle1  rhossan  test01


[root@reyaz ~]# rm -rf /home/test01/
[root@reyaz ~]# ls /home/
applmgr  appsdba  oracle  oracle1  rhossan




You can find me on Fiverr & LinkedIn


How to change user password in Linux | How to add a user password in Linux



Add a user password in Linux.


To change or add a user password in Linux, you must have root access.


Follow below step and see picture also. 

Steps:
[root@reyaz ~]# passwd test01
Changing password for user test01.
New password:
BAD PASSWORD: The password is shorter than 7 characters
Retype new password:
passwd: all authentication tokens updated successfully.



First confirm that you have root access
Type "passwd (username)"
type new password for this user
Retype the password 
Done.

You can find me on Fiverr & LinkedIn




How to create a user in Linux | How to add a user in Linux



In this post we'll see .....
How to create a user in Linux. 


To create a user or to add a user in Linux by using Linux command we will use the command useradd. 

You must be in root user to create a new user.

see the below image. we are going to create a new user test01 by using Linux command usseradd. The command line will be like this.... "useradd test01"


The above picture showing that we have used the command "usseradd test01" to add a new user. after that by using "ls /home/" command you can check the user is added or not. 


steps:
[root@reyaz ~]# useradd test01
[root@reyaz ~]# ls /home/
applmgr  appsdba  oracle  oracle1  rhossan  test01

[root@reyaz ~]#


You can find me on Fiverr & LinkedIn

Tuesday, January 15, 2019

Linux Command List | Linux Command for Beginner | Most using Linux Command List




20 Linux command | Linux command list | Linux command for daily use | Linux command for beginner



In this post we will get most common and import some command of Linux. Each and every command useful for beginner. All command are simple and small command that's why easy to remember and use.

Follow this post and try to use every Linux command in your system. If you need more info or you have any suggestion about this Linux command post then please comment your opinion below.



cd      
This command used for entering to a directory. Image showing cd command to enter "home" directory



ls 
command used to check detail into your current directory. Image showing we are checking detail of our current directory home. 



pwd 
command to show your current directory path.  Image showing my current directory (appsutil) path is /u01/DB/12.1.0/appsutil





cd .. 
command using to go previous directory or to take a back step. For more understanding see the below image

 

free ram 
you can use the Linux command free ram to check ram status in your system. Some more similar commands you can use. I’m writing below some more similar commands. Check images also.




Free –m

free –g





shutdown 
this is the command to shut down your system




 df -hT
This command will show you all details of your storage that is used and available. follow the heading then you will find File type, mount info, used, available and total size etc



cp 
to copy any file or directory you can use the command. If you are copying a directory then use –r. see the image.





mv 
this command for moving any file or directory from one location to another location in your system. And mv command can be used to rename any file or directory. For more understanding please check the below image



 


rm 
this command is using for deleting anything. If you are deleting any directory then use –rf also.
 





clear 
to clear your terminal then use this command. See below image.





du –sh if you are trying to know the total size of your current directory the use like below image.
  



vi to open a file you can use the vi command. 





cat the command cat can help you to read the in same screen. It will not open in another different screen.





mkdir is using to make a directory. See below image there we made xyz directory by using this mkdir command




history this is one of most helpful command for beginner. You can find all of your previous command that you have been used. 





chmod is a command to give read write and execute permission. In this below image we are giving the permission to APPS directory.





chown 
this command for giving ownership to a user and group for a directory. 





su 
to change a user mode then use this command. In this below image we were in root user. Then we used su command to go to appsdba user mode. 






reboot 
it’s a simple linux command to restart your system.





For more commands and more info about linux and oracle please follow our blog. We will be here again with more knowledge of linux and oracle apps dba. 


You can find me on Fiverr & LinkedIn