Thursday, September 25, 2014

Documentum Cloning

Documentum cloning steps

First way
*****************************************************************
Copying a Docbase.
This approach does not use Documentum’s “dump” and “load” utilities, but rather standard file and database schema copies. Paraphrasing the installation guide’s notes, and using “source” to refer to the Docbase being copied, and “target” to refer to the Docbase that will receive the copy:

• NOTE: It is recommended that you use a clean, unused Content Server as the target. You will have to change the security keys to match the source Content Server, which would impact any existing Docbases on the target.

• NOTE: The same OS must be used for both the source and the target Content Servers.

• NOTE: On the target Content Server, the OS user that will own the copied Docbase must have the same username and password as the OS user on the source Content Server.

• Stop the source Docbase.

• Note the name and ID of the Docbase you will be copying. You can look at the Docbase’s server.ini file to determine its ID: $DOCUMENTUM/dba/config/
/server.ini à look for the “docbase_id” parameter.

• Copy the file $DOCUMENTUM/dba/secure/aek.key from the source Content Server to the same location on the target Content Server.

• On the target Content Server, login as the same OS user that owns the Docbase in the source Content Server. Go through the standard process to create a new Docbase. You must use the same Docbase name and ID as the source Docbase. If you are manually creating the Docbase DB schema, it would be a good idea to use the same data and index tablespace names as used by the source Docbase DB schema, to facilitate import (later step).

• Stop the target Docbase.

• On the source Content Server, zip or tar the entire Docbase directory: $DOCUMENTUM/data//

• Export the Docbase schema from the source database.

• Connect as SYSTEM to the target database, and drop the newly-created target Docbase schema.

• Re-create an empty target schema of the same name/password:
SQL> create user 
2 identified by 
3 default tablespace 
4 temporary tablespace 
5 quota unlimited on 
6 quota unlimited on 
7 quota unlimited on ;
SQL> grant connect to 
;
SQL> grant create session to 
;
SQL> grant create sequence to 
;
SQL> grant create table to 
;
SQL> grant create view to 
;

• Import the source Docbase schema export file into your new target schema that you just re-created.

• Connect to the new target Docbase DB schema, check the following, and make updates to refer to the 
new target Docbase location rather than the original source location:

o select r_install_domain, web_server_loc from dm_server_config_s;
o select host_name from dm_mount_point_s
o select target_server from dm_job_s;
o select projection_targets in dm_server_config_r;

• Run the following SQL statement in the target DB schema so that all views get rebuilt:
update dm_type_s set views_valid=0;

• Update the directory path information in Docbase DB schema

Below sql statements are examples of updating drive letter from E to C. 

update DM_LOCATION_S
set FILE_SYSTEM_PATH=replace(FILE_SYSTEM_PATH, 'E:\', 'C:\')
where FILE_SYSTEM_PATH like '%E:\%'


update DM_MOUNT_POINT_S
set FILE_SYSTEM_PATH=replace(FILE_SYSTEM_PATH, 'E:\', 'C:\')
where FILE_SYSTEM_PATH like '%E:\%'


• Copy the zip or tar of the source Docbase filesystem over to the target Content Server, and unzip or untar it into the corresponding target folder $DOCUMENTUM/data//.

• Edit the target server.ini file ($DOCUMENTUM/dba/config//server.ini), and ensure that the preserve_existing_types key in the SERVER_STARTUP section is set to TRUE:

preserve_existing_types=T
• Save server.ini
• Start the target Docbase

**********************************************************************
Same steps in other language

Cloning a Documentum Server

Part I – Preparing the Target Environment
Create same users & groups on target machine
Create /etc/services entries on target identical to source (Unix only)
Install Oracle with different sid 
Create Oracle user same as source 
Create tablespaces, etc. for docbase owner same as source
Verify server.ini settings if tablespace names change
Transfer .profile for dmadmin and docbase owner from source and modify Oracle sid and home settings. (Unix only)
Install Documentum Server on target – same version and patch level as source
Create a local Docbroker on target
Create target Docbase with same properties as source
Docbase name
Docbase ID
Docbase owner
During installation, modify the server.ini to reflect changes in index_store tablespace and add: preserve_existing_types = T
Ensure target Docbase projects only to target Docbroker
Shutdown target Docbase
Apply appropriate server patch
Start target docbase to ensure patch applied successfully
Shutdown target Docbase
Drop all tables in target database schema (Have dba do this)
Sample script:
Connect oracleowner/password@sid
Spool drop_schema.sql
Select ‘drop table’||table_name||’;’ from user_tables;
Spool off
@drop_schema
Verify schema objects no longer exist in target database

Part II – Transfer the database and content
Run LogPurge, DM_Clean and DM_Filescan on source Docbase
Run State of Docbase on source Docbase
Inactivate all jobs on source Docbase if any are scheduled to run during cloning
Shutdown the source Docbase
Export all objects owned by database owner from source database (dba)
(exp oracleowner/password@sid owner=docbaseowner file=docbasename.exp compress=y)
Import data into target database (dba)
(imp oracleowner/password@sid file=docbasename.exp)
Through Oracle, update hostname in target database (login as docbase owner)
Update dm_mount_point_s 
set host_name = ‘newhost’;
Update dm_server_config_s
set r_host_name = ‘newhost’;
Update dm_server_config_r
Set projection_targets = ‘newhost’ where projection_targets = ‘oldhost’;
Update dm_type_s set views_valid = 0;
Update dm_job_s
Set target_server = ‘docbasename.docbasename@newhost’ 
Where target_server = ‘docbasename.docbasename@oldhost’

On source, navigate to $Documentum/data/docbasename/content_store_01. Issue a ls –R | wc –l to get file count. (Unix method, do something similar on Windows)
Tar and transfer everything in $Documentum/data/docbasename/content_store_01. This will include all content beginning with hex-docbase id folder and full text indexes in verity folder. (Unix method, do something similar on Windows)
Untar content on target server.
Navigate to $Documentum/data/docbasename/content_store_01. Issue a ls –R | wc –l to get file count and compare to file count from source. Make sure they match! (Unix method, do something similar on Windows)
Tar and/or transfer the following files/directories: (Unix method, do something similar on Windows)
$Documentum/dba/config/docbasename/checkpass.cfg
$Documentum/dba/config/docbasename/dm_check_audit_pws. chown to root and chmod to 6777.
Re-start source docbase and re-activate jobs

Part III – Activate the Clone
Startup the clone server!
Verify connectivity through iapi and idql
Edit dmcl.ini on local client or application server to point to clone host machine
Log into clone through DTC or Webtop.
**********************************************************

Please note that checkout objects will not get cloned .Make sure you execute api for unlocking the objects: unlock,c,r_object_ id

Run all the 3 jobs 1) dm_filescan 2) dm_clean and 3) dm_consistency checker and start clonning of docbase

No comments:

Post a Comment