Thread: [Job Notification Pack] Error adding notification using 'long' job name


Permlink Replies: 4 - Pages: 1 - Last Post: Mar 31, 2008 11:05 AM Last Post By: RnR
steegss

Posts: 8
Registered: 07/24/98
[Job Notification Pack] Error adding notification using 'long' job name
Posted: May 23, 2007 1:35 AM
Click to report abuse...   Click to reply to this thread Reply
Hi, I've implemented successfully the Job Notification Package. The only problem I have is the length of an existing job name. Adding job COR_OPSCHONEN_GEGEVENS, results in an error:

SQL> exec add_job_email_notification ('COR_OPSCHONEN_GEGEVENS','dba@ppf.nl','JOB_SUCCEEDED');
BEGIN add_job_email_notification ('COR_OPSCHONEN_GEGEVENS','dba@ppf.nl','JOB_SUCCEEDED'); END;
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "SYS.ADD_JOB_EMAIL_NOTIFICATION", line 206
ORA-06512: at line 1

Adding a 'short' name of the job (e.g. COROPSCH) works fine:

SQL> exec add_job_email_notification ('COROPSCH','dba@ppf.nl','JOB_SUCCEEDED');

PL/SQL procedure successfully completed.


I do not want to rename all jobs to a 'short' name.
Does anybody know where to alter the length for the job definition so I can us the original 'long' name without the error?

Stephan

user577101

Posts: 1
Registered: 05/29/07
Re: [Job Notification Pack] Error adding notification using 'long' job nam
Posted: May 29, 2007 3:45 AM   in response to: steegss in response to: steegss
Click to report abuse...   Click to reply to this thread Reply
I faced the same error and while going through the code found that this problem will occur for long job names as well as long user names for whose job, the notification is being created.

This is because

variable 'notifier_job_name' in 'add_job_email_notification' procedure has length 30 and two strings of same length ('canon_job_owner' and 'notifier_job_name') are being appended to this variable. Increasing the length of this variable solved the issue for me.

Hope this helps...

Krishnaprasad
steegss

Posts: 8
Registered: 07/24/98
Re: [Job Notification Pack] Error adding notification using 'long' job nam
Posted: May 30, 2007 1:56 AM   in response to: user577101 in response to: user577101
Click to report abuse...   Click to reply to this thread Reply
Krishnaprasad, thanks for the input. It works now.

Stephan
AGEESER

Posts: 3
Registered: 12/01/05
Re: [Job Notification Pack] Error adding notification using 'long' job name
Posted: Mar 28, 2008 11:27 AM   in response to: steegss in response to: steegss
Click to report abuse...   Click to reply to this thread Reply
I'm trying to send notifications to mulitple addressesl, and have been successful in creating the right syntax, I've tried:
exec add_job_email_notification('J1','user1@company.com;user2@company.com','JOB_FAILED');

and other combinations. What is the trick to send to more the one address?
RnR

Posts: 988
Registered: 12/11/01
Re: [Job Notification Pack] Error adding notification using 'long' job name
Posted: Mar 31, 2008 11:05 AM   in response to: AGEESER in response to: AGEESER
Click to report abuse...   Click to reply to this thread Reply
Hi,

As the documentation says, recipient_address may be a comma-separated list of e-mail addresses. So you should be using commas to separate you addresses e.g.

'user1@company.com,user2@company.com'

Hope this helps,
Ravi.
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums