Oracle Common link string format:
Jdbc:oracle:thin:@//Jdbc:oracle:thin:@Jdbc:oracle:thin:@<tnsname>
How to query SIDs under Linux:
In the case of configuring an Oracle environment variable, you can use the Echo $ORACLE _sid if you are not able to query using PS-EF |grep Oracle:
In the Windows environment, Oracle is managed as a background service, so look at the name: "ORACLESERVICEORCL" in the service, management tools, Control Panel, then ORCL is SID;
The difference between service_name and SID:
SERVICE_NAME: This parameter was introduced by Oracle8i. Before 8i, a SID was used to represent an instance of the identity database, but in Oracle's parallel environment, a database corresponds to multiple instances, which requires multiple network service names and is cumbersome to set up. In order to facilitate the setting in the parallel environment, the SERVICE_NAME parameter is introduced, which corresponds to a database, not an instance, and there are many other benefits to this parameter. The default value for this parameter is db_name. Db_domain is equal to Global_name. A database can correspond to multiple service_name for a more flexible configuration. This parameter is not directly related to the SID, that is, the service name must be the same as the SID
The SID is the name of the DB instance, and each instance is different.
Oracle database connection string format