cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically assign repository to a job

Former Member
0 Kudos

Hello all,

In the job's options tab it is possible to assign the job one or more repositories - manually.

Is it possible to do the same in code (job, script, stored procedure) ?

I am working with 7.2 SP9.


Regards

Rytis

Accepted Solutions (0)

Answers (1)

Answers (1)

jaisuryan
Active Contributor
0 Kudos

Hi Rytis,

May not be a good idea but did you try updating the table MC_JOBS using a "to database" pass and "SQL updating" option?

update mc_jobs set Repository = '<Repository Name>' where jobid = <Id of the job>

Btw, we can assign only one repository for a job.

Kind regards,

Jai

Former Member
0 Kudos

Hi,

It is definitely possible to assign more than one repository for a job.

After manually assigning the second repository you could see that the job is still displayed the same way in the identity center but in the background there is another job added, with different id, and therefore there are two lines in mc_jobs table, one per repository.

Running an insert into mc_jobs table from "to database" pass is possible, but there are so many colums to fill and there could be other tables involved. I hope there is a better way to do that, like a stored procedure.

Regards

Rytis

terovirta
Active Contributor
0 Kudos

Hi Rytis,

I am looking for a similar functionality as you as we need to be able to run lot of update jobs for dozens of repositories.

Tested in my sandbox to change the repository for dummy job with update-statement and ran the dummy job. The job got the repository reference correctly (all it did was to print the repository name out) and I was able to run it.

I was happy with that but chose not to go further as we have problems with jobs that are executed manually in MMC..

Change the repository 5 times in MMC and the passes in the job lose the repository (same as the problem in this thread: http://scn.sap.com/thread/3695370).

Changing the repository in MMC changes also the job name, but changing the repository with update-statement changes only the repository in job. So maybe there is more required than the update-statement (or maybe not - no idea).

regards, Tero