SID 与 Oracle tnsnames.ora 中的服务名称有何不同

2023-09-18数据库问题
22

本文介绍了SID 与 Oracle tnsnames.ora 中的服务名称有何不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

为什么我需要两个?当我必须使用一种或另一种时?

Why do I need two of them? When I have to use one or another?

推荐答案

引用 @DAC

简而言之:SID = 的唯一名称您的数据库,ServiceName = 使用的别名连接时

In short: SID = the unique name of your DB, ServiceName = the alias used when connecting

不完全正确.SID = INSTANCE 的唯一名称(例如在机器上运行的 oracle 进程).Oracle 将数据库"视为成为文件.

Not strictly true. SID = unique name of the INSTANCE (eg the oracle process running on the machine). Oracle considers the "Database" to be the files.

服务名称 = 实例(或多个实例)的别名.这样做的主要目的是,如果您正在运行一个集群,客户端可以说将我连接到 SALES.acme.com",DBA 可以即时更改实例的数量可用于 SALES.acme.com 请求,甚至将 SALES.acme.com 移动到完全不同的数据库,而无需客户端更改任何设置.

Service Name = alias to an INSTANCE (or many instances). The main purpose of this is if you are running a cluster, the client can say "connect me to SALES.acme.com", the DBA can on the fly change the number of instances which are available to SALES.acme.com requests, or even move SALES.acme.com to a completely different database without the client needing to change any settings.

这篇关于SID 与 Oracle tnsnames.ora 中的服务名称有何不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同
Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)...
2024-04-16 数据库问题
13

定义外键有什么好处
what are the advantages of defining a foreign key(定义外键有什么好处)...
2024-04-16 数据库问题
7

音乐库 MySQL 数据库
Music library MySQL database(音乐库 MySQL 数据库)...
2024-04-16 数据库问题
6

理解mysql解释
understanding mysql explain(理解mysql解释)...
2024-04-16 数据库问题
8

价格是浮点数还是小数点?
Float or decimal for prices?(价格是浮点数还是小数点?)...
2024-04-16 数据库问题
5

存储用户并传入单表或单表
store users and pass in single table or separate table(存储用户并传入单表或单表)...
2024-04-16 数据库问题
5