Showing posts with label Documentum. Show all posts
Showing posts with label Documentum. Show all posts

How to run Documentum jobs manually using iAPI/DQL ?

1

Category: , , ,

Following are the commands (DQL/IAPI) to run the jobs manually.


1.iAPI Editor
# apply,c,NULL,DO_METHOD,METHOD,S,[job name], ARGUMENTS,S,[list of arguments]
2. DQL Editor()
#EXECUTE do_method WITH method = [method name], arguments = [list of arguments]


 To change the trace level of a job, use DQL:
                        update dm_job object set method_trace_level = [trace level] where
                        object_name = [job name]
 To determine which jobs are currently running, use this DQL:

                      select object_name, r_object_id from dm_job where a_special_app =                                         'agentexec'
Once you get the object id, you can dump the object and see other attributes and query them as per your needs/analysis.

Happy Running jobs

How to install and configure My Documentum for Microsoft Outlook(MYDOUT)?

0

Category: , ,

I got task to install and configure My Documentum for Outlook . .The most confusing part is to dig through all the documentation which is scattered all over place for different components in this installation.

MyD-Outlook_6_7 /Sp1/Sp2 supports all Content Server 6.5 version and later .

These are the steps i followed and it all worked out .

1- First thing first , make  an excel sheet and note down your current environment  specification for content server , web server . My environment settings are 6.5 SP3 , Tomcat 5.5.35

 

2- Download the matched version for My Documentum for Outlook , you have to download dar(MyD-Outlook_6_7.dar) file and My-Documentum-for-Microsoft-Outlook-6.7SP1.exe .

3- Download WAR/EAR file as per your applications server (WAR for Tomcat and EAR for IBM WAS)

4-  Install the DAR file using composer dar installer to all the repositories which you want to expose for MYD(My Documentum )- straight forward , no issues, it should be installed to global as well as other repositories you want to use in My Documentum.

5- Check out the following file dco_custom_settings.xml from given path /System/Applications/DCO and add all the repositories you want to enable for MYD. Empty login mode means normal mode , where user need to input user id and password to connect with repository.Repository name is case sensitive

<Repository name="TEST" LoginMode=""/>

6- Unzip the War file and add the dfc.properties file to following location My-Documentum-for-Microsoft-Outlook-WebService-6.7\WEB-INF\classes

7- Make war file again

8- Add the following tag to server.xml file in the Tomcat root folder/conf (example-C:\Tomcat\conf) and add the following tag. Here the tag provided in admin guide does'nt work with Tomcat so just make sure that you use this tag between <host>  </host>

<Context path="" docBase="My-Documentum-for-Microsoft-Outlook-WebService-6.7"
antiJARLocking="true" reloadable="true" />

9 Make sure you have enough memory for Tomcat  .

-Xms512m
-Xmx1024m
-XX:MaxPermSize=512m
-XX:MaxHeapFreeRatio=70

image

 

10 – Deploy the WAR file on tomcat which you created in step 7 and start the tomcat server .

11- Go to your DA installation and uncomment the following xml tags from it and restart the DA applications. This enables the administration node in DA for outlook profiles management.

Path for this file DA Installation folder\webtop\config\administration_component.xml

<node componentid=’dcoadmin’>
<icon>dcoadmin.gifdcoadmin.gif</icon>
<handlerclass>com.documentum.webtop.webcomponent.administration.
ConfigurationNavigationNodeConfigurationNavigationNode</handlerclass>
<label><nlsid>MSG_DCOADMIN</nlsid></label>
<node>—>

 

MYDA

 

12- Install the My-Documentum-for-Microsoft-Outlook-6.7SP1.exe on your system ,its straight forward next –next.

13- Configure the My Documentum using Outlook and you will be able to see one extra Menu in Outlook and click on it , configure the repositories.  Two things to remember here.

URL of your deployed application

http://serverurl:portno/

You might get error saying, no repositories available, that means, your setting which you changed in DA step 5 are not working, restart DA , content server, try again. Once it is up and running, you can configure the profiles using DA outlook node as per your business requirement

 

Happy installing.

 

Please let me know if you face any problem by a comment .

How to change installation owner password on content server?

0

Category: , ,

There are two types of system , one is Windows based and other is Unix flavor.

 

For Windows based systems and we are considering dmadmin as installation user on the system.

(This works on WinXP/Win2000/Win2003/Win2008/Win7)

1- Go My Computer

2- Right click on icon

3- Click on manage

4- Go users

5- Right click on your installation user id –dmadmin -

6- Right click and change the password, restart your system

 

Unix based system – it will work on almost all but you can consult your specific Unix flavor for password changing command but it works on almost all.

1- Login to system

2- $passwd

3-$Changing password for dmadmin

4-$(current) UNIX password:

5-$Enter new UNIX password:

