Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » QAnywhere » 服务器管理请求

 

使用服务器管理请求设置服务器属性

<SetProperty> 标记包含一个或多个 <prop> 标记,每个 <prop> 标记指定一个要设置的属性。每个 prop 标记由一个 <client> 标记、一个 <name> 标记和一个 <value> 标记组成。要删除一个属性,请省略 <value> 标记。

<prop> 子标记

说明

<client>

要设置服务器属性的客户端的名称。

<name>

要设置的属性的名称。

<value>

要设置的属性的值。如果不包括该标记,属性会被删除。

有关如何使用服务器管理请求(包括如何对它们进行验证和调度)的概述,请参见服务器管理请求简介

示例

以下服务器管理请求将名为 simpleGroup 的目标别名的 ianywhere.qa.member.client3 属性设置为 Y,这样便将 client3 添加到 simpleGroup 中。

<?xml version="1.0" encoding="UTF-8"?>
<actions>
    <SetProperty>
     <prop>
        <client>simpleGroup</client>
        <name>ianywhere.qa.member.client3</name>
        <value>Y</value>
     </prop>
    </SetProperty>
</actions>

下一示例执行以下操作:

  • 将 client1 属性 myProp1 的值创建或修改为 3。

  • 删除 client1 属性 myProp2。

  • 将 client2 属性 myProp3 的值修改为 "some value"。

<?xml version="1.0" encoding="UTF-8"?>
<actions>
    <SetProperty>
 <prop>
     <client>client1</client>
     <name>myProp1</name>
     <value>3</value>
 </prop>
 <prop>
     <client>client1</client>
     <name>myProp2</name>
 </prop>
 <prop>
     <client>client2</client>
     <name>myProp3</name>
     <value>some value</value>
 </prop>
    </SetProperty>
</actions>