Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CUBRIDMAN-222] DBLink설명란에 단락 구분 및 althost관련 예제 추가 #535

Merged
merged 16 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
0d935ef
[CUBRIDMAN-222] : RND-2018 DBLink설명란에 단락 구분 및 althost관련 예제 추가
bagus-kim Aug 8, 2024
343d3b9
[CUBRIDMAN-222] : RND-2018 : Add althost description in Chapter DBLink
bagus-kim Aug 8, 2024
d514cdc
[CUBRIDMAN-222] : RND-1772 : csql 인터프리터에서 ;plan 세션명령어 오류 확인
bagus-kim Aug 8, 2024
3c1f11e
[CUBRIDMAN-222] : RND-2223 : DBLink에서 property 정보 문자열에 대한 내용수정
bagus-kim Aug 8, 2024
e9efb97
[CUBRIDMAN-222] : RND-2192 : ha_copy_log_base 설명 수정(상대/절대경로)
bagus-kim Aug 8, 2024
5d418eb
[CUBRIDMAN-222] : RND-2194 : ha 복제 구축 시나리오 명령어 수정
bagus-kim Aug 8, 2024
bbcacce
[CUBRIDMAN-222] : RND-2223 : DBLink에서 property 정보 문자열에 대한 내용수정
bagus-kim Aug 12, 2024
489f6fc
[CUBRIDMAN-222] : RND-2192 : ha_copy_log_base 에 대한 리뷰 반영
bagus-kim Aug 22, 2024
debc13f
[CUBRIDMAN-222] : RND-2192 : ha_copy_log_base 에 대한 리뷰 반영
bagus-kim Aug 23, 2024
a7ffdf5
[CUBRIDMAN-222] : RND-2223 : property 정보 문자열에 대한 리뷰 반영
bagus-kim Aug 23, 2024
e46664d
[CUBRIDMAN-222] : RND-2223 : property 정보 문자열에 대한 리뷰 반영
bagus-kim Aug 23, 2024
0106cfd
[CUBRIDMAN-222] : RND-2018 : DB link 설정 내용 보강
bagus-kim Aug 23, 2024
ab9d788
[CUBRIDMAN-222] : RND-2018 : DB link 설정 내용 보강
bagus-kim Aug 23, 2024
6b68046
[CUBRIDMAN-222] : RND-2018 : DB link 설정 내용 보강
bagus-kim Aug 23, 2024
f8eea90
[CUBRIDMAN-222] : RND-2018 : DB link 설명내용 수정. 리뷰의견 등록. 영문등록
bagus-kim Aug 23, 2024
e49cf9e
CUBRIDMAN-222 : Modify of junsklee suggested
bagus-kim Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions en/csql.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

A value that specifies the optimization level. It has the following meanings.
:meta-keywords: csql, cubrid csql, cubrid commands, executing csql, csql options
:meta-description: CUBRID CSQL is an application that allows users to use SQL statements through a command-driven interface. This section briefly explains how to use the CSQL Interpreter and associated commands.

Expand Down Expand Up @@ -633,10 +633,12 @@ If you don't give a value after **;COL** command, it shows the current setting l

You can use the **;PLan** session command to set the view level of executing query plan the level is composed of **simple**, **detail**, and **off**. Each command refers to the following:

* **off**: Not displaying the query execution plan
* **off**: Not displaying the query execution plan (OPT LEVEL=1)
* **simple**: Displaying the query execution plan in simple version (OPT LEVEL=257)
* **detail**: Displaying the query execution plan in detailed version (OPT LEVEL=513)

For more information. see :ref:`viewing-query-plan`.

.. _set-autotrace:

**Setting SQL trace(;trace)**
Expand Down
27 changes: 12 additions & 15 deletions en/ha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,14 @@ For details, see :ref:`log-multiplexing`.

**ha_copy_log_base**

**ha_copy_log_base** is a parameter used to configure the location of storing the transaction log copy. The default is **$CUBRID_DATABASES**/\ *<db_name>*\_\ *<host_name>*.
Specifies the parent path for saving replication logs. The default value is the directory path set in the $CUBRID_DATABASES environment variable.
Replication logs are stored in a subdirectory of <db_name>_<host_name>, depending on the server and database name.

For details, see :ref:`log-multiplexing`.
The replication log path can be set to either a relative or absolute path.
The following are examples of each setting.

ex1) ha_copy_log_base=copylog: Considered a relative path and stores replication logs in $CUBRID_DATABASES/copylog.
ex2) ha_copy_log_base=/log/copy_log: Saves replication logs in /log/copy_log as an absolute path.

.. _ha_copy_log_max_archives:

Expand Down Expand Up @@ -3184,13 +3189,14 @@ Now let's see the case of rebuilding a existing slave node during a service in a
[nodeB]$ rm testdb/log/*

[nodeB]$ rm -rf testdb_nodeA
[nodeB]$ rm $CUBRID/var/APPLYLOGDB/testdb

* Stop log replication processes of *nodeB* on *nodeA* and *nodeC*.

::

[nodeA]$ cubrid heartbeat repl stop testdb nodeB
[nodeC]$ cubrid heartbeat repl stop testdb nodeB
[nodeA]$ cubrid heartbeat repl stop nodeB
[nodeC]$ cubrid heartbeat repl stop nodeB

* Remove replication logs for *nodeB* from *nodeA* and *nodeC*.

Expand All @@ -3199,18 +3205,9 @@ Now let's see the case of rebuilding a existing slave node during a service in a
[nodeA]$ rm -rf $CUBRID_DATABASES/testdb_nodeB
[nodeC]$ rm -rf $CUBRID_DATABASES/testdb_nodeB

2. Remove HA catalog table's data, restore *nodeB*'s database from *nodeA*'s backup, and add data to HA catalog table.
2. Restore *nodeB*'s database from *nodeA*'s backup, and add data to HA catalog table.

* Delete the HA catalog table, db_ha_apply_info's records.

Delete all records of db_ha_apply_info of *nodeB* to initialize.

::

[nodeB]$ csql --sysadm --write-on-standby -u dba -S testdb
csql> DELETE FROM db_ha_apply_info;

Delete db_ha_apply_info data for *nodeB* from *nodeA* and *nodeC*.
* Delete db_ha_apply_info data for *nodeB* from *nodeA* and *nodeC*.

::

Expand Down
29 changes: 26 additions & 3 deletions en/sql/schema/server_stmt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* *db_name*: The database name to connect to remotely.
* *user_name*: The user name to use when connecting to the database to be accessed remotely.
* *password_string*: Password string for *user_name* used to connect to the database to be accessed remotely.
* *properties_string*: Property information string used when connecting to the database to be accessed remotely. (up to 2047 bytes)
* *properties_string*: A string of property information (up to 2047 bytes) used when connecting to a broker (or gateway) for remote database usage. For detailed attribute information, see :ref:`cci-connect-with-url`.

Check warning on line 48 in en/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (en)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)

Check warning on line 48 in en/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (en)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)
* *server_comment_string*: Specifies comments about server information. (up to 1023 bytes)

.. note::
Expand All @@ -58,7 +58,9 @@
* Example of string format
't123db', '123db'


**Example 1**
The following basic example has the required fields (HOST,PORT,DBNAME,USER) and also contains the PROPERTIES and COMMENT fields.

.. code-block:: sql

CREATE SERVER dblink_srv1 (
Expand All @@ -71,6 +73,7 @@
COMMENT='this is dblink_srv1'
);

**Example 2**
The following is an example that includes minimal information when creating a server.
It indicates that the remote demodb will be connected to the dev1 account without a password.
srv1, srv2, and srv3 have the same information.
Expand Down Expand Up @@ -99,7 +102,8 @@
USER=dev1,
PASSWORD=''
);


**Example 3**
The following example specifies the owner when creating the server.
In case of CREATE without designating the owner, the current user becomes the owner.
Later, you can change the owner using the ALTER SERVER statement.
Expand All @@ -126,6 +130,25 @@
COMMENT='The owner of this server is cub.'
);

**Example 4**

Check warning on line 133 in en/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (en)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)

Check warning on line 133 in en/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (en)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)
The following is an example of setting up for failover of a remote database by using the altHosts attribute in PROPERTIES when using a remote database configured in an HA environment.
For more information, see :ref:`cci-connect-with-url`.

.. code-block:: sql

CREATE SERVER dblink_srv1 (
HOST='192.168.1.8',
PORT=3300,
DBNAME=demodb,
USER=dba,
PASSWORD='password1234',
PROPERTIES='?altHosts=192.168.1.9:33000',
COMMENT='this is dblink_srv1'
);

**Example 5**
The following is an example of a poor use of the server name (<dblink_server_name>).

.. code-block:: sql

CREATE SERVER srv1 ( HOST='localhost', PORT=3300, DBNAME=demodb, USER=dev1 );
Expand Down
2 changes: 1 addition & 1 deletion en/sql/tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ To view a query plan for a CUBRID SQL query, you can use following methods.
SET OPTIMIZATION LEVEL opt-level [;]
GET OPTIMIZATION LEVEL [ { TO | INTO } variable ] [;]

* *opt-level* : A value that specifies the optimization level. It has the following meanings.
* *opt-level* : This value specifies the optimization level and is associated with the following settings. Any other value will result in an error.

* 0: Does not perform query optimization. The query is executed using the simplest query plan. This value is used only for debugging.

Expand Down
6 changes: 4 additions & 2 deletions ko/csql.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

A value that specifies the optimization level. It has the following meanings.
:meta-keywords: csql, cubrid csql, cubrid commands, executing csql, csql options
bagus-kim marked this conversation as resolved.
Show resolved Hide resolved
:meta-description: CUBRID CSQL is an application that allows users to use SQL statements through a command-driven interface. This section briefly explains how to use the CSQL Interpreter and associated commands.

Expand Down Expand Up @@ -633,10 +633,12 @@ CSQL 인터프리터에서 작업 중인 데이터베이스 이름 및 호스트

**;PLan** 세션 명령어는 질의 실행 계획 보기의 수준을 설정한다. 수준은 **simple**, **detail**, **off** 로 지정한다. 각 설정값의 의미는 다음과 같다.

* **off**: 질의 실행 계획을 출력하지 않음
* **off**: 질의 실행 계획을 출력하지 않음(OPT LEVEL=1)
* **simple**: 질의 실행 계획을 단순하게 출력함. (OPT LEVEL=257)
* **detail**: 질의 실행 계획을 자세하게 출력함. (OPT LEVEL=513)

OPT LEVEL의 상세한 내용은 :ref:`viewing-query-plan`\ 를 참고한다.

.. _set-autotrace:

**SQL 트레이스 설정(;trace)**
Expand Down
24 changes: 10 additions & 14 deletions ko/ha.rst
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,13 @@ CUBRID는 1시간 주기로 **ha_ping_hosts**\에 명시된 호스트를 점검

**ha_copy_log_base**

복제 로그를 저장할 위치를 지정한다. 기본값은 **$CUBRID_DATABASES**/\ *<db_name>*\_\ *<host_name>*\ 이다.
복제 로그를 저장할 상위 경로를 지정한다. 기본값은 $CUBRID_DATABASES 환경 변수에 설정된 디렉토리 경로이다. 복제 로그들은 서버와 데이터베이스명에 따라 <db_name>_<host_name>의 하위 디렉토리에 저장된다.