6-$Retype new UNIX password:

7-$passwd: password updated successfully

8-$ restart your docbase services.(docbroker/method server/repository services.)

 

Good Luck

How to change DB password for any repository on Content Server?

0

Category: ,

Follow the steps -

Steps:

- Stop docbase
- change the password in database – go to Oracle/MS SQL Server/DB2/SyBase—whatever DB you are using.
- change the dbpasswd.txt

- Re-encrypt the dbpasswd.txt file do the following
cd $DM_HOME/bin
dm_encrypt_password -docbase <docbase name> -rdbms -encrypt <database password>
- Start the docbase

 

Good Luck

Applicaton Xtender to Documentum Migration.

7

Category: , ,

Application Xtender to Documentum Migration

Flow of the program-

1- Connect with AX DB
2- Read table and get all the records.
3- Get docid - than get all the objectid for various pages.
4- Convert the objectids to filesystem path using the formula
5- Make a list of these files and check thier file extension using FileType Class which you can modify.
6- Convert them into PDF if they are tiff or merge them as per the file types.
7- Create the object in Docbase and attach the resulting file in STEP6 to the document and fill the attributes of document by the values which you retrived in STEP 2.

After coding this, you can run it from mulitple computers to make the migration faster and restrict the query result set based on DOCID .

NOTE- You should have access to the file system where AX files are stored as bin. Let me know how it goes.

I hope it helps.


Jar file to be download from internet and use in his code .

itextpdf-5.1.2.jar
jai_codec.jar
jai_core.jar
jai_windows-i586.jar
jmimemagic-0.1.0.jar
mlibwrapper_jai.jar
tika-app-0.9.jar

For source code, please comment on this blog , i will send you the source code.




Happy Migration

How to create two session to two different CS docbases?

0

Category: ,


Include both the docbroker in the dfc.properties.


public static IDfSession connectToDocbase1(String docbaseName,
String username, String passwd, String domain,
String docBrokerHost, String docBrokerPort) throws DfException {
try {
IDfSession session = null;
IDfClientX clientX = new DfClientX();
IDfClient client = clientX.getLocalClient();
IDfLoginInfo loginInfo = new DfLoginInfo();
loginInfo.setUser(username);
loginInfo.setPassword(passwd);
loginInfo.setDomain(domain);
if (docBrokerHost != null && docBrokerHost.length() > 0) {
IDfTypedObject apiconfig = client.getClientConfig();
String primaryHost = apiconfig.getString("primary_host");
String primaryPort = apiconfig.getString("primary_port");
apiconfig.setString("primary_host", docBrokerHost);
apiconfig.setString("primary_port", docBrokerPort);
try {
IDfTypedObject serverMap = client.getServerMapEx(
docbaseName, null, docBrokerHost, docBrokerPort);

session = client.newSession(docbaseName + "@"
+ serverMap.getString("i_host_name"), loginInfo);
} catch (DfException e) {
if (primaryHost != null) {
apiconfig.setString("primary_host", primaryHost);
}
if (primaryPort != null) {
apiconfig.setString("primary_port", primaryPort);
}
throw e;
}
apiconfig.setString("primary_host", primaryHost);
apiconfig.setString("primary_port", primaryPort);
} else {
session = client.newSession(docbaseName, loginInfo);
}
return session;
} catch (DfException ex) {
System.out.println("failed to connect " + ex.getMessage());
throw ex;
}
}

Vast amount of sessions from CTS causing CS to run out of memory error?

0

Category: , , ,

Following up on the webex, please try the steps below to clean up your

1. Unconfigure the docbase using MTS configuration program.
2. Uninstall MTS
3. Remove the remaining Documentum products from Add/Remove Programs.
4. Delete the following folders and all contents:
C:\Documentum
C:\Program Files\Documentum
5. Delete the Documentum entries from registry.
6. Reboot the MTS machine to make sure everything is clean.
7. Back up your custom profiles
8. Log in to DA as an admin user.
9. Delete the Media Server folder, located in: \System (select all children and all versions when prompted during delete)
10. Navigate to \System\Applications
11. Delete the CTSTransformRequest, MediaProfile, and Transformation folders if present
(including all versions and sub folders).
12. Navigate to the System\Modules\TBO folder
13. Delete all of the following folders (if present):
• dm_cts_response
• dm_media_profile
• dm_transform_request
• dmc_cts_reporting_config
• dmc_cts_request_archiving
14. Navigate to the System\Modules\SBO folder and:
• Delete all of the folders that start with "com.documentum.services.cts...";
• Delete all of the folders that start with "com.documentum.services.dam...".
15. Run the following two DQL statements against the docbase, in this order:
DQL> delete cts_instance_info object
DQL> drop type cts_instance_info

Restart docbase. Install MTS 6.5 SP3, install 2 DAR files, and then configure MTS against this docbase again to see if it fix your issue.

Perl Script to automate starting and stopping applications for Documentum Suite on All Unix based platforms.

0

Category:

Perl Script to automate starting and stopping applications for Documentum Suite on All Unix based platforms.


Please do changes as per your environment variables and path settings.

Put it onto your server and call it:
perl dmServices.pl


#!/usr/bin/perl
#########################WARNING-WARNING-WARNING#########################
# Use at your own RISK-please test it on your test environment before you
# jump onto the production .
#########################WARNING-WARNING-WARNING#########################

# Perl Modules required
# If you don't have these modules, this script will not run.
use strict;
use diagnostics;
use File::Basename;
use IPC::Open2;
use strict;
use diagnostics;
use Term::ANSIColor qw(:constants);

use vars qw (*INPUTP *PIPEOUT $CLIENTID $STOP $counter $path);

# Used to abort the script if set to 0;
$STOP = -1;

# Used for the data pipe
$CLIENTID = 0;

#$path = $ENV{'PWD'};
$path = "/tmp/docscript";

sub open_pipe
{
# Open the bi-directional data pipe which is very handy if
# we need to read the output from the command.

printf("Not working yet ... \n");
return;

my $cmd;
$cmd = $_[0];

$cmd='cd /opt;ls';

$CLIENTID = open2(\*PIPEOUT, \*INPUTP, $cmd);
if($CLIENTID == 0)
{ printf("CLIENTID = 0 ...\n");}

if(() eq '')
{ printf("PIPE Connection Error - Must Abort\n"); exit(1);}

printf("PIPE OPEN\n");
}

sub close_pipe
{
# Close all connections

close INPUTP;
close PIPEOUT;

# Kill of the PIPEID process
if($CLIENTID != 0 && kill 0 => $CLIENTID)
{ kill 9 => $CLIENTID;}

waitpid($CLIENTID, 0);
printf("PIPE PID has been terminated\n");
}

sub pipecmd
{
# Commands run through the data pipe
# Takes the input string and pipes out to execute the command

my $str;
$str = $_[0];

# Signal handler in case the pipe is broken.
$SIG{PIPE} = sub {printf("PIPEN has been broken - must Abort\n");};

print INPUTP "$str\n";
}

sub create_path
{
if (! -d $path)
{
my $localcmd;
$localcmd = "mkdir -p $path";
system($localcmd);
}
if (! -d $path) {printf("$path could not be created.\n");exit(0);}
}

sub remove_path
{
if (-d $path)
{
my $localcmd;
my $dir;
$dir = basename $path;
$localcmd = "cd /tmp;rm -rf $dir";
system($localcmd);
}
}

sub promptUser
{
my ($promptString,$defaultValue);
($promptString,$defaultValue) = @_;

$promptString = "->" unless defined $promptString;
$defaultValue = "->" unless defined $defaultValue;

if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}

$| = 1; # force a flush after our print

# If no activity on the prompt for 2 mins then set the interrupt
# to alarm and we will exit.
eval
{
local $SIG{ALRM} = sub {printf("No activity for 2 mins - Doc Services aborts\n"); exit(0);};
alarm 120;
eval
{
$_ = ; # get the input from STDIN (presumably the keyboard)
# Remove '\n'
chomp;
};
alarm 0;
};
alarm 0;

$_ = 'noentry' unless defined $_;
if($_ =~ /[a-z]/ || $_ =~ /[A-Z]/) {
# This is text;
return $_;
}

if($_ == 0) {return 0;}
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}

}
######################################################################
### Main
######################################################################

&input_handler();
exit(0);

