Jobs in RAC

Hi
I have a job created in my RAC database. I want my job always run from Node2. How I can set this ?
Thanks

11gR1. I forgot to show here the version. I already found the answer. With the attribute ( INSTANCE IN BINARY_INTEGER DEFAULT 0, ) I can do it.
dbms_job.submit(
JOB OUT BINARY_INTEGER,
WHAT IN VARCHAR2,
NEXT_DATE IN DATE DEFAULT SYSDATE,
INTERVAL IN VARCHAR2 DEFAULT 'NULL',
NO_PARSE IN BOOLEAN DEFAULT FALSE,
INSTANCE IN BINARY_INTEGER DEFAULT 0,
FORCE IN BOOLEAN DEFAULT FALSE);
Thanks

Similar Messages

  • APPS DBA

    hi everybody
    i am a student
    i came to know about oracle ERP during my internship and from then on i got interested in this field.
    hsawwan,
    u have always been a source of inspiration for me and it was because of you that
    i chose this ORACLE as my career.
    i still remember that during my internship i had a problem in my apps software and
    u helped me regardless of my knowledge and it took you almost an hour in explaining to me
    "how to log in using sqlplus"
    and in later time when i came to know about how senior u were
    it made u look more great in my eyes.
    what you are doing is really a great great great job :).
    after my internship during this one year i have completed my OCA,OCP exams
    and now i am about to graduate in two months and i am ready to learn new things.
    reason i have set this topic is because i am a little bit confused over something
    hope you guys can help me
    i want to become ORACLE APPS DBA
    now in lot of job postings i have seen that RAC certification is also required.
    my question is ;
    should i go for RAC certification 1st and then APPS ???
    OR
    should i go for apps certification 1st ???
    what is the importance of RAC certification in dba world ???
    for apps certification would it be better if i include this RAC certification in my profile ???
    regards !

    Hi,
    Thanks for the words of appreciation. I am glad to know that I have been of real help.
    now in lot of job postings i have seen that RAC certification is also required.Very true :)
    my question is ;
    should i go for RAC certification 1st and then APPS ???
    OR
    should i go for apps certification 1st ???If you are planning to find an Apps DBA job, then I would suggest you go with Apps first, then do the RAC study/certification later. You should be able to manage to find an Apps DBA job where RAC is not really required (RAC is a plus).
    what is the importance of RAC certification in dba world ???Most of the big companies have RAC implemented, so if your dream is to work for such employers, you will have to focus on the RAC track and do the certification (at least know the concept and get familiar with it).
    for apps certification would it be better if i include this RAC certification in my profile ???RAC certification has nothing to do with Apps certification, and you can get the Apps certification without having any knowledge about RAC. However, writing the RAC exam and getting the certification would give the impression that you are familiar with the RAC topic (or I would say Expert as the certification title says). For now, I would suggest you go with Apps certification first, and try to find an Apps DBA job, and later on you can study the RAC topic and appear for the exam. If you are looking for RAC material, please let us know.
    Good luck!
    Regards,
    Hussein

  • Backup Oracle Database On 24x7 System

    Dear Kamran
    First sorry my English.
    I am a beginner of oracle 10g and have a problem please help (Consult) me. If you are accept it
    My problem is a :
    Two oracle server with RAC (Clustering) and one external oracle server (BACKUP ORACLE SERVER) on the this network without RAC (Clustering) on the RHEL 4.7
    How to synchronize third oracle server’s database with RAC oracle servers. Becouse of if RAC Oracle servers down or technical corruption change corrupted server.
    Or other flexible solution tell me (how to do it)

    you can make the third oracle server as a physical standby database to RAC setup. for more information, read oracle doc "Dataguard basics and administration" from http://tahiti.oracle.com
    as other option, you can schedule a refresh job from RAC setup to third database server.

  • Why logical partition is a must for voting disk and OCR

    Hi Guys,
    I just started handling jobs for RAC installation, I have a simple question regarding the setup.
    Why does logical partition have to be used for voting disk and OCR?
    I tried partition the disk that were provisioned for voting disk and OCR with primary partition but when OUI is trying to recognize the disk, it cannot find the disk that has been partitioned with primary partition.
    Thank you,
    Adhika

    Hello Adhika,
    I found it on this doc http://download.oracle.com/docs/cd/B28359_01/install.111/b28250/storage.htm
    Be aware of the following restrictions for partitions:
    * You cannot use primary partitions for storing Oracle Clusterware files while running the OUI to install Oracle Clusterware as described in Chapter 5, "Installing Oracle Clusterware". You must create logical drives inside extended partitions for the disks to be used by Oracle Clusterware files and Oracle ASM.
    * With 32-bit Windows, you cannot create more than four primary disk partitions for each disk. One of the primary partitions can be an extend partition, which can then be subdivided into multiple logical partitions.
    * You can assign mount points only to primary partitions and logical drives.
    * You must create logical drives inside extended partitions for the disks to be used by Oracle Clusterware files and Oracle ASM.
    * Oracle recommends that you limit the number of partitions you create on a single disk to prevent disk contention. Therefore, you may prefer to use extended partitions rather than primary partitions.
    For these reasons, you might prefer to use extended partitions for storing Oracle software files and not primary partitions.
    All the best,
    Rodrigo Mufalani
    http://www.mrdba.com.br/mufalani

  • ESX Maintenance Standard Operating Procedures (SOPs)

    Do you use SOPs for ESX maintenance?  I'm currently compiling some for VIOPS taken from my own experience - I think I've spotted a pattern, you see...
    Also, I love the work of the IT Process Institute, Gene Kim (CTO Tripwire) and Kevin Behr (Assemblage Pointe) and others on bringing science to IT... ever heard of the Toyota Production System?  Ever heard of an IT version?  But I digress (if your interest is piqued - private message me!).
    Back to the SOP - do you have one for ESX maintenance?  My work so far has found five different triggers:
    Swap - e.g. replace failed drive
    Patch - e.g. security patch
    Upgrade - e.g. minor release like 3.5 U2
    Configure - e.g. lock down SSH so you can only access via bastion/jump box
    Observation - e.g. to run a vmsupport script
    So now I'm thinking that ESX Maintenance isn't an SOP, but a collection of SOPs - and the real SOPs are those five above.
    But what does an SOP look like?  The most basic example is a list of steps, but that's not enough for me.  I want something that brings science to IT and allows for continuous improvement.  I want the procedure to be followed rigorously, consistently - and where there is deviation it is because either (a) the process can be improved (improve the process), or (b) the person needs to be improved (improve the person - training).
    So for my gold standard of SOP I've thought of the following attributes - and each SOP should fit on one piece of A4 paper
    Trigger / Driver - what starts this whole thing, possibly a connection to a preceding SOP?
    Input - what information is required to do this job?
    RACI - for this procedure, who is Responsible (who does it), Accountable (who supervises?), Consulted (who helps), Informed (who is notified)
    Resources - what tools and suchlike are needed for the actions (e.g. the list of changes to make to /etc/ssh/sshd_config
    Actions - the unambiguous action to do, down to the most intricate detail - do not summarize, do not leave open to interpretation.
    Timing - for each action, like the marks on the Toyota production line that shows in 32s you should be at step 3.
    Output - A measurable outcome
    So I'm desperately seeking SOPs and people who are interested in this stuff - I believe it's the key to increasing throughput and reliability of change, as do many others... do you?

    I'm planning on separating a SOP from an STP - Standard Technical Procedure.
    So the SOP will have a list of actions / STPs with how long they should take... example:
    1.  On the SOP, one action is "logon to host" and it should take 2 minutes
    2.  The STP is "Use SSH + RSA keyfob to connect to bastion.vmware.com, then SSH from bastion to host with username"
    So on the A4 piece of paper, it does not go into n'th degree of the technical procedure, which may, as you say, require screen shots and stuff.
    And the A4 suggestion is figurative, because all of this should be online anyway, but keeping it short is my point.
    An SOP is equivalent to a project manager's Work Package (Prince2 term?).
    Like you say, I'll write up a sample and try and get that looking good with your help (and others?) - then tackle the rest.
    I am particularly keen on the time it takes to do an SOP... not just the steps required.  How does one limit unplanned yak shaving (to quote John Troyer!).
    Your list looks great, and I've seen a similar one in PSO with HTML interactive screens...

  • Analyze job very slow in RAC environment

    Hi,
    I have an anlyze job which runs for 3 hrs in RAC environment (9.2.0.6).
    Earlier in NON-RAC environment it used to complete in 1 hrs.
    Need help in solving this issue.
    Ajoy Kumar Thapa

    hi,
    This database is used for query purpose mainly.
    we do huge data load during weekend into one of the table.
    This table is then exchange with one of the partition of a huge partitioned table.
    after that analyze job runs on this partitioned table.
    The command we use for analyze is given below:
    DBMS_STATS.GATHER_SCHEMA_STATS
    ownname => '<owner_name>'
    ,estimate_percent => 05
    ,cascade => true
    ,degree => 4
    ,granularity=>'ALL'
    I want to know, what can be the reason, this job, which runs fine in NON-RAC environment, is taking so long in RAC enviroment.
    Any help is highly appreciated.
    Ajoy Kumar Thapa

  • Running an external job at the specific node out of a 2 Node RAC database.

    Hi. all.
    I created a job , which runs an external script, by using dbms_scheduler.
    Our database is 2 node RAC database(10.2.0.2.0).
    The external script exists at a only one Node(Node 1).
    select status,instance_id, additional_info
    from dba_scheduler_job_run_details
    where job_name='TEST_EXPORT_JOB'
    shows that jobs which run on Node 2 failed.
    Of course, the external script does not exist on Node 2.
    I would like to force the job to ALWAYS run on Node 1.
    How can I do that? Is there any ideas?
    Locating the script on Node 2 is not the option.
    Best and Regards.

    Hi,
    In the upcoming 11g release there is an easy solution for this - a new attribute instance_id for a job.
    For 10g there is a workaround. Basically you create a service with just the one instance you want the job to run on. Then create a job class pointing to that service. Finally have your job be in the job class you just created.
    If you create a service and job class per instance you can get jobs to run under whichever instance you want.
    Hope this helps,
    Ravi.

  • Dbms_schduler job is not running on a 2 node rac when 1st node fails

    Hi,
    I want to create a dbms_scheduler job in a 2 node RAC and the job should always run on the node1 and if node1 is down then it should run on node2. This is Oracle 10gR2 (10.2.0.3 in WINDOWS) .In order to do the same I did following
    -- First Step
    Using DBCA- Service Managment - Created a service (BATCH_SERVICE) and given node1 as preferred and node2 as available. This created following entry in tnsnames.ora in both nodes.
    BATCH_SERVICE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = node2-vip)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = BATCH_SERVICE)
    (FAILOVER_MODE =
    (TYPE = SELECT)
    (METHOD = BASIC)
    (RETRIES = 180)
    (DELAY = 5)
    --- Step 2
    -- Created BATCH job classes.
    BEGIN
    DBMS_SCHEDULER.create_job_class(
    job_class_name => 'BATCH_JOB_CLASS',
    service => 'BATCH_SERVICE');
    END;
    -- Step 3 -- created a job using job_class as BATCH_JOB_CLASS
    begin
    dbms_scheduler.create_job(
    job_name => 'oltp_job_test'
    ,job_type => 'STORED_PROCEDURE'
    ,job_action => 'schema1.P1'
    ,start_date => systimestamp at time zone 'US/Central'
    ,repeat_interval => 'FREQ=DAILY;BYHOUR=11;BYMINUTE=30;'
    ,job_class => 'BATCH_JOB_CLASS'
    ,enabled => TRUE
    ,comments => 'New Job.');
    end;
    Now when I monitor this job it runs on node1. Now I started testing for failover. I manually shutdown 1st instance. Then as per my understanding job should run on 2nd node. But job is not picking up.
    when I run the followign command
    srvctl status service -d db -s BATCH_SERVICE
    service BATCH_SERVICE is running on instance node2.
    Any help is really appreciated.

    It does not show that whether job is running or broken.

  • DBMS_SCHEDULAR JOB STICKINESS ON PARTICULAR NODE IN RAC

    Hi All,
    I am using 10g rac . We have scheduled gather stats on node 1 from OEM with instance stickiness is False.
    but it is  running on node2  sometimes  . When it runs on node 2 , node 1 is up and running with lightest load.
    I am confused why it is running on  node 2?
    Please help me out what are the possibilities for this issue.
    Thanks,
    Roopesh

    Doc for 10g say about instance_stickiness this:
    instance_stickiness
    This attribute should only be used for a database running in RAC mode. By default, it is set to TRUE. If you set instance_stickiness to TRUE, jobs start running on the instance with the lightest load and the Scheduler thereafter attempts to run on the instance that it last ran on. If that instance is either down or so overloaded that it will not start new jobs for a significant period of time, another instance will run the job. If the interval between runs is large, instance_stickiness will be ignored an the job will be handled as if it were a non-sticky job.If instance_stickiness is set to FALSE, each instance of the job runs on the first instance available.
    For non-RAC environments, this attribute is not useful because there is only one instance.
    So check you job repeat_interval.

  • Job Chain in RAC Environment

    Hi,
    i've a job chain defined in a RAC environment.
    I need that all the steps of my chain are performed on the same instance.
    How can i do this?
    Now stepA run on the instance 1 and stepB run on the instance 2.
    Thanks.

    Again, If it is a file system write issue, use ACFS (11.2.0.x) to create a shared file system that all nodes can see. What are you using to delete/create these files? A shell script?
    1) create an ACFS file system of sufficient size to handle your data
    2) mkdir /some/acfs/location
    3) using sqlplus create a database directory " create directory foo as '/some/acfs/location' "
    4) put the file in this location
    5) use UTL_FILE to delete AND create the file (see fremove() - http://docs.oracle.com/cd/E11882_01/appdev.112/e10577/u_file.htm)

  • RAC job affinity

    hi,
    I am trying to submit a job on a 4 instance RAC through DBMS_JOB.
    I am using INSTANCE and FORCE clause to specify the affinity of my job to a specific instance.
    e.g.
    INSTANCE =>1
    FORCE =>FALSE
    Say,instance 1 was up and the job was successfully submitted.
    What happens when instance 1 goes down few days down the line ?
    Will the job execute next time on the next available instance or will it throw an exception?
    The instance itself has been specified as FAIL_OVER = true.
    I do not have RAC in my development environment to test this out.Any insights into this will be highly appreciated.
    Regards,
    Ravi

    I don't understant what is your problem Ravi...
    Case 1.
    If i need running job at some specific time and I need to ensure that the job will run when DB is up (wahtever instance of RAC is up & running) then I will NOT specify the instance number in dbms_job.submit.
    That means my job will be executed once by some of (rest) running instances.
    Case 2.
    I need running job by specific instance but when that instance will be down at specific time (time of execution) then my job (of course) will be NOT executed. In this case I will specify instance number in dbms_job.submit.

  • Job Scheduling on Oracle 10g RAC

    Hi,
    If I want to run job on Oracle 10g RAC database having 2 instances suppose n1 and n2 separately and both instances are working/using same Service Name then how could i do this ??
    or how to use SID instead of Service Name in Job Class ???
    Please guide..... Replay awaited...........

    Priyanka,
    If you are a newcomer to the DBA, I would strongly suggest to invest at least time(if not money for training) in reading documentation related to fields in which you are working. For RAC, this should be a good start( V10.2) ,
    http://download.oracle.com/docs/cd/B19306_01/rac.102/b14197/toc.htm
    can we use these dynamic views in Procedure The counter question is, why? What exactly are you trying to accomplish? If you can tell us this, there may be a better way we may suggest doing that thing?
    Aman....

  • How to get dbms_scheduler to run jobs on different RAC nodes

    lets say I have 3 jobs and I want to run each on different RAC nodes. How do I do this?

    Hi,
    Pierre's response shows the easiest way to do this on 10g (create a service for each instance, then a job class for each service, then assign jobs to specific job classes).
    In 11g there is a more direct method, you can just set the INSTANCE_ID attribute of a job using dbms_scheduler.set_attribute.
    Note that for PL/SQL jobs Oracle recommends using services instead of instance ids because they provide better availability if one instance goes down or has to be taken down.
    Hope this helps,
    Ravi.

  • Rac, statspack.snap and new job architecture

    Hi %,
    I want to install perfstat on a new rac database (10.2). In our old 9.2 database I used the job queue to run the snapshots on every instance seperately. Now I want to use the new scheduler to ran statspack.snap, but how do I tell the scheduler to run snap on on instance?
    best regards
    Andreas

    I think I need a seperate job on every instance. Aren't the v$ views instance dependant? But perhaps I'm missing some fact about how statspack works. I always thougt, that statspack.snap samples the data of one instance.
    (And statspack is just an example. Think about a report job which has to run on one defined instance, because someone wants to load balance manually - or an import job, which needs access to some special hardware, etc.)
    regards
    Andreas

  • RAC / Service / Job

    In a RAC if the following setup:
    1)
    SERVICE1 = NODE1, NODE2
    SERVICE2 = NODE3, NODE4
    If I submit job without supplying JOB_CLASS => SERVICE, will the job run potentially on all nodes 1 through 4 ?
    2)
    SERVICE1 = NODE1, NODE2
    SERVICE2 = NODE3, NODE4
    NO SERVICE DEFINED = NODE5, NODE6
    If I submit job without supplying JOB_CLASS => SERVICE, on what nodes will the job potentially run?
    Thanks.

    Jeremy Schneider has a good paper on that: http://www.ardentperf.com/pub/schneider-services.pdf
    On the other hand the "normal" Oracle documentation also has the answers: http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/create007.htm
    On first hand I would say that if you don't define a service within the job-definition, the load-balancer decides where the job is run.
    So in my opinion in both 1) and 2) the jobs can run on any of the nodes
    Cheers
    FJFranken
    My Blog: http://managingoracle.blogspot.com
    Edit: Somewhere in the top of the second link it says:
    Connection requests can include a database service name. If no service name is included and the Net Services file listener.ora designates a default service, the connection uses the default service.
    Edited by: fjfranken on 10-jan-2011 5:50

Maybe you are looking for