<?xml version="1.0" encoding="UTF-8" ?>

<!--
  ~ Copyright (c) DbVis Software AB. All Rights Reserved.
  -->

<!--
   Created by Exasol exclusively for DbVisualizer.

   Exasol grants DbVis Software AB the right to bundle the
   Exasol database profile with DbVisualizer.
-->

<!DOCTYPE DatabaseProfile SYSTEM "dbvis-defs.dtd">

<DatabaseProfile
        desc="Profile for Exasol"
        minver="9.5"
        extends="generic">

   <!-- =================================================================== -->
   <!-- Definition of initialization commands                               -->
   <!-- =================================================================== -->

   <InitCommands extends="true">

      <Command id="exasol.getIsSuperUser">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
true as SUPERUSER
from
EXA_USER_ROLE_PRIVS
where
GRANTED_ROLE = 'DBA' and GRANTEE = CURRENT_USER
            ]]>
         </SQL>
         <Output index="1" name="SUPERUSER"/>
      </Command>

      <Command id="exasol.getIsSelectAnyDictionary">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
true as ANYDICTIONARY
from
(
table EXA_ROLE_SYS_PRIVS
union
table EXA_USER_SYS_PRIVS
)
where
PRIVILEGE = 'SELECT ANY DICTIONARY'
            ]]>
         </SQL>
         <Output index="1" name="ANYDICTIONARY"/>
      </Command>

   </InitCommands>

   <!-- =================================================================== -->
   <!-- Definitions of schema/databases commands -->
   <!-- =================================================================== -->

   <Commands extends="true">
      <Command id="exasol.getNonSystemSchemas">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT SCHEMA_NAME FROM EXA_SCHEMAS
WHERE SCHEMA_IS_VIRTUAL = FALSE
ORDER BY UPPER(SCHEMA_NAME)
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSystemSchemas">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT 'SYS' as SCHEMA_NAME
UNION
SELECT 'EXA_STATISTICS' as SCHEMA_NAME
ORDER BY SCHEMA_NAME
 			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getVirtualSchemas">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
	SCHEMA_NAME 'Schema name',
	SCHEMA_OWNER 'Schema owner',
	ADAPTER_SCRIPT 'Adapter script',
	LAST_REFRESH 'Last refresh',
	LAST_REFRESH_BY 'Last refresh by',
	ADAPTER_NOTES 'Adapter notes'
from
   EXA_VIRTUAL_SCHEMAS
			]]>
         </SQL>
      </Command>

      <Command id="exasol.getVirtualSchemaProperties">
         <SQL>
            <![CDATA[/*snapshot execution*/
select SCHEMA_NAME 'Schema name',
PROPERTY_NAME 'Property name',
PROPERTY_VALUE 'Property value'
from EXA_ALL_VIRTUAL_SCHEMA_PROPERTIES
WHERE
SCHEMA_NAME = '${schema}'
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getVirtualSchemaDDL">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
'CREATE VIRTUAL SCHEMA ' || s.SCHEMA_NAME || ' USING ' || ADAPTER_SCRIPT || '
WITH
' || GROUP_CONCAT(PROPERTY_NAME || ' = ''' || PROPERTY_VALUE || '''' ORDER BY PROPERTY_NAME SEPARATOR '
') || ';
' AS 'TEXT'
from
EXA_VIRTUAL_SCHEMAS s
join
EXA_ALL_VIRTUAL_SCHEMA_PROPERTIES p using (schema_object_id)
where s.schema_name = '${schema}'
group by s.schema_name, adapter_script
   	      ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSchema">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
SCHEMA_NAME 'Schema name',
SCHEMA_OWNER 'Schema owner',
SCHEMA_IS_VIRTUAL 'Schema is virtual',
SCHEMA_COMMENT 'Schema comment'
from
EXA_SCHEMAS
where SCHEMA_NAME = '${schema}'
			   ]]>
         </SQL>
      </Command>

      <!-- The "getTableNamesFor" command is used by Database getTableNamesFor(). It must return table names for the catalog and schema named by the ${table_catalog} and ${table_catalog} variables in the first
         column. -->
      <Command id="exasol.getTableNamesFor">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT TABLE_NAME
FROM EXA_ALL_TABLES
WHERE TABLE_SCHEMA like '${table_schema}'
ORDER BY TABLE_NAME
            ]]>
         </SQL>
      </Command>

      <!--
      The "getColumnNamesFor" command is used by Database getColumnNamesFor().
      It must return column names for the catalog, schema and table named
      by the ${table_catalog}, ${table_schema} and ${table_name}
      variables in the first column.
      -->
      <Command id="exasol.getColumnNamesFor">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT    COLUMN_NAME
FROM      EXA_ALL_COLUMNS
WHERE     COLUMN_SCHEMA  = '${table_schema}'
AND       COLUMN_TABLE = '${table_name}'
ORDER BY  COLUMN_NAME
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Table Related Commands -->
      <!-- ================================================================= -->

      <!--Get TABLE -->
      <Command id="exasol.getTables">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
TABLE_SCHEMA as 'Schema',
TABLE_NAME as 'Table Name',
TABLE_OWNER 'Owner',
		 ]]>
            <If test="#util.isDatabaseVersionGTE(6)">
               <![CDATA[/*snapshot execution*/
TABLE_IS_VIRTUAL  'Is Virtual',
TABLE_HAS_DISTRIBUTION_KEY 'Has Distribution Keys',
TABLE_ROW_COUNT 'Row count',
DELETE_PERCENTAGE 'Delete percentage',
		]]>
            </If>
            <![CDATA[/*snapshot execution*/
TABLE_COMMENT 'Comment'
FROM
EXA_ALL_TABLES
WHERE  TABLE_SCHEMA LIKE '${schema}'
AND    TABLE_NAME LIKE '${objectname}'
ORDER BY	TABLE_SCHEMA, TABLE_NAME
		]]>
         </SQL>
      </Command>

      <Command id="exasol.getViews">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
VIEW_SCHEMA 'Schema',
VIEW_NAME 'View name',
SCOPE_SCHEMA 'Scope Schema',
VIEW_OWNER 'Owner',
'CREATE /*OR REPLACE*/ VIEW "' || REPLACE(VIEW_SCHEMA,'"','""') || '"."' || REPLACE(VIEW_NAME,'"','""') || '" ' || "$VIEW_MIGRATION_TEXT"(VIEW_TEXT)  as 'View text',
VIEW_COMMENT 'Comment'
FROM
EXA_ALL_VIEWS
WHERE  VIEW_SCHEMA LIKE '${schema}'
AND    VIEW_NAME LIKE '${objectname}'
ORDER BY	VIEW_SCHEMA, VIEW_NAME
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getDependency">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
	REFERENCED_OBJECT_SCHEMA 'Referenced object',
	REFERENCED_OBJECT_NAME 'Referenced object name',
	REFERENCED_OBJECT_TYPE 'Referenced object type',
	REFERENCED_OBJECT_OWNER 'Referenced object owner'
FROM
	EXA_ALL_DEPENDENCIES
WHERE
	OBJECT_SCHEMA LIKE '${schema}' and
	OBJECT_NAME LIKE '${objectname}'
ORDER BY REFERENCED_OBJECT_SCHEMA, REFERENCED_OBJECT_NAME
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSystemTables">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
SCHEMA_NAME 'Schema',
OBJECT_NAME 'Table Name',
OBJECT_COMMENT 'Comment'
FROM
EXA_SYSCAT
WHERE	   SCHEMA_NAME LIKE '${schema}'
AND      OBJECT_NAME LIKE '${objectname}'
ORDER BY	OBJECT_NAME
			]]>
         </SQL>
      </Command>

      <Command id="exasol.getSchemaSize">
         <If test="#util.isDatabaseVersionGTE(6,1) and #ANYDICTIONARY">
            <SQL>
               <![CDATA[/*snapshot execution*/
	select
	OBJECT_NAME 'Schema Name',
	case when RAW_OBJECT_SIZE > 0 then cast(RAW_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) else  RAW_OBJECT_SIZE end 'RAW Size in GiB [uncompressed]',
	case when RAW_OBJECT_SIZE_LIMIT > 0 then cast(RAW_OBJECT_SIZE_LIMIT / 1024 / 1024 / 1024 as DECIMAL(36,5)) else  RAW_OBJECT_SIZE_LIMIT end 'RAW Object Size Limit (Quota) in GiB [uncompressed]',
	case when MEM_OBJECT_SIZE > 0 then cast(MEM_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) else MEM_OBJECT_SIZE end 'MEM Size in GiB [compressed]',
	case when MEM_OBJECT_SIZE > 0 then cast(RAW_OBJECT_SIZE / MEM_OBJECT_SIZE as DECIMAL(15,5)) else 0 end   'Compression [RAW/MEM]',
	CREATED 'Created',
	LAST_COMMIT 'Last Commit'
	from
	SYS.EXA_DBA_OBJECT_SIZES
	where
	OBJECT_TYPE = 'SCHEMA' AND OBJECT_NAME LIKE '${objectname}'
	ORDER BY MEM_OBJECT_SIZE desc;
				]]>
            </SQL>
         </If>
         <Else>
            <SQL>
               <![CDATA[/*snapshot execution*/


	select
	OBJECT_NAME 'Schema Name',
	case when RAW_OBJECT_SIZE > 0 then cast(RAW_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) else  RAW_OBJECT_SIZE end 'RAW Size in GiB [uncompressed]',
	case when MEM_OBJECT_SIZE > 0 then cast(MEM_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) else MEM_OBJECT_SIZE end 'MEM Size in GiB [compressed]',
	case when MEM_OBJECT_SIZE > 0 then cast(RAW_OBJECT_SIZE / MEM_OBJECT_SIZE as DECIMAL(15,5)) else 0 end   'Compression [RAW/MEM]',
	CREATED 'Created',
	LAST_COMMIT 'Last Commit'
	from
	SYS.EXA_ALL_OBJECT_SIZES
	where
	OBJECT_TYPE = 'SCHEMA' AND OBJECT_NAME LIKE '${objectname}'
	ORDER BY MEM_OBJECT_SIZE desc;
				]]>
            </SQL>

         </Else>
      </Command>

      <Command id="exasol.getTableSize">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
ROOT_NAME 'Schema name',
OBJECT_NAME 'Table Name',
CAST(RAW_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) 'RAW Size in GiB [uncompressed]',
CAST(MEM_OBJECT_SIZE / 1024 / 1024 / 1024 as DECIMAL(36,5)) 'MEM Size in GiB [compressed]',
CAST(RAW_OBJECT_SIZE/ MEM_OBJECT_SIZE as DECIMAL(15,5)) 'Compression [RAW/MEM]',
TO_CHAR(TABLE_ROW_COUNT,'999G999G999G999G999G999G999G999') 'Row count',
CREATED 'Created',
LAST_COMMIT 'Last Commit'
FROM
SYS.EXA_ALL_OBJECT_SIZES
JOIN
SYS.EXA_DBA_TABLES ON OBJECT_ID = TABLE_OBJECT_ID
WHERE
ROOT_NAME LIKE '${schema}'
AND OBJECT_NAME LIKE '${objectname}'
AND OBJECT_TYPE = 'TABLE'
ORDER BY TABLE_ROW_COUNT DESC
			]]>
         </SQL>
      </Command>

      <Command id="exasol.getTableGrants">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
SELECT
GRANTOR AS 'Grantor',
PRIVILEGE AS 'Privilege',
OBJECT_SCHEMA AS 'Schema',
OBJECT_NAME AS 'Name',
GRANTEE AS 'Grantee',
OWNER AS 'Owner'
FROM EXA_DBA_OBJ_PRIVS
WHERE OBJECT_SCHEMA like '${schema}'
AND OBJECT_NAME like '${objectname}'
   			   ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
SELECT
GRANTOR AS 'Grantor',
PRIVILEGE AS 'Privilege',
OBJECT_SCHEMA AS 'Schema',
OBJECT_NAME AS 'Name',
GRANTEE AS 'Grantee',
OWNER AS 'Owner'
FROM EXA_ALL_OBJ_PRIVS
WHERE OBJECT_SCHEMA like '${schema}'
AND OBJECT_NAME like '${objectname}'
				   ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getSchemaGrants">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
SELECT
GRANTOR AS 'Grantor',
PRIVILEGE AS 'Privilege',
OBJECT_NAME AS 'Name',
GRANTEE AS 'Grantee',
OWNER AS 'Owner'
FROM EXA_DBA_OBJ_PRIVS
WHERE OBJECT_NAME like '${objectname}'
AND OBJECT_TYPE = 'SCHEMA'
  				   ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
SELECT
GRANTOR AS 'Grantor',
PRIVILEGE AS 'Privilege',
OBJECT_NAME AS 'Name',
GRANTEE AS 'Grantee',
OWNER AS 'Owner'
FROM EXA_ALL_OBJ_PRIVS
WHERE OBJECT_NAME like '${objectname}'
AND OBJECT_TYPE = 'SCHEMA'
				   ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getTableConstraints">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
CONSTRAINT_SCHEMA 'Schema',
CONSTRAINT_TABLE 'Table Name',
CONSTRAINT_TYPE 'Constraint Type',
CONSTRAINT_NAME 'Constraint Name',
CONSTRAINT_ENABLED 'Constraint Enabled'
FROM
EXA_ALL_CONSTRAINTS
WHERE
CONSTRAINT_SCHEMA  = '${schema}'
AND CONSTRAINT_TABLE = '${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getTableConstraintColumns">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
CONSTRAINT_SCHEMA 'Constraint Schema',
CONSTRAINT_TABLE 'Constraint Table',
CONSTRAINT_TYPE 'Constraint Type',
CONSTRAINT_NAME 'Constraint Name',
CONSTRAINT_OWNER 'Constraint Owner',
ORDINAL_POSITION 'Ordinal Position',
COLUMN_NAME 'Column Name',
REFERENCED_SCHEMA 'Referenced Schema',
REFERENCED_TABLE 'Referenced Table',
REFERENCED_COLUMN 'Referenced Column'
FROM
EXA_ALL_CONSTRAINT_COLUMNS
WHERE CONSTRAINT_NAME = '${constraint_name}'
AND CONSTRAINT_SCHEMA = '${constraint_schema}'
AND CONSTRAINT_TABLE = '${constraint_table}'
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getTableDistributionKeys">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
COLUMN_SCHEMA 'Column schema',
COLUMN_TABLE 'Column table',
COLUMN_NAME 'Column name',
COLUMN_TYPE 'Column type',
COLUMN_TYPE_ID 'Column type id',
COLUMN_MAXSIZE 'Column maxsize',
COLUMN_NUM_PREC 'Column num prec',
COLUMN_NUM_SCALE 'Column num scale',
COLUMN_ORDINAL_POSITION 'Column ordinal position',
COLUMN_IS_NULLABLE 'Column is nullable',
COLUMN_IS_DISTRIBUTION_KEY 'Column is distribution key',
COLUMN_DEFAULT 'Column default',
COLUMN_IDENTITY 'Column identity',
COLUMN_OWNER 'Column owner',
COLUMN_OBJECT_ID 'Column object id',
STATUS 'Status',
COLUMN_COMMENT 'Column comment'
from
SYS.EXA_ALL_COLUMNS ac
WHERE
COLUMN_SCHEMA  = '${schema}' AND
COLUMN_TABLE = '${objectname}' AND
COLUMN_IS_DISTRIBUTION_KEY is true
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getTableIndices">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
INDEX_SCHEMA 'Index schema',
INDEX_TABLE 'Index table',
INDEX_OWNER 'Index owner',
INDEX_OBJECT_ID 'Index object id',
INDEX_TYPE 'Index type',
cast(MEM_OBJECT_SIZE / 1024 / 1024 as DECIMAL(36,5)) 'MEM Object Size [MiB]',
CREATED 'Created',
LAST_COMMIT 'Last commit',
REMARKS 'Remarks'
from
EXA_ALL_INDICES
where INDEX_SCHEMA = '${schema}' and INDEX_TABLE =  '${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getTableDistribution">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
iproc() as 'Node ID', count(*) as '# Rows'
from
"${schema}"."${objectname}"
group by 1
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- User Related Commands -->
      <!-- ================================================================= -->

      <Command id="exasol.getUsers">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
SELECT
USER_NAME 'Name',
CREATED  'Created',
DISTINGUISHED_NAME 'Distinguished name',
USER_PRIORITY 'User Priority',
USER_COMMENT 'Comment'
FROM
EXA_DBA_USERS
ORDER BY USER_NAME
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
SELECT
USER_NAME as 'Name',
CREATED as 'Created',
USER_PRIORITY 'User Priority',
USER_COMMENT 'Comment'
FROM
EXA_ALL_USERS ORDER BY USER_NAME
            ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getRecursiveRolesOfUser">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
	CONNECT_BY_ROOT(GRANTEE) as 'Grantee',
	GRANTED_ROLE 'Granted Role',
	ADMIN_OPTION 'Admin Option',
	CONNECT_BY_ROOT(GRANTEE) || SYS_CONNECT_BY_PATH(GRANTED_ROLE, ' <- ') as 'Grant Path'
from exa_dba_role_privs
connect by nocycle GRANTEE = prior GRANTED_ROLE
start with GRANTEE in ('${objectname}')
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
GRANTEE 'Grantee',
GRANTED_ROLE 'Granted Role',
ADMIN_OPTION 'Admin Option',
GRANTEE||' <- '||GRANTED_ROLE as 'Grant Path'
from
EXA_USER_ROLE_PRIVS
WHERE GRANTEE = '${objectname}'

union all

select
  CONNECT_BY_ROOT(RR.GRANTEE) as 'Grantee',
  RR.GRANTED_ROLE  'Granted Role',
  RR.ADMIN_OPTION 'Admin Option',
  CONNECT_BY_ROOT(RR.GRANTEE) || SYS_CONNECT_BY_PATH(RR.GRANTED_ROLE, ' <- ') as 'Grant Path'

from exa_role_role_privs RR
left join EXA_USER_ROLE_PRIVS UR
  on UR.GRANTED_ROLE = RR.GRANTEE

connect by RR.GRANTEE = prior RR.GRANTED_ROLE
start with UR.GRANTEE = '${objectname}'  NOCYCLE /*or UR.GRANTEE is null*/
            ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getRecursiveRolesOfRole">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
	CONNECT_BY_ROOT(GRANTEE) as 'Grantee',
	GRANTED_ROLE 'Granted Role',
	ADMIN_OPTION 'Admin Option',
	CONNECT_BY_ROOT(GRANTEE) || SYS_CONNECT_BY_PATH(GRANTED_ROLE, ' <- ') as 'Grant Path'
from exa_dba_role_privs
connect by nocycle GRANTEE = prior GRANTED_ROLE
start with GRANTEE in ('${objectname}')
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
  CONNECT_BY_ROOT(RR.GRANTEE) as 'Grantee',
  RR.GRANTED_ROLE  'Granted Role',
  RR.ADMIN_OPTION 'Admin Option',
  CONNECT_BY_ROOT(RR.GRANTEE) || SYS_CONNECT_BY_PATH(RR.GRANTED_ROLE, ' <- ') as 'Grant Path'

from exa_role_role_privs RR

connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
start with RR.GRANTEE = '${objectname}'
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getSystemPrivilegesRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
"GRANTEE" 'Grantee',
"PRIVILEGE" 'System privilege',
"ADMIN_OPTION" 'Admin option'
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}' or GRANTEE in (
		select
		   GRANTED_ROLE
		from exa_dba_role_privs
		connect by nocycle GRANTEE = prior GRANTED_ROLE
		start with GRANTEE in ('${objectname}')
)
order by 1
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
"GRANTEE" 'Grantee',
"PRIVILEGE" 'System privilege',
"ADMIN_OPTION" 'Admin option'
from
SYS.EXA_USER_SYS_PRIVS
where GRANTEE = '${objectname}'

union

select
"GRANTEE" 'Grantee',
"PRIVILEGE" 'System privilege',
"ADMIN_OPTION" 'Admin option'
from
SYS.EXA_ROLE_SYS_PRIVS
where  GRANTEE in (

		select

		GRANTED_ROLE 'Granted Role'
		from
		EXA_USER_ROLE_PRIVS
		WHERE GRANTEE = '${objectname}'

union

		select

		 RR.GRANTED_ROLE

		from exa_role_role_privs RR
		left join EXA_USER_ROLE_PRIVS UR
		  on UR.GRANTED_ROLE = RR.GRANTEE

		connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
		start with UR.GRANTEE = '${objectname}'
)
order by 1
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getSystemPrivilegesRoleRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
"GRANTEE" 'Grantee',
"PRIVILEGE" 'System privilege',
"ADMIN_OPTION" 'Admin option'
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}' or GRANTEE in (
		select
		   GRANTED_ROLE
		from exa_dba_role_privs
		connect by nocycle GRANTEE = prior GRANTED_ROLE
		start with GRANTEE in ('${objectname}')
)
order by 1
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
"GRANTEE" 'Grantee',
"PRIVILEGE" 'System privilege',
"ADMIN_OPTION" 'Admin option'
from
SYS.EXA_ROLE_SYS_PRIVS
where GRANTEE = '${objectname}' or GRANTEE in (
select
RR.GRANTED_ROLE
from exa_role_role_privs RR
connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
start with RR.GRANTEE = '${objectname}'
)
order by 1
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getObjectPrivilegesRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
op."OBJECT_SCHEMA" 'Object schema', op."OBJECT_NAME" 'Object name', op."OBJECT_TYPE" 'Object type', op."PRIVILEGE" 'Privilege', op."GRANTEE" 'Grantee', op."GRANTOR" 'Grantor', op."OWNER" 'Owner'
from
EXA_DBA_OBJ_PRIVS op
where GRANTEE = '${objectname}' or GRANTEE in (
		select
		   GRANTED_ROLE
		from exa_dba_role_privs
		connect by nocycle GRANTEE = prior GRANTED_ROLE
		start with GRANTEE in ('${objectname}')
)
order by 5
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
op."OBJECT_SCHEMA" 'Object schema', op."OBJECT_NAME" 'Object name', op."OBJECT_TYPE" 'Object type', op."PRIVILEGE" 'Privilege', op."GRANTEE" 'Grantee', op."GRANTOR" 'Grantor', op."OWNER" 'Owner'
from
SYS.EXA_USER_OBJ_PRIVS op
where GRANTEE = '${objectname}'
union all

