This is an automated email from the ASF dual-hosted git repository.

kassiez pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new fd3bb9942f4 [doc] Add docs for database storage vault (#2232)
fd3bb9942f4 is described below

commit fd3bb9942f4e48c30722be178e6df0f17d8f9eb3
Author: Ganlin Zhao <36554565+glzha...@users.noreply.github.com>
AuthorDate: Wed Apr 23 19:49:19 2025 +0800

    [doc] Add docs for database storage vault (#2232)
    
    [doc] Add docs for database storage vault
    
    ## Versions
    
    - [x] dev
    - [x] 3.0
    - [ ] 2.1
    - [ ] 2.0
    
    ## Languages
    
    - [x ] Chinese
    - [x ] English
    
    ## Docs Checklist
    
    - [ ] Checked by AI
    - [ ] Test Cases Built
---
 .../managing-storage-vault.md                      | 24 ++++++++++++++++++++++
 .../sql-statements/database/ALTER-DATABASE.md      | 18 ++++++++++++++++
 .../sql-statements/database/CREATE-DATABASE.md     | 23 +++++++++++++++++++++
 .../managing-storage-vault.md                      | 24 ++++++++++++++++++++++
 .../sql-statements/database/ALTER-DATABASE.md      | 18 ++++++++++++++++
 .../sql-statements/database/CREATE-DATABASE.md     | 23 +++++++++++++++++++++
 .../managing-storage-vault.md                      | 23 +++++++++++++++++++++
 .../sql-statements/database/ALTER-DATABASE.md      | 18 ++++++++++++++++
 .../sql-statements/database/CREATE-DATABASE.md     | 23 +++++++++++++++++++++
 .../managing-storage-vault.md                      | 23 +++++++++++++++++++++
 .../sql-statements/database/ALTER-DATABASE.md      | 18 ++++++++++++++++
 .../sql-statements/database/CREATE-DATABASE.md     | 23 +++++++++++++++++++++
 12 files changed, 258 insertions(+)

diff --git a/docs/compute-storage-decoupled/managing-storage-vault.md 
b/docs/compute-storage-decoupled/managing-storage-vault.md
index acc29c33887..c31f362dcba 100644
--- a/docs/compute-storage-decoupled/managing-storage-vault.md
+++ b/docs/compute-storage-decoupled/managing-storage-vault.md
@@ -120,6 +120,30 @@ PROPERTIES (
 );
 ```
 
+## Specify Storage Vault When Creating a Database
+
+When creating a database, specify `storage_vault_name` in `PROPERTIES`. If 
`storage_vault_name` is not specified when creating a table under the database, 
the table will use the Storage Vault corresponding to the database's `vault 
name` for data storage. Users can change the `storage_vault_name` of the 
database via 
[ALTER-DATABASE](../sql-manual/sql-statements/database/ALTER-DATABASE.md). 
However, this action will not affect the `storage_vault` of tables that have 
already been created un [...]
+
+**Example**
+
+```sql
+CREATE DATABASE IF NOT EXIST `db_test`
+PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+);
+```
+
+:::info Note
+
+This feature is supported since version 3.0.5.
+
+The priority order for using Storage Vault when creating a table is: Table -> 
Database -> Default Storage Vault. If Storage Vault is not specified in the 
table's PROPERTY, it will check if Storage Vault is specified in the database; 
if the database also does not specify it, it will further check if there is a 
default Storage Vault.
+
+If the `VAULT_NAME` attribute of Storage Vault is modified, it may cause the 
Storage Vault set in the database to become invalid, resulting in an error. 
Users will need to configure a valid `storage_vault_name` for the database 
based on the actual situation.
+
+:::
+
+
 ## Alter Storage Vault
 
 Used to alter modifiable properties of the Storage Vault configuration.
diff --git a/docs/sql-manual/sql-statements/database/ALTER-DATABASE.md 
b/docs/sql-manual/sql-statements/database/ALTER-DATABASE.md
index 19d5b38937a..614829ae3fd 100644
--- a/docs/sql-manual/sql-statements/database/ALTER-DATABASE.md
+++ b/docs/sql-manual/sql-statements/database/ALTER-DATABASE.md
@@ -94,3 +94,21 @@ After renaming the database, use the REVOKE and GRANT 
commands to modify the cor
   ```sql
     ALTER DATABASE example_db SET PROPERTIES("replication_allocation" = "");
   ```
+
+- Modify the default Storage Vault of the table under db (this operation is 
only effective for newly created tables and will not modify existing tables 
under db)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = 
"hdfs_demo_vault");
+  ```
+
+- Cancel the default Storage Vault of the table under db (this operation is 
only effective for newly created tables and will not modify existing tables 
under db)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = "");
+  ```
+
+:::info Note
+
+Setting db's `storage_vault_name` is supported since version 3.0.5
+
+:::
diff --git a/docs/sql-manual/sql-statements/database/CREATE-DATABASE.md 
b/docs/sql-manual/sql-statements/database/CREATE-DATABASE.md
index dcd2d4059f3..e7b2618555b 100644
--- a/docs/sql-manual/sql-statements/database/CREATE-DATABASE.md
+++ b/docs/sql-manual/sql-statements/database/CREATE-DATABASE.md
@@ -65,6 +65,20 @@ If you want to specify the default replica distribution 
strategy for the table u
   )
   ```
 
