<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Client connection functions</title>
    <link>/en/sql-reference/functions/client-connection-functions/</link>
    <description>Recent content in Client connection functions on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/functions/client-connection-functions/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: CLOSE_ALL_RESULTSETS</title>
      <link>/en/sql-reference/functions/client-connection-functions/close-all-resultsets/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/close-all-resultsets/</guid>
      <description>
        
        
        &lt;p&gt;Closes all result set sessions within Multiple Active Result Sets (MARS) and frees the MARS storage for other result sets.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT CLOSE_ALL_RESULTSETS (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;session_id&lt;/span&gt;&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;session_id&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A string that specifies the Multiple Active Result Sets session.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None; however, without superuser privileges, you can only close your own session&#39;s results.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example shows how you can view a MARS result set, then close the result set, and then confirm that the result set has been closed.&lt;/p&gt;
&lt;p&gt;Query the MARS storage table. One session ID is open and three result sets appear in the output.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM SESSION_MARS_STORE;

    node_name     |            session_id             | user_name | resultset_id | row_count | remaining_row_count | bytes_used
------------------+-----------------------------------+-----------+--------------+-----------+---------------------+------------
 v_vmart_node0001 | server1.company.-83046:1y28gu9    | dbadmin   |            7 |    777460 |              776460 |   89692848
 v_vmart_node0001 | server1.company.-83046:1y28gu9    | dbadmin   |            8 |    324349 |              323349 |   81862010
 v_vmart_node0001 | server1.company.-83046:1y28gu9    | dbadmin   |            9 |    277947 |              276947 |   32978280
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Close all result sets for session server1.company.-83046:1y28gu9:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CLOSE_ALL_RESULTSETS(&amp;#39;server1.company.-83046:1y28gu9&amp;#39;);
             close_all_resultsets
-------------------------------------------------------------
 Closing all result sets from server1.company.-83046:1y28gu9
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Query the MARS storage table again for the current status. You can see that the session and result sets have been closed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM SESSION_MARS_STORE;

    node_name     |            session_id             | user_name | resultset_id | row_count | remaining_row_count | bytes_used
------------------+-----------------------------------+-----------+--------------+-----------+---------------------+------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: CLOSE_RESULTSET</title>
      <link>/en/sql-reference/functions/client-connection-functions/close-resultset/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/close-resultset/</guid>
      <description>
        
        
        &lt;p&gt;Closes a specific result set within Multiple Active Result Sets (MARS) and frees the MARS storage for other result sets.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT CLOSE_RESULTSET (&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;session_id&lt;/span&gt;&amp;#39;, &lt;span class=&#34;code-variable&#34;&gt;ResultSetID&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;session_id&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A string that specifies the Multiple Active Result Sets session containing the ResultSetID to close.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ResultSetID&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An integer that specifies which result set to close.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None; however, without superuser privileges, you can only close your own session&#39;s results.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;This example shows a MARS storage table opened. One session_id is currently open, and one result set appears in the output.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT * FROM SESSION_MARS_STORE;
    node_name     |            session_id             | user_name | resultset_id | row_count | remaining_row_count | bytes_used
------------------+-----------------------------------+-----------+--------------+-----------+---------------------+------------
 v_vmart_node0001 | server1.company.-83046:1y28gu9    | dbadmin   |            1 |    318718 |              312718 |   80441904
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Close user session server1.company.-83046:1y28gu9 and result set 1:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CLOSE_RESULTSET(&amp;#39;server1.company.-83046:1y28gu9&amp;#39;, 1);
            close_resultset
-------------------------------------------------------------
 Closing result set 1 from server1.company.-83046:1y28gu9
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Query the MARS storage table again for current status. You can see that result set 1 is now closed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT * FROM SESSION_MARS_STORE;

    node_name     |            session_id             | user_name | resultset_id | row_count | remaining_row_count | bytes_used
------------------+-----------------------------------+-----------+--------------+-----------+---------------------+------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: DESCRIBE_LOAD_BALANCE_DECISION</title>
      <link>/en/sql-reference/functions/client-connection-functions/describe-load-balance-decision/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/describe-load-balance-decision/</guid>
      <description>
        
        
        &lt;p&gt;Evaluates if any load balancing routing rules apply to a given IP address and describes how the client connection would be handled. This function is useful when you are evaluating connection load balancing policies you have created, to ensure they work the way you expect them to.&lt;/p&gt;
&lt;p&gt;You pass this function an IP address of a client connection, and it uses the load balancing routing rules to determine how the connection will be handled. The logic this function uses is the same logic used when OpenText™ Analytics Database load balances client connections, including determining which nodes are available to handle the client connection.&lt;/p&gt;
&lt;p&gt;This function assumes the client connection has opted into being load balanced. If actual clients have not opted into load balancing, the connections will not be redirected. See &lt;a href=&#34;../../../../en/connecting-to/client-libraries/accessing/c/connecting-to-db/load-balancing-ado-net/#&#34;&gt;Load balancing in ADO.NET&lt;/a&gt;, &lt;a href=&#34;../../../../en/connecting-to/client-libraries/accessing/java/creating-and-configuring-connection/load-balancing-jdbc/#&#34;&gt;Load balancing in JDBC&lt;/a&gt;, and &lt;a href=&#34;../../../../en/connecting-to/client-libraries/accessing/ccpp/load-balancing/#&#34;&gt;Load balancing&lt;/a&gt;, for information on enabling load balancing on the client. For vsql, use the &lt;code&gt;-C&lt;/code&gt; command-line option to enable load balancing.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;

&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DESCRIBE_LOAD_BALANCE_DECISION(&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;ip_address&lt;/span&gt;&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&#39;&lt;span class=&#34;code-variable&#34;&gt;ip_address&lt;/span&gt;&#39;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An IP address of a client connection to be tested against the load balancing rules. This can be either an IPv4 or IPv6 address.&lt;/dd&gt;
&lt;/dl&gt;

&lt;h2 id=&#34;return-value&#34;&gt;Return value&lt;/h2&gt;
&lt;p&gt;A step-by-step description of how the load balancing rules are being evaluated, including the final decision of which node in the database has been chosen to service the connection.&lt;/p&gt;

&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None.&lt;/p&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example demonstrates calling DESCRIBE_LOAD_BALANCE_DECISION with three different IP addresses, two of which are handled by different routing rules, and one which is not handled by any rule.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;192.168.1.25&amp;#39;);
                        describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [192.168.1.25]
Load balance cache internal version id (node-local): [2]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address matches this rule
Matched to load balance group [group_1] the group has policy [ROUNDROBIN]
number of addresses [2]
(0) LB Address: [10.20.100.247]:5433
(1) LB Address: [10.20.100.248]:5433
Chose address at position [1]
Routing table decision: Success. Load balance redirect to: [10.20.100.248] port [5433]

(1 row)

=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;192.168.2.25&amp;#39;);
                        describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [192.168.2.25]
Load balance cache internal version id (node-local): [2]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address does not match source ip filter for this rule.
Considered rule [subnet_192] source ip filter [192.0.0.0/8]... input address
matches this rule
Matched to load balance group [group_all] the group has policy [ROUNDROBIN]
number of addresses [3]
(0) LB Address: [10.20.100.247]:5433
(1) LB Address: [10.20.100.248]:5433
(2) LB Address: [10.20.100.249]:5433
Chose address at position [1]
Routing table decision: Success. Load balance redirect to: [10.20.100.248] port [5433]

(1 row)

=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;1.2.3.4&amp;#39;);
                         describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [1.2.3.4]
Load balance cache internal version id (node-local): [2]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address does not match source ip filter for this rule.
Considered rule [subnet_192] source ip filter [192.0.0.0/8]... input address
does not match source ip filter for this rule.
Routing table decision: No matching routing rules: input address does not match
any routing rule source filters. Details: [Tried some rules but no matching]
No rules matched. Falling back to classic load balancing.
Classic load balance decision: Classic load balancing considered, but either
the policy was NONE or no target was available. Details: [NONE or invalid]

(1 row)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following example demonstrates calling DESCRIBE_LOAD_BALANCE_DECISION repeatedly with the same IP address. You can see that the load balance group&#39;s ROUNDROBIN load balance policy has it switch between the two nodes in the load balance group:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;192.168.1.25&amp;#39;);
                       describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [192.168.1.25]
Load balance cache internal version id (node-local): [1]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address matches this rule
Matched to load balance group [group_1] the group has policy [ROUNDROBIN]
number of addresses [2]
(0) LB Address: [10.20.100.247]:5433
(1) LB Address: [10.20.100.248]:5433
Chose address at position [1]
Routing table decision: Success. Load balance redirect to: [10.20.100.248]
port [5433]

(1 row)

=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;192.168.1.25&amp;#39;);
                        describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [192.168.1.25]
Load balance cache internal version id (node-local): [1]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address matches this rule
Matched to load balance group [group_1] the group has policy [ROUNDROBIN]
number of addresses [2]
(0) LB Address: [10.20.100.247]:5433
(1) LB Address: [10.20.100.248]:5433
Chose address at position [0]
Routing table decision: Success. Load balance redirect to: [10.20.100.247]
port [5433]

(1 row)

=&amp;gt; SELECT describe_load_balance_decision(&amp;#39;192.168.1.25&amp;#39;);
                         describe_load_balance_decision
--------------------------------------------------------------------------------
 Describing load balance decision for address [192.168.1.25]
Load balance cache internal version id (node-local): [1]
Considered rule [etl_rule] source ip filter [10.20.100.0/24]... input address
does not match source ip filter for this rule.
Considered rule [internal_clients] source ip filter [192.168.1.0/24]... input
address matches this rule
Matched to load balance group [group_1] the group has policy [ROUNDROBIN]
number of addresses [2]
(0) LB Address: [10.20.100.247]:5433
(1) LB Address: [10.20.100.248]:5433
Chose address at position [1]
Routing table decision: Success. Load balance redirect to: [10.20.100.248]
port [5433]

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;



&lt;ul&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/client-connection-functions/get-client-label/&#34;&gt;GET_CLIENT_LABEL&lt;/a&gt;&lt;/li&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/client-connection-functions/reset-load-balance-policy/&#34;&gt;RESET_LOAD_BALANCE_POLICY&lt;/a&gt;&lt;/li&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/client-connection-functions/set-client-label/&#34;&gt;SET_CLIENT_LABEL&lt;/a&gt;&lt;/li&gt;
	
	&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/client-connection-functions/set-load-balance-policy/&#34;&gt;SET_LOAD_BALANCE_POLICY&lt;/a&gt;&lt;/li&gt;
	
&lt;/ul&gt;



      </description>
    </item>
    
    <item>
      <title>Sql-Reference: GET_CLIENT_LABEL</title>
      <link>/en/sql-reference/functions/client-connection-functions/get-client-label/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/get-client-label/</guid>
      <description>
        
        
        &lt;p&gt;Returns the client connection label for the current session.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GET_CLIENT_LABEL()
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Return the current client connection label:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT GET_CLIENT_LABEL();
   GET_CLIENT_LABEL
-----------------------
 data_load_application
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/connecting-to/client-libraries/client-drivers/setting-client-connection-label/#&#34;&gt;Setting a client connection label&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: RESET_LOAD_BALANCE_POLICY</title>
      <link>/en/sql-reference/functions/client-connection-functions/reset-load-balance-policy/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/reset-load-balance-policy/</guid>
      <description>
        
        
        &lt;p&gt;Resets the counter each host in the cluster maintains, to track which host it will refer a client to when the native &lt;a href=&#34;../../../../en/admin/managing-client-connections/connection-load-balancing/about-native-connection-load-balancing/&#34;&gt;connection load balancing scheme&lt;/a&gt; is set to &lt;code&gt;ROUNDROBIN&lt;/code&gt;. To reset the counter, run this function on all cluster nodes.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RESET_LOAD_BALANCE_POLICY() &lt;span class=&#34;code-variable&#34;&gt; &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT RESET_LOAD_BALANCE_POLICY();

                        RESET_LOAD_BALANCE_POLICY
-------------------------------------------------------------------------
Successfully reset stateful client load balance policies: &amp;#34;roundrobin&amp;#34;.
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SET_CLIENT_LABEL</title>
      <link>/en/sql-reference/functions/client-connection-functions/set-client-label/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/set-client-label/</guid>
      <description>
        
        
        &lt;p&gt;Assigns a label to a client connection for the current session. You can use this label to distinguish client connections.&lt;/p&gt;
&lt;p&gt;Labels appear in the &lt;a href=&#34;../../../../en/sql-reference/system-tables/v-monitor-schema/sessions/#&#34;&gt;SESSIONS&lt;/a&gt; system table. However, only certain &lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/data-collector/&#34; title=&#34;A utility that collects and retains database monitoring information.&#34;&gt;Data collector&lt;/a&gt; tables show new client labels set by SET_CLIENT_LABEL. For example, DC_REQUESTS_ISSUED reflects changes by SET_CLIENT_LABEL, while DC_SESSION_STARTS, which collects login data before SET_CLIENT_LABEL can be run, does not.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SET_CLIENT_LABEL(&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;label-name&lt;/span&gt;&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;label-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;VARCHAR name assigned to the client connection label.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;None&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;Assign label &lt;code&gt;data_load_application&lt;/code&gt; to the current client connection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SET_CLIENT_LABEL(&amp;#39;data_load_application&amp;#39;);
             SET_CLIENT_LABEL
-------------------------------------------
 client_label set to data_load_application
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/connecting-to/client-libraries/client-drivers/setting-client-connection-label/#&#34;&gt;Setting a client connection label&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: SET_LOAD_BALANCE_POLICY</title>
      <link>/en/sql-reference/functions/client-connection-functions/set-load-balance-policy/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/client-connection-functions/set-load-balance-policy/</guid>
      <description>
        
        
        &lt;p&gt;Sets how native connection load balancing chooses a host to handle a client connection.&lt;/p&gt;
&lt;p&gt;This is a meta-function. You must call meta-functions in a top-level &lt;a href=&#34;../../../../en/sql-reference/statements/select/#&#34;&gt;SELECT&lt;/a&gt; statement.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/volatile-functions/&#34; title=&#34;&#34;&gt;Volatile&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SET_LOAD_BALANCE_POLICY(&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;policy&lt;/span&gt;&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;policy &lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the load balancing policy to use, one of the following:
&lt;p&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;NONE&lt;/code&gt; (default): Disables native connection load balancing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;ROUNDROBIN&lt;/code&gt;: Chooses the next host from a circular list of hosts in the cluster that are up—for example, in a three-node cluster, iterates over node1, node2, and node3, then wraps back to node1. Each host in the cluster maintains its own pointer to the next host in the circular list, rather than there being a single cluster-wide state.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;RANDOM&lt;/code&gt;: Randomly chooses a host from among all hosts in the cluster that are up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Even if the load balancing policy is set on the server to something other than &lt;code&gt;NONE&lt;/code&gt;, clients must indicate they want their connections to be load balanced by setting a connection property.

&lt;/div&gt;&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Superuser&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example demonstrates enabling native connection load balancing on the server by setting the load balancing scheme to &lt;code&gt;ROUNDROBIN&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SET_LOAD_BALANCE_POLICY(&amp;#39;ROUNDROBIN&amp;#39;);
                  SET_LOAD_BALANCE_POLICY
--------------------------------------------------------------------------------
Successfully changed the client initiator load balancing policy to: roundrobin
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/admin/managing-client-connections/connection-load-balancing/about-native-connection-load-balancing/#&#34;&gt;About native connection load balancing&lt;/a&gt;

      </description>
    </item>
    
  </channel>
</rss>
