| <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
| <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> |
| <channel> |
| <title>资源定义 on ShardingSphere</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/</link> |
| <description>Recent content in 资源定义 on ShardingSphere</description> |
| <generator>Hugo -- gohugo.io</generator> |
| <language>en-us</language> |
| |
| <atom:link href="https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/index.xml" rel="self" type="application/rss+xml" /> |
| |
| |
| <item> |
| <title>ADD RESOURCE</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/add-resource/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/add-resource/</guid> |
| <description>描述 ADD RESOURCE 语法用于为当前所选逻辑库(DATABASE)添加资源。 |
| 语法 AddResource ::= &#39;ADD&#39; &#39;RESOURCE&#39; resourceDefinition (&#39;,&#39; resourceDefinition)* resourceDefinition ::= resourceName &#39;(&#39; ( &#39;HOST&#39; &#39;=&#39; hostName &#39;,&#39; &#39;PORT&#39; &#39;=&#39; port &#39;,&#39; &#39;DB&#39; &#39;=&#39; dbName | &#39;URL&#39; &#39;=&#39; url ) &#39;,&#39; &#39;USER&#39; &#39;=&#39; user (&#39;,&#39; &#39;PASSWORD&#39; &#39;=&#39; password )? (&#39;,&#39; proerties)?&#39;)&#39; resourceName ::= identifier hostname ::= string port ::= int dbName ::= string url ::= string user ::= string password ::= string proerties ::= PROPERTIES &#39;(&#39; property ( &#39;,&#39; property )* &#39;)&#39; property ::= key &#39;=&#39; value key ::= string value ::= string 特别说明 添加资源前请确认已经在 Proxy 中创建逻辑数据库,并执行 use 命令成功选择一个逻辑数据库; 确认添加的资源是可以正常连接的, 否则将不能添加成功; resourceName 区分大小写; resourceName 在当前逻辑库中需要唯一; resourceName 命名只允许使用字母、数字以及 _ ,且必须以字母开头; poolProperty 用于自定义连接池参数,key 必须和连接池参数名一致,value 支持 int 和 String 类型; 当 password 包含特殊字符时,建议使用 string 形式;例如 password@123的 string 形式为 &quot;password@123&quot;。 示例 使用标准模式添加资源 ADD RESOURCE ds_0 ( HOST=127.</description> |
| </item> |
| |
| <item> |
| <title>ALTER RESOURCE</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/alter-resource/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/alter-resource/</guid> |
| <description>描述 ALTER RESOURCE 语法用于修改当前所选逻辑库(DATABASE)的资源。 |
| 语法 AlterResource ::= &#39;ALTER&#39; &#39;RESOURCE&#39; resourceDefinition (&#39;,&#39; resourceDefinition)* resourceDefinition ::= resourceName &#39;(&#39; ( &#39;HOST&#39; &#39;=&#39; hostName &#39;,&#39; &#39;PORT&#39; &#39;=&#39; port &#39;,&#39; &#39;DB&#39; &#39;=&#39; dbName | &#39;URL&#39; &#39;=&#39; url ) &#39;,&#39; &#39;USER&#39; &#39;=&#39; user (&#39;,&#39; &#39;PASSWORD&#39; &#39;=&#39; password )? (&#39;,&#39; proerties)?&#39;)&#39; resourceName ::= identifier hostname ::= string port ::= int dbName ::= string url ::= string user ::= string password ::= string proerties ::= PROPERTIES &#39;(&#39; property ( &#39;,&#39; property )* &#39;)&#39; property ::= key &#39;=&#39; value key ::= string value ::= string 补充说明 修改资源前请确认已经在 Proxy 中创建逻辑数据库,并执行 use 命令成功选择一个逻辑数据库; ALTER RESOURCE不允许改变该资源关联的真实数据源; ALTER RESOURCE会发生连接池的切换,这个操作可能对进行中的业务造成影响,请谨慎使用; 确认添加的资源是可以正常连接的, 否则将不能添加成功; resourceName 区分大小写; resourceName 在当前逻辑库中需要唯一; resourceName 命名只允许使用字母、数字以及 _ ,且必须以字母开头; poolProperty 用于自定义连接池参数,key 必须和连接池参数名一致,value 支持 int 和 String 类型; 当 password 包含特殊字符时,建议使用 string 形式;例如 password@123的 string 形式为 &quot;password@123&quot;。 示例 使用标准模式修改资源 ALTER RESOURCE ds_0 ( HOST=127.</description> |
| </item> |
| |
| <item> |
| <title>DROP RESOURCE</title> |
| <link>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/drop-resource/</link> |
| <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate> |
| |
| <guid>https://shardingsphere.apache.org/document/current/cn/reference/distsql/syntax/rdl/resource-definition/drop-resource/</guid> |
| <description>描述 DROP RESOURCE 语法用于从当前逻辑库中移除资源。 |
| 语法 DropResource ::= &#39;DROP&#39; &#39;RESOURCE&#39; ( &#39;IF&#39; &#39;EXISTS&#39; )? resourceName ( &#39;,&#39; resourceName )* ( &#39;IGNORE&#39; &#39;SINGLE&#39; &#39;TABLES&#39; )? resourceName ::= identifier 补充说明 DROP RESOURCE 只会移除 Proxy 中的资源,不会删除与资源对应的真实数据源; 无法移除已经被规则使用的资源。移除被规则使用的资源时会提示 Resources are still in used; 将要移除的资源中仅包含 SINGLE TABLE RULE,且用户确认可以忽略该限制时,可添加 IGNORE SINGLE TABLES 关键字移除资源。 示例 移除资源 DROP RESOURCE ds_0; 移除多个资源 DROP RESOURCE ds_1, ds_2; 忽略单表移除资源 DROP RESOURCE ds_3 IGNORE SINGLE TABLES; 如果资源存在则移除 DROP RESOURCE IF EXISTS ds_4; 保留字 DROP、RESOURCE、IF、EXISTS、IGNORE、SINGLE、TABLES</description> |
| </item> |
| |
| </channel> |
| </rss> |