{"id":21851,"date":"2023-01-28T12:49:03","date_gmt":"2023-01-28T11:49:03","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=21851"},"modified":"2025-10-24T09:38:32","modified_gmt":"2025-10-24T07:38:32","slug":"a-quick-repository-creation-utility-part-iii","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/","title":{"rendered":"A quick repository creation utility (part III)"},"content":{"rendered":"\n<p>This is part III of the article, see Part I <a href=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-i\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> and Part II <a href=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-ii\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating the seed docbase<\/h3>\n\n\n\n<p>See <a href=\"https:\/\/github.com\/dbiservices\" target=\"_blank\" rel=\"noreferrer noopener\">dbi services<\/a> for its source. Hereafter, only some salient steps are presented, refer to the script for the details.<\/p>\n\n\n\n<p>As its name implies, the script <code>create_docbase.sh<\/code> is used to create a docbase optionally to be used later as a seed. Its usage is:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\n$ .\/create_docbase.sh &#x5B;stem]\n<\/pre><\/div>\n\n\n<p>where the optional <em><code>stem<\/code><\/em> in <code>global_parameters<\/code> defaults to DCTM0 and points to the docbase&#8217;s required settings. It is executed as the installation owner, usually <code>dmadmin<\/code>.<\/p>\n\n\n\n<p>After the <code>global_parameters<\/code> file is sourced with the given stem, the installation directory is created and all the needed software packages (the JDK, the Oracle Instant Client and SQL*Plus if the Oracle RDBMS is chosen, the PostgreSQL source tarball <code>global_parameters.${postgresql_package}<\/code> otherwise) are downloaded into the directory <code>global_parameters.${dctm_software}<\/code>, only if they are not there yet. After their downloading, the packages are expanded and the software installed and configured as advised in the OpenText documentation. For example, the anonymous algorithm for secure communication with the content server is reinstated in the JDK from its default disabled state.<\/p>\n\n\n\n<p>If the selected RDBMS is PostgreSQL, its installation is completely customized. In effect, the platform\u2019s standard PostgreSQL package is normally installed system-wide by root with pieces scattered in several locations, e.g. <code>\/var\/lib<\/code> and <code>\/usr\/lib<\/code>. As we want to embed this RDBMS with the repository and under the <code>dmadmin<\/code> ownership, this is not convenient; we want all the pieces in one directory tree root. In order to make this possible, we need to compile the source code specifying the installation directory <code>${ACTIVE_DOCBASE_ROOT}\/postgresql<\/code>. The binary and data files will all be installed under this directory, which will later be included in the compressed tar ball when the script completes executing. As the compilation takes several minutes and even though it only needs to be done once, a pre-compiled tarball <code>global_parameters.${postgresql_custom_package}<\/code> is available so this step can be skipped, unless <code>global_parameters.${postgresql_compile}<\/code> is set to &#8220;<code>yes<\/code>&#8220;.<\/p>\n\n\n\n<p>After the PostgreSQL binaries have been extracted or compiled, the ODBC connectivity is configured. Surprisingly, Documentum\u2019s configuration program imperatively needs a connect string named <code>postgres<\/code> and defined in <code>\/etc\/odbc.ini<\/code> as if it were hard-coded. Apparently, it reads this file explicitly instead of relying on the ODBC API which looks for any specified connect string first in <code>~\/.odbc.ini<\/code> and lastly in <code>\/etc\/odbc.ini<\/code>. Also, it requires the running PostgresSQL server to be listening on the default port 5432 instead of any port defined in the ini file. Strangely enough, and this is visible when using the configuration program interactively, <code>~\/.odbc.ini<\/code> is correctly used and validated but only until the program effectively starts creating the docbase, where it switches to <code>\/etc\/odbc.ini<\/code> and the weird behavior. The documentation mentions changes to be done in <code>ODBC.INI<\/code> but does not say where it is (it\u2019s in <code>\/etc<\/code> but <code>~\/.odbc.ini<\/code> should be used preferably). Also, it incorrectly says that the connect string should be <code>[MyPostgres]<\/code> whereas it should be anything, although only <code>[postgres]<\/code> works at this stage. All this suggests that the ODBC part is not well mastered by developpers of the installation program, or that it was ported without much attention from some other O\/S. Fortunately, these idiosyncrasies are abandoned after the docbase is created and all the parameters set in the installer owner\u2019s <code>~\/.odbc.ini<\/code> are honored, e.g. custom connect string and database server port.<\/p>\n\n\n\n<p>Here is how <code>\/etc\/odbc.ini<\/code> must look for the docbase creation to start:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; highlight: [1,8]; title: ; notranslate\" title=\"\">\n&#x5B;postgres]\nDescription = PostgreSQL connection to postgres\nDriver = PostgreSQL Unicode\nDatabase = postgres\nServername = ${db_server_host_alias}\nUserName = ${dctm_owner}\n# hard-coded in the server configuration tool;\nPort = 5432\n<\/pre><\/div>\n\n\n<p>and here is the final <code>~\/.odbc.ini<\/code> file defined after the docbase creation, including some of the recommended database settings:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; highlight: [1,7]; title: ; notranslate\" title=\"\">\n&#x5B;${db_connect_string}]\nDescription = PostgreSQL connection to ${ACTIVE_DOCBASE}\nDriver = PostgreSQL Unicode\nDatabase = ${ACTIVE_DOCBASE}\nServername = ${db_server_host_alias}\nUserName = ${dctm_owner}\nPort = ${ACTIVE_DB_SERVER_PORT}\nProtocol = $(echo ${postgresql_custom_package} | sed -E &#039;s\/.+-(&#x5B;0-9]+).*$\/\\1\/&#039;)\nReadOnly = No\nRowVersioning = No\nShowSystemTables = No\nShowOidColumn = No\nFakeOidIndex = No\nUpdateableCursors = Yes\n<\/pre><\/div>\n\n\n<p>The shell variables get expanded when the file is saved.<\/p>\n\n\n\n<p>Another requirement with the postgreSQL RDBMS is that the installer demands a directory named <code>db_${ACTIVE_DOCBASE}_dat.dat<\/code> for the datafile to be created beforehand; if not found, the installer fails.<\/p>\n\n\n\n<p>When using the Oracle RDBMS, a <code>global_parameters.${dctm_root}\/docbase\/oracle\/instantclient_21_7\/network\/admin\/tnsnames.ora<\/code> file gets created with the following content:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; highlight: [3,8]; title: ; notranslate\" title=\"\">\n${db_connect_string} =\n   (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)\n                             (HOST = ${db_server_host_alias})(PORT = ${db_listener_port}\n                             )\n                  )\n                  (CONNECT_DATA =\n                     (SERVER = DEDICATED)\n                     (SERVICE_NAME = ${db_service_name})\n                  )\n   )\n<\/pre><\/div>\n\n\n<p>Next, the data and index tablespaces are created and finally the schema account with the required grants. Here is a summary of the database requirements for Oracle:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; gutter: false; highlight: [1,10,19,26]; title: ; notranslate\" title=\"\">\nselect TABLESPACE_NAME, ALLOCATION_TYPE from dba_tablespaces order by 1;\nTABLESPACE_NAME          ALLOCATION_TYPE\n------------------------------ ---------------------------\nDCTM1_DATA            SYSTEM\nDCTM1_INDEX           SYSTEM\n...\nSEED_DATA             SYSTEM\nSEED_INDEX            SYSTEM\n\nSQL&gt; select privilege from dba_sys_privs where grantee = upper(&#039;dctm1&#039;);\nGRANTEE                        PRIVILEGE                      ADMIN_OPT COMMON\n------------------------------ ------------------------------ --------- ---------\nDCTM1                          CREATE VIEW                    NO        NO\nDCTM1                          CREATE ANY VIEW                NO        NO\nDCTM1                          CREATE SEQUENCE                NO        NO\nDCTM1                          CREATE PROCEDURE               NO        NO\nDCTM1                          CREATE TABLE                   NO        NO\n\nSQL&gt; select * from dba_role_privs where grantee = upper(&#039;dctm1&#039;);\nGRANTEE                        GRANTED_ROLE                   ADMIN_OPT DEFAULT_R COMMON\n------------------------------ ------------------------------ --------- --------- ---------\nDCTM1                          CONNECT                        NO        YES       NO\nDCTM1                          RESOURCE                       NO        YES       NO\nDCTM1                          SELECT_CATALOG_ROLE            NO        YES       NO\n\nSQL&gt; select TABLESPACE_NAME, STATUS, ALLOCATION_TYPE, SEGMENT_SPACE_MANAGEMENT from user_tablespaces;\nTABLESPACE_NAME                STATUS                      ALLOCATION_TYPE             SEGMENT_SPACE_MANA\n------------------------------ --------------------------- --------------------------- ------------------\nDCTM1_DATA                     ONLINE                      SYSTEM                      AUTO\nDCTM1_INDEX                    ONLINE                      SYSTEM                      AUTO\n<\/pre><\/div>\n\n\n<p>After the database steps have been completed, the documentum\u2019s installer program <code>serverSetup.bin<\/code> is launched with the following generated on-the-fly response file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\nINSTALLER_UI=silent\nKEEP_TEMP_FILE=true\ncommon.installOwner.password=dmadmin\nSERVER.SECURE.ROOT_PASSWORD=root\n\n# documentum binaries;\nSERVER.DOCUMENTUM=${ACTIVE_ROOT}\/documentum\nAPPSERVER.SERVER_HTTP_PORT=${ACTIVE_SERVER_HTTP_PORT}\nAPPSERVER.SECURE.PASSWORD=tomcat\n\n# java;\nPATH_TO_JAVA=$(ls -d ${ACTIVE_ROOT}\/java\/amazon-corretto-11*-linux-x64)\n<\/pre><\/div>\n\n\n<p>This step takes several minutes to complete but it does not matter; as said previously, the real optimization occurs in the instantiation step, not in the installation of the binaries or the creation of the model docbase; those steps are done only once (unless it is done outside the context of this project).<\/p>\n\n\n\n<p>Method servers are dedicated to each docbase and receive a distinct base port number defined as <code>global_properties.${<em>stem<\/em>_SERVER_HTTP_PORT}<\/code>. Later during the instantiation, their memory sizing will be configured as set in <code>global_properties.${<em>stem<\/em>_SERVER_HTTP_MEMORY}<\/code>.<\/p>\n\n\n\n<p>It has been noticed that the method server creates several cache directories (e.g. <code>felix-cache<\/code> and <code>activemq-data<\/code>) in the directory it is started from; to move them out of the way and prevent cluttering, the command <code>cd ${DM_JMS_HOME}\/temp<\/code> is later inserted in <code>startMethodServer.sh<\/code> before tomcat\u2019s <code>startup.sh<\/code> script is invoked.<\/p>\n\n\n\n<p>After the binaries have been installed, a connectivity check using documentum\u2019s <code>dmdbtest<\/code> is performed to confirm that the database is reachable via SQL*Net for Oracle or via ODBC for PostgreSQL. This test differs from the ones previously done directly at the database level in that it is performed by documentum. Its output resembles the following one:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; highlight: [2,4]; title: ; notranslate\" title=\"\">\nif &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then\n   ${DOCUMENTUM}\/product\/*\/bin\/dmdbtest -Dxx -S${db_connect_string} -U${ACTIVE_DOCBASE} -P${ACTIVE_DOCBASE}\nelse\n   ${DOCUMENTUM}\/product\/*\/bin\/dmdbtest -Dpostgres -Spostgres -U${dctm_owner} -Pxxx\nfi\nDatabase successfully opened.\nTest table successfully created.\nTest view successfully created.\nTest index successfully created.\nInsert into table successfully done.\nIndex successfully dropped.\nView successfully dropped.\nDatabase case sensitivity test successfully past.\nTable successfully dropped.\n<\/pre><\/div>\n\n\n<p>Note that the above test needs an extra step when using Oracle RDBMS because although the <code>sqlplus<\/code> executable is installed in Instant Client\u2019s <code>${ORACLE_HOME}<\/code> and <code>${ORACLE_HOME}<\/code> is in the <code>${PATH}<\/code>, the installer expects it in the non-existing <code>${ORACLE_HOME}\/bin<\/code>. So, that directory must be created beforehand and <code>sqlplus<\/code> symlinked there. Evidently, <code>sqlplus<\/code>\u2019 expected location is hard-coded and the <code>${ORACLE_HOME}<\/code> environment variable is either not passed to the java programs invoked by the installer script, or ignored when looking for it. This quirk can be half-forgiven as it is a documented requirement.<\/p>\n\n\n\n<p>Since several docbases can potentially be instantiated and run on the same machine, an environment file named <em>docbase_name<\/em>.env for each of them is prepared to allow switching easily between them. This file notably defines the <code>${DOCUMENTUM<\/code>} and <code>${PATH}<\/code> variables, invokes documentum\u2019s own <code>dm_set_server_env.sh<\/code>, and should be sourced prior to working with a given docbase. To simplify this, the bash function <code>swr()<\/code> (which stands for <strong>SW<\/strong>itch <strong>R<\/strong>epository) has been defined in the installation owner\u2019s <code>~\/.profile<\/code>. Other useful management functions such as <code>sur()<\/code>and <code>sdr()<\/code>, have also been defined in <code><em>docbase_name<\/em>.env<\/code>, see down below.<\/p>\n\n\n\n<p>Next, another response file is prepared to install the docbroker. docbrokers too are dedicated to each docbase and defined in the <code>global_properties<\/code> file with parameters <code><em>stem<\/em>_DOCBROKER_NAME<\/code> and <code><em>stem<\/em>_DOCBROKER_PORT<\/code>. Make sure there is no port conflict when creating\/instantiating new docbases. Here is an example of this response file:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\nKEEP_TEMP_FILE=true\nPATH_TO_JAVA=$(ls -d ${ACTIVE_ROOT}\/java\/amazon-corretto-11*-linux-x64)\nINSTALLER_UI=silent\ncommon.aek.algorithm=AES_128_CBC\n\n# docbroker;\nSERVER.CONFIGURATOR.BROKER=TRUE\nSERVER.DOCBROKER_ACTION=CREATE\nSERVER.DOCBROKER_PORT=${ACTIVE_DOCBROKER_PORT}\nSERVER.DOCBROKER_NAME=${ACTIVE_DOCBROKER_NAME}\nSERVER.PROJECTED_DOCBROKER_HOST=$(hostname)\nSERVER.PROJECTED_DOCBROKER_PORT=${ACTIVE_DOCBROKER_PORT}\nSERVER.DOCBROKER_CONNECT_MODE=native\nSERVER.USE_CERTIFICATES=false\n<\/pre><\/div>\n\n\n<p>Make sure the docbroker name does not contains any non alphanumeric characters as the installer is quite restrictive in this regard. For example, the name <code>docbroker_01<\/code> is rejected because it contains an underscore.<\/p>\n\n\n\n<p>Documentum\u2019s <code>dm_launch_server_config_program.sh<\/code> is then invoked with that response file and the docbroker gets created and started along with the method server.<\/p>\n\n\n\n<p>Next, another response file is prepared for the repository. Its most complicated part is the conditional definitions for Oracle and PostgreSQL:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\n$ cat - &lt;&lt;eot &gt; ${ACTIVE_DOCBASE}.properties\nINSTALLER_UI=silent\nKEEP_TEMP_FILE=true\n...\n############################### database stuff #######################################\nSERVER.USE_EXISTING_DATABASE_ACCOUNT=$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then echo &quot;true&quot;; else echo &quot;false&quot;; fi)\n$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;postgres&quot; ]]; then echo &quot;SERVER.DATABASE_NAME=${ACTIVE_DOCBASE}&quot;; fi)\nSERVER.INDEXSPACE_NAME=$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then echo &quot;${ACTIVE_DOCBASE}_INDEX&quot;; else echo &quot;db_${ACTIVE_DOCBASE}_log&quot;; fi)\n# postgres is hard-coded in the server configuration script;\nSERVER.DATABASE_CONNECTION=$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then echo &quot;${db_connect_string}&quot;; else echo &quot;postgres&quot;; fi)\nSERVER.DOCBASE_OWNER_NAME=${ACTIVE_DOCBASE}\nSERVER.SECURE.DOCBASE_OWNER_PASSWORD=${ACTIVE_DOCBASE}\nSERVER.DATABASE_ADMIN_NAME=$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then echo &quot;${ACTIVE_DOCBASE}&quot;; else echo &quot;${dctm_owner}&quot;; fi)\nSERVER.SECURE.DATABASE_ADMIN_PASSWORD=$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;oracle&quot; ]]; then echo &quot;${ACTIVE_DOCBASE}&quot;; else echo &quot;${dctm_password}&quot;; fi)\n$(if &#x5B;&#x5B; &quot;${ACTIVE_RDBMS}&quot; == &quot;postgres&quot; ]]; then echo &quot;SERVER.POSTGRES_USE_DEFAULT_SPACE=false&quot;; fi)\n...\n<\/pre><\/div>\n\n\n<p>Refer to the code on <a href=\"https:\/\/github.com\/dbiservices\" target=\"_blank\" rel=\"noreferrer noopener\">dbi services<\/a>&#8216;s git for the complete settings. Detailed explanations about the content server&#8217;s response file parameters can also be found here <a href=\"https:\/\/www.dbi-services.com\/blog\/documentum-silent-install-docbasesrepositories\/\" target=\"_blank\" rel=\"noreferrer noopener\">Documentum \u2013 Silent Install \u2013 Docbases\/Repositories<\/a>. There are articles on our blog site about the response files for other Documentum components too, so it may be worth giving them a look. Links to all of them can be found <a href=\"https:\/\/www.dbi-services.com\/blog\/documentum-silent-install-xplore-indexagent\/\" target=\"_blank\" rel=\"noreferrer noopener\">here.<\/a><\/p>\n\n\n\n<p>After the configuration program is invoked with the above response file and completes, the documentum processes are shut down and, if using Oracle, the resulting seed&#8217;s database schema will be extracted using the traditional <code>exp<\/code> utility. Although the <code>exp<\/code> and <code>imp<\/code> utilities have been superseded by the data pump for a while now, they do their job well enough for repositories&#8217; schemas. Of course, the more modern data pump can also be used instead under certain conditions, but it may need some preliminary work on the database&#8217;s side to accommodate it. The same applies if using the Instant Client&#8217;s <code>exp<\/code> and <code>imp<\/code> utilities when these tools&#8217; version differs from the database&#8217;s. For example, one of our test database is a v12.1.0.1.0 one but there are no downloadable <code>exp<\/code> and <code>imp<\/code> tools with that version for the Instant Client as they started being included only in v12.2.0.x (cf. <a href=\"https:\/\/download.oracle.com\/otn\/linux\/instantclient\/122010\/instantclient-basic-linux.x64-12.2.0.1.0.zip\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/download.oracle.com\/otn\/linux\/instantclient\/122010\/instantclient-basic-linux.x64-12.2.0.1.0.zip<\/a> and <a href=\"https:\/\/download.oracle.com\/otn\/linux\/instantclient\/122010\/instantclient-tools-linux.x64-12.2.0.1.0.zip\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/download.oracle.com\/otn\/linux\/instantclient\/122010\/instantclient-tools-linux.x64-12.2.0.1.0.zip<\/a>). And since those versions differ from the database&#8217;s, a PL\/SQL package must be executed so they can be used. All this is quite complicated and to simplify the data extraction and import tasks, we will use the <code>exp<\/code> and <code>imp<\/code> utilities bundled with the RDBMS; those will always work as-is so no additional download nor configuration are necessary. However, those tools need to be invoked from within a remote session, hence the settings <code>global_parameters.${db_server_host_*}<\/code>, unless those steps are delegated to the DBAs. As already discussed, Oracle RDBMS is a proprietary, closed-source and quite complex software. Starting with the licensing, it requires some careful planning. Sometimes, databases are even shared between several applications. Therefore, it is mostly managed by specialized people in an organization and installed in dedicated machines. For those reasons, the Oracle part takes up a large chunk of the procedure dedicated to the RDBMS and, for faster and more agile configuration, the leaner but sufficient PostgreSQL RDBMS is preferred. As precedently written, the postgreSQL source is compiled so it can be embedded with the docbase that uses it and the whole binaries and database get copied into the tar ball, which is a considerable simplification at a measly cost of 276 Mb.<\/p>\n\n\n\n<p>After the compressed tar ball is produced, it is renamed to <code>${ACTIVE_DOCBASE}_${ACTIVE_RDBMS}.tgz<\/code> and moved to the <code>${scripts_dir}<\/code> if one with the same name does not exist there yet (otherwise, the move is not performed), ready to be instantiated as needed.<\/p>\n\n\n\n<p>A useful by-product of this project, although it won&#8217;t benefit from the optimized provision time, the generic script <code>create_docbase.sh<\/code> creates any docbase whose parameters are set in <code>global_parameters<\/code>. Once created, this docbase can be used stand-alone, or taken a snapshot of and used as a seed for future instantiations, or both. It can even be uncompressed in several places on the same machine or on different machines as distinct clones, provided resource conflicts are resolved and the usual well-known adjustments post-cloning are applied. The script can create several docbases to be used as models for different purposes after further customizations; edit the script as required.<\/p>\n\n\n\n<p>It is possible to specify as many docbases to be created (or instantiated, see later) in <code>global_parameters.${dctm_machine}<\/code> as needed by specifying their stems on the command-line. So, if several docbases need be created, define them all in global_parameters and invoke the creation script as follows:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; title: ; notranslate\" title=\"\">\n# Example:\n$ for i in {1..10}; do\n   .\/create_docbase.sh &quot;DCTM${i}&quot;\ndone\nwhere DCTM1_* to DCTM10_* are the respective docbases&#039;s stem &quot;pointing&quot; to the settings defined in the global_properties file.\n\n# Another example with unrelated stems:\n.\/create_docbase.sh bookstore\n.\/create_docbase.sh product_catalog\n.\/create_docbase.sh research_papers\n<\/pre><\/div>\n\n\n<p>Concurrent docbase creation would be another useful by-product of the project and should be possible because each created docbase is normally stand-alone (i.e. no dependency on other services such as the docbroker or the method server) and has a distinct <code>${DOCUMENTUM}<\/code> directory under <code>global_parameters.${dctm_root}\/<em>docbase_name<\/em><\/code>. Unfortunately, Documentum&#8217;s installer program does not permit more than one running instance of itself:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; gutter: false; highlight: [1,8]; title: ; notranslate\" title=\"\">\nInstalling the CS binaries documentum_server_22.4_linux64_oracle.tar ...\nPreparing to install\nExtracting the installation resources from the installer archive...\nConfiguring the installer for this system&#039;s environment...\n\nLaunching installer...\n\nMultiple launches of this installer is not allowed. It will now quit.\n\n<\/pre><\/div>\n\n\n<p>The configuration program <code>dm_launch_server_config_program.sh<\/code>, however, does not have this limitation, probably because it is enough for it to run in its own <code>${DOCUMENTUM}<\/code>.<\/p>\n\n\n\n<p>Granted, when using PostgreSQL , since the docbase creation demands a server listening on port 5432, there may be a short period of time when a server gets commonly used by several instances of <code>dm_launch_server_config_program.sh<\/code>. Also, multiple database server instances get started on port 5432, but with only the first one succeeding. Still, this should not be an issue since the databases and their locations are distinct. This glitch does not happen at instantiation time as the PostgreSQL server is always started from the beginning with a custom port.<\/p>\n\n\n\n<p>The additional cost is 2 Gb of disk space since the documentum binaries are not shared between the repositories (i.e. each repository has its own <code>${DOCUMENTUM}<\/code> and its own copy of the binaries), but disk space is so cheap these days that this is not prohibitive. When using Oracle, the above concurrency behavior does not apply.<\/p>\n\n\n\n<p>As mentioned before, <code>create_docbase.sh<\/code> sets up a sourceable script to define a working docbase\u2019s environment and several useful functions, <code>global_properties.${dctm_root}\/<em>docbase<\/em>\/<em>docbase<\/em>.env<\/code>. In particular, it defines:<\/p>\n\n\n\n<p><code>${ACTIVE_DOCBASE}, ${ACTIVE_ROOT}<\/code>, <code>${JAVA_HOME}<\/code>, <code>${DOCUMENTUM}<\/code> and <code>${PATH}<\/code>, and sources documentum\u2019s own <code>dm_set_server_env.sh<\/code>. <code>${ACTIVE_DOCBASE}<\/code> is the name of the current repository and <code>${ACTIVE_ROOT}<\/code> the root directory that contains that docbase\u2019s <code>${JAVA_HOME}<\/code>, <code>${DOCUMENTUM}<\/code> and the postgres root directory if that RDBMS is used. <code>${ACTIVE_ROOT}<\/code> is also equal to <code>global_properties.${dctm_root}\/<em>docbase<\/em><\/code>.<\/p>\n\n\n\n<p>In addition to those environment variables, several management functions are defined too; see the paragraph Management Commands in <a href=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-V\" target=\"_blank\" rel=\"noreferrer noopener\">Part V<\/a>.<\/p>\n\n\n\n<p>For more comfort, the environment file also changes the shell\u2019s prompt to something nicer, e.g.:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; gutter: false; title: ; notranslate\" title=\"\">\ndmadmin@cs2:&#x5B;\/u01\/dctm\/repo03]&#x5B;repo03] $\n<\/pre><\/div>\n\n\n<p>The prompt shows the currently logged user and the machine it is logged on, the current working directory, and the current active docbase, which is useful to prevent manipulating the wrong docbase when several of them coexist in the machine.<\/p>\n\n\n\n<p>See Part IV <a href=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iv\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to create a documentum repository in under a minute.<br \/>\nCreating the seed docbase.<\/p>\n","protected":false},"author":40,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[525],"tags":[129,96,77],"type_dbi":[],"class_list":["post-21851","post","type-post","status-publish","format-standard","hentry","category-enterprise-content-management","tag-documentum","tag-oracle","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>A quick repository creation utility (part III) - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A quick repository creation utility (part III)\" \/>\n<meta property=\"og:description\" content=\"How to create a documentum repository in under a minute. Creating the seed docbase.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-28T11:49:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-24T07:38:32+00:00\" \/>\n<meta name=\"author\" content=\"Middleware Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Middleware Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\"},\"author\":{\"name\":\"Middleware Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"headline\":\"A quick repository creation utility (part III)\",\"datePublished\":\"2023-01-28T11:49:03+00:00\",\"dateModified\":\"2025-10-24T07:38:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\"},\"wordCount\":2126,\"commentCount\":0,\"keywords\":[\"Documentum\",\"Oracle\",\"PostgreSQL\"],\"articleSection\":[\"Enterprise content management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\",\"name\":\"A quick repository creation utility (part III) - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2023-01-28T11:49:03+00:00\",\"dateModified\":\"2025-10-24T07:38:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A quick repository creation utility (part III)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1\",\"name\":\"Middleware Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g\",\"caption\":\"Middleware Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A quick repository creation utility (part III) - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/","og_locale":"en_US","og_type":"article","og_title":"A quick repository creation utility (part III)","og_description":"How to create a documentum repository in under a minute. Creating the seed docbase.","og_url":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/","og_site_name":"dbi Blog","article_published_time":"2023-01-28T11:49:03+00:00","article_modified_time":"2025-10-24T07:38:32+00:00","author":"Middleware Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Middleware Team","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/"},"author":{"name":"Middleware Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"headline":"A quick repository creation utility (part III)","datePublished":"2023-01-28T11:49:03+00:00","dateModified":"2025-10-24T07:38:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/"},"wordCount":2126,"commentCount":0,"keywords":["Documentum","Oracle","PostgreSQL"],"articleSection":["Enterprise content management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/","url":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/","name":"A quick repository creation utility (part III) - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2023-01-28T11:49:03+00:00","dateModified":"2025-10-24T07:38:32+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/a-quick-repository-creation-utility-part-iii\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"A quick repository creation utility (part III)"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d8563acfc6e604cce6507f45bac0ea1","name":"Middleware Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ddcae7ba0f9d1a0e7ae707f0e689e4a9c95bb48ec49c8e6d9cc86d43f4121cb6?s=96&d=mm&r=g","caption":"Middleware Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/middleware-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=21851"}],"version-history":[{"count":21,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21851\/revisions"}],"predecessor-version":[{"id":22211,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21851\/revisions\/22211"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=21851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=21851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=21851"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=21851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}