select
op."OBJECT_SCHEMA" 'Object schema', op."OBJECT_NAME" 'Object name', op."OBJECT_TYPE" 'Object type', op."PRIVILEGE" 'Privilege', op."GRANTEE" 'Grantee', op."GRANTOR" 'Grantor', op."OWNER" 'Owner'
from
SYS.EXA_ROLE_OBJ_PRIVS op
where  GRANTEE in (

				select

				GRANTED_ROLE 'Granted Role'
				from
				EXA_USER_ROLE_PRIVS
				WHERE GRANTEE = '${objectname}'
union
				select

				 RR.GRANTED_ROLE

				from exa_role_role_privs RR
				left join EXA_USER_ROLE_PRIVS UR
				  on UR.GRANTED_ROLE = RR.GRANTEE

				connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
				start with UR.GRANTEE = '${objectname}'

)
order by 5
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getObjectPrivilegesRoleRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
op."OBJECT_SCHEMA" 'Object schema', op."OBJECT_NAME" 'Object name', op."OBJECT_TYPE" 'Object type', op."PRIVILEGE" 'Privilege', op."GRANTEE" 'Grantee', op."GRANTOR" 'Grantor', op."OWNER" 'Owner'
from
EXA_DBA_OBJ_PRIVS op
where GRANTEE = '${objectname}' or GRANTEE in (
		select
		   GRANTED_ROLE
		from exa_dba_role_privs
		connect by nocycle GRANTEE = prior GRANTED_ROLE
		start with GRANTEE in ('${objectname}')
)
order by 5
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/

select
op."OBJECT_SCHEMA" 'Object schema', op."OBJECT_NAME" 'Object name', op."OBJECT_TYPE" 'Object type', op."PRIVILEGE" 'Privilege', op."GRANTEE" 'Grantee', op."GRANTOR" 'Grantor', op."OWNER" 'Owner'
from
SYS.EXA_ROLE_OBJ_PRIVS op
where GRANTEE = '${objectname}' or GRANTEE in (
	select

	 RR.GRANTED_ROLE

	from exa_role_role_privs RR

	connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
	start with RR.GRANTEE = '${objectname}'
)
order by 5
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getGrantedConnectionsRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
	select
	cp.GRANTEE 'Grantee', cp.GRANTED_CONNECTION 'Granted connection', cp.ADMIN_OPTION 'Admin option'
	from
	EXA_DBA_CONNECTION_PRIVS cp
	where GRANTEE = '${objectname}' or GRANTEE in (
					select
					   GRANTED_ROLE
					from exa_dba_role_privs
					connect by nocycle GRANTEE = prior GRANTED_ROLE
					start with GRANTEE in ('${objectname}')
	)
	order by 1
		     	   ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
cp.GRANTEE 'Grantee', cp.GRANTED_CONNECTION 'Granted connection', cp.ADMIN_OPTION 'Admin option'
from
SYS.EXA_USER_CONNECTION_PRIVS cp
where GRANTEE = '${objectname}'
union all

select
cp.GRANTEE 'Grantee', cp.GRANTED_CONNECTION 'Granted connection', cp.ADMIN_OPTION 'Admin option'
from
SYS.EXA_ROLE_CONNECTION_PRIVS cp
where  GRANTEE in (
			select

			GRANTED_ROLE 'Granted Role'
			from
			EXA_USER_ROLE_PRIVS
			WHERE GRANTEE = '${objectname}'
union
			select

			 RR.GRANTED_ROLE

			from exa_role_role_privs RR
			left join EXA_USER_ROLE_PRIVS UR
			  on UR.GRANTED_ROLE = RR.GRANTEE

			connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
			start with UR.GRANTEE = '${objectname}'
)
order by 1
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getGrantedConnectionsRoleRecursive">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
cp.GRANTEE 'Grantee', cp.GRANTED_CONNECTION 'Granted connection', cp.ADMIN_OPTION 'Admin option'
from
EXA_DBA_CONNECTION_PRIVS cp
where GRANTEE = '${objectname}' or GRANTEE in (
				select
				   GRANTED_ROLE
				from exa_dba_role_privs
				connect by nocycle GRANTEE = prior GRANTED_ROLE
				start with GRANTEE in ('${objectname}')
)
order by 1
		  	      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