자세한 내용은 :ref:`log-multiplexing`\ 를 참고한다.
복제 로그 경로는 상대 경로 또는 절대 경로 설정이 가능하다.
다음은 각각의 설정 예제이다.

예1) ha_copy_log_base=copylog : 상대 경로로 간주되어, 복제 로그 경로로 $CUBRID_DATABASES/copylog가 설정된다.
예2) ha_copy_log_base=/log/copy_log : 절대 경로로 간주되어, 복제 로그 경로로 /log/copy_log copylog base가 설정된다.

.. _ha_copy_log_max_archives:

Expand Down Expand Up @@ -3181,13 +3185,14 @@ HA 서비스 운영 중 슬레이브를 새로 추가하려면 기존의 마스
[nodeB]$ rm testdb/log/*

[nodeB]$ rm -rf testdb_nodeA
[nodeB]$ rm $CUBRID/var/APPLYLOGDB/testdb

* *nodeA*\, *nodeC*\에서 *nodeB*\의 로그 복제 정지

::

[nodeA]$ cubrid heartbeat repl stop testdb nodeB
[nodeC]$ cubrid heartbeat repl stop testdb nodeB
[nodeA]$ cubrid heartbeat repl stop nodeB
[nodeC]$ cubrid heartbeat repl stop nodeB

* *nodeA*\, *nodeC*\에서 *nodeB*\에 대한 복제 로그 삭제

Expand All @@ -3196,17 +3201,8 @@ HA 서비스 운영 중 슬레이브를 새로 추가하려면 기존의 마스
[nodeA]$ rm -rf $CUBRID_DATABASES/testdb_nodeB
[nodeC]$ rm -rf $CUBRID_DATABASES/testdb_nodeB

2. HA 카탈로그 테이블 삭제, *nodeA*\의 백업 및 *nodeB*\의 복구, HA 카탈로그 테이블에 정보 추가
2. *nodeA*\의 백업 및 *nodeB*\의 복구, HA 카탈로그 테이블에 정보 추가

* HA 카탈로그 테이블인 db_ha_apply_info의 레코드 삭제

*nodeB*\의 db_ha_apply_info 정보를 모두 삭제하여 초기화한다.

::

[nodeB]$ csql --sysadm -u dba -S testdb
csql> DELETE FROM db_ha_apply_info;

*nodeA*, *nodeC*\에서 *nodeB*\에 대한 db_ha_apply_info 정보를 삭제한다.

::
Expand Down
26 changes: 24 additions & 2 deletions ko/sql/schema/server_stmt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* *db_name*: 원격 접속할 데이터베이스 이름.
* *user_name*: 원격 접속할 데이터베이스에 접속할 때 사용할 사용자 이름.
* *password_string*: 원격 접속할 데이터베이스에 접속할 때 사용하는 *user_name*\에 대한 패스워드 문자열.
* *properties_string*: 원격 접속할 데이터베이스에 접속할 때 사용하는 property 정보 문자열.(최대 2047바이트)
* *properties_string*: 원격 데이터베이스 사용을 위해 broker(또는 gateway)에 접속시 사용하는 property 정보 문자열 (최대 2047 바이트). 상세한 정보는 :ref:`cci-connect-with-url` 를 참고한다.

Check warning on line 48 in ko/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (ko)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)
* *server_comment_string*: 서버 정보에 대한 커멘트를 지정한다.(최대 1023바이트)

.. note::
Expand All @@ -57,6 +57,8 @@
* 문자열 형식의 예
't123db', '123db'

**예제 1**
다음은 필수항목(HOST,PORT,DBNAME,USER) 및 PROPERTIES, COMMENT를 사용한 예제이다.

.. code-block:: sql

Expand All @@ -70,6 +72,7 @@
COMMENT='this is dblink_srv1'
);

**예제 2**
다음은 서버 생성 시 최소한의 정보만 포함하는 예제이다.
원격지의 demodb에 비밀번호가 없는 dev1 계정으로 접속할 것임을 나타내고 있다.
srv1, srv2, srv3는 동일한 의미이다.
Expand Down Expand Up @@ -98,7 +101,8 @@
USER=dev1,
PASSWORD=''
);


**예제 3**
다음은 서버 생성 시 소유자를 지정하는 예제이다.
소유자 지정 없이 CREATE하는 경우에는 현재 사용자가 소유자가 된다.
추후 ALTER SERVER 구문을 이용해서 소유자를 변경할 수 있다.
Expand All @@ -125,6 +129,24 @@
COMMENT='The owner of this server is cub.'
);

**예제 4**

Check warning on line 132 in ko/sql/schema/server_stmt.rst

View workflow job for this annotation

GitHub Actions / build_docs (ko)

undefined label: cci-connect-with-url (if the link has no caption the label must precede a section header)
다음은 HA 환경으로 구성된 원격 데이터베이스 사용시 PROPERTIES에 altHosts 속성을 사용하여 원격 데이터베이스의 fail-over에 대비한 설정 예제이다. 자세한 내용은 :ref:`cci-connect-with-url` 을 참고한다.

.. code-block:: sql

CREATE SERVER dblink_srv1 (
HOST='192.168.1.8',
PORT=3300,
DBNAME=demodb,
USER=dba,
PASSWORD='password1234',
PROPERTIES='?altHosts=192.168.1.9:33000',
COMMENT='this is dblink_srv1'
);

**예제 5**
다음은 서버명(<dblink_server_name>)를 잘 못 사용한 예제이다.

.. code-block:: sql

CREATE SERVER srv1 ( HOST='localhost', PORT=3300, DBNAME=demodb, USER=dev1 );
Expand Down
2 changes: 1 addition & 1 deletion ko/sql/tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ CUBRID SQL 질의에 대한 실행 계획(query plan)을 보기 위해서는 다
SET OPTIMIZATION LEVEL opt-level [;]
GET OPTIMIZATION LEVEL [ { TO | INTO } variable ] [;]

* *opt-level* : 최적화 수준을 지정하는 값으로 다음과 같은 의미를 갖는다.
* *opt-level* : 최적화 수준을 지정하는 값으로 다음과 같은 의미를 갖으며, 이 외에 값을 설정할 경우 에러를 발생한다.

* 0 : 질의 최적화를 수행하지 않는다. 실행하는 질의는 가장 단순한 형태의 실행 계획을 가지고 실행된다. 디버깅의 용도 이외에는 사용되지 않는다.

Expand Down
Loading