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.

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Oracle에 대한 솔루션은 개설 할 수 없습니다. 1. 데이터베이스 서비스 시작; 2. 청취자를 시작하십시오. 3. 포트 충돌을 확인하십시오. 4. 환경 변수를 올바르게 설정하십시오. 5. 방화벽이나 바이러스 백신 소프트웨어가 연결을 차단하지 않도록하십시오. 6. 서버가 닫혀 있는지 확인하십시오. 7. RMAN을 사용하여 손상된 파일을 복구하십시오. 8. TNS 서비스 이름이 올바른지 확인하십시오. 9. 네트워크 연결 확인; 10. Oracle 소프트웨어를 다시 설치하십시오.

Oracle Cursor Closure 문제를 해결하는 방법에는 다음이 포함됩니다. Close 문을 사용하여 커서를 명시 적으로 닫습니다. For Update 절에서 커서를 선언하여 범위가 종료 된 후 자동으로 닫히십시오. 연관된 PL/SQL 변수가 닫히면 자동으로 닫히도록 사용 절에서 커서를 선언하십시오. 예외 처리를 사용하여 예외 상황에서 커서가 닫혀 있는지 확인하십시오. 연결 풀을 사용하여 커서를 자동으로 닫습니다. 자동 제출을 비활성화하고 커서 닫기를 지연시킵니다.

Oracle에서 모든 데이터를 삭제하려면 다음 단계가 필요합니다. 1. 연결 설정; 2. 외국의 주요 제약을 비활성화합니다. 3. 테이블 데이터 삭제; 4. 거래 제출; 5. 외국 키 제약 조건을 활성화합니다 (선택 사항). 데이터 손실을 방지하려면 실행하기 전에 데이터베이스를 백업하십시오.

Oracle 데이터베이스 페이징은 rownum pseudo-columns 또는 fetch 문을 사용하여 구현합니다. Fetch 문은 지정된 첫 번째 행 수를 얻는 데 사용되며 간단한 쿼리에 적합합니다.

Oracle에서 FOR 루프 루프는 커서를 동적으로 생성 할 수 있습니다. 단계는 다음과 같습니다. 1. 커서 유형을 정의합니다. 2. 루프를 만듭니다. 3. 커서를 동적으로 만듭니다. 4. 커서를 실행하십시오. 5. 커서를 닫습니다. 예 : 커서는 상위 10 명의 직원의 이름과 급여를 표시하기 위해주기별로 만들 수 있습니다.

Oracle 데이터베이스를 중지하려면 다음 단계를 수행하십시오. 1. 데이터베이스에 연결하십시오. 2. 즉시 종료; 3. 셧다운은 완전히 중단됩니다.

SQL 문은 Oracle의 동적 SQL을 사용하여 런타임 입력을 기반으로 작성 및 실행할 수 있습니다. 단계에는 다음이 포함됩니다 : 동적으로 생성 된 SQL 문을 저장할 빈 문자열 변수 준비. 즉시 실행 또는 준비 명령문을 사용하여 동적 SQL 문을 컴파일하고 실행하십시오. 바인드 변수를 사용하여 사용자 입력 또는 기타 동적 값을 동적 SQL로 전달하십시오. 동적 SQL 문을 실행하려면 즉시 실행 또는 실행을 사용하십시오.

Centos 시스템에서 Hadoop 분산 파일 시스템 (HDF)을 구축하려면 여러 단계가 필요합니다. 이 기사는 간단한 구성 안내서를 제공합니다. 1. 초기 단계에서 JDK를 설치할 준비 : 모든 노드에 JavadevelopmentKit (JDK)을 설치하면 버전이 Hadoop과 호환되어야합니다. 설치 패키지는 Oracle 공식 웹 사이트에서 다운로드 할 수 있습니다. 환경 변수 구성 : /etc /프로파일 파일 편집, Java 및 Hadoop 설정 설정 시스템에서 JDK 및 Hadoop의 설치 경로를 찾을 수 있습니다. 2. 보안 구성 : SSH 비밀번호가없는 로그인 SSH 키 : 각 노드에서 ssh-keygen 명령을 사용하십시오.
