Feeds:
Posts
Comments

The information provided in this post is tested under the following environment.
Documentum        :6.5 SP2
Database         :Oracle 11g
Operating System  :SUSE Linux Enterprise Server 10

This post is about the default email notifications from a Documentum System.

I would classify these notifications broadly into three categories.

  1. Workflow Notifications: The email notification received when a WorkItem is assigned in the user’s documentum inbox
  2. Document Notification: A Read/Write notification for a document for which user has registered
  3. Jobs Alerts: This includes
    • Job/Agent Exec failure alerts
    • Alerts regarding Environment’s health from default jobs

The important point to note is that I am not claiming that these are the only email notifications send by Documentum. Further the categories of email notifications are not the actual scope of this post.

So moving ahead; if we wish to take benefit of these email notifications the most important thing is that our documentum environment should be capable of sending email notifications. This is achieved through a SMTP server. So, the first thing one would like to check is whether a SMTP IP address is defined in the Server Config Object.

SELECT object_name, smtp_server FROM dm_server_config;

If one is lucky enough to have a SMTP Server configured, the next interesting thing would be to verify whether the configured SMTP server is capable of doing what it is supposed to do. In addition it should also be reachable from the Content Server Host.

The following instructions can be used to test it. The text in blue is the user input.

Use Putty to connect to the Content Server Host and login using the Installation Owner’s account. Connect to the SMTP Server using Telnet.

mypc:~> telnet <smtp ip> 25
Trying <smtp ip>...
Connected to <smtp ip>.
Escape character is '^]'.
220 <smtp host> ESMTP Thu, 7 Jul 2011 11:53:25 -0400
HELO Me
250 <smtp host> Hello [<content server host ip>], pleased to meet you
MAIL FROM: from@email.com
250 2.1.0 from@email.com... Sender ok
RCPT TO: my@email.com
250 2.1.5 my@email.com... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
This is a sample test email
.

250 2.0.0 p67FrP9G027974 Message accepted for delivery

You should feel quiet happy if you receive the intended email. Your SMTP server seems to be working just fine.

If the SMTP server is working absolutely fine then we may like to verify whether documentum is able to use the SMTP Server as per expectation. Documentum uses dm_mailwrapper.sh to call the mail program. dm_mailwrapper.sh resides in $DM_HOME/bin and by looking at it’s content it can be figured out that it is called in the following way.

mypc:~>/documentum/product/6.5/bin> ./dm_mailwrapper.sh "This is the Subject" "my@email.com" testcontent

testcontent is a text file which contains the content of the email message.

dm_mailwrapper.sh uses the mail program to send the emails. mail program can be tested using the syntax given in dm_mailwrapper.sh.

mypc:~>/documentum/product/6.5/bin> /bin/mail -s "This is the Subject" "my@email.com" < testcontent

By default all the Documentum email notification are in plain text. Documentum uses dm_event_sender method (dm_method) which by default uses dm_event_sender.ebs to generate the email content. The Verb of dm_event_sender method can be modified to use dm_html_sender.ebs and it starts generating the email content in HTML. But generating HTML content is not enough. sendmail program can be used in order to make sure that the email is rendered as HTML. dm_mailwrapper.sh can be updated as follows.

#/bin/mail -s "$subject" "$address" < $content_file
/usr/lib/sendmail -io "Dummy Subject" "$address" < $content_file

Before updating the dm_mailwrapper.sh do make sure that the sendmail program is sending emails. The content of testcontent can also be updated as HTML while doing so.

With the above two changes in place we should start getting the email notifications in HTML format. No, there is no need to restart anything. I indeed got few issues with the content of Workflow and the Jobs notification. Those issues were fixed by commenting few lines in the dm_html_sender.ebs. The content of the email notification can be customized by customizing dm_event_sender.ebs for plain text notifications and dm_html_sender.ebs for HTML notifications.

