首页 oracle数据库名称的一些概念(Some concepts of the Oracle database name)

oracle数据库名称的一些概念(Some concepts of the Oracle database name)

举报
开通vip

oracle数据库名称的一些概念(Some concepts of the Oracle database name)oracle数据库名称的一些概念(Some concepts of the Oracle database name) oracle数据库名称的一些概念(Some concepts of the Oracle database name) db_name,instance_name,oracle_sid,db_domain,global_name,service_name 数据库名(db_name)就是一个数据库的标识,就像人的身份证号一样。如果一台机器上装了多全数据库,那么每一个数据库都有一个数据库名。在...

oracle数据库名称的一些概念(Some concepts of the Oracle database name)
oracle数据库名称的一些概念(Some concepts of the Oracle database name) oracle数据库名称的一些概念(Some concepts of the Oracle database name) db_name,instance_name,oracle_sid,db_domain,global_name,service_name 数据库名(db_name)就是一个数据库的标识,就像人的身份证号一样。如果一台机器上装了多全数据库,那么每一个数据库都有一个数据库名。在数据库安装或创建完成之后,参数db_name被写入参数文件之中。格式如下: ########################################### #数据库识别 ########################################### db_domain =“” db_name = ORCL 在创建数据库时就应考虑好数据库名,并且在创建完数据库之后,数据库名不宜修改,即使要修改也会很麻烦。因为,数据库名还被写入控制文件中,控制文件是以二进制型式存储的,用户无法修改控制文件的内容。假设用户修改了参数文件中的数据库名,即修改db_name的值。但是在Oracle启动时,由于参数文件中的db_name与控制文件中的数据库名不一致,导致数据库启动失败,将返回ora-01103错误 数据库名的作用 数据库名是在安装数据库、创建新的数据库、创建数据库控制文件、修改数据结构、备份与恢复数据库时都需要使用到的。 有很多Oracle安装文件目录是与数据库名相关的,如: E:\ \ \ \ system01.dbf Oracle oradata qcaplus这里的qcaplus 如果控制文件损坏或丢失,数据库将不能加载,这时要重新创建控制文件,方法是以安装方式启动实例,然后以创建控制文件命令创建控制文件,当然这个命令中也要指明db_name。 3。修改数据库名 建议:应在创建数据库时就确定好数据库名,数据库名不应作修改,因为修改数据库名是一件比较复杂的事情。 现在就来说明一下,如何在已创建数据之后,修改数据库名。步骤如下: (1)关闭数据库。 (2)修改数据库参数文件中的db_name参数的值为新的数据库名。 (3)以安装方式启动实例,修建控制文件(有关创建控制文件的命令语法,请参考Oracle文档) 4。查询当前数据库名 方法一:你可以看到数据库名; 方法二:显示参数数据库 方法三:查看参数文件 二、数据库实例名 1。数据库实例名的概念 先来解释以下,实例是什么东西。实例是访问Oracle数据库所需的一部分计算机内存和辅助处理后台进程,是由进程和这些进程所使用的内存(SGA)所构成一个集合,它根 本不需要一个与其相关联的数据库,没有任何数据文件也可以启动实例。 实例名指的是用于响应某个数据库操作的数据库管理系统的名称。她同时也叫SID。实例名是由参数instance_name决定的。如果这个参数不被指定(即instance_name没有被指定为任何值),那么实例的名字由该用户的环境变量oracle_sid(注意这里是大写)决定。在Windows平台下,则是注册 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf 中oracle_sid值决定。 三、oracle_sid 在实际中,对于数据库实例的标识有时使用实例名,有时使用oracle_sid,它们有什么区别呢, (oracle_sid) OS < ---------------- > Oracle数据库< --------(instance_name(实例名)) 上图表示实例名instance_name、oracle_sid与数据库及操作系统之 间的关系,虽然这里列出的两个参数都是数据库实例名, But the instance_name parameter is the ORACLE database, this parameter can query in the parameter file; and the ORACLE_SID parameter is the operating system environment variables, with the same ORACLE_BASE and ORACLE_HOME usage, and for operating system interaction. That is to say, in the operating system, you must use ORACLE_SID to get the instance name. And the ORACLE_SID must be consistent with the value of the instance_name, otherwise you will receive an error on the UNIX platform that is "ORACLE not available" on the WinNT platform and is "TNS: protocol adapter error"". Four, database domain name and global database name 1. concepts and relationships Use the database name (da_name) unique identifier for a database, this representation is sufficient for a single database, but with the popularity of the distributed database consists of multiple databases, the database command burden to database management, because the name of the database may be the same, causing confusion in management. In order to solve this kind of situation, the introduction of the db_domain parameters, this is decided jointly by db_name and db_domain two parameters in the database to avoid identification, because the database name and cause confusion in management. This is similar to the management of machine names on the internet. We connect the two parameters of db_name and db_domain with '' 'to represent a database and call the database' global_name ', that is, it extends the db_name. The db_name parameter only by letters, numbers, '_' and '#' and '$', and up to 8 characters. The domain name database (db_domain): the definition of a database where the domain, the domain name with the Internet "domain" does not have any relationship, only the database administrator to manage the distributed database and better decision according to the actual situation. Of course, in order to facilitate management, it can be equal to the domain of the internet. Global database name (global_name): unique identifier for a database (Oracle, database), and Oracle suggests identifying the database in this way. This value is determined when the database is created, with the default value of db_name. db_domain. After any modification to the db_name and db_domain parameters in the file does not affect the value of global_name, if you want to modify the Global_name, database rename global_name to alter can only use the command to modify, and then modify the corresponding parameter. 2. query database domain names Method 1: select, value, from, v$parameter, where, name ='db_domain'; Method two: show, parameter, domain Method three: query in the parameter file Five, database service name This parameter is newly introduced by oracle8i. Before 8i, we used SID to represent an instance of a database, but in a Oracle parallel environment, a database corresponds to multiple instances, which required a multi network service name with tedious settings. To facilitate settings in a parallel environment, service_name parameters are introduced. This parameter corresponds to a database, not an instance, and this parameter has many other benefits. The default value of this parameter is db_name.db_domain, which is equal to global_name.. If the database has a domain name, the database service name is the global database name; otherwise, the database service name is the same as the database name. A database can correspond to multiple service_name in order to achieve a more flexible configuration. This parameter is not directly related to SID, that is, service_name does not have to be the same as SID. A Oracle network component starting with Oracle8i, the host string for which the database is connected to the client, and the database service name used. SID is used before, that is, the database instance name. Query database service name Method 1: select, value, from, v$parameter, where, name ='service_name'; Method two: show, parameter, service_name Six, network service name Network service name (net_service_name), also known as database alias. It is necessary for client program to access database, shielding the details of how the client connects to the server, and realizing the transparent position of the database. The network service name is recorded in the tnsnames.ora file. The network service name is from the client's point of view, and the network service name can be specified when the client connects to a remote database or other service. Therefore, you need to use one or more naming methods to resolve this Net service name as a connection descriptor for a connection database or other service. See below: [local] resolve the network service name in the tnsnames.ora file stored in the local client as the connection descriptor. [Oracle Names] - provided by the Oracle name server, provides analytic methods for each Oracle Net service on the network [host name] connects to the Oracle database service via the host alias in the TCP/IP environment [Sun, NIS]/[DCE, CDS] - dedicated systems are not applicable in the Windows 2000 system environment
本文档为【oracle数据库名称的一些概念(Some concepts of the Oracle database name)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_279425
暂无简介~
格式:doc
大小:24KB
软件:Word
页数:0
分类:理学
上传时间:2017-09-18
浏览量:15