+If you want to specify the default Storage Vault for the table under db, you 
need to specify `<storage_vault_name>` (the `<storage_vault_name>` attribute of 
table has a higher priority than db):
+
+  ```sql
+  PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+  )
+  ```
+
+:::info Note
+
+Setting db's `storage_vault_name` is supported since version 3.0.5
+
+:::
+
 ## Example
 
 - Create a new database db_test
@@ -81,3 +95,12 @@ If you want to specify the default replica distribution 
strategy for the table u
        "replication_allocation" = "tag.location.group_1:3"
    );
    ```
+
+- Create a new database and set the default Storage Vault:
+
+   ```sql
+   CREATE DATABASE `db_test`
+   PROPERTIES (
+       "storage_vault_name" = "hdfs_demo_vault"
+   );
+   ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compute-storage-decoupled/managing-storage-vault.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compute-storage-decoupled/managing-storage-vault.md
index 298ad4b924f..013a3b8d7f3 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/compute-storage-decoupled/managing-storage-vault.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/compute-storage-decoupled/managing-storage-vault.md
@@ -119,6 +119,30 @@ PROPERTIES (
 );
 ```
 
+## 创建数据库时指定 Storage Vault 
+
+创建数据库时在 `PROPERTIES` 中指定 `storage_vault_name`。如果在数据库下建表时没有指定 
`storage_vault_name`,则表会使用数据库的 `vault name` 对应的 Storage Vault 进行数据的存储。用户可以通过 
[ALTER-DATABASE](../sql-manual/sql-statements/database/ALTER-DATABASE.md) 
更改数据库的 
`storage_vault_name`,该行为不会改变数据库下已经创建表的`storage_vault`,只有新创建的表会使用更改后的`storage_vault`。
+
+**示例**
+
+```sql
+CREATE DATABASE IF NOT EXIST `db_test`
+PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+);
+```
+
+:::info 备注
+
+从 3.0.5 版本支持创建库时指定 Storage Vault。
+
+创建表时使用 Storage Vault 的优先顺序为 表 -> 数据库 -> 默认 Storage Vault。即如果表的 PROPERTY 中没有指定 
Storage Vault,则会搜索数据库是否指定了 Storage Vault;如果数据库也没有指定,则会继续搜索是否有默认 Storage Vault。
+
+如果 Storage Vault 的 `VAULT_NAME` 属性被修改,可能会导致数据库下设置的 Storage Vault 
失效而报错,用户需要根据实际情况为数据库再配置一个可用的 `storage_vault_name`。
+
+:::
+
+
 ## 更改 Storage Vault 
 
 用于更新 Storage Vault 配置的可修改属性。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/ALTER-DATABASE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/ALTER-DATABASE.md
index 1dee07d3f13..9daaae7e38b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/ALTER-DATABASE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/ALTER-DATABASE.md
@@ -94,3 +94,21 @@ ALTER DATABASE <db_name> SET <PROPERTIES> ("<key>" = 
"<value>" [, ...])
   ```sql
     ALTER DATABASE example_db SET PROPERTIES("replication_allocation" = "");
   ```
+
+- 修改 db 下 table 的默认 Storage Vault(该操作仅对新建的 table 生效,不会修改 db 下已存在的 table)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = 
"hdfs_demo_vault");
+  ```
+
+- 取消 db 下 table 的默认 Storage Vault(该操作仅对新建的 table 生效,不会修改 db 下已存在的 table)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = "");
+  ```
+
+:::info 备注
+
+从 3.0.5 版本支持指定 db 的 `storage_vault_name`。
+
+:::
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/CREATE-DATABASE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/CREATE-DATABASE.md
index abbc1fa7085..651b05b1336 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/CREATE-DATABASE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/database/CREATE-DATABASE.md
@@ -65,6 +65,20 @@ CREATE DATABASE [IF NOT EXISTS] <db_name>
   )
   ```
 
