<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Operating the database</title>
    <link>/en/admin/operating-db/</link>
    <description>Recent content in Operating the database on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/operating-db/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Starting the database</title>
      <link>/en/admin/operating-db/starting-db/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/operating-db/starting-db/</guid>
      <description>
        
        
        &lt;p&gt;You can start a database through one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/mc/&#34;&gt;Management Console&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Administ&#34;&gt;Administration Tools&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Command&#34;&gt;Command Line&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Administ&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;administration-tools&#34;&gt;Administration tools&lt;/h2&gt;
&lt;p&gt;You can start a database with the &lt;a href=&#34;../../../en/admin/using-admin-tools/&#34;&gt;Administration Tools&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open the Administration Tools and select &lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/viewing-db-cluster-state/&#34;&gt;View Database Cluster State&lt;/a&gt; to make sure all nodes are down and no other database is running.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the Administration Tools. See &lt;a href=&#34;../../../en/admin/using-admin-tools/#&#34;&gt;Using the administration tools&lt;/a&gt; for information about accessing the Administration Tools.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;On the &lt;strong&gt;Main Menu&lt;/strong&gt;, select &lt;strong&gt;Start Database&lt;/strong&gt;,and then select &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the database to start, and then click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;

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

Start only one database at a time. If you start more than one database at a given time, results can be unpredictable: users are liable to encounter resource conflicts, or perform operations on the wrong database.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the database password and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When prompted that the database started successfully, click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check the log files to make sure that no startup problems occurred.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a name=&#34;Command&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;command-line&#34;&gt;Command line&lt;/h2&gt;
&lt;p&gt;You can start a database with the &lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/writing-admin-tools-scripts/&#34;&gt;command line tool&lt;/a&gt; &lt;code&gt;start_db&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/admintools -t start_db -d &lt;span class=&#34;code-variable&#34;&gt;db-name&lt;/span&gt;
     [-p &lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;]
     [-s &lt;span class=&#34;code-variable&#34;&gt;host1&lt;/span&gt;[,...] | --hosts=&lt;span class=&#34;code-variable&#34;&gt;host1&lt;/span&gt;[,...]]
     [--timeout &lt;span class=&#34;code-variable&#34;&gt;seconds&lt;/span&gt;]
     [-i | --noprompts]
     [--fast]
     [-F | --force]
&lt;/code&gt;&lt;/pre&gt;
&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Option&lt;/th&gt; 

&lt;th &gt;
Description&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;



&lt;code&gt;-d --database&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Name of database to start.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;-p&lt;/code&gt; &lt;code&gt;--password&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;






&lt;p&gt;Required only during database creation, when you install a new license.&lt;/p&gt;
&lt;p&gt;If the license is valid, the option &lt;code&gt;-p&lt;/code&gt; (or &lt;code&gt;--password&lt;/code&gt;) is not required to start the database and is silently ignored. This is by design, as the database can only be started by the user who (as part of the verticadba UNIX user group) initially created the database or who has root or su privileges.&lt;/p&gt;
&lt;p&gt;If the license is invalid, the database uses the &lt;code&gt;-p&lt;/code&gt; password argument to attempt to upgrade the license with the license file stored in &lt;code&gt;/opt/vertica/config/share/license.key&lt;/code&gt;.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;

&lt;code&gt;-s --hosts&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;




&lt;p&gt;(Eon Mode only) Comma delimited list of primary node host names or IP addresses. If you use this option, &lt;code&gt;start_db&lt;/code&gt; attempts to start the database using just the nodes in the list. If omitted, &lt;code&gt;start_db&lt;/code&gt; starts all database nodes.&lt;/p&gt;
&lt;p&gt;For details, see &lt;a href=&#34;#Starting_Just_Primary_Nodes&#34;&gt;Start Just the Primary Nodes in an Eon Mode Database&lt;/a&gt; below.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;--timeout&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
The number of seconds a timeout in seconds to await startup completion. If set to &lt;code&gt;never&lt;/code&gt;, start_db never times out (implicitly sets &lt;code&gt;-i&lt;/code&gt;)&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;-i&lt;/code&gt;&lt;br /&gt;&lt;code&gt;--noprompts&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Startup does not pause to await user input. Setting &lt;code&gt;-i&lt;/code&gt; implies a timeout of 1200 seconds.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;--fast&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
(Eon Mode only) Attempts fast startup on a database using startup information from &lt;code&gt;cluster_config.json&lt;/code&gt;. This option can only be used with databases that do not use &lt;a href=&#34;../../../en/security-and-authentication/internode-tls/control-channel-spread-tls/&#34;&gt;Spread encryption&lt;/a&gt;.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;-F&lt;/code&gt;&lt;br /&gt;&lt;code&gt;--force&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Forces the database to start at an epoch before data consistency problems were detected.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;The following example uses &lt;code&gt;start_db&lt;/code&gt; to start a single-node database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/admintools -t start_db -d VMart
Info:
no password specified, using none
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (DOWN)
Node Status: v_vmart_node0001: (UP)
Database VMart started successfully
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a name=&#34;Starting_Just_Primary_Nodes&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;eon-mode-database-node-startup&#34;&gt;Eon Mode database node startup&lt;/h3&gt;
&lt;p&gt;On starting an Eon Mode database, you can start all primary nodes, or a subset of them. In both cases, pass &lt;code&gt;start_db&lt;/code&gt; the list of the primary nodes to start with the &lt;code&gt;-s&lt;/code&gt; option.&lt;/p&gt;
&lt;p&gt;The following requirements apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primary node hosts must already be up to start the database.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;start_db&lt;/code&gt; tool cannot start stopped hosts such as cloud-based VMs. You must either manually start the hosts or use the MC to start the cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following example starts the three primary nodes in a six-node Eon Mode database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ admintools -t start_db -d verticadb -p &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;&amp;#39; \
   -s 10.11.12.10,10.11.12.20,10.11.12.30
    Starting nodes:
        v_verticadb_node0001 (10.11.12.10)
        v_verticadb_node0002 (10.11.12.20)
        v_verticadb_node0003 (10.11.12.30)
    Starting Vertica on all nodes. Please wait, databases with a large catalog may take a while to initialize.
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (DOWN) v_verticadb_node0002: (DOWN) v_verticadb_node0003: (DOWN)
    Node Status: v_verticadb_node0001: (UP) v_verticadb_node0002: (UP) v_verticadb_node0003: (UP)
Syncing catalog on verticadb with 2000 attempts.
Database verticadb: Startup Succeeded.  All Nodes are UP
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the database starts, the &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/secondary-subcluster/&#34; title=&#34;A secondary subcluster is a type of subcluster that is easy to start and shutdown on demand.&#34;&gt;secondary subclusters&lt;/a&gt; are down. You can choose to start them as needed. See &lt;a href=&#34;../../../en/eon/managing-subclusters/starting-and-stopping-subclusters/#Starting_a_Subcluster&#34;&gt;Starting a Subcluster&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Starting the database with a subset of primary nodes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As a best pratice, it is recommended that you always start an Eon Mode database with all primary nodes. Occasionally, you might be unable to start the hosts for all primary nodes. In that case, you might need to start the database with a subset of its primary nodes.&lt;/p&gt;
&lt;p&gt;If &lt;code&gt;start_db&lt;/code&gt; specifies a subset of database primary nodes, the following requirements apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The nodes must comprise a quorum: at least 50% + 1 of all primary nodes in the cluster.&lt;/li&gt;
&lt;li&gt;Collectively, the nodes must provide coverage for all shards in communal storage. The primary nodes you use to start the database do not attempt to rebalance shard subscriptions while starting up.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If either or both of these conditions are not met, &lt;code&gt;start_db&lt;/code&gt; returns an error. In the following example, &lt;code&gt;start_db&lt;/code&gt; specifies three primary nodes in a database with nine primary nodes. The command returns an error that it cannot start the database with fewer than five primary nodes:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ admintools -t start_db -d verticadb -p &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;&amp;#39; \
    -s 10.11.12.10,10.11.12.20,10.11.12.30
    Starting nodes:
        v_verticadb_node0001 (10.11.12.10)
        v_verticadb_node0002 (10.11.12.20)
        v_verticadb_node0003 (10.11.12.30)
Error: Quorum not satisfied for verticadb.
    3 &amp;lt; minimum 5  of 9 primary nodes.
Attempted to start the following nodes:
Primary
        v_verticadb_node0001 (10.11.12.10)
        v_verticadb_node0003 (10.11.12.30)
        v_verticadb_node0002 (10.11.12.20)
Secondary

 hint: you may want to start all primary nodes in the database
Database start up failed.  Cluster partitioned.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you try to start the database with fewer than the full set of primary nodes and the cluster fails to start, database processes might continue to run on some of the hosts. If so, subsequent attempts to start the database will return with an error like the following:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Error: the vertica process for the database is running on the following hosts:
10.11.12.10
10.11.12.20
10.11.12.30
This may be because the process has not completed previous shutdown activities. Please wait and retry again.
Database start up failed.  Processes still running.
Database verticadb did not start successfully: Processes still running.. Hint: you may need to start all primary nodes.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Before you can start the database, you must stop the database server process on the hosts listed in the error message, either with the &lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/advanced-menu-options/stopping-on-host/&#34;&gt;admintools menus&lt;/a&gt; or the admintools command line&#39;s &lt;code&gt;stop_host&lt;/code&gt; tool:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ admintools -t stop_host -s 10.11.12.10,10.11.12.20,10.11.12.30
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Admin: Stopping the database</title>
      <link>/en/admin/operating-db/stopping-db/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/operating-db/stopping-db/</guid>
      <description>
        
        
        &lt;p&gt;There are many occasions when you must stop a database, for example, before an upgrade or performing various maintenance tasks. You can stop a running database through one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/mc/db-management/managing-db-clusters/viewing-and-managing-your-cluster/#ClusterManagementActions&#34;&gt;Management Console&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Administ&#34;&gt;Administration Tools interface&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#ShutDownFunctions&#34;&gt;Database functions&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#StopDbCommand&#34;&gt;Command line&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You cannot stop a running database if any users are connected or Database Designer is building or deploying a database design.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Administ&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;administration-tools&#34;&gt;Administration tools&lt;/h2&gt;
&lt;p&gt;To stop a running database with admintools:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/viewing-db-cluster-state/&#34;&gt;Verify that all cluster nodes are up&lt;/a&gt;. If any nodes are down, &lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/restarting-on-host/&#34;&gt;identify and restart them&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Close all user sessions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Identify all users with active sessions by querying the 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/sessions/#&#34;&gt;SESSIONS&lt;/a&gt;&lt;/code&gt; system table. Notify users of the impending shutdown and request them to shut down their sessions.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Prevent users from starting new sessions by temporarily resetting configuration parameter &lt;a href=&#34;../../../en/sql-reference/config-parameters/general-parameters/&#34;&gt;MaxClientSessions&lt;/a&gt; to 0:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DATABASE DEFAULT SET MaxClientSessions = 0;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Close all remaining user sessions with database functions &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/session-functions/close-session/#&#34;&gt;CLOSE_SESSION&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/session-functions/close-all-sessions/#&#34;&gt;CLOSE_ALL_SESSIONS&lt;/a&gt;.&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;

You can also force a database shutdown and block new sessions with the function &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/db-functions/shutdown/#&#34;&gt;SHUTDOWN&lt;/a&gt;.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open the &lt;a href=&#34;../../../en/admin/using-admin-tools/&#34;&gt;Administration Tools&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From the Main Menu:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Select Stop Database&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;OK&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select the database to stop and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter the password (if asked) and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When prompted that database shutdown is complete, click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a name=&#34;ShutDownFunctions&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;database-functions&#34;&gt;Database functions&lt;/h2&gt;
&lt;p&gt;You can stop a database with the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/db-functions/shutdown/#&#34;&gt;SHUTDOWN&lt;/a&gt; function. By default, the shutdown fails if any users are connected. To force a shutdown regardless of active user connections, call SHUTDOWN with an argument of &lt;code&gt;true&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SHUTDOWN(&amp;#39;true&amp;#39;);
      SHUTDOWN
-------------------------
Shutdown: sync complete
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In Eon Mode databases, you can stop subclusters with the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/shutdown-subcluster/#&#34;&gt;SHUTDOWN_SUBCLUSTER&lt;/a&gt; and &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/shutdown-with-drain/#&#34;&gt;SHUTDOWN_WITH_DRAIN&lt;/a&gt; functions. SHUTDOWN_SUBCLUSTER shuts down subclusters immediately, whereas SHUTDOWN_WITH_DRAIN performs a graceful shutdown that drains client connections from subclusters before shutting them down. For more information, see &lt;a href=&#34;../../../en/eon/managing-subclusters/starting-and-stopping-subclusters/#&#34;&gt;Starting and stopping subclusters&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following example demonstrates how you can shut down all subclusters in an Eon Mode database using SHUTDOWN_WITH_DRAIN:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SHUTDOWN_WITH_DRAIN(&amp;#39;&amp;#39;, 0);
NOTICE 0:  Begin shutdown of subcluster (default_subcluster, analytics)
                SHUTDOWN_WITH_DRAIN
-----------------------------------------------------------------------
Shutdown message sent to subcluster (default_subcluster, analytics)

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a name=&#34;StopDbCommand&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;command-line&#34;&gt;Command line&lt;/h2&gt;
&lt;p&gt;You can stop a database with the &lt;a href=&#34;../../../en/admin/using-admin-tools/admin-tools-reference/writing-admin-tools-scripts/&#34;&gt;admintools command&lt;/a&gt; &lt;code&gt;stop_db&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ $ admintools -t stop_db --help
Usage: stop_db [options]

Options:
  -h, --help            Show this help message and exit.
  -d DB, --database=DB  Name of database to be stopped.
  -p DBPASSWORD, --password=DBPASSWORD
                        Database password in single quotes.
  -F, --force           Force the database to shutdown, even if users are
                        connected.
  -z, --if-no-users     Only shutdown if no users are connected. If any users
                        are connected, exit with an error.
  -n DRAIN_SECONDS, --drain-seconds=DRAIN_SECONDS
                        Eon db only: seconds to wait for user connections to
                        close. Default value is 60 seconds. When the time
                        expires, connections will be forcibly closed and the
                        db will shut down.
  --timeout=NONINTERACTIVE_TIMEOUT
                        Set a timeout (in seconds) to wait for actions to
                        complete (&amp;#39;never&amp;#39;) will wait forever (implicitly sets
                        -i).
  -i, --noprompts       Do not stop and wait for user input(default false).
                        Setting this implies a timeout of 20 min.
&lt;/code&gt;&lt;/pre&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;

You cannot use both the &lt;code&gt;-z&lt;/code&gt; (&lt;code&gt;--if-no-users&lt;/code&gt;) and &lt;code&gt;-F&lt;/code&gt; (or &lt;code&gt;--force&lt;/code&gt;) options in the same &lt;code&gt;stop_db&lt;/code&gt; call.

&lt;/div&gt;
&lt;p&gt;&lt;code&gt;stop_db&lt;/code&gt; behavior depends on whether it stops an &lt;a href=&#34;#StopDbCommandEonMode&#34;&gt;Eon Mode&lt;/a&gt; or &lt;a href=&#34;#StopDbCommandEnterprise&#34;&gt;Enterprise Mode&lt;/a&gt; database.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;StopDbCommandEonMode&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;stopping-an-eon-mode-database&#34;&gt;Stopping an Eon Mode database&lt;/h3&gt;
&lt;p&gt;In Eon Mode databases, the default behavior of &lt;code&gt;stop_db&lt;/code&gt; is to call &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/shutdown-with-drain/#&#34;&gt;SHUTDOWN_WITH_DRAIN&lt;/a&gt; to &lt;a href=&#34;../../../en/eon/managing-subclusters/starting-and-stopping-subclusters/#Graceful_Shutdown&#34;&gt;gracefully shut down&lt;/a&gt; all subclusters in the database. This graceful shutdown process drains client connections from subclusters before shutting them down.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;stop_db&lt;/code&gt; option &lt;code&gt;-n&lt;/code&gt; (&lt;code&gt;--drain-seconds&lt;/code&gt;) lets you specify the number of seconds to wait—by default, 60—before forcefully closing client connections and shutting down all subclusters. If you set a negative &lt;code&gt;-n&lt;/code&gt; value, the subclusters are marked as draining but do not shut down until all active user sessions disconnect.&lt;/p&gt;
&lt;p&gt;In the following example, the database initially has an active client session, but the session closes before the timeout limit is reached and the database shuts down:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ admintools -t stop_db -d verticadb --password &lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt; --drain-seconds 200
Shutdown will use connection draining.
Shutdown will wait for all client sessions to complete, up to 200 seconds
Then it will force a shutdown.
Poller has been running for 0:00:00.000025 seconds since 2022-07-27 17:10:08.292919


------------------------------------------------------------
client_sessions     |node_count          |node_names
--------------------------------------------------------------
0                   |5                   |v_verticadb_node0005,v_verticadb_node0006,v_verticadb_node0003,v_verticadb_node0...
1                   |1                   |v_verticadb_node0001
STATUS: vertica.engine.api.db_client.module is still running on 1 host: &lt;span class=&#34;code-variable&#34;&gt;nodeIP&lt;/span&gt; as of 2022-07-27 17:10:18. See /opt/vertica/log/adminTools.log for full details.
Poller has been running for 0:00:11.371296 seconds since 2022-07-27 17:10:08.292919

...

------------------------------------------------------------
client_sessions     |node_count          |node_names
--------------------------------------------------------------
0                   |5                   |v_verticadb_node0002,v_verticadb_node0004,v_verticadb_node0003,v_verticadb_node0...
1                   |1                   |v_verticadb_node0001
Stopping poller drain_status because it was canceled
Shutdown metafunction complete. Polling until database processes have stopped.
Database verticadb stopped successfully
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you use the &lt;code&gt;-z&lt;/code&gt; (&lt;code&gt;--if-no-users&lt;/code&gt;) option, the database shuts down immediately if there are no active user sessions. Otherwise, the &lt;code&gt;stop_db&lt;/code&gt; command returns an error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ admintools -t stop_db -d verticadb --password &lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt; --if-no-users
Running shutdown metafunction. Not using connection draining

             Active session details
| Session id                        | Host Ip        | Connected User |
| ------- --                        | ---- --        | --------- ---- |
| v_verticadb_node0001-107720:0x257 | 192.168.111.31 | analyst        |
Database verticadb not stopped successfully for the following reason:
Shutdown did not complete. Message: Shutdown: aborting shutdown
Active sessions prevented shutdown.
Omit the option --if-no-users to close sessions. See stop_db --help.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can use the &lt;code&gt;-F&lt;/code&gt; (or &lt;code&gt;--force&lt;/code&gt;) option to shut down all subclusters immediately, without checking for active user sessions or draining the subclusters.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;StopDbCommandEnterprise&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;stopping-an-enterprise-mode-database&#34;&gt;Stopping an Enterprise Mode database&lt;/h3&gt;
&lt;p&gt;In Enterprise Mode databases, the default behavior of &lt;code&gt;stop_db&lt;/code&gt; is to shut down the database only if there are no active sessions. If users are connected to the database, the command aborts with an error message and lists all active sessions. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/admintools -t stop_db -d VMart
Info: no password specified, using none

        Active session details
| Session id                     | Host Ip       | Connected User |
| ------- --                     | ---- --       | --------- ---- |
| v_vmart_node0001-91901:0x162   | 10.20.100.247 | analyst        |
Database VMart not stopped successfully for the following reason:
Unexpected output from shutdown: Shutdown: aborting shutdown
NOTICE: Cannot shut down while users are connected
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can use the &lt;code&gt;-F&lt;/code&gt; (or &lt;code&gt;--force&lt;/code&gt;) option to override user connections and force a shutdown.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: CRC and sort order check</title>
      <link>/en/admin/operating-db/crc-and-sort-order-check/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/operating-db/crc-and-sort-order-check/</guid>
      <description>
        
        
        &lt;p&gt;As a superuser, you can run the Index tool on a database to perform the following tasks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Run a cyclic redundancy check (CRC) on each block of existing data storage to check the data integrity of ROS data blocks.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check that the sort order in ROS containers is correct.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the database is down, invoke the Index tool from the Linux command line. If the database is up, invoke from VSQL with meta-function 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/management-functions/db-functions/run-index-tool/#&#34;&gt;RUN_INDEX_TOOL&lt;/a&gt;&lt;/code&gt;:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Operation&lt;/th&gt; 

&lt;th &gt;
Database down&lt;/th&gt; 

&lt;th &gt;
Database up&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Run CRC&lt;/td&gt; 

&lt;td &gt;

&lt;code&gt;/opt/vertica/bin/vertica -D &lt;span class=&#34;code-variable&#34;&gt;catalog-path&lt;/span&gt; -v&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;SELECT RUN_INDEX_TOOL (&#39;checkcrc&#39;,... );&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Check sort order&lt;/td&gt; 

&lt;td &gt;

&lt;code&gt;/opt/vertica/bin/vertica -D &lt;span class=&#34;code-variable&#34;&gt;catalog-path&lt;/span&gt; -I&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;SELECT RUN_INDEX_TOOL (&#39;checksort&#39;,... );&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;If invoked from the command line, the Index tool runs only on the current node. However, you can run the Index tool on multiple nodes simultaneously.&lt;/p&gt;
&lt;h2 id=&#34;result-output&#34;&gt;Result output&lt;/h2&gt;
&lt;p&gt;The Index tool writes summary information about its operation to standard output; detailed information on results is logged in one of two locations, depending on the environment where you invoke the tool:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
Invoked from:&lt;/th&gt; 

&lt;th &gt;
Results written to:&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linux command line&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;indextool.log&lt;/code&gt; in the database catalog directory&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
VSQL&lt;/td&gt; 

&lt;td &gt;
&lt;code&gt;vertica.log&lt;/code&gt; on the current node&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;p&gt;For information about evaluating output for possible errors, see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/operating-db/crc-and-sort-order-check/evaluating-crc-errors/#&#34;&gt;Evaluating CRC errors&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../en/admin/operating-db/crc-and-sort-order-check/evaluating-sort-order-errors/#&#34;&gt;Evaluating sort order errors&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;optimizing-performance&#34;&gt;Optimizing performance&lt;/h2&gt;
&lt;p&gt;You can optimize meta-function performance by narrowing the scope of the operation to one or more projections, and specifying the number of threads used to execute the function. For details, see 
&lt;code&gt;&lt;a href=&#34;../../../en/sql-reference/functions/management-functions/db-functions/run-index-tool/#&#34;&gt;RUN_INDEX_TOOL&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;

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