Thursday, 24 February 2011

parallel, degrees and instances

create table
PARALLEL ( DEGREE DEFAULT INSTANCES DEFAULT )

The Degree 'default value' is worked out thus :-
number of CPUs (cores) * number_of_thread_per_cpu (from v$parameter)

Instances is the number of nodes in the RAC that you want it to use

We hit a problem with a query going 'massively paralle' because the server had 16 cpus
, the number_of_thread_per_cpu was2 and the number of nodes was 2
We therefore ended up with something close to 64 parallel processes.

Friday, 7 January 2011

PL/sql function and no_data_found

PL/SQL functions with a 'select col1 into v1 from table' line in them behave differently when they hit a no_data_found error (i.e. if the table is empty).
IF
you call the function like this .....
BEGIN
my_function;
END;
THEN
YOU get a no_data_found exception raised.


BUT
IF YOU CALL THE FUNCTION LIKE THIS....
SELECT my_function FROM dual;
THEN
It will not raise a no_data_found

see
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:317260900346187160

Monday, 8 November 2010

db link full spec

DROP DATABASE LINK "apollo";
CREATE DATABASE LINK "apollo"
connect TO xxxxxx
IDENTIFIED BY "xxxxxxx"
using '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS=(PROTOCOL=tcp)(HOST=10.24.0.11)(PORT=1521)))(connect_data=(SID=MIS10G1)))';
SELECT * FROM dual@apollo

Thursday, 28 October 2010

Wednesday, 27 October 2010

direct connection

sqlplus user/pass@10.0.0.1:1521/service_name

Monday, 25 October 2010

tnsping direct

the sytax

tnsping '(ADDRESS=(PROTOCOL=tcp)(HOST=10.24.0.11)(PORT=1521))'