+如果要为 db 下的 table 指定默认的 Storage Vault,需要指定`<storage_vault_name>`(table 
的`<storage_vault_name>`属性优先级会高于 db):
+
+  ```sql
+  PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+  )
+  ```
+
+:::info 备注
+
+从 3.0.5 版本支持指定 db 的 `storage_vault_name`。
+
+:::
+
 ## 示例
 
 - 新建数据库 db_test
@@ -81,3 +95,12 @@ CREATE DATABASE [IF NOT EXISTS] <db_name>
        "replication_allocation" = "tag.location.group_1:3"
    );
    ```
+
+- 新建数据库并设置默认的 Storage Vault:
+
+   ```sql
+   CREATE DATABASE `db_test`
+   PROPERTIES (
+       "storage_vault_name" = "hdfs_demo_vault"
+   );
+   ```
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
index ee09ecb3993..139dd371ae3 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
@@ -119,6 +119,29 @@ PROPERTIES (
 );
 ```
 
+## 创建数据库时指定 Storage Vault 
+
+创建数据库时在 `PROPERTIES` 中指定 `storage_vault_name`。如果在数据库下建表时没有指定 
`storage_vault_name`,则表会使用数据库的 `vault name` 对应的 Storage Vault 进行数据的存储。用户可以通过 
[ALTER-DATABASE](../sql-manual/sql-statements/database/ALTER-DATABASE.md) 
更改数据库的 
`storage_vault_name`,该行为不会改变数据库下已经创建表的`storage_vault`,只有新创建的表会使用更改后的`storage_vault`。
+
+**示例**
+
+```sql
+CREATE DATABASE IF NOT EXIST `db_test`
+PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+);
+```
+
+:::info 备注
+
+从 3.0.5 版本支持创建库时指定 Storage Vault。
+
+创建表时使用 Storage Vault 的优先顺序为 表 -> 数据库 -> 默认 Storage Vault。即如果表的 PROPERTY 中没有指定 
Storage Vault,则会搜索数据库是否指定了 Storage Vault;如果数据库也没有指定,则会继续搜索是否有默认 Storage Vault。
+
+如果 Storage Vault 的 `VAULT_NAME` 属性被修改,可能会导致数据库下设置的 Storage Vault 
失效而报错,用户需要根据实际情况为数据库再配置一个可用的 `storage_vault_name`。
+
+:::
+
 ## 更改 Storage Vault 
 
 用于更新 Storage Vault 配置的可修改属性。
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
index 1dee07d3f13..9daaae7e38b 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
@@ -94,3 +94,21 @@ ALTER DATABASE <db_name> SET <PROPERTIES> ("<key>" = 
"<value>" [, ...])
   ```sql
     ALTER DATABASE example_db SET PROPERTIES("replication_allocation" = "");
   ```
+
+- 修改 db 下 table 的默认 Storage Vault(该操作仅对新建的 table 生效,不会修改 db 下已存在的 table)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = 
"hdfs_demo_vault");
+  ```
+
+- 取消 db 下 table 的默认 Storage Vault(该操作仅对新建的 table 生效,不会修改 db 下已存在的 table)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = "");
+  ```
+
+:::info 备注
+
+从 3.0.5 版本支持指定 db 的 `storage_vault_name`。
+
+:::
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
index abbc1fa7085..651b05b1336 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
@@ -65,6 +65,20 @@ CREATE DATABASE [IF NOT EXISTS] <db_name>
   )
   ```
 
+如果要为 db 下的 table 指定默认的 Storage Vault,需要指定`<storage_vault_name>`(table 
的`<storage_vault_name>`属性优先级会高于 db):
+
+  ```sql
+  PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+  )
+  ```
+
+:::info 备注
+
+从 3.0.5 版本支持指定 db 的 `storage_vault_name`。
+
+:::
+
 ## 示例
 
 - 新建数据库 db_test
@@ -81,3 +95,12 @@ CREATE DATABASE [IF NOT EXISTS] <db_name>
        "replication_allocation" = "tag.location.group_1:3"
    );
    ```