######################################################################
### Subroutines
######################################################################
sub input_handler
{

my $done;
$done = 0;
my ($action, $indicator, $userid);

$userid = getpwuid($>);

while($done == 0)
{
system("clear");

&setupSigHdlrs();
$action =0;

printf("--------------------------------------------\n");
printf(" Welcome $userid to DOC SERVICES\n");
printf("--------------------------------------------\n");
if($userid ne "docinst")
{
printf("--> CURRENT USERID: $userid\n");
printf("---------------------------------------------------\n");
printf("WARNING: To perform maintenance activities on\n");
printf("DOCUMENTUM you MUST be logged in as userid: docinst\n");
printf("otherwise any processes you start or stop will not\n");
printf("operate properly.\n\n");
printf("**********YOUR SESSION IS BEING ABORTED.***********\n");
printf("---------------------------------------------------\n");
exit(0);
}
printf("Please choose one of the options:\n\n");
printf(" --> 1. START Documentum services.\n");
printf(" --> 2. STOP Documentum services.\n");
printf(" --> 3. QUERY Documentum processes.\n");
printf(" --> 4. START Application Server.\n");
printf(" --> 5. START Method Server.\n");
printf(" --> 6. STOP Application Server.\n");
printf(" --> 7. STOP Method Server.\n");
printf(" --> 8. QUERY JAVA Server Process.\n");
printf(" --> 9. START Oracle 10g Server.\n");
printf(" -->10. START Oracle DB Console.\n");
printf(" -->11. STOP DOCBROKER.\n");
printf(" -->12. START DOCBROKER.\n");
printf(" -->13. STOP FULLTEXT SERVER/AGENT.\n");
printf(" -->14. START FULLTEXT SERVER/AGENT.\n");
printf(" -->15. QUERY Index Node Controller.\n");
printf("--------------------------------------------\n");
printf(" --> QUIT: CTRL ^C\n");
printf("--------------------------------------------\n");
printf("--------------------------------------------\n");
$action = &promptUser("Enter numeric option: (1-14): \n");

&setenv_vars();

if($action == 1)
{
system("clear");
&startup_services();
}
elsif($action == 2)
{
system("clear");
&stop_services();
}
elsif($action == 3)
{
system("clear");
my $input = "query";
&terminate_processes($input);
}
elsif($action == 4)
{
system("clear");
my $input = 1;
&handle_apache_server($input);
}
elsif($action == 5)
{
system("clear");
my $input = 4;
&handle_apache_server($input);
}
elsif($action == 6)
{
system("clear");
my $input = 2;
&handle_apache_server($input);
}
elsif($action == 7)
{
system("clear");
my $input = 3;
&handle_apache_server($input);
}
elsif($action == 8)
{
system("clear");
my $input = "java";
&terminate_processes($input);
}
elsif($action == 9)
{
system("clear");

printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/sqlplus /nolog\n");
printf(" --> connect SYS as SYSDBA\n");
printf(" --> oracle1\n");
printf(" --> startup\n");
printf(" --> quit\n");

}
elsif($action == 10)
{
system("clear");

printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/emctl start dbconsole\n");

}
elsif($action == 11)
{
system("clear");
&stop_dmdocbroker();
}
elsif($action == 12)
{
system("clear");
&check_dmdocbroker();
}
elsif($action == 13)
{
system("clear");
&stop_fulltext();
}
elsif($action == 14)
{
system("clear");
&start_fulltext();
}
elsif($action == 15)
{
system("clear");
&get_nctrl();
}

$action = &promptUser("Would you like to exit ?\n");
$action = lc($action);
if($action eq 'y')
{
printf("\n\n\n\n\nTHANK YOU FOR USING DOC SERVICES.\n");
$done = 1;
}
$action = 0;
}}

sub start_oracle
{
printf("Functionality not working yet ...\n");

# Will start the Oracle database or DBconsole
my $inputstr;
$inputstr = $_[0];

&open_pipe();
sleep(1);
&pipecmd("su - oracle;oracle1");

# Setup the environment variables
# $ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';

if($inputstr eq "startup")
{
printf("Performing Oracle Startup ...\n");

# Send in the SQL commands to start up the database
&pipecmd("cd \$ORACLE_HOME;bin/sqlplus /nolog");
&pipecmd("");

while()
{
if(/SQL>/i)
{
# We are in
&pipecmd("connect SYS as SYSDBA");

# Need to sleep 2 secs or we will send in the password before the prompt
# is ready.
sleep(2);
&pipecmd("oracle1");
next;
}
if(/Connected./i)
{
&start_oracle_server();
last;
}
}

sleep(2);
}
if($inputstr eq "console")
{
printf("Performing DBCONSOLE Startup ...\n");

&start_oracle_dbconsole();
}
}

sub start_oracle_server
{
&pipecmd("startup");

while()
{
printf("STARTUP: $_");
}
&pipecmd("quit");
}

sub start_oracle_dbconsole
{
# Startup the oracle database console
&pipecmd("bin/emctl start dbconsole");
while()
{
printf("DBCONSOLE: $_");
}
}

sub terminate_processes
{
# User has the option of passing in parmeter 'query' or 'java' which will
# output processes instead of killing them.

&create_path();
my $pidout = "$path\/pidout.txt";


$counter = 0;

my $input;
$input = $_[0];
$input = 'null' unless defined $input;

my ($pidcnt, $asked, $localcmd, $printonce, $index);
$asked = 'q';
$printonce = 0;
$pidcnt = 0;
$index = 9;

$localcmd = "/bin/ps -fU docinst > $pidout";
system($localcmd);


open(PIDOUT, "< $pidout");
while()
{
if($input eq "java")
{
if($_ =~ /.\/java/i)
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY JAVA Report *******\n");
$printonce = 1;
}
printf("JAVA: $_\n");
$pidcnt ++;
}
next;
}
if($_ =~ /.\/documentum/i ||
$_ =~ /.\/dmdocbroker/i)
{
$counter ++;

# Documentum processes are still alive.
my @psarray;
undef(@psarray);
@psarray = split(/ /, $_);
#$psarray[2] =~ s/\S+$//;
#$psarray[2] =~ s/^\S+//;
my $i;
for($i=0;$i<=5;$i++)
{
my $value;
$value = $psarray[$i];
if($value =~ s/\d+$//)
{ $index=$i;last;}
}
if ($index >= 5) {printf("Invalid PID ... skipping\n"); next;}
if ($input eq 'query')
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY Report *******\n");
$printonce = 1;
}
printf("Owner: $psarray[1] PID: $psarray[$index]\n $_\n");
$pidcnt = $counter;
next;
}

if ($asked eq 'q' || $asked eq 'n')
{
$asked = &promptUser("One of more Documentum processes found\n Would you like to terminate ALL ?\n\n");
$asked = lc($asked);
}

if ($asked eq 'y')
{
printf("Terminating process: $psarray[1] : $psarray[$index]\n");
$localcmd = "kill $psarray[$index]";
my $rc = system($localcmd);
if ($rc != 0)
{
printf("[FAILED] Could not terminate process: $psarray[$index]\n");
$STOP = 0;
}
else
{
$counter = $counter -1;
}
}
else
{
printf("[INFO] Process: $psarray[1] : $psarray[$index] lives\n");
$STOP = 0;
}
printf("[INFO] Documentum processes still alive: $counter.\n");
$pidcnt = $counter;
}
}
close(PIDOUT);
if($pidcnt == 0) {printf("\n\nNO PROCESSES FOUND\n");}
&remove_path();
}

sub setupSigHdlrs
{
# Re-define any signal handlers, as necessary.

# Catch Ctrl-C
$SIG{INT} = \&HandleCtrlC;

}

sub HandleCtrlC
{
# A cleanup routine called when the user types ctrl-C.
if($CLIENTID != 0)
{
#&close_pipe();
}
printf("\nControl ^C encountered - exiting.\n");
exit()
}

sub startup_services
{
# start the documentum services
my $localcmd;

printf("INITIATE STARTUP ...\n\n");

# Check for documentum processes
&terminate_processes();

printf(" CHECKING safety indicator ...\n");
# Check if safe to proceed.
&check_safety();

&setenv_vars();
# Added this here as it seems to work instead of letting the
# dm_start_dbdoc_sh19necm1_r01 script try to bring it up.
printf(" STARTING DM_DOCBROKER ...\n\n\n");
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
sleep(2);

printf("\n\n STARTING DATABASE: dbdoc_sh19necm1_r01 ...\n\n\n");
# Repository
$localcmd = ('cd /opt/documentum/dba;./dm_start_dbdoc_sh19necm1_r01');
system($localcmd);

# Start Tomcat for web services.
&handle_apache_server(1);

# Start Method Server.
#&handle_apache_server(4);

&start_fulltext();

&check_dmdocbroker();

printf("\n\n\n\n");
printf("=======================================================\n");
printf("NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE\n");
printf("=======================================================\n");
printf("You must close your browser and restart using the static\n");
printf("IP address for the DOCUMENTUM services to connect to.\n");
printf("Failure to do so will RESULT in no connectivity.\n");
printf("=======================================================\n");

printf("\n\nSTARTUP INITIATE COMPLETED.\n");
}

sub start_fulltext
{
my $localcmd;

printf(" \n\n STARTING INDEX SERVER ...\n\n\n");
#Index Server
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin;./startup.sh');
system($localcmd);

printf(" \n\n STARTING INDEX AGENT ...\n\n\n");
# Index Agent
$localcmd = ('cd /opt/documentum/shared/IndexAgents/IndexAgent1;./startupIndexAgent.sh');
system($localcmd);

&get_nctrl();

}

sub get_nctrl
{
my $localcmd;

printf("Obtaining Node Controller status Info ...");
sleep(3);
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin; nctrl sysstatus');
system($localcmd);
}