There are a lot of discussions on various forums/threads regarding the Content Server High Availability Environment. But I have not come across any documentation providing the precise steps to implement it. This is an attempt to list the steps that I have been using for the implementation. It’s basically an integration of bits and pieces from various sources combined along with my experience in order to put a clear picture. These steps may not be exactly as suggested and supported by EMC.
The procedure listed below is specific to the Content Server Linux Oracle 6.5 SP2 version.

Prerequisites:

  • As it’s a HA environment, the content files should be present in a File Store that is shared across the Content Servers.
  • The Installation Owner and the Installation Path should be same on each Content Server.
  • Availability of a Database Server and its connectivity through each Content Server Host using Oracle Client.
  • Update the /etc/hosts file of the Content Server Hosts so that they can resolve their IP addresses and hostnames.

Once the above prerequisites are satisfied, the below steps can be used to establish the HA environment.

  • Install the Primary Content Server as per the standard procedure mentioned in Installation Guide.
  • Install the docbroker on the Secondary CS host.
  • Create a Secondary Server Config object using Documentum Administrator.
  • Copy server.ini, aek.key, dbpasswd.txt, dm_start_docbase and dm_shutdown_docbase from Primary CS Host to Secondary CS Host.
  • Update the server.ini on both the Hosts so that the docbrokers project to each other.
    server.ini on the Primary CS:

    [DOCBROKER_PROJECTION_TARGET]
    host = <primary docbroker>
    port = 1489
    [DOCBROKER_PROJECTION_TARGET_1]
    host = <secondary docbroker>
    port = 1489

    server.ini on the Secondary CS:

    [DOCBROKER_PROJECTION_TARGET]
    host = <secondary docbroker>
    port = 1489
    [DOCBROKER_PROJECTION_TARGET_1]
    host = <primary docbroker>
    port = 1489
  • Update the dm_shutdown_docbase as follows: 
      The line preceding to “shutdown,c,T,T” should be updated as follows:

    • Original:
      ./iapi <docbase> -U$DM_DMADMIN_USER -P -e << EOF 
    • Updated:
      ./iapi <docbase>.<secondary server config object name> -U$DM_DMADMIN_USER  -P -e << EOF
  • Update the dfc.properties of the Web Application as well as both the Content Server Hosts so that they point to both the docbrokers.
  • Create an ACS Config object using the below command:
      dmbasic -f dm_acs_install.ebs -e Install -- <docbase name> <installation owner> <password> <new acs config name> <secondary server config name> <JMS Port> <JMS protocol> <output log location>
  • Update the acs.properties accordingly.
  • Once the above steps are complete, shutdown the Primary CS and test the Secondary CS for expected functionality. There may be minor issues which may need few basic fixes. Such fixes include creation of sysadmin directory at $DOCUMENTUM/dba/logs/<repository id>/ in order to fix issues relating to jobs running on Secondary CS.

Start the Primary CS and now both the CS should be in HA.

Weird DQL results

I came up with this junk when I was trying to clean my repository by finding a DQL that I could use to delete more that 150,000 junk user objects from my repository. Ignore that statement as it is again a junk. What I came up is not very new. It’s just the weirdness in the behavior of the DQLs. Is this weirdness only with the repeating attributes? I would like the DQLs to do much of the talking as I feel they can explain their pain much better. So here it goes:

A1)SELECT COUNT(DISTINCT user_name) FROM dm_user >> 168241

A2)SELECT COUNT(DISTINCT users_names) FROM dm_group >> 2916

A3)SELECT COUNT(DISTINCT user_name) FROM dm_user
WHERE user_name NOT IN
(SELECT DISTINCT users_names from dm_group) >> 0

Isn’t that weird?

B1)SELECT COUNT(DISTINCT user_name) FROM dm_user, dm_group
WHERE ANY dm_group.users_names = dm_user.user_name >> 2915

A2 VS B1: again weird!

C1)SELECT COUNT(DISTINCT user_name) FROM dm_user
WHERE user_name NOT IN
(SELECT DISTINCT user_name FROM dm_user, dm_group
WHERE ANY dm_group.users_names = dm_user.user_name) >> 165326

(A2, A3) VS (B1, C1): any explanation?
But that’s a relief indeed. That’s the result I needed. A1 – B1 = C1. Under the current circumstances, that’s encouraging enough to get into some more meddling.

D1)SELECT COUNT(users_names) FROM dm_group
WHERE ANY users_names NOT IN
(SELECT user_name FROM dm_user) >> 5

What the hell!!!

D2)SELECT users_names FROM dm_group
WHERE ANY users_names NOT IN
(SELECT user_name FROM dm_user)
>> TestUser1 test3 test2 orts test1x

hmmmm…

D3)SELECT COUNT(*) FROM dm_user
WHERE user_name IN
(SELECT users_names FROM dm_group
WHERE ANY users_names NOT IN
(SELECT user_name FROM dm_user))>> 4

This is insane. Isn’t D3 a contradiction in itself? Can I challenge EMC to explain that? Can someone come to my rescue?

D4)SELECT user_name FROM dm_user
WHERE user_name IN
(SELECT users_names FROM dm_group
WHERE ANY users_names NOT IN
(SELECT user_name FROM dm_user))
>> TestUser1 test3 test2 orts

Here is something that helps; but it doesn’t explain the insanity though.

ConsistencyChecker Report:

Checking for users belonging to groups not in dm_user
WARNING CC-0002: User ‘test1x’ is referenced in dm_group with id ‘12000d808004a500’ but does not have a valid dm_user object
Rows Returned: 1

Summery:
Weirdness No. 1:     (A1, A2, A3)
Weirdness No. 2:     A2 VS B1: Explained by the ConsistencyChecker Report.
Weirdness No. 3:     (A2, A3) VS (B1, C1)
Weirdness No. 4:     D3: The Contradiction in itself.

I could get an explanation only for Weirdness No. 2 which I guess is not a weirdness at all. I hope someone reading this post would try explaining the other three. 1 & 2 I guess are contributed by repeating attributes but remains unexplained anyway. 4, the D3 is an absolute marvel. Is there a bug in the way DQL works?
C1 is the undisputed winner as it provides the expected result.

“Which are the repeating attribures in my_document?” That question was put by Gaurav as he needed to validate them with Captiva. He was finding it too tedious to validate the attributes by checking the definition of each type in the repository. He was interested in a single DQL query which could make his job easy.

My first reaction to his query was: “You are expecting too much!”. Life can’t be that easy. You can not escape from every complexity. But we can indeed try to make them simple. Can’t we?
So I looked into dmi_dd_type_info, dmi_dd_attr_info and finally in dm_type I found the attributes that I could use. After a few iterations I came up with the following DQL Query:

SELECT name, attr_name, attr_repeating
FROM dm_type
WHERE name = 'my_document' AND attr_repeating = 1
ENABLE(ROW_BASED)

This query is again a good example of the DQL Hint ROW_BASED. With this Hint we get only those results where attr_repeating = 1. That statement may have sounded dumb had attr_repeating been a single valued attribute. But it is repeating and there are some weirdness with the result if we are checking for the value of a repeating attribute in the WHERE clause without using that hint.

SELECT name, attr_name, attr_repeating
FROM dm_type
WHERE name = 'my_document' AND ANY attr_repeating = 1

The result of the first query brought a smile to Gaurav’s face; but his expectations had increased. He was interested in only those repeating attributes that were not inherited from the parent type. We found a simple way to do that.

SELECT name, attr_name, attr_repeating
FROM dm_type
WHERE name = 'my_document' AND attr_repeating = 1 AND attr_name
NOT IN (SELECT attr_name FROM dm_type WHERE name = 'dm_document')
ENABLE(ROW_BASED)

We came up with one more modification and our final query looked like:

SELECT name, attr_name, attr_repeating
FROM dm_type
WHERE name = 'my_document' AND attr_repeating = 1 AND attr_name
NOT IN (SELECT attr_name
	FROM dm_type
	WHERE name =
		(SELECT super_name
		FROM dm_type
		WHERE name = 'my_document')
	)
ENABLE(ROW_BASED)

Now that has brought a smile to my face and I hope that Gaurav doesn’t come up with more expectations.

A Silent Story of DQLs

This post is nothing but few observations that I made in my Documentum repository. Some of you may find it obvious but some others may find it interesting. The observations are specific to a particular repository. These results had messed up my mind and I expect the same for at least a few of you. Please don’t make any conclusion out of this post. Any comments from the readers are welcome.

*****************************************************************************************************************

SELECT COUNT(*) FROM dm_user
Result  >>  435820

SELECT COUNT(*) FROM dm_group
Result  >>  267375

SELECT COUNT(*) FROM dm_user WHERE r_is_group = true
Result  >>  263559

SELECT COUNT(*) FROM dm_user WHERE r_is_group = false
Result  >>  172261

SELECT COUNT(*) FROM dm_group
WHERE group_name
IN (SELECT user_name FROM dm_user WHERE r_is_group = true)

Result  >>  263559

SELECT COUNT(*) FROM dm_group
WHERE group_name
NOT IN (SELECT user_name FROM dm_user WHERE r_is_group = true)

Result  >>  3816

SELECT COUNT(*) FROM dm_group
WHERE r_object_id
IN (SELECT r_object_id FROM dm_user WHERE r_is_group = true)

Result  >>  0

SELECT COUNT(*) FROM dm_group, dm_user
WHERE dm_group.group_name = dm_user.user_name

Result  >>  465587

SELECT dm_user.user_name,dm_group.group_name
FROM dm_group, dm_user
WHERE dm_group.group_name = dm_user.user_name

Total Results  >>  465587

SELECT DISTINCT dm_user.user_name, dm_group.group_name
FROM dm_group, dm_user
WHERE dm_group.group_name = dm_user.user_name

Total Results  >>  198518

SELECT COUNT(*), dm_group.group_name
FROM dm_group, dm_user
WHERE dm_group.group_name = dm_user.user_name
GROUP BY dm_group.group_name
HAVING count(*) > 1

Total Results  >>  38608

SELECT group_name, COUNT(*) FROM dm_group
GROUP BY group_name HAVING COUNT(*) > 1

Total Results  >>  38608

SELECT user_name, COUNT(*) FROM dm_user
GROUP BY user_name HAVING COUNT(*) > 1

Total Results  >>  39468

*********************************************************************************************************

SELECT COUNT(DISTINCT user_name) FROM dm_user
Result  >>  366103

SELECT COUNT(DISTINCT group_name) FROM dm_group
Result  >>  198518

*********************************************************************************************************

SELECT COUNT(DISTINCT user_name) FROM dm_user WHERE r_is_group = true
Result  >>  195107

SELECT COUNT(DISTINCT user_name) FROM dm_user WHERE r_is_group = false
Result  >>  170996

SELECT COUNT(DISTINCT group_name)
FROM dm_group
WHERE group_name
IN (SELECT user_name FROM dm_user WHERE r_is_group = true)

Result  >>  195107

SELECT COUNT(DISTINCT group_name)
FROM dm_group
WHERE group_name
NOT IN (SELECT user_name FROM dm_user WHERE r_is_group = true)

Result  >>  3411

SELECT DISTINCT dm_user.user_name, dm_group.group_name
FROM dm_group, dm_user
WHERE dm_group.group_name = dm_user.user_name

Total Results  >>  198518

SELECT DISTINCT dm_user.user_name, dm_group.group_name
FROM dm_group, dm_user
WHERE dm_user.r_is_group = true and dm_group.group_name = dm_user.user_name

Total Results  >>  195107

SELECT DISTINCT dm_user.user_name, dm_group.group_name
FROM dm_group, dm_user
WHERE dm_user.r_is_group = false and dm_group.group_name = dm_user.user_name

Total Results  >>  3411

SELECT COUNT(DISTINCT group_name)
FROM dm_group
WHERE group_name
IN (SELECT user_name FROM dm_user WHERE r_is_group = false)

Result  >>  3411

SELECT COUNT(DISTINCT group_name)
FROM dm_group
WHERE group_name
IN (SELECT user_name FROM dm_user)

Result  >>  198518

***************************************************************************************************************

***************************************************************************************************************

It’s just an observation and I don’t have much to comment.

puff! puff! puff!

puff! puff! puff!

Now I’m a fella with a heart of gold,
The ways of a gentleman,
I’ve been told.
The kind of a guy that wouldn’t even harm a flea
But if me and a certain character met
That guy that invented that cigarette
I’d murder that son of a gun in the first degree.
Well not because I don’t smoke myself
I don’t reckon they’ll harm your health
I’ve smoked all my life and I’m not dead yet.
But nicotine slaves are all the same,
At a pettin’ party or a poker game,
Everything’s must stop while they smoke a cigarette.

Smoke! Smoke! Smoke! that cigarette.
Puff! Puff! Puff!
And if you smoke yourself to death,
Tell Saint Peter at the golden gate
That you hate to make him wait,
But you got to have another cigarette.

Now in a game of chance the other night,
Old Dame Fortune was doing me right.
The kings and queens just kept on comin’ round
I played ’em hard and I bet ’em high
But my bluff didn’t work on a certain guy
He kept on raisin’ and layin’ that money down
Yeah he’d raise me, and I’d raise him.
I sweated blood, gotta sink or swim;
He finally called, but he didn’t raise the bet.
I said aces full, pal,
How ’bout you?
He said well I-I’m gonna tell you in a minute or two
But right now I got to have a cigarette.

Smoke! Smoke! Smoke! that cigarette.
Puff! Puff! Puff!
And if you smoke yourself to death,
Tell Saint Peter at the golden gate,
That you hates to make him wait,
But you gotta have another cigarette.

Now the other night I had a date
With the cutest little gal in the 48 states,
A high bred up-town fancy little dame.
She said she loved me,
And it seemed to me
That things were about like they oughtta be.
So Hand in hand we strolled down lover’s lane.
She was oh so far from a cake of ice,
Our smoochin’ party was going nice,
So help me Hannah I think I’d’ve been there yet
But I’d give her a kiss and a little squeeze
And she said, “Phil, would you excuse me please,
But I got to have a cigarette.”

Smoke! Smoke! Smoke! that cigarette
Puff! Puff! Puff!
And if you puff yourself to death,
Tell Saint Peter at the golden gate,
That you hate to make him wait,
But you got to have another cigarette.

~ Merle Travis

Uttakarsha - View my most interesting photos on Flickriver

