Linux | Send mail using internal mail command

Hi guys

We are on VEEM+VMWare infrastructure from a while, yet I am paranoid to maintain copies of the backups on different media once after going through couple of nightmares. We take weekly cold backup for our ERP Production server, move the tar files to a standby Linux server, and move those backups once again to an external HDD.

So basically I have a full VM backed up, the same VM holds a weekly cold backup, standby Linux server holding a copy of the cold backup files & to finish it, again copied to an external HDD. The funniest part is, we are moving the entire VMs to a TANDBERG Quick Station as well!

Though everything works fine till date, the last part of the deal needs to intimate me about successful completion of copying the tar files to the external media, ie, HDD that is formatted using NTFS, so that I can use it on both Linux and Windows environments

Be warned: The below bash script only works in an environment that has an internal SMTP server (or I don’t know how to relay the messages through an external SMTP relay and to disappoint you further, I don’t care about relaying through external SMTP). In addition, you must be on Linux 6 and above to use the internal mail command as demonstrated below. Linux 5 doesn’t support many switches provided with the example.

Further, below example demonstrates the basic level of error capturing with “bash” scripts as well

[code language=”bash” gutter=”false”]
#!/bin/bash
/bin/cp -rf /u02/backup/PROD_DAILY_BACKUP*.* /media/Elements/ 2> /dev/null

if [ $? -eq 0 ]
then
echo "The files were successfully copied to external hard disk" | mailx -v -s "ERP Tar Files Moved to External HDD | Success" -S smtp=smtp://server.domain.com -S from="ERP Alerts <someone@example.com>" someoneelse@example.com,someone2@example.com
else
echo "Files were not copied to external HDD" | mailx -v -s "ERP Tar Files to External HDD | Failed" -S smtp=smtp://server.domain.com -S from="ERP Alerts <someone@example.com>" someoneelse@example.com,someone2@example.com
fi
[/code]

Try it and let e know whether it worked for you :)

regards,

rajesh

Oracle developer 10g, developer 6i default values for columns using :PARAMETER.name

We just came across a peculiar situation. Recently we had developed a new approach towards developing new applications for Oracle EBS instance.

We do the following

Develop the prototype using developer 6i forms (hacked and patched for Windows 7 & Windows 8). The only change we make with the developer 6i is changing the “coordinate system” property from points to “inches”

image

This approach gives us rapid development scenarios, as we don’t have to upload the form module to instance top and compile it and try it against the TEST instances.

All we are doing is, once the complete application is tested on developer 6i, a copy of the same opened with Developer 10g forms, and copying the objects following the following sequence

  1. Window( s )
  2. Canvases
  3. Blocks
  4. Procedures & functions
  5. Parameters (if any)

Once mapping the PARAMETERS with PROFILE values, the form is ready for APPS instance testing (99% of the times everything is already tested, so a failure is seldom experienced)

Now, coming to one actual issue we are still struggling with is, using the :PARAMETER.xyz, :PARAMETER.abc as initial values for block elements.

The hacked developer 6i does not populate the initial value from :PARAMETER.xyz or :PARAMETER.abc during run time. ie, the first record (record orientation: forms) will not show the already populated values for the columns, however, the very next record(a delete does it) starts showing the :PARAMETER.xyz, abc values being populated to columns wherever they are set as initial values!!!

Do you have solutions? Please let us know with the comment section

Update 19.11.2012

With developer forms 6i, we loaded the values to column through the WHEN-NEW-FORM-INSTANCE like following

:PARAMETER.ORGANIZATION_ID := FND_PROFILE.VALUE(‘org_id’);
:PARAMETER.ORG_ID := FND_PROFILE.VALUE(‘mfg_organization_id’);
:PARAMETER.USERNAME := FND_PROFILE.VALUE(‘username’);

then, explicitly assigned the values to block columns like

:BLOCK.COLUMN1 := :PARAMETER.ORGANIZATION_ID;

in addition to setting up the initial value for the columns using :PARAMETER.xyz

Looks like the stuff are in place now :)

With Developer 10g, this issue has much easier to fix. All we had to do was to change the case of coding like following:

:parameter.organization_id := fnd_profile.value(‘org_id’);
:parameter.org_id := fnd_profile.value(‘mfg_organization_id’);
:parameter.username := fnd_profile.value(‘username’);

To

:PARAMETER.ORGANIZATION_ID := FND_PROFILE.VALUE(‘org_id’);
:PARAMETER.ORG_ID := FND_PROFILE.VALUE(‘mfg_organization_id’);
:PARAMETER.USERNAME := FND_PROFILE.VALUE(‘username’);

and without any further hacks, the 10g forms started showing initial values.

If you experienced the same, have a solution, please provide us the same with the comment section

regards,

admin