sub handle_apache_server
{
# Handler to start or stop application server or
# Documentum Method Server.
# INPUT: 1 = START APPLICATION SERVER
# 2 = STOP APPLICATION SERVER
# 3 = STOP METHOD SERVER
# 4 = START METHOD SERVER

my ($localcmd,$input);
$input = $_[0];

if ($input == 1)
{
printf(" STARTING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./startup.sh';
system($localcmd);
}
if ($input == 2)
{
printf(" STOPPING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 3)
{
printf(" STOPPING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");

$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 4)
{
printf(" STARTING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");
printf(" COMMAND CANCELLED.\n");
$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./startup.sh';
system($localcmd);
}
}
sub check_dmdocbroker
{
my $found;
$found = -1;
&create_path();
system("/bin/ps -ef > $path\/dmdocb.txt");
open(DMOUT, "< $path\/dmdocb.txt");
while()
{
if($_ =~ /.\/dmdocbroker/i)
{
$found = 0;
last;
}
}
close(DMOUT);
&remove_path();
if($found != 0)
{
my $action;
printf("Docbroker failed to start therefore\n");
$action = &promptUser("would you like to start manually ?\n");
$action = lc($action);
if ($action eq 'y')
{
&setenv_vars();
# Docbroker failed to start so kick it manually.
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
printf("\n**DM_DOCBROKER STARTED MANUALLY FROM SCRIPT**\n");
}
else { printf("\n**Please investigate DOCBROKER LOG\n /opt/documentum/dba/log/docbroker...**\n");}
}
}

sub stop_dmdocbroker
{
my $localcmd;

printf(" Stopping DM DOCBROKER ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_stop_Docbroker';
system($localcmd);
}

sub stop_services
{
my $localcmd;

printf("SHUTDOWN INITIATING ...\n\n");
sleep(2);

&stop_fulltext();

sleep(2);
# Stop Apache and Documentum Method Server
# &handle_apache_server(3); <-- This causes errors so don't do
&handle_apache_server(2);

printf(" Stopping repository ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_shutdown_dbdoc_sh19necm1_r01';
system($localcmd);

&stop_dmdocbroker();

sleep(5);
# Check for any documentum processes
&terminate_processes();

}

sub stop_fulltext
{
my $localcmd;

printf(" Stopping Index Agent ...\n");
$localcmd = 'cd /opt/documentum/shared/IndexAgents/IndexAgent1;./shutdownIndexAgent.sh';
system($localcmd);

printf(" Stopping Index Server ...\n");
$localcmd = 'cd /opt/documentum/fulltext/IndexServer/bin;./shutdown.sh';
system($localcmd);

&get_nctrl();
}

sub check_safety
{

if ($STOP == 0 && $counter > 0)
{
# Not safe to continue.
printf("ERROR: It is unsafe to continue ... \n");
printf(" Check for previous errors!\n\n");
exit(0);
}
}

sub setenv_vars
{
# Setup the environment just in case we are not being called from
# a profile that has the proper ENV.
$ENV{'ORACLE_SID'} = 'DBDOC';
$ENV{'DOCUMENTUM_SHARED'} = '/opt/documentum/shared';
$ENV{'LD_LIBRARY_PATH'} = '/opt/documentum/fulltext/IndexServer/lib:/opt/documentum/fulltext/fast40:/opt/documentum/shared/dfc:/opt/documentum/shared/IndexAgents/ftintegrity';
$ENV{'LC_ALL'} = 'C';
$ENV{'FASTSEARCH'} = '/opt/documentum/fulltext/IndexServer';
$ENV{'JAVA_HOME'} = '/opt/documentum/shared/java/1.4.2_11';
$ENV{'ORACLE_BASE'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'DISPLAY'} = 'localhost:1';
$ENV{'DM_HOME'} = '/opt/documentum/product/5.3';
$ENV{'LOGNAME'} = 'docinst';
$ENV{'DOCUMENTUM'} = '/opt/documentum';
$ENV{'PATH'} = '/usr/bin::/usr/local/bin:/usr/openwin/bin';
$ENV{'TNS_ADMIN'} = '/opt/oracle/oracle/product/10.2.0/db_1/network/admin';
}

How to drop all the tables , views from the oracle schema for recreating the repository?

0

Category: , , ,

How to drop all the tables , views from the Oracle DB schema for recreating the repository?

1-

Create one sql file and name it -createdroptables.sql and write below given queries into this file


SET SERVEROUTPUT ON;

SPOOL C:\droptables.LOG;

SELECT * FROM (SELECT 'DROP TABLE '||table_name||' CASCADE CONSTRAINTS;' FROM user_tables UNION
SELECT 'DROP VIEW '||VIEW_NAME||';' FROM user_views UNION
SELECT 'DROP SEQUENCE '|| SEQUENCE_NAME||';' FROM user_sequences UNION
SELECT 'DROP SYNONYM ' || SYNONYM_NAME ||';' FROM user_synonyms UNION
SELECT 'DROP FUNCTION ' || OBJECT_NAME ||';' FROM user_procedures UNION
SELECT 'PURGE RECYCLEBIN;' FROM dual) ORDER BY 1 ASC;

SPOOL OFF

2 Run this sql file on sqlplus console

SQL> @C:\createdroptables.sql

3 Rename the droptables.log file to droptables.sql which is created in c:\ drive

4 Run this sql file on sqlplus console

SQL> @C:\createdroptables.sql

5 Check the tables in schema by running below given query

select table_name from user_tables;

6 You should get no table name ie its now empty schema.

Good Luck recreating repository.

Manage the User cabinet’s visibility to users in Documentum Server?

0

Category: , ,

How to manage the User cabinet’s visibility to users in Documentum Server?

Scenario1: Only owners will be able to see their cabinets , not even super users and System administrator will be able to see their cabinets.


1: Make is_private = 1 which is by default


Scenario 2: Some group (admin users or some other group of users) wants to see the cabinet of all users

1: Make is_private = 0 attribute of the dm_cabinet objects.
2: Create a default_user_cabinet_acl
Where
Dm_world = none
Admingroup = read
Owner = delete

3: apply above ACL on all the cabinets
4: you can apply above created ACL on the dm_cabinet type so that whenever a new cabinet is created, this ACL is applied automatically, One advantage of this approach is , you can change this ACL at anytime and all the cabinets will be affected by this change for example, you want to add one more group of users who wants to see all the cabinets in your organization like managers than you can add that group to this acl and assign them access.

Scenario 3: When you are integrating LDAP authentication and wants to create default cabinets for users.

1: you can create cabinet by mapping users
2: you can create cabinet by passing one more attribute to the
ldapjobSyn method
-create_default_cabinet true
Insert this before –full_sync =false/true parameter

This creates cabinet with the user’s last name, first name example Singh, Kulveer but in this case, the ACL which you created in Scenario2 was not applied to the cabinet even though you applied the ACL on dm_cabinet
type itself, this is strange behaviour, I don’t know why Documentum does so.

OR
You can create cabinet by mapping LDAP attribute in LDAP config object

Goto DA->Basic Configuration->LDAP Servers->Mappting tab->property Mapping table-> Add new property

Where you can map dm_user objects default_folder attribute to the LDAP attribute for example

Default_folder = {$sn}

Refer Documentum Administrator guide for more detail regarding this LDAP mapping.

3: Step 2 will create cabinets only for the new users which are being pulled by the LDAP in both the cases but if you want to create cabinets for all the users which are already pulled into the Documentum than
A: Create users by script for existing users and make is_private = 0
OR
B: Delete all the users in Documentum and run the LDAPSync job and all the users will be created with their default cabinets. Note: you may loose some group and other ACL information which may be lost when you delete the users but it all again depends on your LDAP configuration.

4: in step 3 user’s cabinets are created but you have to run the script to make the is_private=0 and apply the ACL created in Scenario 2. This task can be done by creating job or changing the existing LDAPSync job to change the is_private=0 and apply the ACL . This totally depends on the complexity of your systems user base.

You can use any of the approaches based on your requirement and complexity of the system.

I would like to hear the comments for the above approaches. Let’s make it better by sharing our knowledge.

How to configure LDAP object in Documentum

0

Category: , , ,

How to configure LDAP Object in Documentum

To setup an LDAPConfig Object and import the users you may follow the steps documented in the eContent Server Administrator Guide, Appendix C, "Using an LDAP Directory Server". However, please note the following three items that are not detailed in the documentation.

1. You must provide an email address in the LDAP server and LDAP Configuration object in Documentum Administrator (DA).

2. Use groupofuniqueNAMES instead of groupofuniquemembers. The groupofuniquenames is defined in the schema, where as the groupofuniquemembers is not.





STEPS FOR TESTING LDAP FUNCTIONALITY:

Below is the procedure for testing the LDAP functionality briefly without checking in detail.

1. Install Netscape Directory Server on NT or Unix. A schema is made automatically when you install LDAP server.


2. Add a user and group into LDAP Directory Server, by Netscape LDAP Directory Server, and PLEASE PROVIDE EMAIL ADDRESS.


3. Make an LDAP Configuration object in a Docbase, using DA. Below is a sample of the setting:



Hostname : your computer name or IP address where LDAP server runs,

Port : default 3891 Note but it depends on your LDAP Server so
consult the LDAP team for this.

Person Object Class : person

Group Object Class : groupofuniquenames [NOT groupofuniquemembers]

Person Search Base : o=xyz.com (This is the domain name of the computer where LDAP server is installed.)

Group Search Base : o=xyz.com (Same as Person Search Base)


Enabling LDAP Changelog Information : uncheck


Name : uid

OS Name : uid

Email Address : mail


4. Restart Docbase


5. Run LDAPSynchornize job


6. Check whether users and groups defined in LDAP server are imported into the Docbase in DA.


7. Try to connect to the Docbase with Intranet Client (IC) or Desktop Client (DTC) as the user defined in LDAP Server.



Again, the following items are correction or clarification to the documentation:

1. Provide an email address in the LDAP server and LDAP Configuration object in Documentum Administrator (DA).

2. Use groupofuniqueNAMES instead of groupofuniquemembers. The groupofuniquenames is defined in the schema, where as the groupofuniquemembers is not.

3. Restart Docbase once you have created a LDAP Configuration object.

Please feel free to given feedback/comments/suggestions/improvements.

Story behind when a document gets deleted in Documentum Repository

0

Category: ,

When a document is deleted from Documentum, only the document's metadata is deleted. The content itself (i.e. the object pointed to by the dmr_content object) remains in the content storage area until the IAPI script generated by the dmclean utility is run. If the dmclean utility has not been run, it is still possible to recover the object's content file.

Note: The document's attributes cannot be recovered without going back to a database backup. Below is an outline of a strategy which can be used to do this recovery.


Recovering the Information of the deleted Object

1. The Following DQL will retrieve the object_ids that correspond to the content objects that have been deleted

select r_object_id from dmr_content where any parent_id is null

If you want to retrieve data for a particular client, you can extract the following information to create your DQL:-

a) What was the name of the object? This is the object_name attribute.

b) What format was the document? This is the full_format attribute.

c) What was the date/time of the last checkin? This is the set_time attribute.

d) What was the name of the client machine where the file was last checked in? This is the set_client attribute.


The DQL that will be created in this case according to your search criteria is as follows:-

select r_object_id from dmr_content where any parent_id is null and
set_client = and full_format = and set_time > DATE('')


2. Using the Object Ids recovered the following IAPI needs to be executed to pick up the path and relevant information of the Object under consideration :-

API> apply,c,,GET_PATH
API> next,c,q0
API> get,c,q0,result

This returns the file system path to the object. For example:

/disk2/dm20/data/solar20o/content_storage_01/00000065/80/00/14/07


How to restore the Document

To be able to restore the document back to its original location, you will need to firstly create a document object of the deleted type using the IAPI :

Creating a new dm_document object using IAPI
API> create,c,dm_document
0900006580005a65.


Setting the name of the Deleted object
API> set,c,,object_name
SET> Restored Document
OK

Linking the deleted file to the newly created object
API> setfile,c,,/disk2/dm20/data/solar20o/content_storage_01/000000
65/80/00/14/07,
OK

Linking the object to a directory in the Cabinets where the file will be restored
API> link,c,,/Temp
OK

Saving the file
API> save,c,

This will restore the deleted document at the location /Temp with the name Restored Document

How to delete large number of objects using iDQL and iAPI on Documentum Server?

3

Category: , , , , ,

Deleting bulk number of objects is a daily task in administrating the Documentum Server and its not possible to delete more than couple of thousands objects using DA or even iDQL because it takes lot of time or sometimes it hangs the server. So best way to do it is through create a text file of API commands for those objects which need to be deleted and i have compiled some steps to do that in easy way . It can be automated by using writting some job but if you need to delete instantenously by running script . Here is the solution.

1:- Create a dql file to extract object_ids of the objects which you want to delete

example

Name this file something like "extract_objectIds.dql"
---------------------------------------
select 'destroy,c,'as destroy,r_object_id from dm_document
go
quit

---------------------------------------
2:- Create a batch file to run this dql command created in above file named like

extract_objectId.bat

----------------------------------------
@echo off
setlocal & pushd


rem -=-=-=-=-=-=-=-=-=--
rem - Set these values -
rem -=-=-=-=-=-=-=-=-=--
set DOCBASE_NAME=xxxx
set DCMT_SUPERUSER=yyyy
set DCMT_SUPERUSER_PW=zzzzz

echo
"%DM_HOME%\bin\idql32" %DOCBASE_NAME% -U%DCMT_SUPERUSER% -P%DCMT_SUPERUSER_PW% -Rextract_objectIds.dql >object_Ids.log
:EOF
endlocal & popd

-----------------------------------

3:- Extract all the API commands from the log you got in previous step in your objectid.log into a new file called "destroy_objects.api"
for example , your object_Ids.log must be containing data like

destroy,c, 09xxxxxxxxxxxxxx
destroy,c, 09xxxxxxxxxxxxxx
destroy,c, 09xxxxxxxxxxxxxx
destroy,c, 09xxxxxxxxxxxxxx

4: Create a new batch file or update the above batch file and run iapi command file using the batch file.

New Batch file example (destroy_objects.bat)

----------------------------------------------
@echo off
setlocal & pushd

rem // $Id$
rem -=-=-=-=-=-=-=-=-=--
rem - Set these values -
rem -=-=-=-=-=-=-=-=-=--
set DOCBASE_NAME=xxxx
set DCMT_SUPERUSER=yyyy
set DCMT_SUPERUSER_PW=zzzzz


rem Destroying Objects
echo
echo.
""%DM_HOME%\bin\iapi32" %DOCBASE_NAME% -U%DCMT_SUPERUSER% -P%DCMT_SUPERUSER_PW% -Rdestroy_objects.api -lobjectsDeleted.log

:EOF
endlocal & popd
------------------------------------------------

Run this batch file by setting your Docbase Name , UserId, Password.

Thats it.

Happy Destroying Objects.

Note: