• Uncategorized

About linux : How-can-we-find-the-system-service-name-of-oracle-db

Question Detail

when I run ps -ef it is showing something like this

oracle 42547 1 0 Mar14 ? 00:00:35 asm_pmon_+ASM

Help me to find exact service name for oracle Database.

Question Answer

ps -ef | grep pmon   

will show you all the processes monitor processes running in the server.

In your case, it shows asm_pmon_+ASM is the name of the process, which means,
+ASM is one of your instances running.

to extract +ASM only from the text, use:

ps -ef | grep "[p]mon" | awk -F "_" '{ print $NF }'.

Another option is to use pgrep pmon instead of ps -ef | grep ..

It is pretty straightforward when you are connected to the database instead.

select sys_context('USERENV','SERVICE_NAME') from dual;

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.