|
|
|
|
Re: Can we manually assign certain query transaction between RAC nodes ? [message #643136 is a reply to message #643126] |
Wed, 30 September 2015 01:52 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
You appear to be tryng to use the outdated method of load balancing across your nodes by coding the addresses of each node listener in your tnsnames.ora entry, but because you have load_balance=off all your connections will go to the first address listed.
You should be going through the SCAN listener(s) which will balance correctly. I did describe it (very simply) here a long time ago,
use of SCAN
|
|
|
|
|
|
|
Re: Can we manually assign certain query transaction between RAC nodes ? [message #643170 is a reply to message #643150] |
Wed, 30 September 2015 23:19 |
|
Kevin Meade
Messages: 2103 Registered: December 1999 Location: Connecticut USA
|
Senior Member |
|
|
I am not aware of any simple way to make a single SQL statement run on a specific node. That said...
I am not recommending either of these. And I note that one has been superseded by the other. And I am not sure either REALLY does what you want. And I can't believe they would play well with any transaction design cause you have to figure out how to get an answer back from them. But, I would not want you to go away from us without getting an answer to your original question...
DBMS_JOB.SUBMIT(
job OUT BINARY_INTEGER,
what IN VARCHAR2, NEXT_DATE IN DATE DEFAULTSYSDATE,
interval IN VARCHAR2 DEFAULT 'NULL',
no_parse IN BOOLEAN DEFAULT FALSE,
instance IN BINARY_INTEGER DEFAULT ANY_INSTANCE, --------( see the nice instance parameter )
force IN BOOLEAN DEFAULT FALSE);
and
DBMS_JOB.INSTANCE (
job IN BINARY_INTEGER,
instance IN BINARY_INTEGER,
force IN BOOLEAN DEFAULT FALSE);
moving up on the world
DBMS_SCHEDULER.create_job_class (
job_class_name => '<job class name>',
service => '<service name>'); --------- ( see the service parameter )
and DBMS_SCHEDULER not wanting to be outdone by its older sibling
TYPE job_definition IS OBJECT (
job_name VARCHAR2(100),
job_class VARCHAR2(32),
job_style VARCHAR2(11),
program_name VARCHAR2(100),
job_action VARCHAR2(4000),
job_type VARCHAR2(20),
schedule_name VARCHAR2(65),
repeat_interval VARCHAR2(4000),
schedule_limit INTERVAL DAY TO SECOND,
start_date TIMESTAMP WITH TIME ZONE,
end_date TIMESTAMP WITH TIME ZONE,
event_condition VARCHAR2(4000),
queue_spec VARCHAR2(100),
number_of_arguments NUMBER,
arguments SYS.JOBARG_ARRAY,
job_priority NUMBER,
job_weight NUMBER,
max_run_duration INTERVAL DAY TO SECOND,
max_runs NUMBER,
max_failures NUMBER,
logging_level NUMBER,
restartable VARCHAR2(5),
stop_on_window_close VARCHAR2(5),
raise_events NUMBER,
comments VARCHAR2(240),
auto_drop VARCHAR2(5),
enabled VARCHAR2(5),
follow_default_timezone VARCHAR2(5),
parallel_instances VARCHAR2(5),
aq_job VARCHAR2(5),
instance_id NUMBER, ------------- ( see me here too )
credential_name VARCHAR2(65),
destination VARCHAR2(4000),
database_role VARCHAR2(20),
allow_runs_in_restricted_mode VARCHAR2(5),
restart_on_recovery BOOLEAN,
restart_on_failure BOOLEAN
)
A job is not quite the same as a single statement but you could make it so if you really need it to be. Everyone here is of course wondering why.
Good luck. Kevin
|
|
|
|
|