Button process with DBMS_SCHEDULER.run_job
Hi,
I need to execute the DBMS_SCHEDULER.run_job on click of a button .
I tried creating a process (On submit) with DBMS_SCHEDULER.run_job('JOBNAME')
when i tried executing directly in db there is no problem, but when i create the process in apex i am running into the following error
ORA-06550: line 2, column 19: PLS-00222: no function with name 'RUN_JOB' exists in this scope ORA-06550: line 2, column 1: PL/SQL: Statement ignored
Anybody have tried this before?? is there a way around or am i getting this wrong?
Thanks,
Resolved,
I had to specify the current session state while executing the scheduler job
In my case i made it false
BEGIN
-- Run job synchronously.
DBMS_SCHEDULER.run_job (job_name => 'JobName',
use_current_session => FALSE);
END;
Thanks
Similar Messages
-
After translation "buttoned" process with procedurecall don't work anymore
Hi all,
I have a application with a procedure called from a buttonclick which works fine before the translation.(en-us->nl) . After translation the application seems to work fine with the translated texts, except this buttonclick with procedure call.
When i delete the translation mapping all works fine again.
What's happening?
greetz,
MarkHi Scott,
Excuse me for not giving you the exact answers.
"My question again is: did the process associated with this button in the translated application not fire when you used this button?"
-- the process did not fire --
"Was that other button an "item button" or a "region position" button?"
-- It was a region position button --
"Why do you mention the conditions on the process? Are you just explaining that as part of the experiment ... "
-- yes, i didn't know of some of the conditions are involved with the disfunctionality of the button --
"If the other button is an item button and the original problem button is an item button, is it the case that one would fire the process but the other would not?"
-- as you read, that was not the case --
"A button in a region position caused this reaction." "I have no idea what you mean."
-- While building some new functionality in the form, i've noticed that on a certain moment the procedure/process (without the conditions, as described before) fires after a click on another region position button. --
"So what is your conclusion? That item buttons in translated applications won't allow associated processes to fire? That may be the case (and it would be a bug we would fix) but I want to know if this is your conclusion or if there is some uncertainty."
-- I'm new with translating an application and dissapearing functionality ;-)
Likewise functionality is soon needed in other parts of the application. If you wish i'll keep you informed.
Scott, thanks for your patience! Your first question about the kind of button did it for me.
Mark -
Problem with the run_job,shell script with sqlldr
Hi Gurus,
I Created a job which calls the shell script and i understood from the other posting this job is going to execute with nobody,
I had done the below testing
Test 1) Shell script calls the SQL file, this SQL file executes the procedure.
Test 2) Shell script calls the sqlldr command.
When i execute the Test cases with , dbms_scheduler Run_job procedure, Test1 is success but Test2 was failed
When i execute the Test cases with, logging into box with owner of the shell & both test cases are successful.
Parent folder & Shell files are given with 777 permissions. & the Oracle db is version 10.2.0.1.0.
Error:
STANDARD_ERROR="SQL*Loader-522: lfiopn failed for file (*.log)"
Please provide me your inputs its bit urgent Thanks a lot for your help.
Edited by: 926769 on May 23, 2012 2:27 PMFirst of all let's look at your environment ... a totally unpatched version of software that is so old it is in desupport mode. You should upgrade to a fully supported version but, if you can't, at least to 10.2.0.5.
That said without seeing any of your code, or a listing showing permissions on the directory and files, there is insufficient information from which to help you.
Please post ALL information required for us to understand what you are doing an your environment.
But before I decided that NOBODY was doing anything ... I'd shell out to the server from SQL*Plus using the HOST command and verify that permissions are as you believe them to be. There is every reason to believe SQL*Loader is having an issue with your file as identified. -
Error In Running dbms_scheduler.run_job ORA-27369 with psexec.
I'm using dbms_scheduler in Oracle 10g on Windows 2008 (32-bit).
A recent application upgrade moved a portion of my work to a Windows 2008 R2 64-bit server.
Becuase of this I had to move some processing to this server.
When the internal processes within the batch files ran locally, everything functioned properly.
However, when I used 'psexec' to run them remotely on the other server, they crashed.
The batch processes work perfectly fine on the OS level. I believe the issue may have something to do with return code, but I'm not sure.
JOB:
BEGIN
DBMS_SCHEDULER.Create_Job(
Job_Name => 'SCENEXPORT',
Job_Action => 'C:\WINDOWS\SYSTEM32\CMD.EXE',
Number_of_Arguments=> 3,
Job_Type => 'EXECUTABLE',
Enabled => false);
DBMS_SCHEDULER.Set_Job_Argument_Value('SCENEXPORT',1,'/q');
DBMS_SCHEDULER.Set_Job_Argument_Value('SCENEXPORT',2,'/c');
DBMS_SCHEDULER.Set_Job_Argument_Value('SCENEXPORT',3,'E:\DBAAdmin\Hastus\PSoft\Test\Hastus\Extract\ScenariosR.bat');
END;
BATCH: (ScenariosR.bat)
psexec \\test236 -u <username> -p <pwd> e:\DBAAdmin\Hastus\PSoft\Test\Hastus\Extract\Scenarios1.bat
ERROR:
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 2
Anyone else working with 'PSEXEC'?
Any ideas how to work through this issue?
Thanks.
BillI appreciate the attempt. However, it does not address a Windows environment.
In addition, ‘exertnaljob.ora’ does not exist in a Windows 10g install.
If the Windows similar is the Windows Service Oracle JobScheduler, it is already using an admin level account and should not be encountering permissions issues.
So, swing and a miss.
Thanks,
Bill
Additional testing revealed some strange behavior.
When I run it the first time, it fails.
When I run it immediately after the first failure, it fails.
However if I wait about ten minutes, it completes without issue.
SQL> BEGIN
2 DBMS_SCHEDULER.RUN_JOB ('SCENEXPORT');
3 END;
4 /
BEGIN
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 2
SQL> /
BEGIN
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 2
SQL> /
PL/SQL procedure successfully completed.
SQL> -
Stop a script process with a "Cancel" button
Hi,
I display a progress bar with a "Cancel" button while the script is running. I can stop the script by pressing the "Esc" key but I would like to stop the script process with the "Cancel" button. What kind of command/event can I add to the button for doing this ?
Thanks-> Update All your Firefox Plugins
* https://www.mozilla.org/en-US/plugincheck/
* '''When Downloading Plugins Update setup files, Remove Checkmark from Downloading other Optional Softwares with your Plugins (e.g. Toolbars, McAfee, Google Chrome, etc.)'''
* Restart Firefox
Check and tell if its working. -
Error with dbms_scheduler and shell script execution
Hi,guys.
I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
DB version: 10g
And my scripts:
Shell scripts (permisons 755):
#!/bin/ksh
export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
export ORACLE_BASE=/home/oracle/product
export ORACLE_SID=zabbix
export ORACLE_HOME=/home/oracle/product/db_home
${ORACLE_HOME}/bin/rman<<EOF
connect target /
run {backup recovery area delete all input;}
EOF
{ echo "From:[email protected]"
echo "To: [email protected]"
echo "Subject: Recovery area"
echo 'Content-Type: text/html'
echo
echo '<html><body><table border="1" cellspacing="1">'
echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
echo "</table></body></html>"
} | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
And below pl/sql script:
begin
DBMS_SCHEDULER.CREATE_JOB
job_name => 'FLASH_RECOVERY',
job_type => 'EXECUTABLE',
job_action => '/home/oracle/backup/test.sh',
start_date => sysdate,
job_class => 'DEFAULT_JOB_CLASS',
enabled => TRUE,
auto_drop => FALSE,
comments => 'FLASH RECOVERY USAGE AREA backup and delete'
END;
/And this job execution:
begin
DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
end;What can be wrong? For me, I think it's something with permisions.
I hope you got my idea and could help me.
Tom
Edited by: safazaurs on 2013.18.2 22:16There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.
-
Error In Running dbms_scheduler.run_job ORA-27369.
Dear Sir
I am trying to execute one batch file from one schedule which imports the data using imp command now my files look like this
*****************imp.bat ***************
imp treasury/tisnic@orcl FILE="C:\data\gis031164.dmp" LOG="C:\data\imp_gis031164.log" FULL=Y IGNORE=Y FEEDBACK=1000
*********************job created with bellow code *******************************
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name=> 'myjob',
job_type=> 'EXECUTABLE',
job_action=> 'c:\windows\system32\cmd.exe /c c:\imp.bat',
enabled=> TRUE,
auto_drop=>false,
start_date => sysdate + 9999
commit;
end;
now when i run my job with bellow command
begin
dbms_scheduler.run_job('myjob');
end;
it gives me error as follow
ERROR at line 1:
ORA-27369: job of type EXECUTABLE failed with exit code: Incorrect function.
ORA-06512: at "SYS.DBMS_ISCHED", line 148
ORA-06512: at "SYS.DBMS_SCHEDULER", line 374
ORA-06512: at line 2
kindlly help as i have tried all your solutions in so many threads but same issue not finding any solution for my problem
Thanks & Regards
AashishDear sir
Actually my motive is to execute one shell script which imports all datafile (exported .dmp) files stored in specific folder and i need to run that job on my form 10g button click trigger but its not working ..
***********************************Job name : importjob*****************************************
begin
DBMS_SCHEDULER.CREATE_JOB (
job_name=> 'importjob',
job_type=> 'executable',
job_action=> '/u1/datafile/imp.sh',
enabled=> TRUE,
auto_drop=>false
commit;
end;
1. when i tried to run above job with bellow code it gives me error
begin
DBMS_scheduler.run_job('importjob');
end;
" ORA-27369: job of type EXECUTABLE failed with exit code: 255 "
2. but when i tried to excute that shell script directly from server like bellow
$ /u1/datafile/imp.sh
it works fine and do what i want
permission to my shell scrpit and complete datafile (folder) is set to
chmod 777 -R /u1/datafile
chmod 777 -R /u1/datafile/imp.sh
now seniors please kindly help me to get my problem resolved and bellow is me files which i used in complete procedure
***************************file name : imp.sh.env *************************************
source /u/upsegid/dbtreasury.env
for i in `ls *.dmp.gz`
do
echo $i
gunzip $i
done
for i in `ls *.dmp`
do
imp parfile=imp1.par file=$i
echo ' ' >>impall.log
echo $i >> impall.log
echo ' ' >>impall.log
cat imp1.log >> impall.log
mv $i ./u1/backup/
gzip ./u1/backup/$i
done
# Remeber to change dates in vdtfinal.sql and vdtdaily.sql file for Plan Data
# Remeber to change date in vdtfinal.sql and vdtdaily.sql file for deleting previous Month Data From Koshtb
# cd ../sqls/vdt1011
#sqlplus vdt1011/mn1346@treasury @vdtfinal
exit
***************************file name : dbtreasury.env *************************************
ORACLE_BASE=/u/apps; export ORACLE_BASE
ORACLE_HOME=/u/apps; export ORACLE_HOME
PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin:.;export PATH
ORACLE_SID=orcl; export ORACLE_SID
TERM=treasury; export TERM
ORACLE_TERM=xterm; export ORACLE_TERM
NLS_LANG=AMERICAN; export NLS_LANG
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
ORACLE_PATH=$PATH:$ORACLE_HOME/bin; export ORACLE_PATH
LD_LIBRARY_PATH=$PATH:$ORACLE_HOME/lib:/usr/lib:/lib:.;export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
#DISPLAY=apps:0.0; export DISPLAY
TMPDIR=/tmp; export TMPDIR
TMP=/tmp; export TMP
TEMP=/tmp; export TEMP
TEMPDIR=/tmp; export TEMPDIR
Now sir kindly help me what and were i am doing wrong because i need to done this any how -
Error While Running DBMS_SCHEDULER.RUN_JOB in Oacle 11g DB in LINUX ENvirnoment
Dear ALL,
I have two separate Server, One is App. Server which is on WINDOWS 2008 and the DB server on LINUX. I'm created a job for Daily logical Backup of Database through EXP command on DB Server.
I have created DBMS_SCHEDULER.CREATE_JOB with JOB_ACTION /home/oracle/wms_dbdmp/auto_backup.sh the Location of .sh file which contain the following code
#!/bin/bash
exp test/test@orcl file=/home/oracle/wms_dbdmp/test.dmp log=/home/oracle/wms_dbdmp/test.log compress=N rows=Y grants=Y owner=(test) statistics=NONE
ECHO "Export done successfully..."
Exit 0
Now i created job successfully, but when i'm invoking this .sh file through DBMS_SCHEDULER>RUN_JOB('backup_01');
I'm facing error which are given as-
ORA-27369: job of type EXECUTABLE failed with exit code: Permission denied
ORA-06512: at "SYS.DBMS_ISCHED", line 185
ORA-06512: at "SYS.DBMS_SCHEDULER", line 486
ORA-06512: at line 1
I did this on WINDOWS Environment Successfully. I'm naive user for LINUX Envirnoment SO Please Guide me to rid off to this problem.
I will be very thank full to all...I wrote the script as
#!/bin/bash
exp test/test@orcl file=/home/oracle/wms_dbdmp/test.dmp log=/home/oracle/wms_dbdmp/test.log compress=N rows=Y grants=Y owner=(test) statistics=NONE
exit 0
But it didn't work through procedure....how to invoke .sh file through db procedure...? -
I bought a brand new mac and follow through setting up process with my apple id but when I open App Store I don't see lion into the purchases list. why?
Updates come through Software Update not the App Store. If you have to reinstall Lion that is done via Internet Recovery.
OS X Lion- About Lion Recovery
OS X Lion- Run Software Update to use Lion Internet Recovery
Lion maintenance and recovery operate via the Recovery HD. It's possible to create a separate recovery disk on a flash drive using OS X Lion: About Lion Recovery Disk Assistant.
To boot into the Recovery HD:
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button. -
Dbms_scheduler.run_job doesn't work
Hi,
We are currently using dbms_scheduler to execute linux system command. It works all fine before I update our database from 10.2.0.3 to 10.2.0.4. Now if we choose dbms_scheduler.run_job with parameter use_current_session => true, the following error occurs:
ORA-27370: job slave failed to launch a job of type EXECUTABLE ORA-27300: OS system dependent operation:getting external job pid failed with status: 2 ORA-27301: OS failure message: No such file or directory ORA-27302: failure occurred at: sjsec 6a
While we change use_current_session => false, everything works again.
As a result, we have to drop the job with force => true. Then the job details are not listed in view all_scheduler_job_run_details. wow, it seems like a bomb chain. Now everything need to be done in different way. Does anyone know why it will come and how to fix it?
Regards,
LikHi Lik and Ravi,
I'm in a similar situation but haven't managed to get it fixed.
Lik, what exactly did you do to the $ORACLE_HOME/bin dir to get it working again?
I've recently upgraded to 10.2.0.4 from 10.2.0.2 on Linux and I'm hitting problems running jobs.
Oracle is the os user executing the job.
My permissions on the three files you mention to check look ok:
-rwsr-x--- 1 root oinstall 64258 2008-06-17 10:45 /opt/app/oracle/product/10.2.0/db_1/bin/extjob
-rwxr-xr-x 1 oracle oinstall 64258 2008-06-17 10:45 /opt/app/oracle/product/10.2.0/db_1/bin/extjobo
-rw-r--r-- 1 root oinstall 1534 2005-12-22 13:39 /opt/app/oracle/product/10.2.0/db_1/rdbms/admin/externaljob.ora
THe Oracle bin dir has execute permissions also:
drwxr-xr-x 2 oracle oinstall 12288 2008-06-18 12:21 bin
I've looked through your guide also, but no luck with the suggestions mentioned there.
I still get this message when I execute the job (oracle is executing it):
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:getting external job pid failed with
status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: sjsec 6a
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1
Also, if I create a test job, it does execute the script, as I can see that /tmp/testjob.out is created.
-rw-r--r-- 1 nobody nobody 15 2008-06-18 14:01 /tmp/testjob.out
however, I still get the error message from Oracle:
ERROR at line 1:
ORA-27370: job slave failed to launch a job of type EXECUTABLE
ORA-27300: OS system dependent operation:getting external job pid failed with
status: 2
ORA-27301: OS failure message: No such file or directory
ORA-27302: failure occurred at: sjsec 6a
ORA-06512: at "SYS.DBMS_ISCHED", line 150
ORA-06512: at "SYS.DBMS_SCHEDULER", line 441
ORA-06512: at line 1
This is the script:
#!/bin/ksh
echo "THIS IS A TEST" > /tmp/testjob.out
exit 0
Is there anything else I can try?
Thanks,
Owen.
Message was edited by:
owen00 -
DBMS_SCHEDULER.RUN_JOB causes scheduled job not to run again
Environment: 10.2.0.2 Linux 64-bit
Hi,
I have some DBMS_SCHEDULER chain jobs scheduled to run every hour which has been running fine with no issues for a while now.
I needed to run a couple of jobs manually in-between scheduled times so I ran the job using DBMS_SCHEDULER.RUN_JOB, and that worked as expected as it has done in the past.
This issue is that the jobs I ran manually haven't run at their scheduled time since I did that. The only way around it was to recreate the job completely.
Any idea if this is normal functionality, or should I be raising this as a possible issue through Oracle Metalink?
Any help or ideas would be much appreciated.
Thanks
TimHi Tim,
This is a known bug which is tracked internally by bug #5705385. It will be fixed in the next patchsets for 10.2 and 11.1 (i.e. 10.2.0.5 and 11.1.0.7) . If you urgently need a fix, an official patch seems to be available for 10.2.0.3 .
There does seem to be a workaround - using run_job again after the first run_job has completed will not do anything but the chain job should again run on schedule.
Hope this helps,
Ravi. -
On the 11g db that I have access to, I'm seeing different systimestamp value while running plsql block using
dbms_scheduler.run_job with use_current_session = true and false.
My job looks like following.
dbms_scheduler.create_job(
job_name => 'tk2timestamp_test',
job_type => 'PLSQL_BLOCK',
job_action => 'begin insert into tktest values (systimestamp, to_char(sysdate, ''DD-MON-YYYY HH24:MI:SS''), current_timestamp, localtimestamp, dbtimezone, sessiontimezone); end;',
enabled => true,
auto_drop => false);
I see that UTC time was returned as systimestamp if it is called with true and PST if it is called with false.
In the same session, I get following result with select statement.
select systimestamp, current_timestamp, localtimestamp, dbtimezone, sessiontimezone from dual;
SYSTIMESTAMP CURRENT_TIMESTAMP LOCALTIMESTAMP DBTIMEZONE SESSIONTIM
27-MAR-13 04.05.59.914647 PM +00:00 27-MAR-13 09.05.59.914650 AM -07:00 27-MAR-13 09.05.59.914650 AM +00:00 -07:00
Can any one let me know why this is happening? Why systimestamp value is not PST if use_current_session = true?Thank you again for your response.
I've got following result.
SQL> SELECT SYSTIMESTAMP FROM dual;
SYSTIMESTAMP
28-MAR-13 07.13.08.556079 PM +00:00
SQL> SELECT SYSTIMESTAMP AT TIME ZONE 'PDB' FROM dual;
SELECT SYSTIMESTAMP AT TIME ZONE 'PDB' FROM dual
ERROR at line 1:
ORA-01882: timezone region not found
SQL> SELECT SESSIONTIMEZONE,CURRENT_TIMESTAMP, LOCALTIMESTAMP FROM dual;
SESSIONTIM CURRENT_TIMESTAMP LOCALTIMESTAMP
-07:00 28-MAR-13 12.13.41.196653 PM -07:00 28-MAR-13 12.13.41.196653 PM
BTW, I have two instances returns the result like this if this information helps.
I've created following table in order to help proving something is changing whether I pass true or false to use_current_session parameter when calling dbms_scheduler.run_job.
create table tktest (tksystimestamp timestamp(6), tktocharsysdate varchar2(100), tkcurrent_timestamp timestamp(6), tklocaltimestamp timestamp(6), tldbtimezone varchar2(100), tksessiontimezone varchar2(100));
Then I created job as following. This job inserts systimestamp,sysdate,current_timestamp,localtimestamp,dbtimezone, and sessiontimezone to above table.
begin
dbms_scheduler.create_job(
job_name => 'tk2timestamp_test',
job_type => 'PLSQL_BLOCK',
job_action => 'begin insert into tktest values (systimestamp, to_char(sysdate, ''DD-MON-YYYY HH24:MI:SS''), current_timestamp, localtimestamp, dbtimezone, sessiontimezone); end;',
enabled => true,
auto_drop => false);
exception
when others then
null;
end;
Run the job using run_job procedure.
exec dbms_scheduler.run_job(job_name => 'tk2timestamp_test',use_current_session => true);
Above inserts following record in tktest.
SYSTIMESTAMP SYSDATE CURRENT_TIMESTAMP LOCALTIMESTAMP DBTZ SESSIONTZ
28-MAR-13 07.04.58.227616 PM 28-MAR-2013 19:04:58 28-MAR-13 07.04.58.227617 PM 28-MAR-13 07.04.58.227617 PM +00:00 +00:00
Run the job using run_job procedure again but use 'use_current_session => false' this time.
Above inserts following record in tktest.
SYSTIMESTAMP SYSDATE CURRENT_TIMESTAMP LOCALTIMESTAMP DBTZ SESSIONTZ
28-MAR-13 12.05.24.150817 PM 28-MAR-2013 12:05:24 28-MAR-13 12.05.24.150819 PM 28-MAR-13 12.05.24.150819 PM +00:00 -07:00
I also run following from the same session.
SQL> select systimestamp, current_timestamp, localtimestamp, dbtimezone, sessiontimezone from dual;
SYSTIMESTAMP CURRENT_TIMESTAMP LOCALTIMESTAMP DBTZ SESSIONTZ
28-MAR-13 07.05.40.640499 PM +00:00 28-MAR-13 12.05.40.640503 PM -07:00 28-MAR-13 12.05.40.640503 PM +00:00 -07:00
So why executing dbms_scheduler.run_job with 'use_current_session => false' causes SEESSIONTIMEZONE to be PST8PDT?
I have an another instance pointing all the time based on UTC and my question is why only above instance is showing result like above and what causes it.
thx. -
DBMS_SCHEDULER.run_job problem
Hi friends.I have one problem. I use Oracle 10g(r2) in oracle enter.server. Also I can execute backupdb.sh script from terminal
success.But I created Job sheduler as
BEGIN
DBMS_SCHEDULER.CREATE_JOB
job_name => 'BACKUP_DB_JOB',
job_type => 'EXECUTABLE',
job_action => '/orahome/orastart/./backupdb.sh',
start_date => '13-jan-2010 6:32 PM',
repeat_interval => 'FREQ=DAILY'
END;
although i execute following
begin
DBMS_SCHEDULER.run_job (job_name=>'BACKUP_DB_JOB');
end;
then occur error [1]: (Error): ORA-27369: job of type EXECUTABLE failed with exit code: 274660 ORA-06512: at "SYS.DBMS_ISCHED", line 150 ORA-06512: at "SYS.DBMS_SCHEDULER", line 441 ORA-06512: at line 4
also i see detail information from dba_scheduler_job_run_details.ADDITIONAL_INFO described as
ORA-27369: job of type EXECUTABLE failed with exit code: 274660
STANDARD_ERROR="Oracle Scheduler error: Not running as extjob or extjobo."
there are for extjob following
ls -l $ORACLE_HOME/bin/extjob
-rwsr-x--- 1 root oinstall 64842 Oct 15 06:58 /orahome/oracle/product/10.2.0/db_1/bin/extjob
and
ls -l $ORACLE_HOME/rdbms/admin/externaljob.ora
-rw-rwxr-- 1 640 oinstall 1536 Jan 19 15:08 /orahome/oracle/product/10.2.0/db_1/rdbms/admin/externaljob.ora
why that error happen?See the below forum for solution
Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
Hope this helps,
Regards
http://www.oracleracexpert.com
Click here for [Block Corruption and recovery|http://www.oracleracexpert.com/2009/08/block-corruption-and-recovery.html]
Click here for [Redo log corruption and recovery|http://www.oracleracexpert.com/2009/08/redo-log-corruption-and-recovery.html] -
Batch processing with an image overlay
Is it possible to do batch processing with an image overlay in FW CS4?
I'm trying to resize several hundred images and place rounded corners on them.
If this cannot be done in FW, does anyone know of another program that could accomplish this?Hi Marje,
It's possible to include both resizing and image overlay in a custom Fireworks command that can be used in batch processing. To get started, you could check out this tutorial that deals with the first step.
That article describes how to perform image resize and overlay (in that case, a watermark), and then how to record the steps and turn them into a custom command that can be later used in batch processing.
Once you saved the custom command, click File >> Batch Process, and follow the steps below:
In the first window, select the images you want to process.
On the next screen, open the Commands dropdown menu and select the custom command you created (it'll probably be on the bottom of the list), and click the Add button to include it in the batch process list.
Finally, on the next screen select the location of the processed files, and optionally save the batch script for later use.
Good luck! -
Strange issue with dbms_scheduler
Hi All,
Below is our DB details
SQL> select *
2 from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - ProductionWe have a job wchich is defined as below
DBMS_SCHEDULER.CREATE_JOB
job_name => 'CSF_JOB_MONITORING'
,start_date => TO_TIMESTAMP_TZ('2010/12/08 14:45:00.000000 +04:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
,repeat_interval => 'FREQ=HOURLY'
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'PLSQL_BLOCK'
,job_action => 'begin upload_utilities.monitor_jobs; end;'
,comments => NULL
);The procedure upload_utilities.monitor_jobs will check some log tables and will mail to specified users the details.
Till yesterdya, teh job was working fine. We made some changes in the procedure upload_utilities.monitor_jobs and compiled succesfully. After that the job is behaving strangely. The output of the job is entirely different from the output when we are running the procedure manually.
Even, the output is fine when we are running as below. We changed the email list, but the job is taking the old list. exec DBMS_SCHEDULER.run_job (job_name => 'CSF_JOB_MONITORING');We tried droping and recreating the job. Still teh same behaviour.
Appreciate your help,
Regards,
JeneeshHi Centinul,
The job is supposed to check the log tables for the succesful completion of some processes. If the log entry is missing in the log table, the job will send a mial to a group of mail ids.
For example, the below is a part of the cod, which will check one of the processes.
declare
lc_status varchar2(15);
ld_date date;
begin
ld_date := get_job_scheduled_time('CIF_HAND_OFF');
if ld_date is null then
apps.mail_utils.mail(lc_mail_from,lc_techops_mail,'CSF Job - CIF_HAND_OFF Failed',
'CSF-CIF_HAND_OFF is not scheduled/Running Properly. Please check.');
elsif ld_date > trunc(sysdate)+1 then
begin
select 'COMPLETED'
into lc_status
from log_details
where creation_date >= trunc(sysdate)
and text = 'CIF_HAND_OFF Submitted Succesfully'
and rownum = 1;
exception
when others then
apps.mail_utils.mail(lc_mail_from,lc_techops_mail,'CSF Job - CIF_HAND_OFF Failed',
'CSF-CIF_HAND_OFF Logs Shows that the Job is not Compeleted Succesfully. Please check.');
end;
end if;
end;When I am running the procedure manually, we are not getting any mails, which is correct. But trough the job, we are getting mails for all teh processes that they are failed.
And also, teh mails are going to an old list, which we changed. The amil list is kept in a parameter table.
Our issue is, why the procedure is behaving diffrently in job. And we confirmed that only one procedure exists in that name
SQL> select object_name,object_type
2 from dba_objects
3 where object_name = 'UPLOAD_UTILITIES';
OBJECT_NAME OBJECT_TYPE
UPLOAD_UTILITIES PACKAGE
UPLOAD_UTILITIES PACKAGE BODYRegards,
jeneesh
Maybe you are looking for
-
Generating .pdf file from Reports Builder 10g
Hi, I made a report in Reports Builder 10g and every label and field I set, but when I print the report throw reports builder field are displaced randomly, i.e. they are not where I set them in paper layout. In print preview everything is OK, but whe
-
Quasi Newton Optimization Algorithm in Java
I need to implement Quasi Newton Optimization Algorithm in Java, I�ve found it in C. Can anyone help me to find this in Java?
-
How to unlock iphone 1st gen and it be like an ipod touch
how to unlock iphone 1st gen and it be like an ipod touch
-
Installing iAS 1.0.2 on W2K
I am trying to install iAS 1.0.2 on W2K server to deploy Forms and Reports.The DB is 8.1.7 on a separate machine. I could not see Oracle HTTP service as well as Forms server service.I could see reports server service could start after Reboot. Could a
-
How to watch SOAP requests/responses
Hello, I am developing web services on 9.0.4. I want to watch the SOAP Requests that are sent from client and that are received from server. Is there any monitoring service provided by Oracle ? Thanks Kiran