<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Running Database Designer programmatically</title>
    <link>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/</link>
    <description>Recent content in Running Database Designer programmatically on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Database Designer function categories</title>
      <link>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/db-designer-function-categories/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/db-designer-function-categories/</guid>
      <description>
        
        
        &lt;p&gt;Database Designer functions perform the following operations, generally performed in the following order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Setup&#34;&gt;Create a design&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Configur&#34;&gt;Set design properties&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Populate&#34;&gt;Populate a design&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Create&#34;&gt;Create design and deployment scripts&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Get&#34;&gt;Get design data&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;#Clean&#34;&gt;Clean up&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
You can also use meta-function &lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-single-run/#&#34;&gt;DESIGNER_SINGLE_RUN&lt;/a&gt;, which encapsulates all of these steps with a single call. The meta-function iterates over all queries within a specified timespan, and returns with a design ready for deployment.
&lt;/div&gt;
&lt;p&gt;For detailed information, see &lt;a href=&#34;../../../../../en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/workflow-running-db-designer-programmatically/#&#34;&gt;Workflow for running Database Designer programmatically&lt;/a&gt;. For information on required privileges, see &lt;a href=&#34;../../../../../en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/privileges-running-db-designer-functions/#&#34;&gt;Privileges for running Database Designer functions&lt;/a&gt;

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

Before running Database Designer functions on an existing schema, back up the current design by calling &lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/catalog-functions/export-catalog/#&#34;&gt;EXPORT_CATALOG&lt;/a&gt;.

&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Setup&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;create-a-design&#34;&gt;Create a design&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-create-design/#&#34;&gt;DESIGNER_CREATE_DESIGN&lt;/a&gt; directs Database Designer to create a design.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Configur&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;set-design-properties&#34;&gt;Set design properties&lt;/h2&gt;
&lt;p&gt;The following functions let you specify design properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-set-design-type/#&#34;&gt;DESIGNER_SET_DESIGN_TYPE&lt;/a&gt;: Specifies whether the design is comprehensive or incremental.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-design-projection-encodings/#&#34;&gt;DESIGNER_DESIGN_PROJECTION_ENCODINGS&lt;/a&gt;: Analyzes encoding in the specified projections and creates a script that implements encoding recommendations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-set-design-ksafety/#&#34;&gt;DESIGNER_SET_DESIGN_KSAFETY&lt;/a&gt;: Sets the &lt;a class=&#34;glosslink&#34; href=&#34;../../../../../en/glossary/k-safety/&#34; title=&#34;For more information, see Designing for K-Safety.&#34;&gt;K-safety&lt;/a&gt; value for a comprehensive design.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-set-optimization-objective/#&#34;&gt;DESIGNER_SET_OPTIMIZATION_OBJECTIVE&lt;/a&gt;: Specifies whether the design optimizes for query or load performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-set-propose-unsegmented-projections/#&#34;&gt;DESIGNER_SET_PROPOSE_UNSEGMENTED_PROJECTIONS&lt;/a&gt;: Enables inclusion of unsegmented projections in the design.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Populate&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;populate-a-design&#34;&gt;Populate a design&lt;/h2&gt;
&lt;p&gt;The following functions let you add tables and queries to your Database Designer design:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-add-design-tables/#&#34;&gt;DESIGNER_ADD_DESIGN_TABLES&lt;/a&gt;: Adds the specified tables to a design.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-add-design-query/#&#34;&gt;DESIGNER_ADD_DESIGN_QUERY&lt;/a&gt;, &lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-add-design-queries/#&#34;&gt;DESIGNER_ADD_DESIGN_QUERIES&lt;/a&gt;, &lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-add-design-queries-from-results/#&#34;&gt;DESIGNER_ADD_DESIGN_QUERIES_FROM_RESULTS&lt;/a&gt;: Adds queries to the design and weights them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Create&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;create-design-and-deployment-scripts&#34;&gt;Create design and deployment scripts&lt;/h2&gt;
&lt;p&gt;The following functions populate the Database Designer workspace and create design and deployment scripts. You can also analyze statistics, deploy the design automatically, and drop the workspace after the deployment:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-run-populate-design-and-deploy/#&#34;&gt;DESIGNER_RUN_POPULATE_DESIGN_AND_DEPLOY&lt;/a&gt;: Populates the design and creates design and deployment scripts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-wait-for-design/#&#34;&gt;DESIGNER_WAIT_FOR_DESIGN&lt;/a&gt;: Waits for a currently running design to complete.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;reset-a-design&#34;&gt;Reset a design&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-reset-design/#&#34;&gt;DESIGNER_RESET_DESIGN&lt;/a&gt; discards all the run-specific information of the previous Database Designer build or deployment of the specified design but retains its configuration.&lt;/p&gt;
&lt;p&gt;&lt;a name=&#34;Get&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;get-design-data&#34;&gt;Get design data&lt;/h2&gt;
&lt;p&gt;The following functions display information about projections and scripts that the Database Designer created:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-output-all-design-projections/#&#34;&gt;DESIGNER_OUTPUT_ALL_DESIGN_PROJECTIONS&lt;/a&gt;: Sends to standard output DDL statements that define design projections.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-output-deployment-script/#&#34;&gt;DESIGNER_OUTPUT_DEPLOYMENT_SCRIPT&lt;/a&gt;: Sends to standard output a design&#39;s deployment script.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a name=&#34;Clean&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;cleanup&#34;&gt;Cleanup&lt;/h2&gt;
&lt;p&gt;The following functions cancel any running Database Designer operation or drop a Database Designer design and all its contents:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-cancel-populate-design/#&#34;&gt;DESIGNER_CANCEL_POPULATE_DESIGN&lt;/a&gt;: Cancels population or deployment operation for the specified design if it is currently running.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-drop-design/#&#34;&gt;DESIGNER_DROP_DESIGN&lt;/a&gt;: Removes the schema associated with the specified design and all its contents.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/functions/db-designer-functions/designer-drop-all-designs/#&#34;&gt;DESIGNER_DROP_ALL_DESIGNS&lt;/a&gt;: Removes all Database Designer-related schemas associated with the current user.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;


      </description>
    </item>
    
    <item>
      <title>Admin: Workflow for running Database Designer programmatically</title>
      <link>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/workflow-running-db-designer-programmatically/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/workflow-running-db-designer-programmatically/</guid>
      <description>
        
        
        &lt;p&gt;The following example shows the steps you take to create a design by running Database Designer programmatically.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
Before running Database Designer functions on an existing schema, back up the current design by calling function &lt;a href=&#34;../../../../../en/sql-reference/functions/management-functions/catalog-functions/export-catalog/#&#34;&gt;EXPORT_CATALOG&lt;/a&gt;.
&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Before you run this example, you should have the DBDUSER role, and you should have enabled that role using the SET ROLE DBDUSER command:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a table in the public schema:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE T(
   x INT,
   y INT,
   z INT,
   u INT,
   v INT,
   w INT PRIMARY KEY
   );
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add data to the table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;\! perl -e &amp;#39;for ($i=0; $i&amp;lt;100000; ++$i)   {printf(&amp;#34;%d, %d, %d, %d, %d, %d\n&amp;#34;, $i/10000, $i/100, $i/10, $i/2, $i, $i);}&amp;#39;
   | vsql -c &amp;#34;COPY T FROM STDIN DELIMITER &amp;#39;,&amp;#39; DIRECT;&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a second table in the public schema:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE T2(
   x INT,
   y INT,
   z INT,
   u INT,
   v INT,
   w INT PRIMARY KEY
   );
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the data from table &lt;code&gt;T1&lt;/code&gt; to table &lt;code&gt;T2&lt;/code&gt; and commit the changes:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; INSERT /*+DIRECT*/ INTO T2 SELECT * FROM T;
=&amp;gt; COMMIT;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a new design:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_CREATE_DESIGN(&amp;#39;my_design&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This command adds information to the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/designs/&#34;&gt;DESIGNS&lt;/a&gt; system table in the V_MONITOR schema.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add tables from the public schema to the design :&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_ADD_DESIGN_TABLES(&amp;#39;my_design&amp;#39;, &amp;#39;public.t&amp;#39;);
=&amp;gt; SELECT DESIGNER_ADD_DESIGN_TABLES(&amp;#39;my_design&amp;#39;, &amp;#39;public.t2&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;These commands add information to the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/design-tables/&#34;&gt;DESIGN_TABLES&lt;/a&gt; system table.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a file named &lt;code&gt;queries.txt&lt;/code&gt; in &lt;code&gt;/tmp/examples&lt;/code&gt;, or another directory where you have READ and WRITE privileges. Add the following two queries in that file and save it. Database Designer uses these queries to create the design:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELECT DISTINCT T2.u FROM T JOIN T2 ON T.z=T2.z-1 WHERE T2.u &amp;gt; 0;
SELECT DISTINCT w FROM T;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the queries file to the design and display the results—the numbers of accepted queries, non-design queries, and unoptimizable queries:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_ADD_DESIGN_QUERIES
     (&amp;#39;my_design&amp;#39;,
     &amp;#39;/tmp/examples/queries.txt&amp;#39;,
     &amp;#39;true&amp;#39;
     );
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The results show that both queries were accepted:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Number of accepted queries                      =2
Number of queries referencing non-design tables =0
Number of unsupported queries                   =0
Number of illegal queries                       =0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The DESIGNER_ADD_DESIGN_QUERIES function populates the &lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/design-queries/&#34;&gt;DESIGN_QUERIES&lt;/a&gt; system table.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the design type to &lt;strong&gt;comprehensive&lt;/strong&gt;. (This is the default.) A comprehensive design creates an initial or replacement design for all the design tables:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_SET_DESIGN_TYPE(&amp;#39;my_design&amp;#39;, &amp;#39;comprehensive&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the optimization objective to &lt;strong&gt;query&lt;/strong&gt;. This setting creates a design that focuses on faster query performance, which might recommend additional projections. These projections could result in a larger database storage footprint:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_SET_OPTIMIZATION_OBJECTIVE(&amp;#39;my_design&amp;#39;, &amp;#39;query&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the design and save the design and deployment scripts in &lt;code&gt;/tmp/examples&lt;/code&gt;, or another directory where you have READ and WRITE privileges. The following command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Analyzes statistics&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Doesn&#39;t deploy the design.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Doesn&#39;t drop the design after deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Stops if it encounters an error.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_RUN_POPULATE_DESIGN_AND_DEPLOY
   (&amp;#39;my_design&amp;#39;,
    &amp;#39;/tmp/examples/my_design_projections.sql&amp;#39;,
    &amp;#39;/tmp/examples/my_design_deploy.sql&amp;#39;,
    &amp;#39;True&amp;#39;,
    &amp;#39;False&amp;#39;,
    &amp;#39;False&amp;#39;,
    &amp;#39;False&amp;#39;
    );
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This command adds information to the following system tables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/deployment-projection-statements/&#34;&gt;DEPLOYMENT_PROJECTION_STATEMENTS&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/deployment-projections/&#34;&gt;DEPLOYMENT_PROJECTIONS&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/sql-reference/system-tables/v-monitor-schema/output-deployment-status/&#34;&gt;OUTPUT_DEPLOYMENT_STATUS&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Examine the status of the Database Designer run to see what projections Database Designer recommends. In the &lt;code&gt;deployment_projection_name&lt;/code&gt; column:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;rep&lt;/code&gt; indicates a replicated projection&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;super&lt;/code&gt; indicates a superprojection&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;deployment_status&lt;/code&gt; column is &lt;code&gt;pending&lt;/code&gt; because the design has not yet been deployed.&lt;/p&gt;
&lt;p&gt;For this example, Database Designer recommends four projections:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \x
Expanded display is on.
=&amp;gt; SELECT * FROM OUTPUT_DEPLOYMENT_STATUS;
-[ RECORD 1 ]--------------+-----------------------------
deployment_id              | 45035996273795970
deployment_projection_id   | 1
deployment_projection_name | T_DBD_1_rep_my_design
deployment_status          | pending
error_message              | N/A
-[ RECORD 2 ]--------------+-----------------------------
deployment_id              | 45035996273795970
deployment_projection_id   | 2
deployment_projection_name | T2_DBD_2_rep_my_design
deployment_status          | pending
error_message              | N/A
-[ RECORD 3 ]--------------+-----------------------------
deployment_id              | 45035996273795970
deployment_projection_id   | 3
deployment_projection_name | T_super
deployment_status          | pending
error_message              | N/A
-[ RECORD 4 ]--------------+-----------------------------
deployment_id              | 45035996273795970
deployment_projection_id   | 4
deployment_projection_name | T2_super
deployment_status          | pending
error_message              | N/A
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;View the script &lt;code&gt;/tmp/examples/my_design_deploy.sql&lt;/code&gt; to see how these projections are created when you run the deployment script. In this example, the script also assigns the encoding schemes RLE and COMMONDELTA_COMP to columns where appropriate.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Deploy the design from the directory where you saved it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; \i /tmp/examples/my_design_deploy.sql
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now that the design is deployed, delete the design:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT DESIGNER_DROP_DESIGN(&amp;#39;my_design&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Privileges for running Database Designer functions</title>
      <link>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/privileges-running-db-designer-functions/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/privileges-running-db-designer-functions/</guid>
      <description>
        
        
        &lt;p&gt;Non-DBADMIN users with the &lt;a href=&#34;../../../../../en/admin/db-users-and-privileges/db-roles/predefined-db-roles/dbduser/&#34;&gt;DBDUSER role&lt;/a&gt; can run Database Designer &lt;a href=&#34;../../../../../en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/db-designer-function-categories/&#34;&gt;functions&lt;/a&gt;. Two steps are required to enable users to run these functions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;A DBADMIN or superuser grants the user the DBDUSER role:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; GRANT DBDUSER TO &lt;span class=&#34;code-variable&#34;&gt;username&lt;/span&gt;;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This role persists until the DBADMIN revokes it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Before the DBDUSER can run Database Designer functions, one of the following must occur:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The user enables the DBDUSER role:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SET ROLE DBDUSER;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The superuser sets the user&#39;s default role to DBDUSER:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER USER &lt;span class=&#34;code-variable&#34;&gt;username&lt;/span&gt; DEFAULT ROLE DBDUSER;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;general-dbduser-limitations&#34;&gt;General DBDUSER limitations&lt;/h2&gt;
&lt;p&gt;As a DBDUSER, the following restrictions apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You can set a design&#39;s &lt;a href=&#34;../../../../../en/architecture/enterprise-concepts/k-safety-an-enterprise-db/&#34;&gt;K-safety&lt;/a&gt; to a value less than or equal to system K-safety. You cannot change system K-safety.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You cannot explicitly change the ancient history mark (AHM), even during design deployment.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;design-dependencies-and-privileges&#34;&gt;Design dependencies and privileges&lt;/h2&gt;
&lt;p&gt;Individual design tasks are likely to have dependencies that require specific privileges:

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



&lt;tr&gt; 

&lt;th &gt;
Task&lt;/th&gt; 

&lt;th &gt;
Required privileges&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Add tables to a design&lt;/td&gt; 

&lt;td &gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;USAGE privilege on the design table schema&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;OWNER privilege on the design table&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Add a single design query to the design&lt;/td&gt; 

&lt;td &gt;


&lt;ul&gt;
&lt;li&gt;Privilege to execute the design query&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Add a query file to the design&lt;/td&gt; 

&lt;td &gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Read privilege on the storage location that contains the query file&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Privilege to execute all the queries in the file&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Add queries from the result of a user query to the design&lt;/td&gt; 

&lt;td &gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Privilege to execute the user query&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Privilege to execute each design query retrieved from the results of the user query&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;


Create design and deployment scripts&lt;/td&gt; 

&lt;td &gt;




&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;WRITE privilege on the storage location of the design script&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;WRITE privilege on the storage location of the deployment script&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Resource pool for Database Designer users</title>
      <link>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/resource-pool-db-designer-users/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/configuring-db/creating-db-design/running-db-designer-programmatically/resource-pool-db-designer-users/</guid>
      <description>
        
        
        &lt;p&gt;When you grant a user the DBDUSER role, be sure to associate a resource pool with that user to manage resources during Database Designer runs. This allows multiple users to run Database Designer concurrently without interfering with each other or using up all cluster resources.

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

When a user runs Database Designer, execution is mostly contained in the user&#39;s resource pool. However, the database might also use other system resource pools to perform less intensive tasks.

&lt;/div&gt;&lt;/p&gt;

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