Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 10 of 16 total |
JOBs and Servers and Categories |
Tue, Apr 29 2014 10:49 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Hi
I am providing a UI that allows for the scheduling of backups. So I need to be able to give access to the JOBs that are backups and hide the ones that do other things. To be honest, I don't know what those "other things" might be at this stage but 50years ago I was a Scout and our motto was "BP". There is a Category on the JOB and a ServerJobCategory in the server set up, so I assume the Category is what I should use. Setting the ServerJobCategory to blank (default) will allow it to run all categories. And I can put "UserBackups" in the job's category. So far so good. The problem in the future could be that I have other categories of jobs that I want to be run on other servers e.g. Server1 to run Category1 and Categore2 jobs and Server2 to run Category1 and Categore3 jobs .... so how would I specify multiple categories but not all categories in the ServerJobCategory? Comma delimited list like "Category1,Category2" ? If there is no simple answer, I can ignore the problem for the moment - or perhaps use Attributes on the Jobs to Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz |
Tue, Apr 29 2014 11:12 PM | Permanent Link |
Barry | >.... so how would I specify multiple categories but not all categories in the
ServerJobCategory? Comma delimited list like "Category1,Category2" ? If there is no simple answer, I can ignore the problem for the moment - or perhaps use Attributes on the Jobs to < Jeff, Why not use the Jobs.Attributes (CLOB) column for your comma delimited list of categories? You can then filter on this column to your heart's delight. See "Select * from Configuration.Jobs" for more info. Barry |
Tue, Apr 29 2014 11:21 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | <Barry> wrote in message
news:A4790399-2E17-4B10-9289-3E703669D515@news.elevatesoft.com... > Jeff, > > Why not use the Jobs.Attributes (CLOB) column for your comma delimited > list of categories? You can then filter on this column to your heart's > delight. > > See "Select * from Configuration.Jobs" for more info. > > Barry > Yes and No. Yes, I can do that and It will work for the user interface. No, I don't see how that will work with different servers picking up different job. As I see it this can only work through the Category as I don't think you can tell the server to pick up based on attributes. I'm probably way ahead of myself here as I'm not even through the basics in this area Cheers Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz |
Wed, Apr 30 2014 3:27 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jeff
>No, I don't see how that will work with different servers picking up >different job. As I see it this can only work through the Category as I >don't think you can tell the server to pick up based on attributes. You haven't got into the ElevateDB mindset yet Jobs is a table, no different to any other table toy can query it on ANY of the columns that are exposed to public gaze. Since you're unlikely to need massive speed for this you could probably get away with using value pairs in Attributes eg ALTER JOB "Fred" RUN AS "Administrator" FROM DATE '2014-04-30' TO DATE '2014-04-30' ONCE BETWEEN TIME '08:16:01.785' AND TIME '08:16:01.785' CATEGORY '' BEGIN END ATTRIBUTES 'Backup=Yes CleanUp=No ItsFriday=Great IHateMondays=True' or at least something to give a unique sytring to test on within the CLOB (you could even use my TextSearch routine - look in the extensions) To make it easier to do the alteration you can read the CreateSQL column for the sql needed to do it, just alter CREATE to ALTER and the ATTRIBUTES to whatever you want. Roy Lambert |
Wed, Apr 30 2014 10:38 AM | Permanent Link |
Barry | >Server1 to run Category1 and Categore2 jobs and
Server2 to run Category1 and Categore3 jobs< On addition to what Roy said, you can also add something like this to Attributes: "Servers=1,2,AB34" if you want to identify that only servers 1, 2 and AB34 should run this job. Barry |
Wed, Apr 30 2014 5:45 PM | Permanent Link |
Jeff Cook Aspect Systems Ltd | Kia Orana Roy and Barry
> > You haven't got into the ElevateDB mindset yet > Getting there ------------------------------------ Sorry, still don't get what you are suggesting HOWEVER I haven't faced deployment issues yet, so I could be worrying about nothing. I don't even know what I have to send my QA guy in order to set up the app on his machine, so that he can start testing what I have done so far. AND, lucky me, I'm off to Rarotonga on holiday tomorrow so I'm going to be thinking of beaches and snorkelling and www.youtube.com/watch?v=R0QQIDJ2j30 ( plus beer ) and no computers. Kia Manuia Jeff -- Jeff Cook Aspect Systems Ltd www.aspect.co.nz |
Thu, May 1 2014 3:44 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jeff
For post holiday consumption Having looked at it again and given it a bit more thought its a bit more complex than I (don't know about Barry) first assumed First to help the move to the ElevateDB mindset: The catalog in ElevateDB is "just" a collection of tables. Its organised into two databases: Information and Configuration. You can look up the details as to which table is in which in the on-line help. With a few exceptions (two of which are you can't alter the structures or add new tables) you manage these tables using SQL in exactly the same way as you would any of the tables in your own database. One of the columns Tim has added into the majority, if not all but I can't be bothered to go and look, of the system tables is Attributes. It is a CLOB (or for the DBISAM minded a MEMO) column so you can stuff any unstructured character data in there. If you want to impose a structure you can do that but, naturally, that structure will only mean something to you and your programs. The problem as I now see it is to get the information to allow the job to decide wether or not to run on a specific server. I have the start of an idea as to how to do this. I'll do some research over the weekend and post back if it works out. Roy Lambert |
Thu, May 1 2014 7:16 AM | Permanent Link |
Fernando Dias Team Elevate | Jeff,
Different servers will have different configuration files, so one approach would be to only create those JOBs that will run on each server "on the fly" when the application first runs or so. Another approach, as already suggested, is to use Attributes - I do that using "Description" because when I first started using JOBs Attributes didn't yet exist, but it's the same and has been working very well. The JOB will have to run, test for what's in Attributes and then leave if it's not intended to run on that server. In the following example, if the name of the computer executing the JOB is not EG-WS1 or EG-L1 the JOB execution is interrupted. CREATE JOB "TestJob" RUN AS "System" FROM DATE '2014-05-01' TO DATE '2014-12-31' EVERY 1 MINUTES BETWEEN TIME '00:00' AND TIME '23:59:59.468' BEGIN DECLARE Attr VARCHAR DEFAULT ''; EXECUTE IMMEDIATE 'SELECT Attributes INTO ? FROM Configuration.Jobs WHERE Name = ?' USING Attr, 'TestJob' ; IF POSITION('Server=' + CURRENT_COMPUTER + #13, Attr + #13) = 0 THEN LEAVE ; END IF ; ... Your Code ... END VERSION 1.00 ATTRIBUTES 'Server=EG-WS1 Server=EG-L1' -- Fernando Dias [Team Elevate] |
Thu, May 1 2014 7:39 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fernando
Bril that saves me having to check stuff out. The only change I'd suggest is have server names surrounded by a none usable character eg / just in case one servers name is a substring in anothers. Roy Lambert |
Thu, May 1 2014 7:41 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Fernando
I retract my comment - my brain just caught onto what you did with the #13 Roy Lambert |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Tuesday, May 14, 2024 at 07:14 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |