How to query the Oracle database instance name: Use SQL*Plus to connect and run the query: select name from v$instance; Navigate to "Database Instance" through Oracle Enterprise Manager (OEM) and view "Properties"; Check the environment Variable: %ORACLE_SID% in Windows, $ORACLE_SID in Linux/Unix.
How to query the Oracle database instance name
Method 1: Use SQL*Plus
Connect to Oracle database:
sqlplus / as sysdba
Execute the following query:
select name from v$instance;
Method Two: Use Oracle Enterprise Manager (OEM)
Method 3: Check environment variables
For Windows systems:
echo %ORACLE_SID%
For Linux/Unix systems:
echo $ORACLE_SID
The difference between instance name and SID
The instance name and SID are usually the same, but sometimes they may be different. The instance name is the human-readable name of the Oracle server instance, and the SID is the system identifier of the Oracle database itself.
The above is the detailed content of How to check database instance name in oracle. For more information, please follow other related articles on the PHP Chinese website!