Mass QR update

Tools and several solutions to manage Control-M products
Post Reply
User avatar
J-Man
Nouveau
Nouveau
Posts: 18
Joined: 04 Dec 2009 12:00
Location: BC

Mass QR update

Post by J-Man » 07 Jun 2010 10:34

I wanted to add a QR to 4000 jobs. I wrote a SQL procedure to do the work.

In the end it 50% worked.

- Smart insert into Server Tables cms_qr_j
- Scheduling Table Manager, mass Download changed tables

Check the jobs via Control-M EM
- All jobs that had QRs already show the new QR I inserted.
- Any jobs that had no QRs, still show no QRs. Even though they show an entry in the cms_qr_j table.

Does anyone know if there is a 2nd table that triggers the jobs to check the cms_qr_j table? (couldn't see anything in cms_jobdef)

User avatar
J-Man
Nouveau
Nouveau
Posts: 18
Joined: 04 Dec 2009 12:00
Location: BC

Post by J-Man » 07 Jun 2010 8:51

I tried the Find and Update tool recommended by BMC, didnt work out.
Ok here is the scenario, I have roughly 9000 jobs. I want to mass add the QR "OP-ControlM" to all jobs that are missing that QR dependency.

Plus if the job has that dependency already, I don’t want to add it again.

The Find and Update tool for QRs doesn't work as expected. When I try to find jobs whos QRs don't equal OP-ControlM, it only searches jobs that already have QRs. And will show jobs that don't equal that QR on any row. So if OP-ContorlM is the 3rd QR it will still show it. Because OP-ControlM is not the 1st or 2nd QR. So using the find and update tool in Control-M is not working.

Also if I ignore the above, and just use the Update tool it changes all QRs for all jobs to OP-ControlM.

Example Job A I have
1)AP-PPM 1
2)DB-PPM 2

Using a search like, find all jobs, update QR OP-ControlM. Job A shows up as 1)OP-ControlM 1 2)OP-ControlM 1

Instead of inserting OP-ControlM as the 3 required resource.

hipikll

Post by hipikll » 07 Jun 2010 11:11

try to export your jobs to xml, it is easy to edit it and import xml back to EM and CTM server.

Search for export utilities.

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 08 Jun 2010 9:38

Hi,

See some discussions here or here
Best regards
Walty

User avatar
J-Man
Nouveau
Nouveau
Posts: 18
Joined: 04 Dec 2009 12:00
Location: BC

Post by J-Man » 08 Jun 2010 7:39

Yea I wrote a shell script last year to auto insert any QR I need into XML.

Problem is we do monthly releases where we change random jobs. I'm not the developer, but I'm the T3 once they are in Prod. We ask developers to remember to use the QRs. But maybe 50% remember.

So each month I need to scan for the missing QRs in the scheduling tables, export to XML, run my shell script and then re-import.

The SQL procedure was just a little smarter and faster solution and runs in seconds.

I find it really funny though that the SQL changes in CMR_QR_J are only noticed by Sched tables that already have QRs. I'm just really curious what triggers jobs to run the select statement that checks for QRs. I've put some logging on the DB for inserts. So I could add a QR via the GUI and watch the transactions, but didn't see anything special.

Post Reply