You can view the Oracle database instance by using SQL Plus to query the INSTANCE_NAME column in the V$INSTANCE table. Use command line instructions such as ps -ef (Linux) or tasklist /FI "imagename eq oracle.exe" (Windows). The query results will display the name of the currently running Oracle instance. Each instance has a unique name consistent with its associated database service.
How to view the Oracle database instance
To view the Oracle database instance, you can use the following method:
1. Via SQL Plus
SELECT INSTANCE_NAME FROM V$INSTANCE;
2. Via the command line
ps -ef | grep pmon
tasklist /FI "imagename eq oracle.exe"
Output Explanation
The query results will display the name of the currently running Oracle instance. Each instance has a unique name consistent with its associated database service.
For example, if the query returns the following results:
INSTANCE_NAME ---------------- ORCLCDB
This means that an Oracle instance named "ORCLCDB" is running. This instance will be associated with a database service named "ORCLCDB".
The above is the detailed content of Check the instances of oracle database. For more information, please follow other related articles on the PHP Chinese website!