+
+- 新建数据库并设置默认的 Storage Vault:
+
+   ```sql
+   CREATE DATABASE `db_test`
+   PROPERTIES (
+       "storage_vault_name" = "hdfs_demo_vault"
+   );
+   ```
diff --git 
a/versioned_docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
 
b/versioned_docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
index 919ea3624b7..07b5f058ce0 100644
--- 
a/versioned_docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
+++ 
b/versioned_docs/version-3.0/compute-storage-decoupled/managing-storage-vault.md
@@ -120,6 +120,29 @@ PROPERTIES (
 );
 ```
 
+## Specify Storage Vault When Creating a Database
+
+When creating a database, specify `storage_vault_name` in `PROPERTIES`. If 
`storage_vault_name` is not specified when creating a table under the database, 
the table will use the Storage Vault corresponding to the database's `vault 
name` for data storage. Users can change the `storage_vault_name` of the 
database via 
[ALTER-DATABASE](../sql-manual/sql-statements/database/ALTER-DATABASE.md). 
However, this action will not affect the `storage_vault` of tables that have 
already been created un [...]
+
+**Example**
+
+```sql
+CREATE DATABASE IF NOT EXIST `db_test`
+PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+);
+```
+
+:::info Note
+
+This feature is supported since version 3.0.5.
+
+The priority order for using Storage Vault when creating a table is: Table -> 
Database -> Default Storage Vault. If Storage Vault is not specified in the 
table's PROPERTY, it will check if Storage Vault is specified in the database; 
if the database also does not specify it, it will further check if there is a 
default Storage Vault.
+
+If the `VAULT_NAME` attribute of Storage Vault is modified, it may cause the 
Storage Vault set in the database to become invalid, resulting in an error. 
Users will need to configure a valid `storage_vault_name` for the database 
based on the actual situation.
+
+:::
+
 ## Alter Storage Vault
 
 Used to alter modifiable properties of the Storage Vault configuration.
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
 
b/versioned_docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
index 19d5b38937a..614829ae3fd 100644
--- 
a/versioned_docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-statements/database/ALTER-DATABASE.md
@@ -94,3 +94,21 @@ After renaming the database, use the REVOKE and GRANT 
commands to modify the cor
   ```sql
     ALTER DATABASE example_db SET PROPERTIES("replication_allocation" = "");
   ```
+
+- Modify the default Storage Vault of the table under db (this operation is 
only effective for newly created tables and will not modify existing tables 
under db)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = 
"hdfs_demo_vault");
+  ```
+
+- Cancel the default Storage Vault of the table under db (this operation is 
only effective for newly created tables and will not modify existing tables 
under db)
+
+  ```sql
+    ALTER DATABASE example_db SET PROPERTIES("storage_vault_name" = "");
+  ```
+
+:::info Note
+
+Setting db's `storage_vault_name` is supported since version 3.0.5
+
+:::
diff --git 
a/versioned_docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
 
b/versioned_docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
index dcd2d4059f3..e7b2618555b 100644
--- 
a/versioned_docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
+++ 
b/versioned_docs/version-3.0/sql-manual/sql-statements/database/CREATE-DATABASE.md
@@ -65,6 +65,20 @@ If you want to specify the default replica distribution 
strategy for the table u
   )
   ```
 
+If you want to specify the default Storage Vault for the table under db, you 
need to specify `<storage_vault_name>` (the `<storage_vault_name>` attribute of 
table has a higher priority than db):
+
+  ```sql
+  PROPERTIES (
+    "storage_vault_name" = "hdfs_demo_vault"
+  )
+  ```
+
+:::info Note
+
+Setting db's `storage_vault_name` is supported since version 3.0.5
+
+:::
+
 ## Example
 
 - Create a new database db_test
@@ -81,3 +95,12 @@ If you want to specify the default replica distribution 
strategy for the table u
        "replication_allocation" = "tag.location.group_1:3"
    );
    ```
+
+- Create a new database and set the default Storage Vault:
+
+   ```sql
+   CREATE DATABASE `db_test`
+   PROPERTIES (
+       "storage_vault_name" = "hdfs_demo_vault"
+   );
+   ```


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to