Scheduling jobs through dbconsole
Just trying to clear my concepts about automating jobs, my understanding is we can automate jobs through crontjobs (on unix) /taskscheduler (on windows)
The other option is DBMS_SCHEDULER.
any jobs like RMAN backups or sql scripts running should show up in below query(they are not running through Scheduled Tasks (its window box)
but i see few jobs & RMAN backups running on one db but i can't see them in this query, what i am missing?
SQL> SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
OWNER JOB_NAME ENABL
SYS AUTO_SPACE_ADVISOR_JOB TRUE
SYS GATHER_STATS_JOB FALSE
SYS FGR$AUTOPURGE_JOB FALSE
SYS PURGE_LOG TRUE
ORACLE_OCM MGMT_STATS_CONFIG_JOB TRUE
ORACLE_OCM MGMT_CONFIG_JOB TRUE
6 rows selected.
Edited by: DBA2011 on Jun 21, 2012 9:09 AM
DBA2011 wrote:
Just trying to clear my concepts about automating jobs, my understanding is we can automate jobs through crontjobs (on unix) /taskscheduler (on windows)
The other option is DBMS_SCHEDULER.
any jobs like RMAN backups or sql scripts running should show up in below query(they are not running through Scheduled Tasks (its window box)
but i see few jobs & RMAN backups running on one db but i can't see them in this query, what i am missing?
SQL> SELECT owner, job_name, enabled FROM dba_scheduler_jobs;
OWNER JOB_NAME ENABL
SYS AUTO_SPACE_ADVISOR_JOB TRUE
SYS GATHER_STATS_JOB FALSE
SYS FGR$AUTOPURGE_JOB FALSE
SYS PURGE_LOG TRUE
ORACLE_OCM MGMT_STATS_CONFIG_JOB TRUE
ORACLE_OCM MGMT_CONFIG_JOB TRUE
6 rows selected.
Edited by: DBA2011 on Jun 21, 2012 9:09 AMdepends on how the job was scheduled. You should also check DBA_JOBS.
And of course, there is no guarantee the job you expect to see actually exists in database B just becaue it existsin database A .....
Similar Messages
-
Possibility of deleting the scheduled jobs through reports
hi friends
is it possible to delete the schedule jobs through report making?
i mean i have to enter a particular user name
list of jobs scheduled by him has to be listed
and selecting the unwanted job have to delete all the jobs
Thanks and regards
s.janagarJangar,
Yes. This can be done. Write a delete statement and use it on the table TBTCO.
Note: Any other operations can be done on the tables TBTC*
Thanks,
Babu Kilari -
GETWA_NOT_ASSIGNED error while scheduling job through F9
Hi All,
i am getting <b>GETWA_NOT_ASSIGNED</B> dump while scheduling a job through F9 and giving local printer as LP01.
any pointers regarding this ?
thanks
kunal kishanHi Ankesh,
can you please elaborate on this.???
Basiclly when i am trying to schedule a job by pressing F9 and setting it to immediate. when i chek in SM36, the job gets cancelled. The dump says "GETWA_NOT_ASSIGNED" error. The source code where the error is soming is a refresh statement. -
Dbconsole scheduled job question
I have successfully re-created my dbconsole and repository. I then clicked on the 'Jobs' link and created a SQL Script job to execute once a day.
My code for this job is as follows:
set serveroutput on;
exec system.export_db;
EXPORT_DB is a procedure which uses the DataPump API to perform a daily export of a few db schemas. I have this job running successfully on a dozen other servers with no issues at all.
However, on this particular server, I get the following error, and I can't figure out what could possibly be different:
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'SYSTEM.EXPORT_DB' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I can run the same job through SQLPlus, but not through the DBControl. I added the same procedure to the SYS schema, but always the same error.
Normally, I know that I would need to grant execute permissions on the procedure to the user calling the procedure. But I can't seem to get this to work.
Any ideas would be much appreciated.
Thanks,
NoraI found another way to do it.. I instead used the 'Scheduler Jobs' portion of the Dbcontrol, and was able to successfully schedule and run the job there.
Thanks,
Nora -
Sending log files for scheduled jobs as attachment through mail
Hi All,
Can any one please help me out to write a pl/sql program to send log files for scheduled jobs as attachment through mail.
Thanks.Why would anyone do that as this code has already been posted here a thousand times, it is all over the Internet, and the only thing you need to do is to search for it?
I agree it would cost you some effort, but you are getting paid for it, and we are not getting paid for delivering it on a golden plate on your doorstep, as you can not be bothered to use online resources.
Sybrand Bakker
Senior Oracle DBA -
Hi all,
We are running 11gR2 PS1 (BP01). We have a scheduled job that creates role and then populates approver_user attribute (with user ID) in the catalog entry of this role. We only want the approver_user to be populated and not the certifier and fulfillment user on the catalog.
When i view the role in catalog, the approver user is correctly set with the user ID provided by the scheduled job however I see that certifier user and fulfillment user are automatically set to oiminternal.
We did not see this behavior in R2.
Are there any configurations that will prevent certifier user and fulfillment users to be auto populated with the identity of the user running the scheduled job (oiminternal)?
Thanks.So while this certainly isn't the most elegant of solutions, and most assuredly isn't in the realm of supported by Oracle...
I've used the DBMS_IJOB.DROP_USER_JOBS('username'); package to remove the 194558 orphaned job entries from the job$ table. Don't ask, I've no clue how they all got there; but I've prepared some evil looks to unleash upon certain developers tomorrow morning.
Not being able to reorganize the JOB$ table to free the now wasted ~67MB of space I've opted to create a new index on the JOB$ table to sidestep the full table scan.
CREATE INDEX SYS.JOB_F1_THIS_NEXT ON SYS.JOB$ (FIELD1, THIS_DATE, NEXT_DATE) TABLESPACE SYSTEM;The next option would be to try to find a way to grant the select privilege to the role without using the aforementioned "after CREATE on schema" trigger and dbms_job call. This method was adopted to cover situations in which a developer manually added a table directly to the database rather than using the provided scripts to recreate their test environment.
I assume that the following quote from the 11gR2 documentation is mistaken, and there is no such beast as "create or replace table" in 11g:
http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/statements_9003.htm#i2061306
"Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters. Truncating and replacing have none of these effects. Therefore, removing rows with the TRUNCATE statement or replacing the table with a *CREATE OR REPLACE TABLE* statement can be more efficient than dropping and re-creating a table." -
ADF_FACES-60097 error while opening a random schedule job
Hello,
recently i'm facing a error in oim while i open the schedule job
When i logeed in with xelsysadm
click on advanced.then click on System management
search all the scehdule jobs
open a random schedule job
error occured!!
Error: An error Occurred while retrieving trigger for the schedule job.
ADF_FACES-60097
please help
regards
tpHi Frank,
Thanks for the reply. I am using it as an inline popup. I am trying to create command links dynamically in an iterator. When a link is clicked a popup window opens. The text of the link is passed to the popup window by creating a variable in the session scope ( I even tried request scope) by an action listener in the backing bean.
I tried to create another simple application with a static command button which passes its text to popup window through a session scope variable. It worked fine. I am not sure why the same procedure is not working in my original application. Can you give me a hint what could possibly go wrong according the exception stack trace ?
Thanks,
KK -
Scheduled job not getting executed on a logical standby
Hello,
We have created a job(through dbms_scheduler API). The job is enabled and shows up in the SCHEDULERJOBS view also.
However the job does not get executed. I looked into the following tables there was no relevant entry found for the aforesaid job:
select * from all_scheduler_job_log
select * from dba_scheduler_running_jobs
select * from DBA_SCHEDULER_JOB_RUN_DETAILS order by log_date desc
Is there any limitation that we cannot execute scheduled jobs on a logical standby database. If i execute the relevant program (that is configured to be run as job in this scenario) as an individual procedure from SQL plus, it gets executed successfully implying there is no errors/problem in the subprogram that the job is going to invoke.
Appreciate your thoughts in this regard.
Thanks.Hi Justin,
Thanks for your response.
As per the app design, the job invokes a stored program(that maps to a stored procedure present in standby db itself) that reads the data from standby and populates the relevant tables/entities in another database(third db, not primary or standby) which acts as a repository. No write operations are to be performed on standby.
So, i have two doubts:
-- Can scheduled jobs execute on logical standby db[Oracle release 10g(R2)]
I was going through few of the oracle docs and it is mentioned that this is a known limitation in 10g
R2 release and has been corrected in 11g. Now we have something called database_role
attribute that needs to be set to 'LOGICAL STANDBY' if you need to execute a job on
standby. However it is available in 11g onwards.
-- If there is no workaround for the above mentioned problem in 10g-R2 release.
Then we may have to schedule a job from third db instance that shall invoke the program(residing on the standby db). Can we have a scheduled job which executes a program that maps to a remote stored procedure instead of local stored procedure?
Appreciate your thoughts.
Thanks -
Problem editing scheduled jobs
I just had a problem where 3.1, EA1 and EA2 all failed to edit a scheduled job in sqldev. A coworker was able to make the same edit using the same database ID, except he did it through SQL*Plus - that made me suspect a bug in sqldev.
Here are the symptoms:
In sqldev 3.1 (any flavor) > Scheduler > Jobs > edit an existing job > try to edit the JOB_ACTION field. In 3.1, double-clicking in the field only highlights the current word - it does not give me a cursor, and I cannot edit the contents.
In sqldev 3.0.4, editing the same job works as expected. I can edit the field, and save the changes.
Note that the server that I connect to is remote - it is hosted by Oracle OnDemand.Doesn't work for me either;
Here's the exception dumped in the console when selecting Edit:
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: antlr.TokenStream
Dependent class: org.antlr.stringtemplate.language.DefaultTemplateLexer
Loader: ide-global:11.1.1.0.0
Code-Source: /C:/Archivos%20de%20programa/sqldeveloper3.1.06.82/sqldeveloper/lib/stringtemplate-3.1b1.jar
Configuration: <classpath> in /file:/C:/Archivos de programa/sqldeveloper3.1.06.82/sqldeveloper/extensions/oracle.sqldeveloper.jar!/META-INF/extension
.xml
The missing class is not available from any code-source or loader in the system.
at oracle.classloader.PolicyClassLoader.defineClass(PolicyClassLoader.java:2387)
at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1546)
at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:226)
at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1728)
at oracle.classloader.PolicyClassLoader.access$000(PolicyClassLoader.java:143)
at oracle.classloader.PolicyClassLoader$LoadClassAction.run(PolicyClassLoader.java:331)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1692)
at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1674)
at org.antlr.stringtemplate.StringTemplateGroup.<clinit>(Unknown Source)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)And consecutive tries:
java.lang.NoClassDefFoundError: Could not initialize class org.antlr.stringtemplate.StringTemplateGroup
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.initGroupLoader(DBMSSchedulerCodeGenerator.java:321)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.<init>(DBMSSchedulerCodeGenerator.java:298)
at oracle.dbtools.scheduler.generator.DBMSSchedulerCodeGenerator.getInstance(DBMSSchedulerCodeGenerator.java:309)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.getQuery(NewJobCreateBase2.java:94)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:62)
at oracle.dbtools.raptor.backgroundTask.utils.DatabaseQueryTask.<init>(DatabaseQueryTask.java:48)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2$ListTask.<init>(NewJobCreateBase2.java:86)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.getListTask(NewJobCreateBase2.java:58)
at oracle.dbtools.scheduler.panels.common.ActionDialogBase.launch(ActionDialogBase.java:29)
at oracle.dbtools.scheduler.dialogs.newjob.NewJobCreateBase2.launch(NewJobCreateBase2.java:81)
at oracle.dbtools.raptor.controls.sqldialog.ObjectActionController.handleEvent(ObjectActionController.java:192)
at oracle.ide.controller.IdeAction.performAction(IdeAction.java:529)
at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:884)
at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:501)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.Component.processMouseEvent(Component.java:6289)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6054)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4652)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4482)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:603)
at java.awt.EventQueue$1.run(EventQueue.java:601)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:617)
at java.awt.EventQueue$2.run(EventQueue.java:615)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Hope that helps for debugging,
K. -
PC:Regulation and Regulation Configuration fields appears blank, while Scheduling Job
Hi All,
The regulation drop down does not show any entry,while scheduling job(Automated Monitoring -> Continuous monitoring scheduler)
So, i tried to create regulation, for which i got below error., while creating a Regulation Configuration
i have been through SAP GRC Process Control - Not Displaying Regulations in Organizations menu
I understand that it might be due to incomplete configuration in SPRO. So, could you anyone suggest on this.
fyi, i have activated all BC sets
Regards
PlabanHello Sahoo,
check the below note and perform the technical steps to make fields available for regulations
1799427 - How to make fields available to be selected as regulation specific .
Regulations will not appear until you assign objects to your organization such as Sub processes , policies and Indirect-Entity-Level Controls that have been assigned to regulations.
Regards
Baithi -
How to drop all scheduled jobs
Hi,
in 8i, how to drop all oracle scheduled jobs ?
Many thanks before.SELECT job FROM user_jobs;
exec dbms_job.remove(23);
To remove all jobs, you can write a pl/sql block to loop through all jobs and remove them.
http://www.psoug.org/reference/dbms_job.html
Aalap Sharma :) -
How to disable scheduled task through database?
I would like to know to disable scheduled task without OIM running, preferably through the database.
OIM has out of the box schedule tasks that are set to run when OIM starts, and I would like to prevent that from happening.
Is is possible to disable these tasks when OIM is not running?
if possible I would like to know what I need to do, preferably through the databaseThe QRTZ92_TRIGGERS table contains the trigger time of the schedule tasks. You can directly modify the START_TIME and the NEXT_FIRE_TIME columns to future dates in order to prevent the scheduled jobs from starting.
You can also stop the Scheduler, which is responsible for kicking off the scheduled jobs.
To manually stop the Scheduler go to http://OIM_HOST:OIM_PORT/SchedulerService-web/status
You can configure the oim-config.xml so that the Scheduler is not started when OIM starts.
Reference: Managing Scheduled Tasks
To disable a schedule task, you have to have OIM running. You can use the APIs, modify the schedule tasks metadata (<taskStatus>false</taskStatus>), or use the UI to disable the schedule tasks. -
How to schedule JAVA program as scheduled Job on portal 7.0 server ?
Hi,
Can you let me know on how do we schedule JAVA program as a scheduled job to run daily on portal 7.0 server ?
Thanks,
Vinit PugaliyaAm not clear on that,
check this
https://ecohub.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/abb91c2a-0b01-0010-6ca6-9f0f62268454 [original link is broken]
Am also new and now going through Job scheduler.
Will let u know if i get to knwo any thing more abt same.
Regards,
Ravi -
DS run longer with scheduled job as compare to manual run
I have scheduled a job through Management Console (MC) to run everyday once at
certain time. After some time, maybe after 15 days of running, the execution
time has increased to double from 17 mins to 67 mins by one time jump. After
that, the job kept running and spent 67 mins to complete.
The nature of the job is to generate around 400 output flat files from a
source db2 table. Under efficient running time, 1 file took around 2 seconds to
generate. But now it became taking 8 seconds to generate one file. The data
volume and nature of the source table didn't change, so that was not the root
cause of increasing time.
I have done several investigations and the results as such:
1) I scheduled again this job at MC to run for testing, it would take 67 mins
to complete. However, if I manually run this job thorough MC, it would take
17 mins efficient time to run.
2) I replicated this job to a second job as a copy. Then I scheduled this
copied job at MC to run, it would take 67 mins to run. But if I manually run
this job through MC, it will take 17 mins to run.
3) I created another test repo and load this job in. I scheduled the job to
run at this new repo, it would take 67 mins to run. If I manually run the job
through MC, it only took 17 mins to run.
4) Finally, I manually executed the job through unix job scripts command,
which is one of the scheduled job entry in the cron file, such as
./DI__4c553b0d_6fe5_4083_8655_11cb0fe230f4_2_r_3_w_n_6_40.sh, the job also would take 17
mins to run to finish.
5) I have recreated the repo to make it clean and reload back the jobs and
recreated again the schedule. Yet it still took 67 mins to run scheduled job.
Therefore, the conclusion is why it takes longer time to run by scheduling
method as compare to manually running method?
Please provide me a way to troubleshoot this problem. Thank you.
OS : HPUX 11.31
DS : BusinessObjects Data Services 12.1.1.0
databasee : DB2 9.1Yesterday we had done another test and indirectly made the problem to go
away. We changed the generated output flat file directory from current directory
of /fdminst/cmbc/fdm_d/bds/gl to /fdminst/cmbc/fdm_d/bds/config directory to
run, to see any difference would make. We changed the directory pointing
inside Substitution Parameter Configurations windows. Surprisingly, job had
started to run fast and completed in 15 minutes and not 67 minutes anymore.
Then we shifted back and pointed the output directory back to original
/fdminst/cmbc/fdm_d/bds/gl and the job has started to run fast ever since and all
completed in 15 minutes. Even we created ad hoc schedule to run and it was
still running fast.
We not sure why it was solved by shifting directory away and shifting back,
and whether this had to do with BODS problem or HP Unix system environment
problem. Nonetheless, the job is started to run normally and fast now as we
test. -
How to create a batch job through coding
Hi Experts,
How to create a batch job through coding?
Regards
SarojHi, below is the code.
***Create Variant for the job
***Get the dynamic variant name
DATA: variant_name TYPE varid-variant value 'test'.
DATA: vari_desc LIKE varid,
vari_contents LIKE rsparams OCCURS 0 WITH HEADER LINE,
vari_text LIKE varit OCCURS 0 WITH HEADER LINE.
CLEAR: vari_desc,vari_contents,vari_text.
REFRESH: vari_contents[], vari_text[].
vari_desc-mandt = sy-mandt.
vari_desc-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
vari_desc-variant = variant_name.
vari_desc-transport = 'F'.
vari_desc-environmnt = 'A'.
vari_desc-version = 1.
vari_desc-mlangu = sy-langu.
***Varint Text
vari_text-mandt = sy-mandt.
vari_text-langu = sy-langu.
vari_text-report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
vari_text-variant = variant_name.
CONCATENATE 'job' 'Background' INTO vari_text-vtext SEPARATED BY space.
APPEND vari_text.
***Partner
IF ( p_partner-low IS NOT INITIAL ).
vari_contents-selname = 'PARTNER'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_partner-low.
ENDIF.
IF ( ( p_partner-low IS NOT INITIAL ) AND ( p_partner-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_partner-low.
vari_contents-high = p_partner-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Contract Account
IF ( p_cont_acct-low IS NOT INITIAL ).
vari_contents-selname = 'CA_ACC'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_cont_acct-low.
ENDIF.
IF ( ( p_cont_acct-low IS NOT INITIAL ) AND ( p_cont_acct-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_cont_acct-low.
vari_contents-high = p_cont_acct-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Contract Object
IF ( p_cont_obj-low IS NOT INITIAL ).
vari_contents-selname = 'CO_OBJ'.
vari_contents-kind = 'S'.
vari_contents-sign = 'I'.
IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS INITIAL ) ).
vari_contents-option = 'EQ'.
vari_contents-low = p_cont_obj-low.
ENDIF.
IF ( ( p_cont_obj-low IS NOT INITIAL ) AND ( p_cont_obj-high IS NOT INITIAL ) ).
vari_contents-option = 'BT'.
vari_contents-low = p_cont_obj-low.
vari_contents-high = p_cont_obj-high.
ENDIF.
APPEND vari_contents.
ENDIF.
***Account Category
IF ( p_ctra_acc_category IS NOT INITIAL ).
vari_contents-selname = 'P_CAT'.
vari_contents-kind = 'P'.
vari_contents-low = p_ctra_acc_category.
APPEND vari_contents.
ENDIF.
***filed_freq_to_change_from
IF ( p_filed_freq_to_change_from IS NOT INITIAL ).
vari_contents-selname = 'P_TO_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_filed_freq_to_change_from.
APPEND vari_contents.
ENDIF.
***req_filed_freq_change
IF ( p_req_filed_freq_change IS NOT INITIAL ).
vari_contents-selname = 'P_CHANGE'.
vari_contents-kind = 'P'.
vari_contents-low = p_req_filed_freq_change.
APPEND vari_contents.
ENDIF.
***Test Run p_tstrun
vari_contents-selname = 'P_TSTRUN'.
vari_contents-kind = 'P'.
vari_contents-low = p_test_run.
APPEND vari_contents.
***Update Filing Frequency Checkbox
vari_contents-selname = 'P_FIL_FR'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_filing_frequency.
APPEND vari_contents.
***Update Incoming Payment Channel Checkbox
vari_contents-selname = 'P_PAY_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_payment_channel.
APPEND vari_contents.
***Update Filing Channel Checkbox
vari_contents-selname = 'P_FIL_CH'.
vari_contents-kind = 'P'.
vari_contents-low = p_update_filing_channel.
APPEND vari_contents.
***Use Current Filing Period Checkbox
vari_contents-selname = 'P_CU_PER'.
vari_contents-kind = 'P'.
vari_contents-low = use_curr_per.
APPEND vari_contents.
****Create Variant thru Function Module
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
curr_variant = variant_name
vari_desc = vari_desc
TABLES
vari_contents = vari_contents
vari_text = vari_text.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
****Prepare all the date for scheduling job
***Get the print parameters
DATA: params LIKE pri_params.
CLEAR params.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'CURRENT'
no_dialog = 'X'
IMPORTING
out_parameters = params.
params-paart = 'X_65_255'."'X_PAPER'.
***Open The scheduling job
DATA: job LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount.
CLEAR: job,jobcount.
job = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job
IMPORTING
jobcount = jobcount
EXCEPTIONS
OTHERS = 4.
***Job Submit
DATA: authcknam LIKE tbtcjob-authcknam.
CLEAR: authcknam.
authcknam = sy-uname.
params-primm = space.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = authcknam
jobcount = jobcount
jobname = job
priparams = params
report = 'ZCTRAOBJECT_CAL_FILEDAMT_JOB'
variant = variant_name.
***JOB_CLOSE
DATA: sdlstrttm TYPE tbtcjob-sdlstrttm,
released LIKE btch0000-char1.
sdlstrttm = p_job_start_time + 30.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
sdlstrtdt = p_job_start_date
sdlstrttm = sdlstrttm
jobcount = jobcount
jobname = job
IMPORTING
job_was_released = released.
Regs
Manas
Maybe you are looking for
-
Premiere Elements 11 file sizes
Premiere Elements 11 file sizes? I recorded small 170MB and larger 570MB videos with audio using HyperCam 3. Both load and play back in Windows Media Player (ver 12.0.7601.18150) without a problem. I can load and play back the small files in Premiere
-
How do I know if my stuff is backed up on iCloud?
Alright, I have possible phone migration/firmware update and I wanna be sure about this. My photos, apps etc are all backed-up via iTunes. However, I've chosen a few things to back up via Settings > iCloud. I've turned these on: Contacts Bookmarks No
-
Audio warning about security on computer.....
I am getting frequent loud audio warning about security on my computer. The message plays continuously until I turn it off. it tells me to go to (I think this is it,but I threw the paper away with the exact address) but there is no web address like
-
SapScript 'MAIN' Window without 'Text Element'
Why is it, if we run 'MAIN' Window without defining 'Text Element'(/E), it displays the contents twice.. The same doesn't happens with other 'Variable' windows..
-
Error when uploading 300Mb file to file sharing - when will it be working again?
I've been trying to upload a 300Mb zip to deliver via file sharing for the last couple of days but each try ends with an error. I've tried to drag and drop into Firefox and also directly via the CC desktop file folder - neither has been an issue in t