搜索
首页数据库mysql教程Oracle中的global

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入 1. You connect to SALES.US.EXAMPLE.COM and query the GLOBAL_NAME data dictionary view to determine the current database global name: CONNECT SYSTEM@sales.us.example.com SELECT * FROM G

欢迎进入Oracle社区论坛,与200万技术人员互动交流 >>进入

    1. You connect to SALES.US.EXAMPLE.COM and query the GLOBAL_NAME data dictionary view to determine the current database global name:

    CONNECT SYSTEM@sales.us.example.com

    SELECT * FROM GLOBAL_NAME;

    GLOBAL_NAME

    ----------------------------------------------------------------------------

    SALES.US.EXAMPLE.COM

    2. You query the V$PARAMETER view to determine the current setting for the DB_DOMAIN initialization parameter:

    SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'db_domain';

    NAME VALUE

    --------- -----------

    db_domain US.EXAMPLE.COM

    3. You then create a database link to a database called hq, using only a partially-specified global name:

    CREATE DATABASE LINK hq USING 'sales';

    The database expands the global database name for this link by appending the domain part of the global database name of the local database to the name of the database specified in the link.

    4. You query USER_DB_LINKS to determine which domain name the database uses to resolve the partially specified global database name:

    SELECT DB_LINK FROM USER_DB_LINKS;

    DB_LINK

    ------------------

    HQ.US.EXAMPLE.COM

    This result indicates that the domain part of the global database name of the local database is us.example.com. The database uses this domain in resolving partial database link names when the database link is created.

    5. Because you have received word that the sales database will move to Japan, you rename the sales database to sales.jp.example.com:

    ALTER DATABASE RENAME GLOBAL_NAME TO sales.jp.example.com;

    SELECT * FROM GLOBAL_NAME;

    GLOBAL_NAME

    ----------------------------------------------------------------------------

    SALES.JP.EXAMPLE.COM

    6. You query V$PARAMETER again and discover that the value of DB_DOMAIN is not changed, although you renamed the domain part of the global database name:

    SELECT NAME, VALUE FROM V$PARAMETER

    WHERE NAME = 'db_domain';

    NAME VALUE

    --------- -----------

    db_domain US.EXAMPLE.COM

    This result indicates that the value of the DB_DOMAIN initialization parameter is independent of the ALTER DATABASE RENAME GLOBAL_NAME statement. The ALTER DATABASE statement determines the domain of the global database name, not the DB_DOMAIN initialization parameter (although it is good practice to alter DB_DOMAIN to reflect the new domain name)。

    7. You create another database link to database supply, and then query USER_DB_LINKS to see how the database resolves the domain part of the global database name of supply:

    CREATE DATABASE LINK supply USING 'supply';

    SELECT DB_LINK FROM USER_DB_LINKS;

    DB_LINK

    ------------------

    HQ.US.EXAMPLE.COM

    SUPPLY.JP.EXAMPLE.COM

    This result indicates that the database resolves the partially specified link name by using the domain jp.example.com. This domain is used when the link is created because it is the domain part of the global database name of the local database. The database does not use the DB_DOMAIN initialization parameter setting when resolving the partial link name.

    8. You then receive word that your previous information was faulty: sales will be in the ASIA.JP.EXAMPLE.COM domain, not the JP.EXAMPLE.COM domain. Consequently, you rename the global database name as follows:

    ALTER DATABASE RENAME GLOBAL_NAME TO sales.asia.jp.example.com;

    SELECT * FROM GLOBAL_NAME;

    GLOBAL_NAME

    ----------------------------------------------------------------------------

    SALES.ASIA.JP.EXAMPLE.COM

    You query V$PARAMETER to again check the setting for the parameter DB_DOMAIN:

    SELECT NAME, VALUE FROM V$PARAMETER

    WHERE NAME = 'db_domain';

    NAME VALUE

    ---------- -----------

    db_domain US.EXAMPLE.COM

    The result indicates that the domain setting in the parameter file is the same as it was before you issued either of the ALTER DATABASE RENAME statements.

    9. Finally, you create a link to the warehouse database and again query USER_DB_LINKS to determine how the database resolves the partially-specified global name:

    CREATE DATABASE LINK warehouse USING 'warehouse';

    SELECT DB_LINK FROM USER_DB_LINKS;

    DB_LINK

    ------------------

    HQ.US.EXAMPLE.COM

    SUPPLY.JP.EXAMPLE.COM

    WAREHOUSE.ASIA.JP.EXAMPLE.COM

    Again, you see that the database uses the domain part of the global database name of the local database to expand the partial link name during link creation.

    由此说明, alter database rename global_name to xx并不影响db_domain参数, 而创建db link时使用的是global_name而不是db_domain.

Oracle中的global

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
解释酸的特性(原子,一致性,隔离,耐用性)。解释酸的特性(原子,一致性,隔离,耐用性)。Apr 16, 2025 am 12:20 AM

ACID属性包括原子性、一致性、隔离性和持久性,是数据库设计的基石。1.原子性确保事务要么完全成功,要么完全失败。2.一致性保证数据库在事务前后保持一致状态。3.隔离性确保事务之间互不干扰。4.持久性确保事务提交后数据永久保存。

MySQL:数据库管理系统与编程语言MySQL:数据库管理系统与编程语言Apr 16, 2025 am 12:19 AM

MySQL既是数据库管理系统(DBMS),也与编程语言紧密相关。1)作为DBMS,MySQL用于存储、组织和检索数据,优化索引可提高查询性能。2)通过SQL与编程语言结合,嵌入在如Python中,使用ORM工具如SQLAlchemy可简化操作。3)性能优化包括索引、查询、缓存、分库分表和事务管理。

mySQL:使用SQL命令管理数据mySQL:使用SQL命令管理数据Apr 16, 2025 am 12:19 AM

MySQL使用SQL命令管理数据。1.基本命令包括SELECT、INSERT、UPDATE和DELETE。2.高级用法涉及JOIN、子查询和聚合函数。3.常见错误有语法、逻辑和性能问题。4.优化技巧包括使用索引、避免SELECT*和使用LIMIT。

MySQL的目的:有效存储和管理数据MySQL的目的:有效存储和管理数据Apr 16, 2025 am 12:16 AM

MySQL是一种高效的关系型数据库管理系统,适用于存储和管理数据。其优势包括高性能查询、灵活的事务处理和丰富的数据类型。实际应用中,MySQL常用于电商平台、社交网络和内容管理系统,但需注意性能优化、数据安全和扩展性。

SQL和MySQL:了解关系SQL和MySQL:了解关系Apr 16, 2025 am 12:14 AM

SQL和MySQL的关系是标准语言与具体实现的关系。1.SQL是用于管理和操作关系数据库的标准语言,允许进行数据的增、删、改、查。2.MySQL是一个具体的数据库管理系统,使用SQL作为其操作语言,并提供高效的数据存储和管理。

说明InnoDB重做日志和撤消日志的作用。说明InnoDB重做日志和撤消日志的作用。Apr 15, 2025 am 12:16 AM

InnoDB使用redologs和undologs确保数据一致性和可靠性。1.redologs记录数据页修改,确保崩溃恢复和事务持久性。2.undologs记录数据原始值,支持事务回滚和MVCC。

在解释输出(类型,键,行,额外)中要查找的关键指标是什么?在解释输出(类型,键,行,额外)中要查找的关键指标是什么?Apr 15, 2025 am 12:15 AM

EXPLAIN命令的关键指标包括type、key、rows和Extra。1)type反映查询的访问类型,值越高效率越高,如const优于ALL。2)key显示使用的索引,NULL表示无索引。3)rows预估扫描行数,影响查询性能。4)Extra提供额外信息,如Usingfilesort提示需要优化。

在解释中使用临时状态以及如何避免它是什么?在解释中使用临时状态以及如何避免它是什么?Apr 15, 2025 am 12:14 AM

Usingtemporary在MySQL查询中表示需要创建临时表,常见于使用DISTINCT、GROUPBY或非索引列的ORDERBY。可以通过优化索引和重写查询避免其出现,提升查询性能。具体来说,Usingtemporary出现在EXPLAIN输出中时,意味着MySQL需要创建临时表来处理查询。这通常发生在以下情况:1)使用DISTINCT或GROUPBY时进行去重或分组;2)ORDERBY包含非索引列时进行排序;3)使用复杂的子查询或联接操作。优化方法包括:1)为ORDERBY和GROUPB

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
4 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
4 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您听不到任何人,如何修复音频
4 周前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.聊天命令以及如何使用它们
4 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

适用于 Eclipse 的 SAP NetWeaver 服务器适配器

将Eclipse与SAP NetWeaver应用服务器集成。

WebStorm Mac版

WebStorm Mac版

好用的JavaScript开发工具

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

VSCode Windows 64位 下载

VSCode Windows 64位 下载

微软推出的免费、功能强大的一款IDE编辑器