cp.GRANTEE 'Grantee', cp.GRANTED_CONNECTION 'Granted connection', cp.ADMIN_OPTION 'Admin option'
from
SYS.EXA_ROLE_CONNECTION_PRIVS cp
where GRANTEE = '${objectname}' or GRANTEE in (
	select

	 RR.GRANTED_ROLE

	from exa_role_role_privs RR
	left join EXA_USER_ROLE_PRIVS UR
	  on UR.GRANTED_ROLE = RR.GRANTEE

	connect by nocycle RR.GRANTEE = prior RR.GRANTED_ROLE
	start with UR.GRANTEE = '${objectname}'
)
order by 1
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getOwnedSchemas">
         <SQL>
            <![CDATA[/*snapshot execution*/
select
es."SCHEMA_NAME" 'Schema name', es."SCHEMA_OWNER" 'Owner',  es."SCHEMA_IS_VIRTUAL" 'Is virtual', es."SCHEMA_COMMENT" 'Comment'

from
"SYS"."EXA_SCHEMAS" es
where SCHEMA_OWNER = '${objectname}'
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getConnections">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
SELECT
	CONNECTION_NAME 'Name',
	CONNECTION_STRING 'Connection String',
	USER_NAME 'User name',
	CREATED 'Created',
	CONNECTION_COMMENT 'Comment'
FROM
	SYS.EXA_DBA_CONNECTIONS
ORDER BY CONNECTION_NAME
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
SELECT
	CONNECTION_NAME 'Name',
	CREATED 'Created',
	CONNECTION_COMMENT 'Comment'
FROM
	SYS.EXA_ALL_CONNECTIONS
ORDER BY CONNECTION_NAME
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getConnectionGrantees">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
select
GRANTEE 'Grantee'
from
EXA_DBA_CONNECTION_PRIVS
where
GRANTED_CONNECTION = '${objectname}'
ORDER BY 1
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
select
GRANTEE 'Grantee'
from
EXA_USER_CONNECTION_PRIVS
where
GRANTED_CONNECTION = '${objectname}'
ORDER BY 1
               ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getRoles">
         <SQL>
            <![CDATA[/*snapshot execution*/
SELECT
ROLE_NAME 'Name',
CREATED 'Created',
ROLE_PRIORITY 'Priority',
ROLE_COMMENT 'Comment'
FROM
EXA_ALL_ROLES
ORDER BY 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getUsersFromRole">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[/*snapshot execution*/
SELECT
GRANTEE 'Grantee',
GRANTED_ROLE 'Granted Role',
ADMIN_OPTION 'Admin Option'
FROM
EXA_DBA_ROLE_PRIVS
WHERE
GRANTED_ROLE like '%${objectname}%'
ORDER BY 1
			      ]]>
            </If>
            <Else>
               <![CDATA[/*snapshot execution*/
SELECT
GRANTEE 'Grantee',
GRANTED_ROLE 'Granted Role',
ADMIN_OPTION 'Admin Option'
FROM
EXA_USER_ROLE_PRIVS
WHERE
GRANTED_ROLE like '%${objectname}%'
ORDER BY 1
			      ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getPriorities">
         <If test="#util.isDatabaseVersionGTE(6,1)">
            <SQL>
               <![CDATA[/*snapshot execution*/
	select
	pg."PRIORITY_GROUP_NAME" 'Name' , pg."PRIORITY_GROUP_ID" 'ID', pg."PRIORITY_GROUP_WEIGHT" 'Weight', pg."CREATED" 'Created', pg."PRIORITY_GROUP_COMMENT" 'Comment'
	from
	"SYS"."EXA_PRIORITY_GROUPS" pg
	order by  pg."PRIORITY_GROUP_NAME"
				]]>
            </SQL>
         </If>

         <Else>
            <SQL>
               <![CDATA[/*snapshot execution*/
		  with vals (Name) as (
 values ('LOW'),('MEDIUM'),('HIGH')
 )
 select NAME as 'Name' from vals;
			]]>
            </SQL>
         </Else>

      </Command>

      <Command id="exasol.getUsersAndRolesOfPriority">
         <SQL>
            <![CDATA[/*snapshot execution*/

		SELECT "EXA_ALL_USERS"."USER_NAME" 'Name', "EXA_ALL_USERS"."USER_PRIORITY"  'Priority'
		FROM "SYS"."EXA_ALL_USERS"
		WHERE "EXA_ALL_USERS"."USER_PRIORITY" = '${objectname}'

		UNION ALL

		SELECT "EXA_ALL_ROLES"."ROLE_NAME","EXA_ALL_ROLES"."ROLE_PRIORITY"
		FROM "SYS"."EXA_ALL_ROLES"
		WHERE "EXA_ALL_ROLES"."ROLE_PRIORITY" = '${objectname}'

		ORDER BY 1

            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Other Related Commands -->
      <!-- ================================================================= -->

      <Command id="exasol.getAuditDatesAndCommandsLastWeek">
         <SQL>
            <![CDATA[
SELECT DISTINCT cast(cast(trunc(start_time) as date) as varchar(10)) AUDIT_DATE,COMMAND_CLASS
FROM
EXA_STATISTICS.EXA_DBA_AUDIT_SQL
where trunc(start_time) > add_weeks(current_date,-1)
order by 1 desc,2
		      ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditByUserNameClientLastWeek">
         <SQL>
            <![CDATA[
SELECT DISTINCT cast(cast(trunc(start_time) as date) as varchar(10)) AUDIT_DATE, USER_NAME, CLIENT
FROM
EXA_STATISTICS.EXA_DBA_AUDIT_SQL
JOIN
EXA_STATISTICS.EXA_DBA_AUDIT_SESSIONS using (session_id)
where trunc(start_time) > add_weeks(current_date,-1)
order by 1 desc,2
		      ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditLongRunning">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	STMT_ID 'Stmt ID',
	COMMAND_NAME 'Command name',
	COMMAND_CLASS 'Command class',
	DURATION 'Duration [sec]',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text',
	SCOPE_SCHEMA 'Scope schema',
	PRIORITY 'Priority',
	NICE 'Nice',
	RESOURCES 'Resources %',
	ROW_COUNT 'Row count',
	EXECUTION_MODE 'Execution mode',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL
WHERE trunc(START_TIME) = '${audit_date}' AND COMMAND_CLASS = '${command_class}'
ORDER BY DURATION desc
LIMIT 1000
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditQueriesRecent">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	STMT_ID 'Stmt ID',
	COMMAND_NAME 'Command name',
	COMMAND_CLASS 'Command class',
	DURATION 'Duration [sec]',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text',
	SCOPE_SCHEMA 'Scope schema',
	PRIORITY 'Priority',
	NICE 'Nice',
	RESOURCES 'Resources %',
	ROW_COUNT 'Row count',
	EXECUTION_MODE 'Execution mode',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL
WHERE trunc(START_TIME) = CURRENT_DATE
ORDER BY START_TIME desc
LIMIT 1000
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditLongRunningFromUsernameClient">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	s.STMT_ID 'Stmt ID',
	s.COMMAND_NAME 'Command name',
	s.COMMAND_CLASS 'Command class',
	s.DURATION 'Duration [sec]',
	s.START_TIME 'Start time',
	s.STOP_TIME 'Stop time',
	s.CPU 'CPU %',
	s.TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	s.HDD_READ 'HDD read [MiB/sec]',
	s.HDD_WRITE 'HDD write [MiB/sec]',
	s.NET 'Network [MiB/sec]',
	s.SUCCESS 'Success',
	s.ERROR_CODE 'Error code',
	s.ERROR_TEXT 'Error text',
	s.SCOPE_SCHEMA 'Scope schema',
	s.PRIORITY 'Priority',
	s.NICE 'Nice',
	s.RESOURCES 'Resources %',
	s.ROW_COUNT 'Row count',
	s.EXECUTION_MODE 'Execution mode',
	s.SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL s
JOIN
	EXA_STATISTICS.EXA_DBA_AUDIT_SESSIONS se using (session_id)

WHERE trunc(START_TIME) = '${audit_date}' AND
	USER_NAME = '${user_name}' AND
	CLIENT = '${client}'
ORDER BY DURATION desc
LIMIT 1000
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditRecentFromUsernameClient">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	s.STMT_ID 'Stmt ID',
	s.COMMAND_NAME 'Command name',
	s.COMMAND_CLASS 'Command class',
	s.DURATION 'Duration [sec]',
	s.START_TIME 'Start time',
	s.STOP_TIME 'Stop time',
	s.CPU 'CPU %',
	s.TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	s.HDD_READ 'HDD read [MiB/sec]',
	s.HDD_WRITE 'HDD write [MiB/sec]',
	s.NET 'Network [MiB/sec]',
	s.SUCCESS 'Success',
	s.ERROR_CODE 'Error code',
	s.ERROR_TEXT 'Error text',
	s.SCOPE_SCHEMA 'Scope schema',
	s.PRIORITY 'Priority',
	s.NICE 'Nice',
	s.RESOURCES 'Resources %',
	s.ROW_COUNT 'Row count',
	s.EXECUTION_MODE 'Execution mode',
	s.SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL s
JOIN
	EXA_STATISTICS.EXA_DBA_AUDIT_SESSIONS se using (session_id)

WHERE trunc(START_TIME) = '${audit_date}' AND
	USER_NAME = '${user_name}' AND
	CLIENT = '${client}'
ORDER BY START_TIME desc
LIMIT 1000
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditLongRunningDMLLast24h">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	STMT_ID 'Stmt ID',
	COMMAND_NAME 'Command name',
	COMMAND_CLASS 'Command class',
	DURATION 'Duration [sec]',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text',
	SCOPE_SCHEMA 'Scope schema',
	PRIORITY 'Priority',
	NICE 'Nice',
	RESOURCES 'Resources %',
	ROW_COUNT 'Row count',
	EXECUTION_MODE 'Execution mode',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL
WHERE START_TIME >=  add_hours(CURRENT_TIMESTAMP,-24)   AND COMMAND_CLASS = 'DML'
ORDER BY DURATION desc
LIMIT 1000
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditSessions">
         <SQL>
            <![CDATA[
select
	SESSION_ID 'Session ID',
	LOGIN_TIME 'Login time',
	LOGOUT_TIME 'Logout time',
	USER_NAME 'User name',
	CLIENT 'Client',
	DRIVER 'Driver',
	ENCRYPTED 'Encrypted',
	HOST 'Host',
	OS_USER 'OS user',
	OS_NAME 'OS name',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text'
from
	EXA_DBA_AUDIT_SESSIONS
WHERE LOGIN_TIME >= ADD_HOURS(CURRENT_TIMESTAMP, -24)
order by
	login_time desc
			]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditSession">
         <SQL>
            <![CDATA[
select
	SESSION_ID 'Session ID',
	LOGIN_TIME 'Login time',
	LOGOUT_TIME 'Logout time',
	USER_NAME 'User name',
	CLIENT 'Client',
	DRIVER 'Driver',
	ENCRYPTED 'Encrypted',
	HOST 'Host',
	OS_USER 'OS user',
	OS_NAME 'OS name',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text'
from
	EXA_DBA_AUDIT_SESSIONS
WHERE SESSION_ID = ${session_id}
		  	   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditQueriesOfSession">
         <SQL>
            <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	STMT_ID 'Stmt ID',
	COMMAND_NAME 'Command name',
	COMMAND_CLASS 'Command class',
	DURATION 'Duration [sec]',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	SUCCESS 'Success',
	ERROR_CODE 'Error code',
	ERROR_TEXT 'Error text',
	SCOPE_SCHEMA 'Scope schema',
	PRIORITY 'Priority',
	NICE 'Nice',
	RESOURCES 'Resources %',
	ROW_COUNT 'Row count',
	EXECUTION_MODE 'Execution mode',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL
WHERE SESSION_ID = ${session_id}
order by start_time desc
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getAuditQueryText">
         <SQL>
            <![CDATA[
SELECT
	SQL_TEXT 'text'
FROM
	EXA_STATISTICS.EXA_DBA_AUDIT_SQL
WHERE SESSION_ID = ${session_id}  AND
	STMT_ID = ${stmt_id}
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getProfileOfQuery">
         <SQL>
            <![CDATA[
SELECT
	--SESSION_ID 'Session ID',
	--STMT_ID 'Stmt ID',
	--COMMAND_NAME 'Command name',
	--COMMAND_CLASS 'Command class',
	PART_ID 'Part ID',
	PART_NAME 'Part name',
	PART_INFO 'Part info',
	OBJECT_SCHEMA 'Object schema',
	OBJECT_NAME 'Object name',
	OBJECT_ROWS 'Object rows',
	OUT_ROWS 'Out rows',
	DURATION 'Duration [sec]',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	REMARKS 'Remarks',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_PROFILE_LAST_DAY
WHERE SESSION_ID = ${session_id} AND
STMT_ID = ${stmt_id}
order by PART_ID
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getRunningProfileOfQuery">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[
SELECT
	--SESSION_ID 'Session ID',
	--STMT_ID 'Stmt ID',
	--COMMAND_NAME 'Command name',
	--COMMAND_CLASS 'Command class',
	PART_ID 'Part ID',
	PART_NAME 'Part name',
	PART_INFO 'Part info',
	OBJECT_SCHEMA 'Object schema',
	OBJECT_NAME 'Object name',
	OBJECT_ROWS 'Object rows',
	OUT_ROWS 'Out rows',
	DURATION 'Duration [sec]',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	REMARKS 'Remarks',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_DBA_PROFILE_RUNNING
WHERE SESSION_ID = ${session_id} AND
STMT_ID = ${stmt_id}
order by PART_ID
			      ]]>
            </If>
            <Else>
               <![CDATA[
SELECT
	--SESSION_ID 'Session ID',
	--STMT_ID 'Stmt ID',
	--COMMAND_NAME 'Command name',
	--COMMAND_CLASS 'Command class',
	PART_ID 'Part ID',
	PART_NAME 'Part name',
	PART_INFO 'Part info',
	OBJECT_SCHEMA 'Object schema',
	OBJECT_NAME 'Object name',
	OBJECT_ROWS 'Object rows',
	OUT_ROWS 'Out rows',
	DURATION 'Duration [sec]',
	CPU 'CPU %',
	TEMP_DB_RAM_PEAK 'Temp DB RAM Peak [MiB]',
	HDD_READ 'HDD read [MiB/sec]',
	HDD_WRITE 'HDD write [MiB/sec]',
	NET 'Network [MiB/sec]',
	REMARKS 'Remarks',
	SQL_TEXT 'SQL text'
FROM
	EXA_STATISTICS.EXA_USER_PROFILE_RUNNING
WHERE SESSION_ID = ${session_id} AND
STMT_ID = ${stmt_id}
order by PART_ID
			      ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getSystemInfo">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[
select
param_name, param_value
from
SYS.EXA_METADATA
where
PARAM_NAME in
(
'databaseProductVersion',
'databaseName'
)
union all

select
'Nodes' , cast(NODES   as VARCHAR(10))
from
EXA_SYSTEM_EVENTS
where EVENT_TYPE = 'STARTUP'
and measure_time = (select
max(measure_time)
from EXA_SYSTEM_EVENTS where EVENT_TYPE = 'STARTUP'
)

union all

select
'DBRAM (GiB)' , cast(DB_RAM_SIZE   as VARCHAR(10))
from
EXA_SYSTEM_EVENTS
where EVENT_TYPE = 'STARTUP'
and measure_time = (select
max(measure_time)
from EXA_SYSTEM_EVENTS where EVENT_TYPE = 'STARTUP'
)

union all

select
PARAM_NAME, PARAM_VALUE
from
"EXA_COMMANDLINE"
where
PARAM_NAME in
(
'soft_replicationborder_in_kb',
'soft_replicationborder_in_numrows',
'disableViewOptimization',
'disableIndexIteratorScan',
'auditing_enabled',
'expiration_advanced_edition_features',
'expiration_standard_edition_features'
)

order by 1
               ]]>
            </If>
            <Else>
               <![CDATA[
select
param_name, param_value
from
SYS.EXA_METADATA
where
PARAM_NAME in
(
'databaseProductVersion',
'databaseName'
)
union all

select
'Nodes' , cast(NODES   as VARCHAR(10))
from
EXA_SYSTEM_EVENTS
where EVENT_TYPE = 'STARTUP'
and measure_time = (select
max(measure_time)
from EXA_SYSTEM_EVENTS where EVENT_TYPE = 'STARTUP'
)

union all

select
'DBRAM (GiB)' , cast(DB_RAM_SIZE   as VARCHAR(10))
from
EXA_SYSTEM_EVENTS
where EVENT_TYPE = 'STARTUP'
and measure_time = (select
max(measure_time)
from EXA_SYSTEM_EVENTS where EVENT_TYPE = 'STARTUP'
)
order by 1
			      ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getSystemEvents">
         <SQL>
            <![CDATA[
select
MEASURE_TIME 'Measure time',
EVENT_TYPE 'Event type',
DBMS_VERSION 'Database version',
Nodes 'Number of nodes',
DB_RAM_SIZE 'Size of DB RAM'
from
EXA_SYSTEM_EVENTS
order by MEASURE_TIME DESC
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSettings">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			parameter_name AS 'Parameter Name',
			current_value AS 'Current Value',
			default_value AS 'Default Value',
			change_under_support_guidance AS 'Change Under Support Guidance',
			change_requires_restart AS 'Change Requires Restart',
			description AS 'Description'
FROM     v_monitor.configuration_parameters
ORDER BY parameter_name
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getParameters">
         <SQL>
            <![CDATA[
SELECT
PARAMETER_NAME 'Parameter name', SESSION_VALUE  'Session value', SYSTEM_VALUE 'System value'
FROM
EXA_PARAMETERS
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getStorageVolumes">
         <SQL>
            <![CDATA[
select
TABLESPACE 'Tablespace',
VOLUME_ID 'Volume ID',
IPROC 'Node Number',
LOCALITY 'Locality',
REDUNDANCY 'Redundancy',
HDD_TYPE 'HDD type',
HDD_COUNT 'HDD count',
HDD_FREE 'HDD free [GiB]',
VOLUME_SIZE 'Voulme Size [GiB]',
USE 'Use in percent',
COMMIT_DATA 'Commited data [GiB]',
SWAP_DATA 'Swapped data [GiB]',
UNUSED_DATA 'Ununsed data [GiB]',
DELETE_DATA 'Deleted data [GiB]',
MULTICOPY_DATA 'Multicopy data [GiB]'
from
SYS.EXA_VOLUME_USAGE
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSessions">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[
select
	SESSION_ID 'Session ID',
	case when SESSION_ID = CURRENT_SESSION THEN true end 'Current Session',
	case when instr(activity,' rows')!=0 and is_number(substr(activity,0,length(activity)-length(' rows'))) then to_char(to_number(substr(activity,0,length(activity)-length(' rows'))),'999G999G999G999G999G999G999G999') || ' rows' else activity end  'Activity',
	USER_NAME 'User name',
	STATUS 'Status',
	COMMAND_NAME 'Command name',
	STMT_ID 'Statement ID',
	DURATION 'Duration',
	QUERY_TIMEOUT 'Query timeout [sec]',
	concat(TEMP_DB_RAM,' MiB') 'Temporary DB RAM',
	LOGIN_TIME 'Login time',
	CLIENT 'Client',
	DRIVER 'Driver',
	ENCRYPTED 'Encrpyted',
	HOST 'Host',
	OS_USER 'OS user',
	OS_NAME 'OS name',
	SCOPE_SCHEMA 'Scope schema',
	PRIORITY 'Priority',
	NICE 'Nice',
	case when RESOURCES is not null then RESOURCES || '%' end 'Resources',
	SQL_TEXT 'SQL text'
from
	EXA_DBA_SESSIONS
order by session_id
               ]]>
            </If>
            <Else>
               <![CDATA[
select
	SESSION_ID 'Session ID',
	case when SESSION_ID = CURRENT_SESSION THEN true end 'Current Session',
	case when instr(activity,' rows')!=0 and is_number(substr(activity,0,length(activity)-length(' rows'))) then to_char(to_number(substr(activity,0,length(activity)-length(' rows'))),'999G999G999G999G999G999G999G999') || ' rows' else activity end  'Activity',
	USER_NAME 'User name',
	STATUS 'Status',
	COMMAND_NAME 'Command name',
	STMT_ID 'Statement ID',
	DURATION 'Duration',
	QUERY_TIMEOUT 'Query timeout [sec]',
	concat(TEMP_DB_RAM,' MiB') 'Temporary DB RAM',
	LOGIN_TIME 'Login time',
	CLIENT 'Client',
	DRIVER 'Driver',
	ENCRYPTED 'Encrpyted',
	PRIORITY 'Priority',
	NICE 'Nice',
	case when RESOURCES is not null then RESOURCES || '%' end 'Resources'
from
	EXA_ALL_SESSIONS
order by session_id
			      ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getLocks">
         <SQL>
            <If test="#ANYDICTIONARY">
               <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	CONFLICT_SESSION_ID 'Conflict Session ID',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CONFLICT_TYPE 'Conflict type',
	CONFLICT_OBJECTS 'Conflict Objects',
	CONFLICT_INFO 'Conflict Information'
FROM
	EXA_STATISTICS.EXA_DBA_TRANSACTION_CONFLICTS
ORDER BY START_TIME DESC
LIMIT  1000
				   ]]>
            </If>
            <Else>
               <![CDATA[
SELECT
	SESSION_ID 'Session ID',
	CONFLICT_SESSION_ID 'Conflict Session ID',
	START_TIME 'Start time',
	STOP_TIME 'Stop time',
	CONFLICT_TYPE 'Conflict type',
	CONFLICT_OBJECTS 'Conflict Objects',
	CONFLICT_INFO 'Conflict Information'
FROM
	EXA_STATISTICS.EXA_USER_TRANSACTION_CONFLICTS_LAST_DAY
ORDER BY START_TIME DESC
LIMIT  1000
			      ]]>
            </Else>
         </SQL>
      </Command>

      <Command id="exasol.getDBSizeLastDay">
         <SQL>
            <![CDATA[
SELECT
   MEASURE_TIME 'Time',
   RAW_OBJECT_SIZE  'RAW uncompressed [GiB]',
   MEM_OBJECT_SIZE 'MEM compressed [GiB]',
   case when MEM_OBJECT_SIZE > 0 then cast(RAW_OBJECT_SIZE/MEM_OBJECT_SIZE as DECIMAL(18,3)) else 0 end 'Compression RAW/MEM',
   AUXILIARY_SIZE  'Auxiliary/Indices [GiB]',
   STATISTICS_SIZE 'Statistics [GiB]',
   RECOMMENDED_DB_RAM_SIZE 'Recommended DB RAM [GiB]',
   STORAGE_SIZE 'Storage [GiB]',
   USE 'Use in %',
   OBJECT_COUNT 'Object count'
FROM
   EXA_STATISTICS.EXA_DB_SIZE_LAST_DAY
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getDBSizeHourly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	RAW_OBJECT_SIZE_AVG 'RAW uncompressed AVG [GiB]',
	RAW_OBJECT_SIZE_MAX  'RAW uncompressed MAX [GiB]',
	MEM_OBJECT_SIZE_AVG  'MEM compressed AVG [GiB]',
	MEM_OBJECT_SIZE_MAX  'MEM compressed MAX [GiB]',
	case when MEM_OBJECT_SIZE_AVG > 0 then  cast(RAW_OBJECT_SIZE_AVG/MEM_OBJECT_SIZE_AVG as DECIMAL(18,3)) else null end 'Compression AVG RAW/MEM',
	AUXILIARY_SIZE_AVG  'Auxiliary/Indices AVG [GiB]',
	AUXILIARY_SIZE_MAX  'Auxiliary/Indices MAX [GiB]',
	STATISTICS_SIZE_AVG 'Statistics AVG [GiB]',
	STATISTICS_SIZE_MAX 'Statistics MAX [GiB]',
	RECOMMENDED_DB_RAM_SIZE_AVG 'Recommended DB RAM AVG [GiB]',
	RECOMMENDED_DB_RAM_SIZE_MAX  'Recommended DB RAM MAX [GiB]',
	STORAGE_SIZE_AVG 'Storage AVG [GiB]',
	STORAGE_SIZE_MAX 'Storage MAX [GiB]',
	USE_AVG 'Use in % AVG',
	USE_MAX 'Use in % MAX',
	OBJECT_COUNT_AVG 'Object count AVG',
	OBJECT_COUNT_MAX 'Object count MAX'
FROM
	EXA_STATISTICS.EXA_DB_SIZE_HOURLY
order by 1 desc
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getDBSizeDaily">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	RAW_OBJECT_SIZE_AVG 'RAW uncompressed AVG [GiB]',
	RAW_OBJECT_SIZE_MAX  'RAW uncompressed MAX [GiB]',
	MEM_OBJECT_SIZE_AVG  'MEM compressed AVG [GiB]',
	MEM_OBJECT_SIZE_MAX  'MEM compressed MAX [GiB]',
	case when MEM_OBJECT_SIZE_AVG > 0 then  cast(RAW_OBJECT_SIZE_AVG/MEM_OBJECT_SIZE_AVG as DECIMAL(18,3)) else null end 'Compression AVG RAW/MEM',
	AUXILIARY_SIZE_AVG  'Auxiliary/Indices AVG [GiB]',
	AUXILIARY_SIZE_MAX  'Auxiliary/Indices MAX [GiB]',
	STATISTICS_SIZE_AVG 'Statistics AVG [GiB]',
	STATISTICS_SIZE_MAX 'Statistics MAX [GiB]',
	RECOMMENDED_DB_RAM_SIZE_AVG 'Recommended DB RAM AVG [GiB]',
	RECOMMENDED_DB_RAM_SIZE_MAX  'Recommended DB RAM MAX [GiB]',
	STORAGE_SIZE_AVG 'Storage AVG [GiB]',
	STORAGE_SIZE_MAX 'Storage MAX [GiB]',
	USE_AVG 'Use in % AVG',
	USE_MAX 'Use in % MAX',
	OBJECT_COUNT_AVG 'Object count AVG',
	OBJECT_COUNT_MAX 'Object count MAX'
FROM
	EXA_STATISTICS.EXA_DB_SIZE_DAILY
WHERE TRUNC(INTERVAL_START) >= add_days(current_date,-31)
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getDBSizeMonthly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	RAW_OBJECT_SIZE_AVG 'RAW uncompressed AVG [GiB]',
	RAW_OBJECT_SIZE_MAX  'RAW uncompressed MAX [GiB]',
	MEM_OBJECT_SIZE_AVG  'MEM compressed AVG [GiB]',
	MEM_OBJECT_SIZE_MAX  'MEM compressed MAX [GiB]',
	case when MEM_OBJECT_SIZE_AVG > 0 then  cast(RAW_OBJECT_SIZE_AVG/MEM_OBJECT_SIZE_AVG as DECIMAL(18,3)) else null end 'Compression AVG RAW/MEM',
	AUXILIARY_SIZE_AVG  'Auxiliary/Indices AVG [GiB]',
	AUXILIARY_SIZE_MAX  'Auxiliary/Indices MAX [GiB]',
	STATISTICS_SIZE_AVG 'Statistics AVG [GiB]',
	STATISTICS_SIZE_MAX 'Statistics MAX [GiB]',
	RECOMMENDED_DB_RAM_SIZE_AVG 'Recommended DB RAM AVG [GiB]',
	RECOMMENDED_DB_RAM_SIZE_MAX  'Recommended DB RAM MAX [GiB]',
	STORAGE_SIZE_AVG 'Storage AVG [GiB]',
	STORAGE_SIZE_MAX 'Storage MAX [GiB]',
	USE_AVG 'Use in % AVG',
	USE_MAX 'Use in % MAX',
	OBJECT_COUNT_AVG 'Object count AVG',
	OBJECT_COUNT_MAX 'Object count MAX'
FROM
	EXA_STATISTICS.EXA_DB_SIZE_MONTHLY
wHERE  INTERVAL_START >=  ADD_MONTHS(CURRENT_DATE,-13)
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getUsageLastDay">
         <SQL>
            <![CDATA[
SELECT
	MEASURE_TIME 'Time',
	USERS 'Users',
	QUERIES 'Queries'
FROM
	EXA_USAGE_LAST_DAY
WHERE
       MEASURE_TIME >= add_minutes(CURRENT_TIMESTAMP,-60)
ORDER BY 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getUsageHourly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	USERS_AVG 'Users AVG',
	USERS_MAX 'Users MAX',
	QUERIES_AVG 'Queries AVG',
	QUERIES_MAX 'Queries MAX',
	IDLE 'Idle'
FROM
	EXA_STATISTICS.EXA_USAGE_HOURLY
where  INTERVAL_START >= add_hours(CURRENT_TIMESTAMP,-25)
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getUsageDaily">
         <SQL>
            <![CDATA[
SELECT
	cast(INTERVAL_START as Date) 'Time',
	USERS_AVG 'Users AVG',
	USERS_MAX 'Users MAX',
	QUERIES_AVG 'Queries AVG',
	QUERIES_MAX 'Queries MAX',
	IDLE 'Idle'
FROM
	EXA_STATISTICS.EXA_USAGE_DAILY
WHERE TRUNC(INTERVAL_START) >= CURRENT_DATE - 31
ORDER BY 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getUsageMonthly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	USERS_AVG 'Users AVG',
	USERS_MAX 'Users MAX',
	QUERIES_AVG 'Queries AVG',
	QUERIES_MAX 'Queries MAX',
	IDLE 'Idle'
FROM
	EXA_STATISTICS.EXA_USAGE_MONTHLY
where  INTERVAL_START >=  ADD_MONTHS(CURRENT_DATE,-13)
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getMonitorLastDay">
         <SQL>
            <![CDATA[
SELECT
	MEASURE_TIME 'Measure time',
	LOAD 'Load',
	CPU 'CPU in %',
	TEMP_DB_RAM 'Temp DB RAM [MiB]',
	HDD_READ 'HDD Read [MiB/sec]',
	HDD_WRITE 'HDD Write [MiB/sec]',
	NET 'Network [MiB/sec]',
	SWAP 'Swap [MiB/sec]'
FROM
	EXA_STATISTICS.EXA_MONITOR_LAST_DAY
WHERE  MEASURE_TIME >= add_minutes(CURRENT_TIMESTAMP,-60)
ORDER BY 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getMonitorHourly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	LOAD_AVG 'Load AVG',
	LOAD_MAX 'Load MAX',
	CPU_AVG 'CPU in % AVG',
	CPU_MAX 'CPU in % MAX',
	TEMP_DB_RAM_AVG 'Temp DB RAM [MiB] AVG',
	TEMP_DB_RAM_MAX 'Temp DB RAM [MiB] MAX',
	HDD_READ_AVG 'HDD Read [MiB/sec] AVG',
	HDD_READ_MAX 'HDD Read [MiB/sec] MAX',
	HDD_WRITE_AVG 'HDD Write [MiB/sec] AVG',
	HDD_WRITE_MAX 'HDD Write [MiB/sec] MAX',
	NET_AVG 'Network [MiB/sec] AVG',
	NET_MAX 'Network [MiB/sec] MAX',
	SWAP_AVG 'Swap [MiB/sec] AVG',
	SWAP_MAX  'Swap [MiB/sec] MAX'
FROM
	EXA_STATISTICS.EXA_MONITOR_HOURLY
WHERE INTERVAL_START >= add_hours(CURRENT_TIMESTAMP ,-25)
ORDER BY 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getMonitorDaily">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	LOAD_AVG 'Load AVG',
	LOAD_MAX 'Load MAX',
	CPU_AVG 'CPU in % AVG',
	CPU_MAX 'CPU in % MAX',
	TEMP_DB_RAM_AVG 'Temp DB RAM [MiB] AVG',
	TEMP_DB_RAM_MAX 'Temp DB RAM [MiB] MAX',
	HDD_READ_AVG 'HDD Read [MiB/sec] AVG',
	HDD_READ_MAX 'HDD Read [MiB/sec] MAX',
	HDD_WRITE_AVG 'HDD Write [MiB/sec] AVG',
	HDD_WRITE_MAX 'HDD Write [MiB/sec] MAX',
	NET_AVG 'Network [MiB/sec] AVG',
	NET_MAX 'Network [MiB/sec] MAX',
	SWAP_AVG 'Swap [MiB/sec] AVG',
	SWAP_MAX  'Swap [MiB/sec] MAX'
FROM
	EXA_STATISTICS.EXA_MONITOR_HOURLY
WHERE trunc(INTERVAL_START) >= add_days(current_date,-31)
order by 1
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getMonitorMonthly">
         <SQL>
            <![CDATA[
SELECT
	INTERVAL_START 'Time',
	LOAD_AVG 'Load AVG',
	LOAD_MAX 'Load MAX',
	CPU_AVG 'CPU in % AVG',
	CPU_MAX 'CPU in % MAX',
	TEMP_DB_RAM_AVG 'Temp DB RAM [MiB] AVG',
	TEMP_DB_RAM_MAX 'Temp DB RAM [MiB] MAX',
	HDD_READ_AVG 'HDD Read [MiB/sec] AVG',
	HDD_READ_MAX 'HDD Read [MiB/sec] MAX',
	HDD_WRITE_AVG 'HDD Write [MiB/sec] AVG',
	HDD_WRITE_MAX 'HDD Write [MiB/sec] MAX',
	NET_AVG 'Network [MiB/sec] AVG',
	NET_MAX 'Network [MiB/sec] MAX',
	SWAP_AVG 'Swap [MiB/sec] AVG',
	SWAP_MAX  'Swap [MiB/sec] MAX'
FROM
	EXA_STATISTICS.EXA_MONITOR_MONTHLY
WHERE trunc(INTERVAL_START) >= add_months(current_date,-13)
order by 1 desc
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSqlLastDay">
         <SQL>
            <![CDATA[
SELECT
	"SESSION_ID" 'Session ID',
	"STMT_ID" 'Stmt ID',
	"COMMAND_NAME" 'Command name',
	"COMMAND_CLASS" 'Command class',
	"DURATION" 'Duration',
	"START_TIME" 'Start time',
	"STOP_TIME" 'Stop time',
	"CPU" 'CPU',
	"TEMP_DB_RAM_PEAK" 'Temp DB RAM Peak [MiB]',
	"HDD_READ" 'HDD Read [MiB/sec]',
	"HDD_WRITE" 'HDD Write [MiB/sec]',
	"NET" 'Network [MiB/sec]',
	"SUCCESS" 'Success',
	"ERROR_CODE" 'Error code',
	"ERROR_TEXT" 'Error text',
	"PRIORITY" 'Priority',
	"NICE" 'Nice',
	"RESOURCES" 'Resources',
	"ROW_COUNT" 'Row count',
	"EXECUTION_MODE" 'Execution mode'
FROM
	"EXA_STATISTICS"."EXA_SQL_LAST_DAY"
order by
		"START_TIME" desc
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSqlStats">
         <SQL>
            <![CDATA[
with sql_stats_pivoted as (
        SELECT
                "INTERVAL_START" 'Time',
                "COMMAND_CLASS" 'Command class',
                 case when"COMMAND_CLASS" = 'DQL' then sum("COUNT") end as 'Count DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("COUNT") end as 'Count DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("COUNT") end as 'Count DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("COUNT") end as 'Count DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("COUNT") end as 'Count Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("COUNT") end as 'Count Other' ,

                 case when"COMMAND_CLASS" = 'DQL' then sum("DURATION_AVG") end as 'Duration AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("DURATION_AVG") end as 'Duration AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("DURATION_AVG") end as 'Duration AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("DURATION_AVG") end as 'Duration AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("DURATION_AVG") end as 'Duration AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("DURATION_AVG") end as 'Duration AVG Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("DURATION_MAX") end as 'Duration MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("DURATION_MAX") end as 'Duration MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("DURATION_MAX") end as 'Duration MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("DURATION_MAX") end as 'Duration MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("DURATION_MAX") end as 'Duration MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("DURATION_MAX") end as 'Duration MAX Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("CPU_AVG") end as 'CPU AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("CPU_AVG") end as 'CPU AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("CPU_AVG") end as 'CPU AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("CPU_AVG") end as 'CPU AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("CPU_AVG") end as 'CPU AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("CPU_AVG") end as 'CPU AVG Other' ,

                 case when"COMMAND_CLASS" = 'DQL' then sum("CPU_MAX") end as 'CPU MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("CPU_MAX") end as 'CPU MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("CPU_MAX") end as 'CPU MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("CPU_MAX") end as 'CPU MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("CPU_MAX") end as 'CPU MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("CPU_MAX") end as 'CPU MAX Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("TEMP_DB_RAM_PEAK_AVG") end as 'Temp DB RAM Peak AVG Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("TEMP_DB_RAM_PEAK_MAX") end as 'Temp DB RAM Peak MAX Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("HDD_READ_AVG") end as 'HDD Read AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("HDD_READ_AVG") end as 'HDD Read AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("HDD_READ_AVG") end as 'HDD Read AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("HDD_READ_AVG") end as 'HDD Read AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("HDD_READ_AVG") end as 'HDD Read AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("HDD_READ_AVG") end as 'HDD Read AVG Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("HDD_READ_MAX") end as 'HDD Read MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("HDD_READ_MAX") end as 'HDD Read MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("HDD_READ_MAX") end as 'HDD Read MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("HDD_READ_MAX") end as 'HDD Read MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("HDD_READ_MAX") end as 'HDD Read MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("HDD_READ_MAX") end as 'HDD Read MAX Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("HDD_WRITE_AVG") end as 'HDD Write AVG Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("HDD_WRITE_MAX") end as 'HDD Write MAX Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("NET_AVG") end as 'Net AVG DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("NET_AVG") end as 'Net AVG DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("NET_AVG") end as 'Net AVG DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("NET_AVG") end as 'Net AVG DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("NET_AVG") end as 'Net AVG Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("NET_AVG") end as 'Net AVG Other',

                 case when"COMMAND_CLASS" = 'DQL' then sum("NET_MAX") end as 'Net MAX DQL' ,
                 case when "COMMAND_CLASS" = 'DML' then sum("NET_MAX") end as 'Net MAX DML' ,
                 case when "COMMAND_CLASS" = 'DCL' then sum("NET_MAX") end as 'Net MAX DCL' ,
                 case when "COMMAND_CLASS" = 'DDL' then sum("NET_MAX") end as 'Net MAX DDL' ,
                 case when "COMMAND_CLASS" = 'TRANSACTION' then sum("NET_MAX") end as 'Net MAX Transaction' ,
                 case when "COMMAND_CLASS" = 'OTHER' then sum("NET_MAX") end as 'Net MAX Other'

        FROM
                ${sql_stats_table}

        WHERE ${filter}

        group by  "INTERVAL_START" ,
                "COMMAND_CLASS"
)
select
"Time",
max("Count DQL")  as 'Count DQL' ,
max("Count DML")  as 'Count DML' ,
max("Count DCL")  as 'Count DCL',
max("Count DDL")  as 'Count DDL',
max("Count Transaction")  as 'Count Transaction' ,
max("Count Other")  as 'Count Other',

max("Duration AVG DQL") as 'Duration AVG DQL',
max("Duration AVG DML") as 'Duration AVG DML',
max("Duration AVG DCL") as 'Duration AVG DCL',
max("Duration AVG DDL") as 'Duration AVG DDL',
max("Duration AVG Transaction") as 'Duration AVG Transaction',
max("Duration AVG Other") as 'Duration AVG Other',

max("Duration MAX DQL") as 'Duration MAX DQL',
max("Duration MAX DML") as 'Duration MAX DML',
max("Duration MAX DCL") as 'Duration MAX DCL',
max("Duration MAX DDL") as 'Duration MAX DDL',
max("Duration MAX Transaction") as 'Duration MAX Transaction',
max("Duration MAX Other") as 'Duration MAX Other',

max("CPU AVG DQL") as 'CPU AVG DQL',
max("CPU AVG DML") as 'CPU AVG DML',
max("CPU AVG DCL") as 'CPU AVG DCL',
max("CPU AVG DDL") as 'CPU AVG DDL',
max("CPU AVG Transaction") as 'CPU AVG Transaction',
max("CPU AVG Other") as 'CPU AVG Other',

max("CPU MAX DQL") as 'CPU MAX DQL',
max("CPU MAX DML") as 'CPU MAX DML',
max("CPU MAX DCL") as 'CPU MAX DCL',
max("CPU MAX DDL") as 'CPU MAX DDL',
max("CPU MAX Transaction") as 'CPU MAX Transaction',
max("CPU MAX Other") as 'CPU MAX Other',

max("Temp DB RAM Peak AVG DQL") as 'Temp DB RAM Peak AVG DQL [MiB]',
max("Temp DB RAM Peak AVG DML") as 'Temp DB RAM Peak AVG DML [MiB]',
max("Temp DB RAM Peak AVG DCL") as 'Temp DB RAM Peak AVG DCL [MiB]',
max("Temp DB RAM Peak AVG DDL") as 'Temp DB RAM Peak AVG DDL [MiB]',
max("Temp DB RAM Peak AVG Transaction") as 'Temp DB RAM Peak AVG Transaction [MiB]',
max("Temp DB RAM Peak AVG Other") as 'Temp DB RAM Peak AVG Other [MiB]',

max("Temp DB RAM Peak MAX DQL") as 'Temp DB RAM Peak MAX DQL [MiB]',
max("Temp DB RAM Peak MAX DML") as 'Temp DB RAM Peak MAX DML [MiB]',
max("Temp DB RAM Peak MAX DCL") as 'Temp DB RAM Peak MAX DCL [MiB]',
max("Temp DB RAM Peak MAX DDL") as 'Temp DB RAM Peak MAX DDL [MiB]',
max("Temp DB RAM Peak MAX Transaction") as 'Temp DB RAM Peak MAX Transaction [MiB]',
max("Temp DB RAM Peak MAX Other") as 'Temp DB RAM Peak MAX Other [MiB]',

max("HDD Read AVG DQL") as 'HDD Read AVG DQL [MiB/sec]',
max("HDD Read AVG DML") as 'HDD Read AVG DML [MiB/sec]',
max("HDD Read AVG DCL") as 'HDD Read AVG DCL [MiB/sec]',
max("HDD Read AVG DDL") as 'HDD Read AVG DDL [MiB/sec]',
max("HDD Read AVG Transaction") as 'HDD Read AVG Transaction [MiB/sec]',
max("HDD Read AVG Other") as 'HDD Read AVG Other [MiB/sec]',

max("HDD Read MAX DQL") as 'HDD Read MAX DQL [MiB/sec]',
max("HDD Read MAX DML") as 'HDD Read MAX DML [MiB/sec]',
max("HDD Read MAX DCL") as 'HDD Read MAX DCL [MiB/sec]',
max("HDD Read MAX DDL") as 'HDD Read MAX DDL [MiB/sec]',
max("HDD Read MAX Transaction") as 'HDD Read MAX Transaction [MiB/sec]',
max("HDD Read MAX Other") as 'HDD Read MAX Other [MiB/sec]',

max("HDD Write AVG DQL") as 'HDD Write AVG DQL [MiB/sec]',
max("HDD Write AVG DML") as 'HDD Write AVG DML [MiB/sec]',
max("HDD Write AVG DCL") as 'HDD Write AVG DCL [MiB/sec]',
max("HDD Write AVG DDL") as 'HDD Write AVG DDL [MiB/sec]',
max("HDD Write AVG Transaction") as 'HDD Write AVG Transaction [MiB/sec]',
max("HDD Write AVG Other") as 'HDD Write AVG Other [MiB/sec]',

max("HDD Write MAX DQL") as 'HDD Write MAX DQL [MiB/sec]',
max("HDD Write MAX DML") as 'HDD Write MAX DML [MiB/sec]',
max("HDD Write MAX DCL") as 'HDD Write MAX DCL [MiB/sec]',
max("HDD Write MAX DDL") as 'HDD Write MAX DDL [MiB/sec]',
max("HDD Write MAX Transaction") as 'HDD Write MAX Transaction [MiB/sec]',
max("HDD Write MAX Other") as 'HDD Write MAX Other [MiB/sec]',

max("Net AVG DQL") as 'Net AVG DQL [MiB/sec]',
max("Net AVG DML") as 'Net AVG DML [MiB/sec]',
max("Net AVG DCL") as 'Net AVG DCL [MiB/sec]',
max("Net AVG DDL") as 'Net AVG DDL [MiB/sec]',
max("Net AVG Transaction") as 'Net AVG Transaction [MiB/sec]',
max("Net AVG Other") as 'Net AVG Other [MiB/sec]',

max("Net MAX DQL") as 'Net MAX DQL [MiB/sec]',
max("Net MAX DML") as 'Net MAX DML [MiB/sec]',
max("Net MAX DCL") as 'Net MAX DCL [MiB/sec]',
max("Net MAX DDL") as 'Net MAX DDL [MiB/sec]',
max("Net MAX Transaction") as 'Net MAX Transaction [MiB/sec]',
max("Net MAX Other") as 'Net MAX Other [MiB/sec]'

from
sql_stats_pivoted
group by "Time"
order by "Time"
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Scripts and UDF related  -->
      <!-- ================================================================= -->

      <Command id="exasol.getAllScripts">
         <SQL>
            <![CDATA[
select
	SCRIPT_SCHEMA 'Script schema',
	SCRIPT_NAME 'Script name',
	SCRIPT_OWNER 'Script owner',
	SCRIPT_TYPE 'Script type',
	SCRIPT_LANGUAGE 'Script language',
	SCRIPT_INPUT_TYPE 'Script input type',
	SCRIPT_RESULT_TYPE 'Script result type',
	SCRIPT_TEXT 'Script text',
	SCRIPT_COMMENT 'Script comment'
from
EXA_ALL_SCRIPTS
where
SCRIPT_SCHEMA = '${schema}'
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getScripts">
         <SQL>
            <![CDATA[
select
   SCRIPT_SCHEMA 'Script schema',
   SCRIPT_NAME 'Script name',
   SCRIPT_OWNER 'Script owner',
   SCRIPT_TYPE 'Script type',
   SCRIPT_LANGUAGE 'Script language',
   SCRIPT_INPUT_TYPE 'Script input type',
   SCRIPT_RESULT_TYPE 'Script result type',
   SCRIPT_TEXT 'Script text',
   SCRIPT_COMMENT 'Script comment'
from
EXA_ALL_SCRIPTS
where
SCRIPT_SCHEMA = '${schema}'
and SCRIPT_TYPE = '${script_type}'
and SCRIPT_INPUT_TYPE ${script_input_type}
  ORDER BY SCRIPT_NAME
            ]]>
         </SQL>
      </Command>

      <Command id="exasol.getScript">
         <SQL>
            <![CDATA[
select
	SCRIPT_SCHEMA 'Script schema',
	SCRIPT_NAME 'Script name',
	SCRIPT_OWNER 'Script owner',
	SCRIPT_TYPE 'Script type',
	SCRIPT_LANGUAGE 'Script language',
	SCRIPT_INPUT_TYPE 'Script input type',
	SCRIPT_RESULT_TYPE 'Script result type',
	SCRIPT_TEXT 'Script text',
	SCRIPT_COMMENT 'Script comment'
from
EXA_ALL_SCRIPTS
where
SCRIPT_SCHEMA = '${schema}'
and SCRIPT_NAME = '${script_name}'
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getSQLFunctions">
         <SQL>
            <![CDATA[
SELECT
	FUNCTION_SCHEMA 'Function schema',
	FUNCTION_NAME 'Function name',
	FUNCTION_OWNER 'Function owner',
	FUNCTION_OBJECT_ID 'Function object id',
	FUNCTION_TEXT 'Function text',
	FUNCTION_COMMENT 'Function comment'
FROM
	SYS.EXA_ALL_FUNCTIONS
WHERE FUNCTION_SCHEMA = '${schema}'
ORDER BY FUNCTION_NAME
			   ]]>
         </SQL>
      </Command>

      <Command id="exasol.getCommandClasses">
         <SQL>
            <![CDATA[
	  with command_class(command_class) as  (
values
'TRANSACTION',
'DML',
'DQL',
'OTHER',
'DCL',
'DDL'
)
select * from command_class ;
			   ]]>
         </SQL>
      </Command>
   </Commands>

   <!-- =================================================================== -->
   <!-- Definition of the object actions                                    -->
   <!-- =================================================================== -->

   <ObjectsActionDef extends="false">
      <ActionGroup type="Schemas">
         <Action id="exasol-schemas-create" label="Create Schema" reload="true"
                 resetschemas="true" icon="add">
            <Input label="Schema Name" name="newSchema" style="text" editable="true"/>
            <Command>
               <SQL>
                  <![CDATA[
CREATE SCHEMA ${QB}${newSchema}${QB}
                  ]]>
               </SQL>
            </Command>
            <Confirm>Create schema ${newSchema}?</Confirm>
            <Result>Schema ${newSchema} created!</Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Schema">
         <Action id="exasol-schema-change-owner" label="Change owner of Schema" reload="true" resetschemas="true" icon="role">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="New Owner" name="newOwner" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select USER_NAME OWNER from SYS.EXA_ALL_USERS union all select ROLE_NAME OWNER from SYS.EXA_ALL_ROLES
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
ALTER SCHEMA "${schema}" CHANGE OWNER ${QB}${newOwner}${QB}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm owner of schema ${objectname} to ${newOwner}?
            </Confirm>
            <Result>
               Changed owner of schema ${objectname} to ${newOwner} successful.
            </Result>
         </Action>
         <If test="#util.isDatabaseVersionGTE(6,1) and #SUPERUSER">
            <Action id="exasol-schema-quota" label="Alter quota of Schema" reload="true" resetschemas="true" icon="quota">

               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="RAW uncompressed quota in GiB" name="rawQuota" style="number">
                  <Default>
                     <Command>
                        <SQL>
                           <![CDATA[
	select
	case when "EXA_DBA_OBJECT_SIZES"."RAW_OBJECT_SIZE_LIMIT" is null then ' ' else "EXA_DBA_OBJECT_SIZES"."RAW_OBJECT_SIZE_LIMIT"/1024/1024/1024  END current_raw_object_size_limit
	from
	"SYS"."EXA_DBA_OBJECT_SIZES"
	where   "EXA_DBA_OBJECT_SIZES"."OBJECT_TYPE" = 'SCHEMA'
	and  "EXA_DBA_OBJECT_SIZES"."OBJECT_NAME" = '${schema}';
							]]>
                        </SQL>
                     </Command>
                  </Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
	ALTER SCHEMA "${schema}" SET RAW_SIZE_LIMIT =  ${rawQuota} * 1024 * 1024 * 1024
					  ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm alter quota of ${objectname} to ${rawQuota} GiB?
               </Confirm>
               <Result>
                  Changed quota of ${objectname} to ${rawQuota} GiB
                  successfully?
               </Result>
            </Action>
         </If>

         <Action id="exasol-schema-comment" label="Comment Schema" reload="true" resetschemas="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON SCHEMA "${schema}" IS '${comment}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on schema ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>

         <Action id="exasol-schema-rename" label="Rename Schema" reload="true" resetschemas="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="New Schema Name" name="newSchema" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
RENAME "${schema}" TO ${QB}${newSchema}${QE}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm rename of schema ${objectname} to ${newSchema}?
            </Confirm>
            <Result>
               Schema ${objectname} renamed to ${newSchema}!
            </Result>
         </Action>

         <Action id="exasol-schema-drop" label="Drop Schema" reload="true"
                 resetschemas="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Cascade Objects" name="cascade" style="check">
               <Values>CASCADE</Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
DROP SCHEMA "${schema}" ${cascade}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               <![CDATA[
                 Really drop schema ${schema}?<br>
                 (All data will be lost!)
               ]]>
            </Confirm>
            <Result>Schema ${schema} dropped!</Result>
         </Action>

         <Action id="exasol-schema-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|INSERT|UPDATE|DELETE|EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.
            </Result>
         </Action>

         <Action id="exasol-schema-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|INSERT|UPDATE|DELETE|EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <If test="#util.isLicensed()">
            <Action id="exasol-schema-export" label="Export Schema"
                    icon="export" reload="false"
                    class="schemaExport"
                    doclink="http://www.dbvis.com/doclink/export-schema"/>
         </If>
         <Else>
            <Action id="exasol-schema-export-INFO" label="Export Schema" icon="export">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>
      </ActionGroup>

      <ActionGroup type="VirtualSchema">
         <Action id="exasol-virtualschema-refresh" label="Refresh Virtual Schema" reload="true" resetschemas="true" icon="reload">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
ALTER VIRTUAL SCHEMA "${schema}" REFRESH
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm refresh of virtual schema ${objectname}?
            </Confirm>
            <Result>
               Refresh of virtual schema ${objectname} successful.
            </Result>
         </Action>

         <Action id="exasol-virtualschema-change-owner" label="Change owner of Virtual Schema" reload="true" resetschemas="true" icon="role">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="New Owner" name="newOwner" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select USER_NAME OWNER from SYS.EXA_ALL_USERS union all select ROLE_NAME OWNER from SYS.EXA_ALL_ROLES
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
ALTER VIRTUAL SCHEMA "${schema}" CHANGE OWNER ${QB}${newOwner}${QB}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm owner of schema ${objectname} to ${newOwner}?
            </Confirm>
            <Result>
               Changed owner of schema ${objectname} to ${newOwner} successful.
            </Result>
         </Action>

         <Action id="exasol-virtualschema-rename" label="Rename Virtual Schema" reload="true" resetschemas="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="New Schema Name" name="newSchema" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
RENAME "${schema}" TO "${newSchema}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm rename of schema ${objectname} to ${newSchema}?
            </Confirm>
            <Result>
               Schema ${objectname} renamed to ${newSchema}!
            </Result>
         </Action>

         <Action id="exasol-virtualschema-drop" label="Drop Virtual Schema" reload="true"
                 resetschemas="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
DROP VIRTUAL SCHEMA "${schema}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               <![CDATA[
                 Really drop virtual schema ${schema}?<br>
                 (All metadata will be lost!)
               ]]>
            </Confirm>
            <Result>Virtual schema ${schema} dropped!</Result>
         </Action>

         <Action id="exasol-virtualschema-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|REFRESH
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.
            </Result>
         </Action>

         <Action id="exasol-virtualschema-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|REFRESH
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-virtualschema-comment" label="Comment Virtual Schema" reload="true" resetschemas="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON SCHEMA "${schema}" IS '${comment}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on schema ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Tables">
         <If test="#util.isLicensed()">
            <Action id="exasol-tables-create-table" label="Create Table"
                    icon="add" reload="true"
                    class="tableCreateOrAlter"
                    classargs="create"
                    doclink="http://www.dbvis.com/doclink/create-table"/>
         </If>
         <Else>
            <Action id="exasol-tables-create-table-INFO" label="Create Table" icon="add">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>
         <If test="#util.isLicensed()">
            <Action id="exasol-tables-import-table-data"
                    label="Import Table Data"
                    icon="import"
                    reload="true"
                    class="tableDataImport"
                    doclink="http://www.dbvis.com/doclink/import-table"/>
         </If>
         <Else>
            <Action id="exasol-tables-import-table-data-INFO" label="Import Table Table" icon="import">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>
      </ActionGroup>

      <ActionGroup type="Table">
         <If test="#util.isLicensed()">
            <Action id="exasol-tables-alter-table" label="Alter Table"
                    icon="edit" reload="true"
                    class="tableCreateOrAlter"
                    classargs="alter"
                    doclink="http://www.dbvis.com/doclink/alter-table"/>
         </If>
         <Else>
            <Action id="exasol-tables-alter-table-INFO" label="Alter Table" icon="add">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>

         <Action id="exasol-table-rename" label="Rename Table" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Table Name" name="newTable" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
rename table "${schema}"."${objectname}"  to "${schema}"."${newTable}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm rename of table ${objectname} to ${newTable}?
            </Confirm>
            <Result>
               Table ${objectname} renamed to ${newTable}!
            </Result>
         </Action>

         <Action id="exasol-table-clear" label="Empty Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Use Command" name="useCommand" style="radio">
               <Values>TRUNCATE|DELETE</Values>
               <Default>TRUNCATE</Default>
            </Input>
            <SetVar name="_command" value="#useCommand.equals('TRUNCATE') ? 'truncate table' : 'delete from'"/>
            <Command>
               <SQL>
                  <![CDATA[
${_command} "${schema}"."${objectname}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really remove all rows in table ${schema}.${objectname}?
            </Confirm>
            <Result>
               All rows in table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="exasol-table-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Drops all foreign keys that include the table" name="cascade" style="check"
                   tip="Automatically drop foreign keys that depend on the table">
               <Values>cascade constraints</Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
drop table "${schema}"."${objectname}" ${cascade}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="exasol-table-reorganize" label="Reorganize Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
reorganize table "${schema}"."${objectname}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really reorganize table ${schema}.${objectname}? This may take a
               while!
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been reorganized!
            </Result>
         </Action>

         <Action id="exasol-table-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|INSERT|UPDATE|DELETE|REFERENCES
               </Values>
            </Input>

            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}"."${objectname}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-table-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  ALTER|SELECT|INSERT|UPDATE|DELETE|REFERENCES
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}"."${objectname}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-table-comment" label="Comment Table" reload="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON TABLE "${schema}"."${objectname}" IS '${comment}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on table ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>

         <Separator/>

         <If test="#util.isLicensed()">
            <Action id="exasol-table-import-table-data" label="Import Table Data" icon="import"
                    class="tableDataImport"
                    doclink="http://www.dbvis.com/doclink/import-table"/>
         </If>
         <Else>
            <Action id="exasol-table-import-table-data-INFO" label="Import Table Data" icon="import">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>

         <If test="#util.isLicensed()">
            <Action id="exasol-table-export" label="Export Table" icon="export"
                    class="tableExport"
                    doclink="http://www.dbvis.com/doclink/export-table"/>
         </If>
         <Else>
            <Action id="exasol-table-export-INFO" label="Export Table" icon="export">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>

         <Separator/>

         <Action id="exasol-table-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Constraint">
         <Action id="exasol-table-constraint-setenablestate" label="Enable/Disable Constraint" reload="true" supportsmultipleobjects="false">
            <Input name="contraintName" label="Constraint Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Current Status" name="currentContraintStatus" style="text" editable="false">
               <Default>
                  <Command>
                     <SQL>
                        <![CDATA[
select CASE AC.CONSTRAINT_ENABLED
     WHEN 0 THEN 'DISABLED'
     WHEN 1 THEN 'ENABLED'
   END AS Status
   from EXA_ALL_CONSTRAINTS AC where CONSTRAINT_SCHEMA = '${schema}' AND CONSTRAINT_TABLE = '${theTableName}' AND CONSTRAINT_NAME = '${objectname}';
   ]]>
                     </SQL>
                  </Command>
               </Default>
            </Input>
            <SetVar name="_newContraintStatus" value="#currentContraintStatus.equals('DISABLED') ? 'ENABLE' : 'DISABLE'"/>

            <Input label="New Constraint Status" name="newStatus" style="radio">
               <Values>ENABLE|DISABLE</Values>
               <Labels>ENABLED|DISABLED</Labels>
               <Default>${_newContraintStatus}</Default>
            </Input>

            <Command>
               <SQL>
                  <![CDATA[Alter table "${schema}"."${theTableName}" Modify CONSTRAINT "${objectname}" ${newStatus};]]>
               </SQL>
            </Command>
            <Confirm>
               <![CDATA[Really update Constraint ${objectname}?]]></Confirm>
            <Result>Constraint ${objectname} updated!</Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Column">
         <Action id="exasol-column-comment" label="Comment Column" reload="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${theTableName}</Default>
            </Input>
            <Input label="Column" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON "${schema}"."${theTableName}" ("${objectname}" IS '${comment}')
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on column ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="VirtualTable">
         <If test="#util.isLicensed()">
            <Action id="exasol-virtualtable-export" label="Export Table" icon="export"
                    class="tableExport"
                    doclink="http://www.dbvis.com/doclink/export-table"/>
         </If>
         <Else>
            <Action id="exasol-virtualtable-export-INFO" label="Export Table" icon="export">
               <Confirm>
                  <![CDATA[
                  This feature is available only in the <b>DbVisualizer Pro</b> edition.
                  ]]>
               </Confirm>
            </Action>
         </Else>

         <Separator/>

         <Action id="exasol-virtualtable-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *"/>
      </ActionGroup>
      <ActionGroup type="View">
         <Action id="exasol-view-rename" label="Rename View" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New View Name" name="newView" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
rename view "${schema}"."${objectname}" to "${schema}".${QB}${newView}${QE}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm rename of view ${objectname} to ${newView}?
            </Confirm>
            <Result>
               View ${objectname} renamed to ${newView}!
            </Result>
         </Action>

         <Action id="exasol-view-drop" label="Drop View" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
drop view "${schema}"."${objectname}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop view ${schema}.${objectname}?
            </Confirm>
            <Result>
               View ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="exasol-view-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  SELECT
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}"."${objectname}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-view-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Arg name="output" value='${value}'/>
               <Arg name="newline" value=", "/>
               <Values>
                  SELECT
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}"."${objectname}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-view-export" label="Export View" icon="export"
                 class="viewExport"
                 doclink="http://www.dbvis.com/doclink/export-view"/>

         <Separator/>

         <Action id="exasol-view-script-builder" label="Script View" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Functions">
         <Action id="exasol-functions-create" label="Create Function" reload="true" icon="add"
                 doclink="http://www.dbvis.com/doclink/create-function">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" name="functionName" style="text"/>
            <Input label="Return Data Type" name="returns" style="text">
               <Default>VARCHAR(20)</Default>
            </Input>
            <Input label="Parameters" style="separator"/>
            <Input name="parameters" style="grid">
               <Arg name="output" value="${QB}${name}${QE} ${type}"/>
               <Arg name="newline" value=", "/>
               <Input name="name" label="Name" style="text">
                  <Default>parm</Default>
               </Input>
               <Input name="type" label="Type" style="text">
                  <Default>VARCHAR(20)</Default>
               </Input>
            </Input>
            <SetVar name="_parameters" value='#parameters.trim().equals("") ? "()" : "(" + #parameters + ")"'/>
            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE FUNCTION "${schema}".${QB}${functionName}${QE} ${_parameters}
RETURN ${returns}
AS
BEGIN
   RETURN 'Hello World';
END;
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Create function ${functionName}?
            </Confirm>
            <Result>
               Function ${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Function">
         <Action id="exasol-function-rename" label="Rename Function" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Function Name" name="newFunction" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
rename function "${schema}"."${objectname}" to ${QB}${newFunction}${QE}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm rename of function ${objectname} to ${newFunction}?
            </Confirm>
            <Result>
               Function ${objectname} renamed to ${newFunction}!
            </Result>
         </Action>

         <Action id="exasol-function-drop" label="Drop Function" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
drop function "${schema}"."${objectname}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Function ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="exasol-function-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>

            <Input label="Object Privileges" name="privs" style="list">
               <Values>
                  EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}"."${objectname}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-function-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="check-list">
               <Values>
                  EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}"."${objectname}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-function-comment" label="Comment Function" reload="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON FUNCTION "${schema}"."${objectname}" IS '${comment}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on function ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>
         <Action id="exasol-function-export" label="Export Function" icon="export"
                 class="functionExport"
                 doclink="http://www.dbvis.com/doclink/export-code-object"/>

         <Separator/>

         <Action id="exasol-function-script" label="Script Function" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Script">
         <Action id="exasol-script-grant" label="Grant Privileges" icon="privileges">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="list">
               <Values>
                  EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
GRANT ${privs} ON "${schema}"."${objectname}" TO ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really grant object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Granted object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-script-revoke" label="Revoke Privileges" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Object Privileges" name="privs" style="list">
               <Values>
                  EXECUTE
               </Values>
            </Input>
            <Input label="Grantee" name="grantee" style="check-list">
               <Arg name="output" value='"${value}"'/>
               <Arg name="newline" value=", "/>
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
select user_name as 'Grantee' from exa_all_users union all select role_name as 'Grantee' from exa_all_roles order by 1
                        ]]>
                     </SQL>
                  </Command>
               </Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
REVOKE ${privs} ON "${schema}"."${objectname}" FROM ${grantee}
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really revoke object privileges for ${schema}.${objectname}?
            </Confirm>
            <Result>
               Revoked object privileges for ${schema}.${objectname}.
            </Result>
         </Action>

         <Action id="exasol-script-comment" label="Comment Script" reload="true" icon="comment">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Comment" name="comment" style="text"/>
            <Command>
               <SQL>
                  <![CDATA[
COMMENT ON SCRIPT "${schema}"."${objectname}" IS '${comment}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Confirm comment on script ${objectname}?
            </Confirm>
            <Result>
               Comment on ${objectname} successful.
            </Result>
         </Action>
         <Action id="exasol-script-export" label="Export Script" icon="export"
                 class="scriptExport"
                 doclink="http://www.dbvis.com/doclink/export-code-object"/>
      </ActionGroup>

      <!-- =================================================================== -->
      <!-- DBA object actions                                                  -->
      <!-- =================================================================== -->

      <ActionGroup type="DBA">
         <!--Alert: The next 5 actions below all run FLUSH STATISTICS. Is this really correct? Enough with one?-->
         <Action id="exasol-dba-flush_statistics" label="Flush statistics" reload="true" icon="reload">
            <Command>
               <SQL>
                  <![CDATA[
FLUSH STATISTICS
                  ]]>
               </SQL>
            </Command>
            <Confirm><![CDATA[Flush statistics?]]></Confirm>
            <Result>
               Flush statistic successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="RecentQueries">
         <Action id="exasol-auditing-flush_statistics" label="Flush statistics" reload="true" icon="reload">
            <Command>
               <SQL>
                  <![CDATA[
FLUSH STATISTICS
                  ]]>
               </SQL>
            </Command>
            <Confirm><![CDATA[Flush statistics?]]></Confirm>
            <Result>
               Flush statistic successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Monitoring">
         <Action id="exasol-monitoring-flush_statistics" label="Flush statistics" reload="true" icon="reload">
            <Command>
               <SQL>
                  <![CDATA[
FLUSH STATISTICS
                  ]]>
               </SQL>
            </Command>
            <Confirm><![CDATA[Flush statistics?]]></Confirm>
            <Result>
               Flush statistic successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="DatabaseSize">
         <Action id="exasol-dbsize-flush_statistics" label="Flush statistics" reload="true" icon="reload">
            <Command>
               <SQL>
                  <![CDATA[
FLUSH STATISTICS
                  ]]>
               </SQL>
            </Command>
            <Confirm><![CDATA[Flush statistics?]]></Confirm>
            <Result>
               Flush statistic successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Usage">
         <Action id="exasol-usage-flush_statistics" label="Flush statistics" reload="true" icon="reload">
            <Command>
               <SQL>
                  <![CDATA[
FLUSH STATISTICS
                  ]]>
               </SQL>
            </Command>
            <Confirm><![CDATA[Flush statistics?]]></Confirm>
            <Result>
               Flush statistic successful.
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Users">
         <If test="#SUPERUSER">
            <Action id="exasol-users-add" label="Create User" reload="true" icon="add">
               <Input label="User Name" name="username" style="text"/>
               <Input label="Password" name="password" style="password"/>
               <Command>
                  <SQL>
                     <![CDATA[
CREATE USER ${QB}${username}${QE} IDENTIFIED BY "${password}"
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  User ${username} created!
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-users-addldap" label="Create User LDAP" reload="true" icon="add">
               <Input label="User Name" name="username" style="text"/>
               <Input label="LDAP Distiguished name" name="distname" style="text">
                  <Default>cn=user_2,dc=authorization,dc=exasol,dc=com</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
CREATE USER ${QB}${username}${QE} AT LDAP AS '${distname}'
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  User ${username} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="User">
         <If test="#SUPERUSER">
            <Action id="exasol-user-rename" label="Rename User" reload="true" icon="rename">
               <Input label="User" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="New name" name="newName" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
rename user "${objectname}" to ${QB}${newName}${QE}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm rename of user ${objectname} to ${newName}?
               </Confirm>
               <Result>
                  User ${objectname} renamed to ${newName}!
               </Result>
            </Action>
         </If>

         <Action id="exasol-user-changepassword" label="Change Password" icon="password">
            <Input label="User Name" style="text" editable="false">
               <Default>
                  ${objectname}
               </Default>
            </Input>
            <Input label="Current Password" name="oldpassword" style="password"/>
            <Input label="New Password" name="newpassword" style="password"/>
            <Command>
               <SQL>
                  <![CDATA[
ALTER USER "${objectname}" IDENTIFIED BY "${newpassword}" REPLACE "${oldpassword}"
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Really change password for user ${objectname}?
            </Confirm>
            <Result>
               Password for ${objectname} changed!
            </Result>
         </Action>

         <If test="#SUPERUSER">
            <Action id="exasol-user-changedistinguishedname" label="Change LDAP Distinguished Name " icon="user">
               <Input label="User Name" style="text" editable="false">
                  <Default>
                     ${objectname}
                  </Default>
               </Input>
               <Input label="Distinguished name" name="distname" style="text">
                  <Default>
                     ${distinguishedName}
                  </Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
ALTER USER "${objectname}" IDENTIFIED AT LDAP AS '${distname}'
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really change distinguished name for user ${objectname}?
               </Confirm>
               <Result>
                  Distinguished name ${objectname} changed!
               </Result>
            </Action>

            <Action id="exasol-user-drop" label="Drop User" reload="true" icon="remove">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="Drops all user-defined objects created by the user dropped, including schema, table and all views that reference the table, and the table's associated projections">
                  <Values>cascade</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
drop user "${objectname}" ${cascade}
                     ]]>
                  </SQL>
               </Command>
               <Confirm><![CDATA[Really drop user ${objectname}?]]></Confirm>
               <Result>
                  User ${objectname} dropped!
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-grant-role" label="Grant Role to User" reload="true" icon="role">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Role to grant" name="roleToGrant" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select ROLE_NAME from EXA_DBA_ROLES
where ROLE_NAME not in (
select
GRANTED_ROLE
from
EXA_DBA_ROLE_PRIVS
where
GRANTEE = '${objectname}'
) and ROLE_NAME not like 'PUBLIC'
				               ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="With admin option" name="withAdminOptions" style="check"
                      tip="Will grant the role with admin option, so the user can grant this role to others.">
                  <Values>WITH ADMIN OPTION</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
GRANT "${roleToGrant}" TO "${objectname}" ${withAdminOptions}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Grant role ${roleToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted role ${roleToGrant} to ${objectname}?
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-revoke-role" label="Revoke Role from User" reload="true" icon="remove">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Role to revoke" name="roleToRevoke" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
GRANTED_ROLE
from
EXA_DBA_ROLE_PRIVS
where
GRANTEE = '${objectname}'
				               ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
REVOKE "${roleToRevoke}" FROM "${objectname}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Revoke role ${roleToRevoke} from ${objectname}?
               </Confirm>
               <Result>
                  Revoked role ${roleToRevoke} from ${objectname}.
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-grant-syspriv" label="Grant System Privilege to User" reload="true" icon="privileges">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="System privilege to grant" name="sysPrivToGrant" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
with sysprivs(privilege) as ( values
('GRANT ANY OBJECT PRIVILEGE'),
('GRANT ANY PRIVILEGE'),
('GRANT ANY PRIORITY'),
('CREATE SESSION'),
('KILL ANY SESSION'),
('ALTER SYSTEM'),
('CREATE USER'),
('ALTER USER'),
('DROP USER'),
('CREATE ROLE'),
('DROP ANY ROLE'),
('GRANT ANY ROLE'),
('CREATE CONNECTION'),
('ALTER ANY CONNECTION'),
('DROP ANY CONNECTION'),
('GRANT ANY CONNECTION'),
('USE ANY CONNECTION'),
('ACCESS ANY CONNECTION'),
('CREATE SCHEMA'),
('ALTER ANY SCHEMA'),
('DROP ANY SCHEMA'),
('CREATE VIRTUAL SCHEMA'),
('ALTER ANY VIRTUAL SCHEMA'),
('ALTER ANY VIRTUAL SCHEMA REFRESH'),
('DROP ANY VIRTUAL SCHEMA'),
('CREATE TABLE'),
('CREATE ANY TABLE'),
('ALTER ANY TABLE'),
('DELETE ANY TABLE'),
('DROP ANY TABLE'),
('INSERT ANY TABLE'),
('SELECT ANY TABLE'),
('SELECT ANY DICTIONARY'),
('UPDATE ANY TABLE'),
('CREATE VIEW'),
('CREATE ANY VIEW'),
('DROP ANY VIEW'),
('CREATE FUNCTION'),
('CREATE ANY FUNCTION'),
('EXECUTE ANY FUNCTION'),
('CREATE SCRIPT'),
('CREATE ANY SCRIPT'),
('DROP ANY SCRIPT'),
('EXECUTE ANY SCRIPT')
)
select * from sysprivs
minus
select
PRIVILEGE
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}'
order by 1
				]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="With admin option" name="withAdminOptions" style="check"
                      tip="Will grant the system privilege with admin option, so the user can grant this role to others.">
                  <Values>WITH ADMIN OPTION</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
GRANT ${sysPrivToGrant} TO "${objectname}" ${withAdminOptions}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Grant system privilege ${sysPrivToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted system privilege ${sysPrivToGrant} to ${objectname}?
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-revoke-syspriv" label="Revoke System Privilege From User" reload="true" icon="remove">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="System privilege to revoke" name="sysPrivToRevoke" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
PRIVILEGE
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}'
order by 1
					]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
REVOKE ${sysPrivToRevoke} FROM "${objectname}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Revoke system privilege ${sysPrivToRevoke} from ${objectname}?
               </Confirm>
               <Result>
                  Revoked system privilege ${sysPrivToRevoke} from
                  ${objectname}?
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-grant-priority" label="Grant Priority Group to User" reload="true" icon="status">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Priority" name="prioToGrant" style="list">
                  <Values>
                     <If test="#util.isDatabaseVersionGTE(6,1)">
                        <Command>
                           <SQL>
                              <![CDATA[
select
pg."PRIORITY_GROUP_NAME" 'Name'
from
"SYS"."EXA_PRIORITY_GROUPS" pg
order by  pg."PRIORITY_GROUP_NAME"
					]]>
                           </SQL>
                        </Command>
                     </If>
                     <Else>
                        LOW|MEDIUM|HIGH
                     </Else>
                  </Values>
               </Input>
               <Command>
                  <If test="#util.isDatabaseVersionGTE(6,1)">
                     <SQL>
                        <![CDATA[
GRANT PRIORITY GROUP ${QB}${prioToGrant}${QE} TO ${QB}${objectname}${QE}
                     ]]>
                     </SQL>
                  </If>
                  <Else>
                     <SQL>
                        <![CDATA[
GRANT PRIORITY ${QB}${prioToGrant}${QE} TO ${QB}${objectname}${QE}
                     ]]>
                     </SQL>
                  </Else>
               </Command>
               <Confirm>
                  Grant priority group ${prioToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted priority group ${prioToGrant} to ${objectname}?
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="exasol-user-comment" label="Comment User" reload="true" icon="comment">
               <Input label="User" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Comment" name="comment" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
COMMENT ON USER "${objectname}" IS '${comment}'
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm comment on user ${objectname}?
               </Confirm>
               <Result>
                  Comment on ${objectname} successful.
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Roles">
         <If test="#SUPERUSER">
            <Action id="exasol-roles-add" label="Create Role" reload="true" icon="add">
               <Input label="Role Name" name="rolename" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
CREATE ROLE ${QB}${rolename}${QE}
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  Role ${rolename} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Role">
         <If test="#SUPERUSER">
            <Action id="exasol-role-rename" label="Rename Role" reload="true" icon="rename">
               <Input label="Role" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="New name" name="newRole" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
rename role "${objectname}" to ${QB}${newRole}${QE}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm rename of role ${objectname} to ${newRole}?
               </Confirm>
               <Result>
                  Role ${objectname} renamed to ${newRole}!
               </Result>
            </Action>

            <Action id="exasol-role-drop" label="Drop Role" reload="true" icon="remove">
               <Input label="Role" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="Revoke the role from users and other roles before dropping the role">
                  <Values>cascade</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
drop role "${objectname}" ${cascade}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm drop of role ${objectname}?
               </Confirm>
               <Result>
                  Role ${objectname} dropped!
               </Result>
            </Action>

            <Action id="exasol-role-grant-role" label="Grant Role to Role" reload="true" icon="role">
               <Input label="Role Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Role to grant" name="roleToGrant" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select ROLE_NAME from EXA_DBA_ROLES
where ROLE_NAME not in (
select
GRANTED_ROLE
from
EXA_DBA_ROLE_PRIVS
where
GRANTEE = '${objectname}'
) and ROLE_NAME not like 'PUBLIC'
					  ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="With admin option" name="withAdminOptions" style="check"
                      tip="Will grant the role with admin option, so the user can grant this role to others.">
                  <Values>WITH ADMIN OPTION</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
GRANT "${roleToGrant}" TO "${objectname}" ${withAdminOptions}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Grant role ${roleToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted role ${roleToGrant} to ${objectname}?
               </Result>
            </Action>

            <Action id="exasol-role-revoke-role" label="Revoke Role from Role" reload="true" icon="remove">
               <Input label="Role Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Role to revoke" name="roleToRevoke" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
GRANTED_ROLE
from
EXA_DBA_ROLE_PRIVS
where
GRANTEE = '${objectname}'
  					            ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
REVOKE "${roleToRevoke}" FROM "${objectname}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Revoke role ${roleToRevoke} from ${objectname}?
               </Confirm>
               <Result>
                  Revoked role ${roleToRevoke} from ${objectname}.
               </Result>
            </Action>

            <Action id="exasol-role-grant-syspriv" label="Grant System Privilege to Role" reload="true" icon="privileges">
               <Input label="Role Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="System privilege to grant" name="sysPrivToGrant" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
with sysprivs(privilege) as ( values
('GRANT ANY OBJECT PRIVILEGE'),
('GRANT ANY PRIVILEGE'),
('GRANT ANY PRIORITY'),
('CREATE SESSION'),
('KILL ANY SESSION'),
('ALTER SYSTEM'),
('CREATE USER'),
('ALTER USER'),
('DROP USER'),
('CREATE ROLE'),
('DROP ANY ROLE'),
('GRANT ANY ROLE'),
('CREATE CONNECTION'),
('ALTER ANY CONNECTION'),
('DROP ANY CONNECTION'),
('GRANT ANY CONNECTION'),
('USE ANY CONNECTION'),
('ACCESS ANY CONNECTION'),
('CREATE SCHEMA'),
('ALTER ANY SCHEMA'),
('DROP ANY SCHEMA'),
('CREATE VIRTUAL SCHEMA'),
('ALTER ANY VIRTUAL SCHEMA'),
('ALTER ANY VIRTUAL SCHEMA REFRESH'),
('DROP ANY VIRTUAL SCHEMA'),
('CREATE TABLE'),
('CREATE ANY TABLE'),
('ALTER ANY TABLE'),
('DELETE ANY TABLE'),
('DROP ANY TABLE'),
('INSERT ANY TABLE'),
('SELECT ANY TABLE'),
('SELECT ANY DICTIONARY'),
('UPDATE ANY TABLE'),
('CREATE VIEW'),
('CREATE ANY VIEW'),
('DROP ANY VIEW'),
('CREATE FUNCTION'),
('CREATE ANY FUNCTION'),
('EXECUTE ANY FUNCTION'),
('CREATE SCRIPT'),
('CREATE ANY SCRIPT'),
('DROP ANY SCRIPT'),
('EXECUTE ANY SCRIPT')
)
select * from sysprivs
minus
select
PRIVILEGE
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}'
order by 1
				]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="With admin option" name="withAdminOptions" style="check"
                      tip="Will grant the system privilege with admin option, so the user can grant this role to others.">
                  <Values>WITH ADMIN OPTION</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
GRANT ${sysPrivToGrant} TO "${objectname}" ${withAdminOptions}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Grant system privilege ${sysPrivToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted system privilege ${sysPrivToGrant} to ${objectname}?
               </Result>
            </Action>

            <Action id="exasol-role-revoke-syspriv" label="Revoke System Privilege From Role" reload="true" icon="remove">
               <Input label="Role Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="System privilege to revoke" name="sysPrivToRevoke" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
PRIVILEGE
from
EXA_DBA_SYS_PRIVS
where GRANTEE = '${objectname}'
order by 1
				               ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
REVOKE ${sysPrivToRevoke} FROM "${objectname}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Revoke system privilege ${sysPrivToRevoke} from ${objectname}?
               </Confirm>
               <Result>
                  Revoked system privilege ${sysPrivToRevoke} from
                  ${objectname}?
               </Result>
            </Action>

            <Action id="exasol-role-grant-priority" label="Grant Priority Group to Role" reload="true" icon="status">
               <Input label="Role Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Priority" name="prioToGrant" style="list">
                  <Values>
                     <If test="#util.isDatabaseVersionGTE(6,1)">
                        <Command>
                           <SQL>
                              <![CDATA[
select
pg."PRIORITY_GROUP_NAME" 'Name'
from
"SYS"."EXA_PRIORITY_GROUPS" pg
order by  pg."PRIORITY_GROUP_NAME"
					]]>
                           </SQL>
                        </Command>
                     </If>
                     <Else>
                        LOW|MEDIUM|HIGH
                     </Else>

                  </Values>

               </Input>
               <Command>
                  <If test="#util.isDatabaseVersionGTE(6,1)">
                     <SQL>
                        <![CDATA[
GRANT PRIORITY GROUP ${QB}${prioToGrant}${QE} TO ${QB}${objectname}${QE}
                     ]]>
                     </SQL>
                  </If>
                  <Else>
                     <SQL>
                        <![CDATA[
GRANT PRIORITY ${QB}${prioToGrant}${QE} TO ${QB}${objectname}${QE}
                     ]]>
                     </SQL>
                  </Else>
               </Command>
               <Confirm>
                  Grant priority group ${prioToGrant} to ${objectname}?
               </Confirm>
               <Result>
                  Granted priority group ${prioToGrant} to ${objectname}?
               </Result>
            </Action>

            <Action id="exasol-role-comment" label="Comment Role" reload="true" resetschemas="true" icon="comment">
               <Input label="Role" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Comment" name="comment" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
COMMENT ON ROLE "${objectname}" IS '${comment}'
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm comment on role ${objectname}?
               </Confirm>
               <Result>
                  Comment on ${objectname} successful.
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Priorities">
         <If test="#util.isDatabaseVersionGTE(6,1) and #SUPERUSER">
            <Action id="exasol-priorities-add" label="Create Priority Group" reload="true" icon="add">
               <Input label="Priority Name" name="priorityname" style="text"/>
               <Input name="weight" label="Weight" style="number" tip="Please enter the weight (1-1000).">
                  <Default>100</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
CREATE PRIORITY GROUP ${QB}${priorityname}${QE} WITH WEIGHT = ${weight}
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  Priority group ${priorityname} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Priority">
         <If test="#util.isDatabaseVersionGTE(6,1) and #SUPERUSER">

            <Action id="exasol-priority-alter" label="Alter Weight" reload="true" icon="add">
               <Input label="Priority group" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input name="weight" label="Weight" style="number" tip="Please enter the weight (1-1000).">
                  <Default>${currentweight}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
	ALTER PRIORITY GROUP ${QB}${objectname}${QE} SET WEIGHT = ${weight}
						 ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm alter of weight priority group ${objectname} to
                  ${weight}?
               </Confirm>
               <Result>
                  Set weight ${weight} for ${objectname}!
               </Result>
            </Action>

            <Action id="exasol-priority-rename" label="Rename Priority Group" reload="true" icon="rename">
               <Input label="Priority group" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="New name" name="newName" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
	rename priority group "${objectname}" to ${QB}${newName}${QE}
						 ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm rename of priority group ${objectname} to ${newName}?
               </Confirm>
               <Result>
                  Priority group ${objectname} renamed to ${newName}!
               </Result>
            </Action>

            <Action id="exasol-priority-drop" label="Drop Priority Group" reload="true" icon="remove">
               <Input label="Priority group" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>

               <Command>
                  <SQL>
                     <![CDATA[
	drop priority group "${objectname}"
						 ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm drop of priority group ${objectname}?
               </Confirm>
               <Result>
                  Priority group ${objectname} dropped!
               </Result>
            </Action>

            <Action id="exasol-priority-comment" label="Comment Priority Group" reload="true" resetschemas="true" icon="comment">
               <Input label="Priority Group" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Comment" name="comment" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
	COMMENT ON PRIORITY GROUP "${objectname}" IS '${comment}'
						 ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm comment on priority group ${objectname}?
               </Confirm>
               <Result>
                  Comment on ${objectname} successful.
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Connections">
         <If test="#SUPERUSER">
            <Action id="exasol-connections-add" label="Create Connection" reload="true" icon="add">
               <Input label="Connection Name" name="connectionname" style="text"/>
               <Input label="Connection String" name="connectionstring" style="text-editor">
                  <Arg name="height" value="30"/>
                  <Default>jdbc:</Default>
               </Input>
               <Input label="User Name" name="username" style="text"/>
               <Input label="Password" name="password" style="password"/>
               <Command>
                  <SQL>
                     <![CDATA[
CREATE CONNECTION ${QB}${connectionname}${QE} TO '${connectionstring}' USER '${username}' IDENTIFIED BY '${password}'
                    ]]>
                  </SQL>
               </Command>
               <Result>
                  Connection ${connectionname} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Connection">
         <If test="#SUPERUSER">
            <Action id="exasol-connection-rename" label="Rename Connection" reload="true" icon="rename">
               <Input label="Connection" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="New name" name="newName" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
rename connection "${objectname}" to ${QB}${newName}${QE}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm rename of ${objectname} to ${newName}?
               </Confirm>
               <Result>
                  Connection ${objectname} renamed to ${newName}!
               </Result>
            </Action>

            <Action id="exasol-connection-drop" label="Drop Connection" reload="true" icon="remove">
               <Input label="Connection" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
DROP CONNECTION "${objectname}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really drop connection "${objectname}"?
               </Confirm>
               <Result>
                  Connection "${objectname}" has been dropped!
               </Result>
            </Action>

            <Action id="exasol-connection-alter" label="Alter Connection" reload="true">
               <Input label="Connection" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Connection String" name="connectionstring" style="text-editor">
                  <Arg name="height" value="30"/>
                  <Default>${constring}</Default>
               </Input>
               <Input label="User Name" name="username" style="text">
                  <Default>${uname}</Default>
               </Input>
               <Input label="Password" name="password" style="password"/>
               <Command>
                  <SQL>
                     <![CDATA[
ALTER CONNECTION "${objectname}" TO '${connectionstring}' USER '${username}' IDENTIFIED BY '${password}'
                    ]]>
                  </SQL>
               </Command>
               <Result>
                  User ${username} created!
               </Result>
            </Action>

            <Action id="exasol-connection-grant" label="Grant Connection" reload="true" icon="role">
               <Input label="Connection Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Grant to" name="roleToGrant" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
ROLE_NAME 'Name'
from EXA_DBA_ROLES
where ROLE_NAME not in (
	select
	GRANTEE
	from
	EXA_DBA_CONNECTION_PRIVS
	where
	GRANTED_CONNECTION = '${objectname}'
)

union all

select
USER_NAME 'Name'
from EXA_DBA_USERS
where USER_NAME not in (
	select
	GRANTEE
	from
	EXA_DBA_CONNECTION_PRIVS
	where
	GRANTED_CONNECTION = '${objectname}'
)
					            ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="With admin option" name="withAdminOptions" style="check"
                      tip="Will grant the connection with admin option, so the user can grant this connection to others.">
                  <Values>WITH ADMIN OPTION</Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
GRANT CONNECTION "${objectname}" TO "${roleToGrant}" ${withAdminOptions}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Grant connection ${objectname} to ${roleToGrant}?
               </Confirm>
               <Result>
                  Granted ${objectname} to ${roleToGrant}.
               </Result>
            </Action>

            <Action id="exasol-connection-revoke" label="Revoke Connection" reload="true" icon="remove">
               <Input label="Connection Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Revoke From" name="roleToRevoke" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
select
GRANTEE
from
EXA_DBA_CONNECTION_PRIVS
where
GRANTED_CONNECTION = '${objectname}'
					            ]]>
                        </SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
REVOKE CONNECTION "${objectname}" FROM "${roleToRevoke}"
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Revoke connection ${objectname} from ${roleToRevoke}?
               </Confirm>
               <Result>
                  Revoked ${objectname} from ${roleToRevoke}.
               </Result>
            </Action>

            <Action id="exasol-connection-comment" label="Comment Connection" reload="true" icon="comment">
               <Input label="Connection" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Comment" name="comment" style="text"/>
               <Command>
                  <SQL>
                     <![CDATA[
COMMENT ON CONNECTION "${objectname}" IS '${comment}'
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm comment on connection ${objectname}?
               </Confirm>
               <Result>
                  Comment on ${objectname} successful.
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Session">
         <If test="#SUPERUSER">
            <Action id="exasol-session-close" label="Kill Session" reload="true" icon="remove">
               <Input label="Session ID" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
KILL SESSION ${objectname}
                     ]]>
                  </SQL>
               </Command>
               <Confirm><![CDATA[Really kill session ${objectname}?]]></Confirm>
               <Result>
                  Session ${objectname} has been closed!
               </Result>
            </Action>

            <Action id="exasol-statement-close" label="Kill Statement in Session" reload="true" icon="remove">
               <Input label="Session ID" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Statement ID" style="text" editable="false">
                  <Default>${statementid}</Default>
               </Input>
               <Input label="Message" name="message" style="text" editable="true">
                  <Default>Statement killed manually by DBA</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[
KILL STATEMENT ${statementid} IN SESSION ${objectname} WITH MESSAGE '${message}'
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  <![CDATA[Really kill statement ${statementid} session ${objectname}?]]></Confirm>
               <Result>
                  Statement ${statementid} in session ${objectname} has been
                  killed!
               </Result>
            </Action>
         </If>
      </ActionGroup>

   </ObjectsActionDef>

   <!-- ================================================================ -->
   <!-- Definition of the ObjectsTreeDef showing the database hierarchy -->
   <!-- ================================================================ -->

   <ObjectsTreeDef extends="false">

      <GroupNode type="Schemas" label="Schemas">
         <DataNode type="Schema" label="${exasol.getNonSystemSchemas.schema_name}">
            <SetVar name="schema" value="${exasol.getNonSystemSchemas.schema_name}"/>
            <Command idref="exasol.getNonSystemSchemas">
               <Filter index="schema_name" label="Name"/>
            </Command>

            <GroupNode type="Tables" label="Tables">
               <DataNode type="Table" label="${exasol.getTables.Table Name}">
                  <SetVar name="objectname" value="${exasol.getTables.Table Name}"/>
                  <SetVar name="owner" value="${exasol.getTables.Owner}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <SetVar name="isVirtual" value="${exasol.getTables.Is Virtual}"/>
                  <Command idref="exasol.getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="type" value="TABLE"/>
                  </Command>

                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>
                  <SetVar name="theColumnName" value="%"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true"
                               icon="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'PrimaryKey' : 'Column'"
                               tip="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'This is a primary key column' : ''">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="Table"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>

                  <GroupNode type="Constraints" label="Constraints">
                     <DataNode type="Constraint" label="${exasol.getTableConstraints.Constraint Name}"
                               isLeaf="true"
                               warnstate="#dataMap.get('exasol.getTableConstraints.Constraint Enabled').equals(false)"
                               tip="#dataMap.get('exasol.getTableConstraints.Constraint Enabled').equals(false) ? 'Constraint is disabled' : ''">
                        <SetVar name="objectname" value="${exasol.getTableConstraints.Constraint Name}"/>

                        <Command idref="exasol.getTableConstraints">
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                        </Command>
                     </DataNode>
                  </GroupNode>

               </DataNode>
            </GroupNode>

            <GroupNode type="Views" label="Views">
               <DataNode type="View" label="${exasol.getViews.View Name}">
                  <SetVar name="objectname" value="${exasol.getViews.View Name}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="exasol.getViews">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                  </Command>

                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <!-- Save the Column Name -->
                        <SetVar name="theColumnName" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="View"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>

            <GroupNode type="Functions" label="Functions">
               <DataNode type="Function" label="${exasol.getSQLFunctions.Function name}"
                         isLeaf="true">
                  <SetVar name="objectname" value="${exasol.getSQLFunctions.Function name}"/>

                  <Command idref="exasol.getSQLFunctions">
                     <Input name="schema" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Scripts" label="Scripts">
               <GroupNode type="Adapters" label="Adapters">
                  <DataNode type="Script"
                            label="${exasol.getScripts.Script name}"
                            label1="${exasol.getScripts.Script language}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${exasol.getScripts.Script name}"/>
                     <Command idref="exasol.getScripts">
                        <Input name="schema" value="${schema}"/>
                        <Input name="script_type" value="ADAPTER"/>
                        <Input name="script_input_type" value=" is null"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="Scripting" label="LUA Scripting">
                  <DataNode type="Script"
                            label="${exasol.getScripts.Script name}"
                            label1="${exasol.getScripts.Script language}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${exasol.getScripts.Script name}"/>
                     <Command idref="exasol.getScripts">
                        <Input name="schema" value="${schema}"/>
                        <Input name="script_type" value="SCRIPTING"/>
                        <Input name="script_input_type" value="is null"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDFs" label="UDFs">
                  <DataNode type="Script"
                            label="${exasol.getScripts.Script name}"
                            label1="${exasol.getScripts.Script language} ${exasol.getScripts.Script input type} ${exasol.getScripts.Script result type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${exasol.getScripts.Script name}"/>
                     <Command idref="exasol.getScripts">
                        <Input name="schema" value="${schema}"/>
                        <Input name="script_type" value="UDF"/>
                        <Input name="script_input_type" value="is not null"/>
                     </Command>
                  </DataNode>
               </GroupNode>
            </GroupNode>

         </DataNode>
      </GroupNode>

      <GroupNode type="VirtualSchemas" label="Virtual Schemas">
         <DataNode type="VirtualSchema" label="${exasol.getVirtualSchemas.Schema name}">
            <SetVar name="schema" value="${exasol.getVirtualSchemas.Schema name}"/>
            <Command idref="exasol.getVirtualSchemas">
               <Filter index="schema_name" label="Name"/>
            </Command>

            <GroupNode type="Tables" label="Tables">
               <DataNode type="VirtualTable" label="${exasol.getTables.Table Name}">
                  <SetVar name="objectname" value="${exasol.getTables.Table Name}"/>
                  <SetVar name="owner" value="${exasol.getTables.Owner}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <SetVar name="isVirtual" value="${exasol.getTables.Is Virtual}"/>
                  <Command idref="exasol.getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="type" value="TABLE"/>
                  </Command>
                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>
                  <SetVar name="theColumnName" value="%"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true"
                               icon="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'PrimaryKey' : 'Column'"
                               tip="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'This is a primary key column' : ''">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="Table"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="SystemSchemas" label="System Schemas">
         <DataNode type="SystemSchema" label="${exasol.getSystemSchemas.schema_name}">
            <SetVar name="schema" value="${exasol.getSystemSchemas.schema_name}"/>
            <Command idref="exasol.getSystemSchemas"/>
            <GroupNode type="SystemTables" label="System Tables">
               <DataNode type="SystemTable" label="${exasol.getSystemTables.Table Name}">
                  <SetVar name="objectname" value="${exasol.getSystemTables.Table Name}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="exasol.getSystemTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                  </Command>
                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumns.COLUMN_NAME}"
                               label1="${getColumns.TYPE_NAME}"
                               isLeaf="true">
                        <SetVar name="objectname" value="${getColumns.COLUMN_NAME}"/>
                        <Command idref="getColumns">
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${objectname}"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="DBA" label="DBA">

         <GroupNode type="Users" label="Users">
            <DataNode type="User" label="${exasol.getUsers.Name}" isLeaf="true">
               <SetVar name="objectname" value="${exasol.getUsers.Name}"/>
               <SetVar name="distinguishedName" value="${exasol.getUsers.Distinguished name}"/>
               <Command idref="exasol.getUsers"/>
            </DataNode>
         </GroupNode>

         <GroupNode type="Roles" label="Roles">
            <DataNode type="Role" label="${exasol.getRoles.name}">
               <SetVar name="objectname" value="${exasol.getRoles.name}"/>
               <Command idref="exasol.getRoles"/>
               <DataNode type="User" label="${exasol.getUsersFromRole.Grantee}" isLeaf="true">
                  <Command idref="exasol.getUsersFromRole"/>
               </DataNode>
            </DataNode>
         </GroupNode>
         <GroupNode type="Priorities" label="Priority Groups" icon="status">
            <DataNode type="Priority" label="${exasol.getPriorities.Name}" icon="status" isLeaf="true">
               <SetVar name="objectname" value="${exasol.getPriorities.Name}"/>
               <SetVar name="currentweight" value="${exasol.getPriorities.Weight}"/>
               <Command idref="exasol.getPriorities"/>
            </DataNode>
         </GroupNode>

         <GroupNode type="Connections" label="Connections">
            <DataNode type="Connection" label="${exasol.getConnections.Name}" isLeaf="true">
               <SetVar name="objectname" value="${exasol.getConnections.Name}"/>
               <SetVar name="constring" value="${exasol.getConnections.Connection String}"/>
               <SetVar name="uname" value="${exasol.getConnections.User name}"/>
               <Command idref="exasol.getConnections"/>
            </DataNode>
         </GroupNode>
         <If test="#ANYDICTIONARY">
            <GroupNode type="RecentQueries" label="Auditing" isLeaf="true"/>
         </If>
         <GroupNode type="DatabaseSize" label="DB Size" isLeaf="true"/>
         <GroupNode type="Usage" label="Usage" isLeaf="true"/>

         <GroupNode type="Monitoring" label="Monitoring" isLeaf="false">
            <GroupNode type="MonitoringLastDay" icon="Monitoring" label="Monitoring Last Hour" isLeaf="true"/>
            <GroupNode type="MonitoringHourly" icon="Monitoring" label="Monitoring Hourly" isLeaf="true"/>
            <GroupNode type="MonitoringDaily" icon="Monitoring" label="Monitoring Daily" isLeaf="true"/>
            <GroupNode type="MonitoringMonthly" icon="Monitoring" label="Monitoring Monthly" isLeaf="true"/>
         </GroupNode>

         <GroupNode type="Statistics" label="SQL Statistics" isLeaf="false">
            <GroupNode type="StatisticsHourly" icon="Statistics" label="Statistics Hourly" isLeaf="true"/>
            <GroupNode type="StatisticsDaily" icon="Statistics" label="Statistics Daily" isLeaf="true"/>
            <GroupNode type="StatisticsMonthly" icon="Statistics" label="Statistics Monthly" isLeaf="true"/>
         </GroupNode>

         <GroupNode type="System" label="System" isLeaf="true"/>
         <GroupNode type="Locks" label="Locks" isLeaf="true"/>

         <GroupNode type="Sessions" label="Sessions">
            <DataNode type="Session" label="${exasol.getSessions.Session ID}"
                      label1="${exasol.getSessions.User name}" isLeaf="true">
               <SetVar name="objectname" value="${exasol.getSessions.Session ID}"/>
               <SetVar name="statementid" value="${exasol.getSessions.Statement ID}"/>
               <Command idref="exasol.getSessions"/>
            </DataNode>
         </GroupNode>
      </GroupNode>

   </ObjectsTreeDef>

   <!-- =================================================================== -->
   <!-- Definition of the database objects views -->
   <!-- =================================================================== -->

   <ObjectsViewDef extends="true">

      <!-- ================================================================= -->
      <!-- Databases/schemas related views -->
      <!-- ================================================================= -->

      <ObjectView type="Schemas">
         <DataView id="generic-schemas-schemas" action="drop"/>

         <DataView id="exasol-schemas-schemas" icon="Schemas" label="Schemas" viewer="grid">
            <Command idref="exasol.getNonSystemSchemas"/>
         </DataView>

         <DataView id="exasol-schemas-schemasize" icon="storage" label="Schema sizes" viewer="grid">
            <Command idref="exasol.getSchemaSize">
               <Input name="objectname" value="%"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows schema sizes as shown in EXA_[ALL|DBA]_OBJECT_SIZES
               </html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Schema">
         <DataView id="generic-schema-tables" action="drop"/>
         <DataView id="generic-schema-references" action="drop"/>
         <DataView id="exasol-schema-info" icon="Info" label="Info" viewer="form">
            <Command idref="exasol.getSchema">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
         <DataView id="exasol-schema-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getSchemaGrants">
               <Input name="objectname" value="${schema}"/>
            </Command>
            <Message>
               <![CDATA[
			   	<html>
			   	This view shows the grants for this schema as shown in EXA_[ALL|DBA]_OBJ_PRIVS.
			   	</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-schema-schemasize" icon="storage" label="Schema size" viewer="form">
            <Command idref="exasol.getSchemaSize">
               <Input name="objectname" value="${schema}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows schema size as shown in EXA_[ALL|DBA]_OBJECT_SIZES
               </html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-schema-tablesizes" icon="storage" label="Table Sizes" viewer="grid">
            <Command idref="exasol.getTableSize">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>

            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the sizes of the tables as shown in EXA_[ALL|DBA]_OBJECT_SIZES
               </html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="VirtualSchema">
         <DataView id="exasol-virtualschema-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="exasol-virtualschema-properties" icon="toolpropertieswindow" label="Properties" viewer="grid">
            <Input name="menuItem" value="Script: ALTER PROPERTY">
               <Input name="command" value=" ALTER VIRTUAL SCHEMA ${object||Schema name} SET ${object||Property name}  = '${object||Property value}'"/>
            </Input>
            <Command idref="exasol.getVirtualSchemaProperties">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>

         <DataView id="exasol-virtualschema-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getSchemaGrants">
               <Input name="objectname" value="${schema}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the grants for this schema as shown in EXA_[ALL|DBA]_OBJ_PRIVS.
               </html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-virtualschema-ddl" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="TEXT"/>
            <Input name="formatSQL" value="false"/>
            <Command idref="exasol.getVirtualSchemaDDL">
               <Input name="schema" value="${schema}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the DDL of the virtual schema.
               </html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Table Related Views -->
      <!-- ================================================================= -->

      <ObjectView type="Tables">
         <DataView id="generic-tables-tables" action="drop"/>
         <DataView id="generic-tables-references" action="drop"/>

         <DataView id="exasol-tables-tables" icon="Tables" label="Tables" viewer="grid">
            <If test="#util.isLicensed()">
               <Input name="menuItem" value="Open in New Tab...">
                  <Input name="action" value="open-object-in-new-tab-command ${schema||Schema}${object||Table Name}"/>
               </Input>
               <Input name="menuItem" value="Open in Floating Tab...">
                  <Input name="action" value="open-object-in-floating-tab-command ${schema||Schema}${object||Table Name}"/>
               </Input>
            </If>
            <Input name="menuItem" value="Script: SELECT ALL (Max 50000)">
               <Input name="command" value="SELECT * FROM ${schema||Schema}${object||Table Name} limit 50000"/>
            </Input>
            <Input name="menuItem" value="Script: DROP TABLE">
               <Input name="command" value="DROP table ${schema||Schema}${object||Table Name} CASCADE"/>
            </Input>
            <Command idref="exasol.getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="type" value="TABLE"/>
            </Command>
         </DataView>
         <DataView id="exasol-tables-references" icon="References" label="References" viewer="tables-refs"
                   doclink="http://www.dbvis.com/doclink/show-references">
            <Command idref="getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="tableType" value="TABLE"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Table">
         <DataView id="generic-table-indexes" action="drop"/>
         <DataView id="generic-table-rowid" action="drop"/>
         <DataView id="generic-table-grants" action="drop"/>
         <DataView id="generic-table-ddl">
            <Message/>
         </DataView>
         <DataView id="exasol-table-distribution-keys" icon="columns" label="Distribution Keys" viewer="grid">
            <Command idref="exasol.getTableDistributionKeys">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="exasol-table-indices" icon="index" label="Indices" viewer="grid">
            <Command idref="exasol.getTableIndices">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="exasol-table-size" icon="storage" label="Size" viewer="form">
            <Command idref="exasol.getTableSize">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="exasol-table-distribution" icon="storage" label="Distribution" viewer="form">
            <Command idref="exasol.getTableDistribution">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <!-- Add the Constraints view -->
         <DataView id="exasol-table-constraints" icon="Constraints" label="Constraints" viewer="grid">
            <Command idref="exasol.getTableConstraints">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>

            <DataView id="exasol-table-constraint-columns" icon="Constraints" label="Constraint Columns" viewer="grid">
               <Command idref="exasol.getTableConstraintColumns">
                  <Input name="constraint_name" value="${Constraint Name}"/>
                  <Input name="constraint_table" value="${Table Name}"/>
                  <Input name="constraint_schema" value="${Schema}"/>
               </Command>
            </DataView>

         </DataView>

         <!-- Add the Grants view -->
         <DataView id="exasol-table-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getTableGrants">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the grants for this table as shown in EXA_[ALL|DBA]_OBJ_PRIVS.
               </html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Constraints">
         <DataView id="exasol-table-constraints-constraints" icon="Constraints" label="Constraints" viewer="grid">
            <Command idref="exasol.getTableConstraints">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Constraint">
         <DataView id="exasol-constraint-info" icon="Info" label="Info" viewer="node-form"/>

         <DataView id="exasol-constraint-columns" icon="Constraints" label="Constraint Columns" viewer="grid">
            <Command idref="exasol.getTableConstraintColumns">
               <Input name="constraint_name" value="${objectname}"/>
               <Input name="constraint_table" value="${theTableName}"/>
               <Input name="constraint_schema" value="${Schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Virtual Schema Related -->
      <!-- ================================================================= -->

      <ObjectView type="VirtualTable">
         <DataView id="exasol-virtualtable-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="exasol-virtualtable-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="getColumns">
               <Input name="catalog" value="${catalog}"/>
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="exasol-virtualtable-data" icon="Data" label="Data" viewer="table-data">
            <Input name="editDisabled" value="true"/>
         </DataView>

         <DataView id="exasol-virtualtable-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>

         <DataView id="exasol-virtualtable-ddl" icon="Source" label="DDL" viewer="ddl"/>

      </ObjectView>

      <!-- ================================================================= -->
      <!-- Views Related -->
      <!-- ================================================================= -->

      <ObjectView type="Views">
         <DataView id="exasol-views-views" icon="Views" label="Views" viewer="grid">
            <If test="#util.isLicensed()">
               <Input name="menuItem" value="Open in New Tab...">
                  <Input name="action" value="open-object-in-new-tab-command ${schema||schema_name}${object||table_name}"/>
               </Input>
               <Input name="menuItem" value="Open in Floating Tab...">
                  <Input name="action" value="open-object-in-floating-tab-command ${schema||schema_name}${object||table_name}"/>
               </Input>
            </If>
            <Input name="menuItem" value="Script: SELECT ALL (Max 50000)">
               <Input name="command" value="SELECT * FROM ${schema||schema_name}${object||table_name} limit 50000"/>
            </Input>
            <Input name="menuItem" value="Script: DROP TABLE">
               <Input name="command" value="DROP table ${schema||schema_name}${object||table_name} CASCADE"/>
            </Input>
            <Command idref="exasol.getViews">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="View">
         <DataView id="exasol-view-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="exasol-view-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="getColumns">
               <Input name="catalog" value="${catalog}"/>
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="exasol-view-data" icon="Data" label="Data" viewer="table-data">
            <!--Views cannot be edited in exasol-->
            <Input name="disableEdit" value="true"/>
         </DataView>

         <DataView id="exasol-view-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>

         <!-- Add the Grants view -->
         <DataView id="exasol-view-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getTableGrants">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the grants for this view as shown in EXA_ALL_OBJ_PRIVS.
               </html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-view-ddl" icon="Source" label="DDL" viewer="ddl">
            <Input name="objectType" value="View"/>
         </DataView>

         <DataView id="exasol-view-dependencies" icon="nodes" label="Dependencies" viewer="grid">
            <Command idref="exasol.getDependency">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the dependencies for this view as shown in EXA_ALL_DEPENDENCIES.
               </html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- System Tables Related -->
      <!-- ================================================================= -->

      <ObjectView type="SystemTables">
         <DataView id="exasol-systemtables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||Schema}${object||Table Name}"/>
            </Input>
            <Command idref="exasol.getSystemTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="SystemTable">
         <DataView id="exasol-systemtable-data" icon="Data" label="Data" viewer="table-data">
            <Input name="editDisabled" value="true"/>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Commons defs -->
      <!-- ================================================================= -->

      <!--Alert: The exasol.getColumnAnalyticStats command doesn't exist. Remove it or add command?-->
      <!--<ObjectView type="Column">-->
      <!--<DataView id="exasol-column-statistics" icon="Statistics" label="Statistics" viewer="grid">-->
      <!--<Command idref="exasol.getColumnAnalyticStats">-->
      <!--<Input name="objectname" value="${objectname}"/>-->
      <!--<Input name="theTableName" value="${theTableName}"/>-->
      <!--</Command>-->
      <!--</DataView>-->
      <!--</ObjectView>-->

      <!-- ================================================================= -->
      <!-- DBA Dedicated-Query View -->
      <!-- ================================================================= -->

      <ObjectView type="RecentQueries">

         <DataView id="exasol-recentqueries-auditbrowser-recent" icon="RecentQueries" label="Recent Queries" viewer="grid">
            <Command idref="exasol.getAuditQueriesRecent"/>

            <Message>
               <![CDATA[
					<html>
					Auditing is only showing data if auditing is enabled for the EXASOL database in EXAoperation.
					Please select a statement to drill deeper (query text, profile etc...).
					Please be aware that <b>profiling must be enabled</b> for your EXASOL system and
					the profile is only available if the query was executed within the last 24 hours.
					</html>
					 ]]>
            </Message>
            <DataView id="exasol-recentqueries-auditbrowser-recent-queries-text" icon="Code" label="Query Text" viewer="text">
               <Input name="dataColumn" value="text"/>
               <Input name="formatSQL" value="true"/>
               <Command idref="exasol.getAuditQueryText">
                  <Input name="session_id" value="${Session ID}"/>
                  <Input name="stmt_id" value="${Stmt ID}"/>
               </Command>
            </DataView>

            <DataView id="exasol-recentqueries-auditbrowser-recent-profile" icon="plan" label="Query Profile" viewer="grid">
               <Command idref="exasol.getProfileOfQuery">
                  <Input name="session_id" value="${Session ID}"/>
                  <Input name="stmt_id" value="${Stmt ID}"/>
               </Command>
            </DataView>

            <DataView id="exasol-recentqueries-auditbrowser-recent-info" icon="Info" label="Query Info" viewer="node-form"/>

            <DataView id="exasol-recentqueries-auditbrowser-recent-session" icon="user" label="Session Info" viewer="form">
               <Command idref="exasol.getAuditSession">
                  <Input name="session_id" value="${Session ID}"/>
               </Command>
            </DataView>
         </DataView>

         <DataView id="exasol-recentqueries-auditbrowser" icon="RecentQueries" label="Audit by COMMAND_CLASS last week" viewer="grid">
            <Command idref="exasol.getAuditDatesAndCommandsLastWeek"/>
            <Message>
               <![CDATA[
               <html>
               <b>Auditing is only showing data if auditing is enabled for the EXASOL database in EXAoperation.</b>
               Please select a AUDIT_DATE and COMMAND_CLASS to identify long running statements.
               </html>
					]]>
            </Message>
            <DataView id="exasol-recentqueries-auditbrowser-longrunners" icon="RecentQueries" label="Long Running Statements" viewer="grid">
               <Command idref="exasol.getAuditLongRunning">
                  <Input name="audit_date" value="${AUDIT_DATE}"/>
                  <Input name="command_class" value="${COMMAND_CLASS}"/>
               </Command>
               <Message>
                  <![CDATA[
                  <html>
                  Please select a statement to drill deeper (query text, profile etc...).
                  Please be aware that <b>profiling must be enabled</b> for your EXASOL system and
                  the profile is only available if the query was executed within the last 24 hours.
                  </html>
                  ]]>
               </Message>
               <DataView id="exasol-recentqueries-auditbrowser-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser-info" icon="Info" label="Query Info" viewer="node-form"/>

               <DataView id="exasol-recentqueries-auditbrowser-session" icon="user" label="Session Info" viewer="form">
                  <Command idref="exasol.getAuditSession">
                     <Input name="session_id" value="${Session ID}"/>
                  </Command>
               </DataView>
            </DataView>


         </DataView>

         <DataView id="exasol-recentqueries-auditbrowser2" icon="RecentQueries" label="Audit by USER_NAME/CLIENT last week" viewer="grid">
            <Command idref="exasol.getAuditByUserNameClientLastWeek"/>
            <Message>
               <![CDATA[
               <html>
               <b>Auditing is only showing data if auditing is enabled for the EXASOL database in EXAoperation.</b>
               Please select a AUDIT_DATE, USER_NAME, CLIENT to identify long running statements.
               </html>
               ]]>
            </Message>

            <DataView id="exasol-recentqueries-auditbrowser2-longrunners" icon="RecentQueries" label="Long Running Statements" viewer="grid">
               <Command idref="exasol.getAuditLongRunningFromUsernameClient">
                  <Input name="audit_date" value="${AUDIT_DATE}"/>
                  <Input name="user_name" value="${USER_NAME}"/>
                  <Input name="client" value="${CLIENT}"/>
               </Command>
               <Message>
                  <![CDATA[
                  <html>
                  Please select a statement to drill deeper (query text, profile etc...).
                  Please be aware that <b>profiling must be enabled</b> for your EXASOL system and
                  the profile is only available if the query was executed within the last 24 hours.
                  </html>
                  ]]>
               </Message>

               <DataView id="exasol-recentqueries-auditbrowser2-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser2-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser2-info" icon="Info" label="Query Info" viewer="node-form"/>

               <DataView id="exasol-recentqueries-auditbrowser2-session" icon="user" label="Session Info" viewer="form">
                  <Command idref="exasol.getAuditSession">
                     <Input name="session_id" value="${Session ID}"/>
                  </Command>
               </DataView>
            </DataView>

            <DataView id="exasol-recentqueries-auditbrowser2-recent" icon="RecentQueries" label="Recent Statements" viewer="grid">
               <Command idref="exasol.getAuditRecentFromUsernameClient">
                  <Input name="audit_date" value="${AUDIT_DATE}"/>
                  <Input name="user_name" value="${USER_NAME}"/>
                  <Input name="client" value="${CLIENT}"/>
               </Command>
               <Message>
                  <![CDATA[
                  <html>
                  Please select a statement to drill deeper (query text, profile etc...).
                  Please be aware that <b>profiling must be enabled</b> for your EXASOL system and
                  the profile is only available if the query was executed within the last 24 hours.
                  </html>
                  ]]>
               </Message>

               <DataView id="exasol-recentqueries-auditbrowser2-recent-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser2-recent-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditbrowser2-recent-info" icon="Info" label="Query Info" viewer="node-form"/>

               <DataView id="exasol-recentqueries-auditbrowser2-recent-session" icon="user" label="Session Info" viewer="form">
                  <Command idref="exasol.getAuditSession">
                     <Input name="session_id" value="${Session ID}"/>
                  </Command>
               </DataView>
            </DataView>
         </DataView>

         <DataView id="exasol-recentqueries-auditsessions" icon="RecentQueries" label="Audit Sessions last 24h" viewer="grid">
            <Command idref="exasol.getAuditSessions"/>

            <DataView id="exasol-recentqueries-auditsessions-queries" icon="RecentQueries" label="Audit Queries of Session" viewer="grid">
               <Command idref="exasol.getAuditQueriesOfSession">
                  <Input name="session_id" value="${Session ID}"/>
               </Command>

               <DataView id="exasol-recentqueries-auditsessions-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditsessions-queries-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-recentqueries-auditsessions-queries-info" icon="Info" label="Query Info" viewer="node-form"/>
            </DataView>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Functions Related -->
      <!-- ================================================================= -->

      <ObjectView type="Functions">
         <DataView id="exasol-functions-functions" icon="Functions" label="Functions" viewer="grid">
            <Command idref="exasol.getSQLFunctions">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Function">
         <DataView id="exasol-function-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="exasol-function-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getTableGrants">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the grants for this function as shown in EXA_[ALL|DBA]_OBJ_PRIVS.
               </html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-function-ddl" icon="Source" label="DDL" viewer="ddl">
            <Input name="objectType" value="Function"/>
         </DataView>

      </ObjectView>

      <!-- ================================================================= -->
      <!-- UDF / Scripting Related -->
      <!-- ================================================================= -->

      <ObjectView type="Scripts">
         <DataView id="exasol-scripts-list" icon="UDX" label="Scripts" viewer="grid">
            <Command idref="exasol.getAllScripts">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Adapters">
         <DataView id="exasol-scripts-adapters-list" icon="UDX" label="Adapters" viewer="grid">
            <Command idref="exasol.getScripts">
               <Input name="schema" value="${schema}"/>
               <Input name="script_type" value="ADAPTER"/>
               <Input name="script_input_type" value=" is null"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Scripting">
         <DataView id="exasol-scripts-scripting-list" icon="UDX" label="LUA Scripting" viewer="grid">
            <Command idref="exasol.getScripts">
               <Input name="schema" value="${schema}"/>
               <Input name="script_type" value="SCRIPTING"/>
               <Input name="script_input_type" value="is null"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDFs">
         <DataView id="exasol-scripts-udfs-list" icon="UDX" label="UDFs" viewer="grid">
            <Command idref="exasol.getScripts">
               <Input name="schema" value="${schema}"/>
               <Input name="script_type" value="UDF"/>
               <Input name="script_input_type" value=" like '%'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Script">
         <DataView id="exasol-script-info" icon="Info" label="Script" viewer="node-form">
            <Command idref="exasol.getScript">
               <Input name="schema" value="${schema}"/>
               <Input name="script_name" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="exasol-script-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="exasol.getTableGrants">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
            <Message>
               <![CDATA[
               <html>
               This view shows the grants for this script as shown in EXA_[ALL|DBA]_OBJ_PRIVS.
               </html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-scripts-ddl" icon="Source" label="DDL" viewer="ddl">
            <Input name="objectType" value="Script"/>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- User related -->
      <!-- ================================================================= -->

      <ObjectView type="Users">
         <DataView id="exasol-users-users" icon="Users" label="Users" viewer="grid">
            <Command idref="exasol.getUsers"/>
         </DataView>
      </ObjectView>

      <ObjectView type="User">
         <DataView id="exasol-user-info" icon="Info" label="Info" viewer="node-form"/>

         <DataView id="exasol-user-recursiveroles" icon="role" label="Granted Roles" viewer="grid">
            <Command idref="exasol.getRecursiveRolesOfUser"/>
            <Message>
               <![CDATA[
               <html>Granted roles for this user shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-user-recursivesystemprivs" icon="privileges" label="Granted System Privileges" viewer="grid">
            <Command idref="exasol.getSystemPrivilegesRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted system privileges for this user shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-user-recursiveobjectprivs" icon="table" label="Granted Object Privileges" viewer="grid">
            <Command idref="exasol.getObjectPrivilegesRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted object privileges for this user shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-user-ownedschemas" icon="schema" label="Owned Schemas" viewer="grid">
            <Command idref="exasol.getOwnedSchemas"/>
            <Message>
               <![CDATA[
               <html>Owned schemas of this user.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-user-recursiveconnections" icon="DatabaseLinks" label="Granted Connections" viewer="grid">
            <Command idref="exasol.getGrantedConnectionsRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted connections for this user shown recursively.</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Connections">
         <DataView id="exasol-connections-connections" icon="Servers" label="Connections" viewer="grid">
            <Command idref="exasol.getConnections"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Connection">
         <DataView id="exasol-connection-info" icon="Server" label="Connection" viewer="node-form"/>

         <DataView id="exasol-connections-grantees" icon="roles" label="Grantees" viewer="grid">
            <Command idref="exasol.getConnectionGrantees"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Roles">
         <DataView id="exasol-roles-roles" icon="Groups" label="Roles" viewer="grid">
            <Command idref="exasol.getRoles"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Role">
         <DataView id="exasol-role-info" icon="Info" label="Info" viewer="node-form"/>

         <DataView id="exasol-role-recursiveroles" icon="role" label="Granted Roles" viewer="grid">
            <Command idref="exasol.getRecursiveRolesOfRole"/>
            <Message>
               <![CDATA[
               <html>Granted roles for this role shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-role-recursivesystemprivs" icon="privileges" label="Granted System Privileges" viewer="grid">
            <Command idref="exasol.getSystemPrivilegesRoleRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted system privileges for this role shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-role-recursiveobjectprivs" icon="table" label="Granted Object Privileges" viewer="grid">
            <Command idref="exasol.getObjectPrivilegesRoleRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted object privileges for this role shown recursively.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-role-ownedschemas" icon="schema" label="Owned Schemas" viewer="grid">
            <Command idref="exasol.getOwnedSchemas"/>
            <Message>
               <![CDATA[
               <html>Owned schemas of this role.</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-role-recursiveconnections" icon="connection" label="Granted Connections" viewer="grid">
            <Command idref="exasol.getGrantedConnectionsRoleRecursive"/>
            <Message>
               <![CDATA[
               <html>Granted connections for this role shown recursively.</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Priorities">
         <DataView id="exasol-priorities-priorities" icon="status" label="Priorities" viewer="grid">
            <Command idref="exasol.getPriorities"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Priority">
         <DataView id="exasol-priority-info" icon="info" label="Info" viewer="node-form"/>

         <DataView id="exasol-priority-usersroles" icon="Roles" label="Users and Roles" viewer="grid">
            <Command idref="exasol.getUsersAndRolesOfPriority"/>
            <Message>
               <![CDATA[
               <html>Users and roles having this priority.</html>
               ]]>
            </Message>
         </DataView>

      </ObjectView>
      <!-- ================================================================= -->
      <!-- Various -->
      <!-- ================================================================= -->

      <ObjectView type="System">
         <DataView id="exasol-system-system" icon="Info" label="General" viewer="form">
            <Command idref="exasol.getSystemInfo"/>
            <Message>
               <![CDATA[
               <html>General EXASOL system information (overview)</html>
               ]]>
            </Message>
         </DataView>
         <DataView id="exasol-system-events" icon="Info" label="System Events" viewer="form">
            <Command idref="exasol.getSystemEvents"/>
            <Message>
               <![CDATA[
               <html>Lists EXASOL system events</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-system-parameters" icon="Settings" label="Parameters" viewer="grid">
            <Command idref="exasol.getParameters"/>
            <Message>
               <![CDATA[
               <html>Parameters of current session and system settings</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="exasol-system-storage-volumes" icon="Settings" label="Storage Volumes" viewer="grid">
            <Command idref="exasol.getStorageVolumes"/>
            <Message>
               <![CDATA[
               <html>Parameters for system storage volumes</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Sessions">
         <DataView id="exasol-sessions-sessions" icon="Sessions" label="Sessions" viewer="grid">
            <Command idref="exasol.getSessions"/>
            <Input name="menuItem" value="Script: KILL SESSION">
               <Input name="command" value="KILL SESSION ${Session Id}"/>
            </Input>
            <Input name="menuItem" value="Script: KILL STATEMENT IN SESSION">
               <Input name="command" value="KILL STATEMENT ${Statement Id} IN SESSION ${Session Id} WITH MESSAGE 'Statement manually killed by DBA'"/>
            </Input>

            <DataView id="exasol-sessions-sessions-profile-running" icon="plan" label="Running Profile" viewer="grid">
               <Command idref="exasol.getRunningProfileOfQuery">
                  <Input name="session_id" value="${Session ID}"/>
                  <Input name="stmt_id" value="${Statement ID}"/>
               </Command>
            </DataView>

            <DataView id="exasol-sessions-sessions-auditsessions-queries" icon="RecentQueries" label="Audit Queries of Session" viewer="grid">
               <Command idref="exasol.getAuditQueriesOfSession">
                  <Input name="session_id" value="${Session ID}"/>
               </Command>
               <Message>
                  <![CDATA[
                  <html>
                  Auditing is only showing data if auditing is enabled for the EXASOL database in EXAoperation.
                  Please select a statement to drill deeper (query text, profile etc...).
                  Please be aware that <b>profiling must be enabled</b> for your EXASOL system and
                  the profile is only available if the query was executed within the last 24 hours.
                  </html>
                  ]]>
               </Message>
               <DataView id="exasol-sessions-sessions-auditsessions-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-sessions-sessions-auditsessions-queries-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${Session ID}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-sessions-sessions-auditsessions-queries-info" icon="Info" label="Query Info" viewer="node-form"/>
            </DataView>

         </DataView>
      </ObjectView>

      <ObjectView type="Session">
         <DataView id="exasol-session-info" icon="Session" label="Info" viewer="node-form"/>
         <If test="#ANYDICTIONARY">
            <DataView id="exasol-session-auditsessions-queries" icon="RecentQueries" label="Audit Queries of Session" viewer="grid">
               <Command idref="exasol.getAuditQueriesOfSession">
                  <Input name="session_id" value="${objectname}"/>
               </Command>

               <DataView id="exasol-session-auditsessions-queries-text" icon="Code" label="Query Text" viewer="text">
                  <Input name="dataColumn" value="text"/>
                  <Input name="formatSQL" value="true"/>
                  <Command idref="exasol.getAuditQueryText">
                     <Input name="session_id" value="${objectname}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-session-auditsessions-queries-profile" icon="plan" label="Query Profile" viewer="grid">
                  <Command idref="exasol.getProfileOfQuery">
                     <Input name="session_id" value="${objectname}"/>
                     <Input name="stmt_id" value="${Stmt ID}"/>
                  </Command>
               </DataView>

               <DataView id="exasol-session-auditsessions-queries-info" icon="Info" label="Query Info" viewer="node-form"/>
            </DataView>
         </If>

      </ObjectView>

      <ObjectView type="Locks">
         <DataView id="exasol-locks-locks" icon="Locks" label="Transaction conflicts" viewer="grid">
            <Command idref="exasol.getLocks"/>
         </DataView>
      </ObjectView>

      <ObjectView type="DatabaseSize" layout="tilevertical 2">
         <DataView id="exasol-databasesize-lastday" icon="usage" label="Database size last day" viewer="chart">
            <Command idref="exasol.getDBSizeLastDay"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="RAW uncompressed [GiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="MEM compressed [GiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Auxiliary/Indices [GiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Statistics [GiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Recommended DB RAM [GiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Storage [GiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Database size last day"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="GiB"/>
         </DataView>

         <DataView id="exasol-databasesize-daily" icon="usage" label="Database size daily" viewer="chart">
            <Command idref="exasol.getDBSizeDaily"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="RAW uncompressed MAX [GiB]"/>
            <Input name="chart.serie.0.visible" value="false"/>

            <Input name="chart.serie.1.name" value="RAW uncompressed AVG [GiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="MEM compressed MAX [GiB]"/>
            <Input name="chart.serie.2.visible" value="false"/>

            <Input name="chart.serie.3.name" value="MEM compressed AVG [GiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Auxiliary/Indices MAX [GiB]"/>
            <Input name="chart.serie.4.visible" value="false"/>

            <Input name="chart.serie.5.name" value="Auxiliary/Indices AVG [GiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.serie.6.name" value="Statistics MAX [GiB]"/>
            <Input name="chart.serie.6.visible" value="false"/>

            <Input name="chart.serie.7.name" value="Statistics AVG [GiB]"/>
            <Input name="chart.serie.7.visible" value="true"/>

            <Input name="chart.serie.8.name" value="Recommended DB RAM MAX [GiB]"/>
            <Input name="chart.serie.8.visible" value="true"/>

            <Input name="chart.serie.9.name" value="Recommended DB RAM AVG [GiB]"/>
            <Input name="chart.serie.9.visible" value="true"/>

            <Input name="chart.serie.10.name" value="Storage MAX [GiB]"/>
            <Input name="chart.serie.10.visible" value="false"/>

            <Input name="chart.serie.11.name" value="Storage AVG [GiB]"/>
            <Input name="chart.serie.11.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Database size daily"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="GiB"/>
         </DataView>

         <DataView id="exasol-databasesize-monthly" icon="usage" label="Database size monthly" viewer="chart">
            <Command idref="exasol.getDBSizeMonthly"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="RAW uncompressed MAX [GiB]"/>
            <Input name="chart.serie.0.visible" value="false"/>

            <Input name="chart.serie.1.name" value="RAW uncompressed AVG [GiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="MEM compressed MAX [GiB]"/>
            <Input name="chart.serie.2.visible" value="false"/>

            <Input name="chart.serie.3.name" value="MEM compressed AVG [GiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Auxiliary/Indices MAX [GiB]"/>
            <Input name="chart.serie.4.visible" value="false"/>

            <Input name="chart.serie.5.name" value="Auxiliary/Indices AVG [GiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.serie.6.name" value="Statistics MAX [GiB]"/>
            <Input name="chart.serie.6.visible" value="false"/>

            <Input name="chart.serie.7.name" value="Statistics AVG [GiB]"/>
            <Input name="chart.serie.7.visible" value="true"/>

            <Input name="chart.serie.8.name" value="Recommended DB RAM MAX [GiB]"/>
            <Input name="chart.serie.8.visible" value="true"/>

            <Input name="chart.serie.9.name" value="Recommended DB RAM AVG [GiB]"/>
            <Input name="chart.serie.9.visible" value="true"/>

            <Input name="chart.serie.10.name" value="Storage MAX [GiB]"/>
            <Input name="chart.serie.10.visible" value="false"/>

            <Input name="chart.serie.11.name" value="Storage AVG [GiB]"/>
            <Input name="chart.serie.11.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Database size last 12 months"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="GiB"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Usage" layout="tilehorizontal">
         <DataView id="exasol-usage-lasthour" icon="usage" label="Usage last hour" viewer="chart">
            <Command idref="exasol.getUsageLastDay"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Users"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Queries"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Usage last hour"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Number of Queries / Users"/>
         </DataView>

         <DataView id="exasol-usage-hourly" icon="usage" label="Usage hourly" viewer="chart">
            <Command idref="exasol.getUsageHourly">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Users AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Queries AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Users MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Queries MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Idle"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Usage hourly (Last 24 hours)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Number of Queries / Users"/>
         </DataView>

         <DataView id="exasol-usage-daily" icon="usage" label="Usage daily" viewer="chart">
            <Command idref="exasol.getUsageDaily">
               <!--<ProcessDataSet action="truncatedataset" value="keeplast 5"/>-->
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Users AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Queries AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Users MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Queries MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Idle"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Usage Daily (Last 31 days)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Date"/>
            <Input name="yaxisTitle" value="Number of Queries / Users"/>
         </DataView>

         <DataView id="exasol-usage-monthly" icon="usage" label="Usage monthly" viewer="chart">
            <Command idref="exasol.getUsageMonthly">
               <!--<ProcessDataSet action="truncatedataset" value="keeplast 5"/>-->
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Users AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Queries AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Users MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Queries MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Idle"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Usage Monthly (Last 12 months)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Date"/>
            <Input name="yaxisTitle" value="Number of Queries / Users"/>
         </DataView>
      </ObjectView>

      <ObjectView type="MonitoringLastDay" layout="tilevertical 2">
         <DataView id="exasol-monitoringlastday-cpu" icon="Monitoring" label="CPU / Load" viewer="chart">
            <Command idref="exasol.getMonitorLastDay">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Load"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU in %"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.category_column" value="Measure time"/>

            <Input name="chartTitle" value="CPU/Load last hour"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value=""/>
         </DataView>

         <DataView id="exasol-monitoringlastday-tempdbram" icon="Monitoring" label="Temp DB RAM [MiB]" viewer="chart">
            <Command idref="exasol.getMonitorLastDay">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Measure time"/>

            <Input name="chartTitle" value="Temp DB RAM last hour"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-monitoringlastday-hdd-net" icon="Monitoring" label="HDD / Network / SWAP" viewer="chart">
            <Command idref="exasol.getMonitorLastDay">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Write [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Network [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Swap [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.category_column" value="Measure time"/>

            <Input name="chartTitle" value="HDD / Network / SWAP last hour"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>
      </ObjectView>

      <ObjectView type="MonitoringHourly" layout="tilevertical 2">
         <DataView id="exasol-monitoringhourly-cpu" icon="Monitoring" label="CPU / Load" viewer="chart">
            <Command idref="exasol.getMonitorHourly"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Load AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Load MAX"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU in % AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU in % MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU/Load last 24 hours"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value=""/>
         </DataView>

         <DataView id="exasol-monitoringhourly-tempdbram" icon="Monitoring" label="Temp DB RAM [MiB]" viewer="chart">
            <Command idref="exasol.getMonitorHourly">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM [MiB] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM [MiB] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM last 24 hours"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-monitoringhourly-hdd-net" icon="Monitoring" label="HDD / Network / SWAP" viewer="chart">
            <Command idref="exasol.getMonitorHourly">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read [MiB/sec] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read [MiB/sec] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Network [MiB/sec] MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Network [MiB/sec] AVG"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Swap [MiB/sec] MAX"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.serie.6.name" value="Swap [MiB/sec] AVG"/>
            <Input name="chart.serie.6.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD / Network / SWAP last 24 hours"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>
      </ObjectView>

      <ObjectView type="MonitoringDaily" layout="tilevertical 2">
         <DataView id="exasol-monitoringdaily-cpu" icon="Monitoring" label="CPU / Load" viewer="chart">
            <Command idref="exasol.getMonitorDaily"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Load AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Load MAX"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU in % AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU in % MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU/Load last 31 days"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value=""/>
         </DataView>

         <DataView id="exasol-monitoringdaily-tempdbram" icon="Monitoring" label="Temp DB RAM [MiB]" viewer="chart">
            <Command idref="exasol.getMonitorDaily">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM [MiB] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM [MiB] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM last 31 days"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-monitoringdaily-hdd-net" icon="Monitoring" label="HDD / Network / SWAP" viewer="chart">
            <Command idref="exasol.getMonitorDaily">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read [MiB/sec] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read [MiB/sec] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Network [MiB/sec] MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Network [MiB/sec] AVG"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Swap [MiB/sec] MAX"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.serie.6.name" value="Swap [MiB/sec] AVG"/>
            <Input name="chart.serie.6.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD / Network / SWAP last 31 days"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

      </ObjectView>

      <ObjectView type="MonitoringMonthly" layout="tilevertical 2">
         <DataView id="exasol-monitoringmonthly-cpu" icon="Monitoring" label="CPU / Load" viewer="chart">
            <Command idref="exasol.getMonitorMonthly"/>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Load AVG"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Load MAX"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU in % AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU in % MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU/Load last 12 months"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value=""/>
         </DataView>

         <DataView id="exasol-monitoringmonthly-tempdbram" icon="Monitoring" label="Temp DB RAM [MiB]" viewer="chart">
            <Command idref="exasol.getMonitorMonthly">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM [MiB] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM [MiB] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM last 12 months"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-monitoringmonthly-hdd-net" icon="Monitoring" label="HDD / Network / SWAP" viewer="chart">
            <Command idref="exasol.getMonitorMonthly">
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read [MiB/sec] MAX"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read [MiB/sec] AVG"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] MAX"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Write [MiB/sec] AVG"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Network [MiB/sec] MAX"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Network [MiB/sec] AVG"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Swap [MiB/sec] MAX"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.serie.6.name" value="Swap [MiB/sec] AVG"/>
            <Input name="chart.serie.6.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD / Network / SWAP last 12 months"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>
      </ObjectView>

      <ObjectView type="StatisticsHourly">
         <DataView id="exasol-statisticshourly-count" icon="Statistics" label="Count" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Count DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Count DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Count DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Count DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Count Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Count Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Statement Count (executed succesfully)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Number of Statements"/>
         </DataView>

         <DataView id="exasol-statisticshourly-duration-avg" icon="Statistics" label="Duration AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-statisticshourly-duration-max" icon="Statistics" label="Duration MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-statisticshourly-cpu-avg" icon="Statistics" label="CPU AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU AVG in %"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="CPU in %"/>
         </DataView>

         <DataView id="exasol-statisticshourly-cpu-max" icon="Statistics" label="CPU MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU MAX in %"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="CPU in %"/>
         </DataView>

         <DataView id="exasol-statisticshourly-temp-avg" icon="Statistics" label="Temp DB RAM Peak AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak AVG DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak AVG DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak AVG DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak AVG DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak AVG Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak AVG Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-statisticshourly-temp-max" icon="Statistics" label="Temp DB RAM Peak MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak MAX DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak MAX DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak MAX DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak MAX DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak MAX Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak MAX Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-statisticshourly-hdd-read-avg" icon="Statistics" label="HDD Read AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticshourly-hdd-read-max" icon="Statistics" label="HDD Read MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticshourly-hdd-write-avg" icon="Statistics" label="HDD Write AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>


            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticshourly-hdd-write-max" icon="Statistics" label="HDD Write MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticshourly-net-avg" icon="Statistics" label="Network AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticshourly-net-max" icon="Statistics" label="Network MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_HOURLY"/>
               <Input name="filter" value="INTERVAL_START >= add_hours(current_date,-25) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>
      </ObjectView>

      <ObjectView type="StatisticsDaily">
         <DataView id="exasol-statisticsdaily-count" icon="Statistics" label="Count" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Count DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Count DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Count DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Count DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Count Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Count Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Statement Count (executed succesfully)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Number of Statements"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-duration-avg" icon="Statistics" label="Duration AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-duration-max" icon="Statistics" label="Duration MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-cpu-avg" icon="Statistics" label="CPU AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU AVG in %"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="CPU in %"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-cpu-max" icon="Statistics" label="CPU MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU MAX in %"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="CPU in %"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-temp-avg" icon="Statistics" label="Temp DB RAM Peak AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak AVG DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak AVG DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak AVG DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak AVG DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak AVG Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak AVG Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-temp-max" icon="Statistics" label="Temp DB RAM Peak MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak MAX DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak MAX DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak MAX DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak MAX DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak MAX Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak MAX Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-hdd-read-avg" icon="Statistics" label="HDD Read AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-hdd-read-max" icon="Statistics" label="HDD Read MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-hdd-write-avg" icon="Statistics" label="HDD Write AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-hdd-write-max" icon="Statistics" label="HDD Write MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-net-avg" icon="Statistics" label="Network AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-statisticsdaily-net-max" icon="Statistics" label="Network MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_DAILY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_days(current_date,-31) and INTERVAL_START &lt; CURRENT_DATE and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>
      </ObjectView>

      <ObjectView type="StatisticsMonthly">
         <DataView id="exasol-sqls-hourly-count" icon="Statistics" label="Count" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Count DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Count DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Count DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Count DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Count Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Count Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Statement Count (executed succesfully)"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Number of Statements"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-duration-avg" icon="Statistics" label="Duration AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-duration-max" icon="Statistics" label="Duration MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Duration MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Duration MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Duration MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Duration MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Duration MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Duration MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Duration MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="Seconds"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-cpu-avg" icon="Statistics" label="CPU AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU AVG DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU AVG DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU AVG DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU AVG DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU AVG Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU AVG Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU AVG in %"/>
            <Input name="chartTopBackground" value="#45494a"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-cpu-max" icon="Statistics" label="CPU MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="CPU MAX DQL"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="CPU MAX DML"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="CPU MAX DCL"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="CPU MAX DDL"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="CPU MAX Transaction"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="CPU MAX Other"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="CPU MAX in %"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="CPU in %"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-temp-avg" icon="Statistics" label="Temp DB RAM Peak AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak AVG DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak AVG DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak AVG DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak AVG DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak AVG Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak AVG Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-temp-max" icon="Statistics" label="Temp DB RAM Peak MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Temp DB RAM Peak MAX DQL [MiB]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Temp DB RAM Peak MAX DML [MiB]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Temp DB RAM Peak MAX DCL [MiB]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Temp DB RAM Peak MAX DDL [MiB]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Temp DB RAM Peak MAX Transaction [MiB]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Temp DB RAM Peak MAX Other [MiB]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Temp DB RAM Peak MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-hdd-read-avg" icon="Statistics" label="HDD Read AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-hdd-read-max" icon="Statistics" label="HDD Read MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Read MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="HDD Read MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="HDD Read MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="HDD Read MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="HDD Read MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="HDD Read MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Read MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-hdd-write-avg" icon="Statistics" label="HDD Write AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-hdd-write-max" icon="Statistics" label="HDD Write MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true"/>
            </Command>

            <Input name="displayModem" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="HDD Write MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="HDD Write MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-net-avg" icon="Statistics" label="Network AVG" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net AVG DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net AVG DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net AVG DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net AVG DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net AVG Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net AVG Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network AVG"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

         <DataView id="exasol-sqls-hourly-net-max" icon="Statistics" label="Network MAX" viewer="chart">
            <Command idref="exasol.getSqlStats">
               <Input name="sql_stats_table" value="EXA_STATISTICS.EXA_SQL_MONTHLY"/>
               <Input name="filter" value="trunc(INTERVAL_START) >= add_months(current_date,-13) and SUCCESS = true and EXECUTION_MODE = 'EXECUTE'"/>
            </Command>

            <Input name="displayMode" value="chart"/>
            <Input name="toolbarVisible" value="true"/>

            <Input name="chart.serie.0.name" value="Net MAX DQL [MiB/sec]"/>
            <Input name="chart.serie.0.visible" value="true"/>

            <Input name="chart.serie.1.name" value="Net MAX DML [MiB/sec]"/>
            <Input name="chart.serie.1.visible" value="true"/>

            <Input name="chart.serie.2.name" value="Net MAX DCL [MiB/sec]"/>
            <Input name="chart.serie.2.visible" value="true"/>

            <Input name="chart.serie.3.name" value="Net MAX DDL [MiB/sec]"/>
            <Input name="chart.serie.3.visible" value="true"/>

            <Input name="chart.serie.4.name" value="Net MAX Transaction [MiB/sec]"/>
            <Input name="chart.serie.4.visible" value="true"/>

            <Input name="chart.serie.5.name" value="Net MAX Other [MiB/sec]"/>
            <Input name="chart.serie.5.visible" value="true"/>

            <Input name="chart.category_column" value="Time"/>

            <Input name="chartTitle" value="Network MAX"/>
            <Input name="xaxisHandleTimeAsText" value="false"/>
            <Input name="xaxisTitle" value="Time"/>
            <Input name="yaxisTitle" value="MiB/sec"/>
         </DataView>

      </ObjectView>

   </ObjectsViewDef>

</DatabaseProfile>