Another day at work. Nothing much to do. I have been asked by my TL to rework on a proposal. It’s not for sending to the client. The guys wish to check out the improvement that we can put in the proposal after some kind of exercise we were going through in the past week or two. But, it’s not my cup of tea. And I am not sure what to do about it. Let me tell you that I am not a presales guy. I am a technical guy, an Engineering graduate. But my current employer being a PCMM level 5 organization, doesn’t find a need of having dedicated guys for presales. As I am free, they can ask me for anything. I had joined this organization around 9 months ago for a technical position. The HR had told me that it was an immediate onsite opportunity. In the Managerial Level Interview I was told that they have lots of projects (They indeed had few projects when I joined but none in the technology I expertise ( 🙂 that’s how we say it) in) and I can travel to Saudi, South Africa, Angola and I don’t remember which other countries. Yes, US is not in the list because I can be eligible for an H1B application only after being here for an year. So, after 9 months I am still here waiting for a project. There were two other people over here from the same technology. Both had joined around 3 months earlier to me. Karthik is now in Angola for some support project which they have managed somehow. He is there along with Raghav who has little experience in the technology. But he was smart enough to clear the client interview, thanks to Google chat (Sorry Raghav! Karthik told me so 🙂 Hope you don’t mind). Suba is on her maternity leave. And I am sitting over here trying to enjoy writing this post. So, that’s my situation.
I have indeed tried my best to escape from this situation. The first six months over here was the probation period and the good thing about it was that the notice period was only 1 month (Now it’s thrice). I had tried my luck but thanks to recession, I couldn’t even appear for a single interview. Anyway, the time is changing and I am getting some calls. Few days ago I appeared for XXX interview. The interviewers were beginners in the technology. It was easy satisfying them. HR was offering me a hike which is roughly 17%. She asked me to think over, but I never received a call again. On mailing twice to the consultant I got a reply, “….Your profile would not match the position….”. Last week I appeared for YYY ZZZZ. It was a client interview. The interviewers were experienced but still one of them (who was younger compared to the other two) refuted one of my answers and when I practically verified it later, just for my satisfaction, I confirmed my correctness. In the HR interview I was told that based on the company’s norms my current salary was on the higher side. Ultimately the lady said she will try to get approval for a salary which was 7.5% higher than my current. Now thats insane. Don’t you think so? I asked her whether it means that no one with my experience gets a package (current!) equivalent to mine in that organization. To my surprise she said it was true (HRs are big time frauds). Anyway, I am expecting the offer soon. I am expected to work for 14 hours a day and even on weekends. I got a small issue with this offer. Sometimes when you are desperate for a better future, your past comes and stands infront of you like a monster. I had resigned from my earlier organisation (an IT giant who’s Chairman had accepted to the fraud charges merely two months after I had switched) due to a misunderstanding with the Delivery Manager and another Manager who happened to be immediate next to the Practice Head as per designation. Now the bad news is that the same guy (later one) is also having an offer from YYY ZZZZ and he will be joining there obviously at some very high position. Now that’s called a screwed luck. Let me clarify here that the sourness in our relationship may have started with some kind of misunderstanding but I had put my best efforts to prove it to him that he is not dealing with some ordinary guy (I shall write about those efforts some other time, if you are too eager to know about it). And now I suppose that enthusiasm can cost me dearly. In another interview for PQRS, I was told that they are having a CoE (Center of Excellence). Now that indeed sounds fascinating but it is pretty the same thing which we have over here. On asking he told that they have more than one project running. I couldn’t resist asking the interviewer whether I will get to work on a project once I join the organization. The interviewer fumed up pointing out that they are not wasting their time simply interviewing me. As expected, I couldn’t clear it. Clearing it would not have made a difference anyway :). Anyways, let’s hope for the best. O Yes, one more hope. I have got another interview scheduled tomorrow. Have also send my resume at other organizations with expectations, but they are taking long. Let’s wait and watch. There is hardly anything else that I can do anyway.
For now I plan to talk to my Manager about his plans for me. As I have already said, I am not interested in writing proposals. My TL who is leaving for onsite day after tomorrow had a small chat with him regarding me yesterday. Seems he wants me to implement the proposed system in the proposal over here, just in an effort to prove our capability to ourselves. Though that sounds somewhat interesting to me but when I think about the ‘Immediate Onsite Opportunity’ I was told about, its back to square. An option could be spending few more months over here and then try for another offer. But I am going to spend those months doing what? Let’s see whether the discussion with my PM helps.
Okay… I just got a call. A company based in Noida with Headquarter in US is looking for people of my profile to work for their client in Chennai. The Lady was quiet excited and before having any kind of interview she made it clear that a salary which turns out to be 20% hike is what they are going to pay. Now that sounds cool. But did you smell somthing? The client is YYY ZZZZ. W…T…..F……..?
I need to get out of this. I’m going to look for my Manager. Will have a glass of water before that. The least you can do is to wish me good luck. Please do that. 🙂

<!– Turned Public after nine months –>