TO_DATE function issue in Oracle 10g R2
Hi,
This SQL statement works in Oracle 10g R2 env & Oracle 9i R2.
SQL>select TO_CHAR(TO_DATE(SYSDATE,'DD/MM/RRRR','NLS_DATE_LANGUAGE = ''AMERICAN'''),'RRRR/MM/DD','NLS_DATE_LANGUAGE = ''AMERICAN''') SYSTEM_DATE
from dual;
But after changing the session to Arabic it does not work in Oracle 10g R2 env but works in Oracle 9i R2 env.
SQL> alter session set nls_language='ARABIC';
SQL>select TO_CHAR(TO_DATE(SYSDATE,'DD/MM/RRRR','NLS_DATE_LANGUAGE = ''AMERICAN'''),'RRRR/MM/DD','NLS_DATE_LANGUAGE = ''AMERICAN''') SYSTEM_DATE
from dual;
Some one please confirm this will not work in Oracle 10g R2 env after altering the session.
Rgds,
The error message is:
ORA-01858: a non-numeric character was found where a numeric was expected.\
Rgds.
Similar Messages
-
Function issue in oracle 8i (817)
Hello,
Following objects are created in database
1. CREATE OR REPLACE TYPE PARAMETER_OBJ AS OBJECT
RUN VARCHAR2(2000),
BATCH_NO VARCHAR2(2000),
DAY_NO VARCHAR2(2000),
PARAMETER_NAME VARCHAR2(2000),
PARAMETER_VALUE VARCHAR2(2000),
PARAMETER_UOM VARCHAR2(2000)
2. CREATE OR REPLACE TYPE PARAMETER_TYP AS TABLE OF PARAMETER_OBJ ;
Info abt the function
1. function return type is PARAMETER_TYP.
2. Inside the function i initialize tblParameters PARAMETER_TYP:=PARAMETER_TYP();
3. Create a temporary table[TMP_PARAMETER] .The structure of the table is same as "PARAMETER_OBJ"
4. In a loop Insert data into temporary table
5. At the end issue following select statement
SELECT CAST (MULTISET (SELECT * FROM TMP_PARAMETER)
AS PARAMETER_TYP )
INTO tblParameters FROM DUAL;
6. issue commit (which flushes temp table)
7. return RETURN tblParameters
Finally issue following sql statement to get data from the function
select * from table(T_Get_ParameterValue('A03052','-1-SPINNER-CELL_AGE-15L,3-SPINNER-DOUBLING_TIME-15L'))
It works oracle 10g. In oracle 817 function compiles.But if i select as shown above it gives erorr says nested table not found..
Can any body help me.1. CREATE OR REPLACE TYPE PARAMETER_OBJ AS OBJECT
RUN VARCHAR2(2000),
BATCH_NO VARCHAR2(2000),
DAY_NO VARCHAR2(2000),
PARAMETER_NAME VARCHAR2(2000),
PARAMETER_VALUE VARCHAR2(2000),
PARAMETER_UOM VARCHAR2(2000)
2. CREATE OR REPLACE TYPE PARAMETER_TYP AS TABLE OF PARAMETER_OBJ ;
# Code
CREATE OR REPLACE Function T_Get_ParameterValue
a_run CLOB,
a_dytblcoleqp CLOB
-- [T]: TO_REMOVE: Changed return type.
-- 1. Need to create a temporary table TMP_PARAMETER which has the same structure as your object.
--RETURN PARAMETER_TYP PIPELINED
RETURN PARAMETER_TYP
AS
PRAGMA AUTONOMOUS_TRANSACTION;
TYPE cursor_type IS REF CURSOR;
TYPE STR_LST IS TABLE OF VARCHAR2(2000) INDEX BY BINARY_INTEGER;
l_sql varchar2(4000);
l_cr cursor_type;
-- [T]: TO_REMOVE: Added variable.
tblParameters PARAMETER_TYP:=PARAMETER_TYP();
l_batch_lst STR_LST;
l_tblcl_lst STR_LST;
l_tbl_lst STR_LST;
l_col_lst STR_LST;
l_day_lst STR_LST;
l_sign_lst STR_LST;
l_eqp_lst STR_LST;
l_con CLOB;
l_tmp varchar2(4000);--Tmp store
l_pos number:=0; -- LOcator of the seperaotr
s_pos number:=0; -- start position
l_k number:=0; -- Array controller
l_n number:=0; -- Array controller
f_sp varchar2(1):=','; -- First seperator
s_sp varchar2(1):='-'; -- Second seperator
l_col_desc varchar2(2000);
l_column_type varchar2(2000);
l_capture_date varchar2(2000);
-- ipc list
l_parameter_uom varchar2(2000);
l_action_limit_max varchar2(2000);
l_action_limit_min varchar2(2000);
l_control_limit_max varchar2(2000);
l_control_limit_min varchar2(2000);
l_center_line varchar2(2000);
l_parameter_value varchar2(2000);
l_batch_id varchar2(2000);
l_batch_no varchar2(2000);
l_day_no varchar2(2000);
l_eqp varchar2(2000);
l_date date;
-- Loop Control
l_cont number;
i number;
--remove
l_sqlerm varchar2(2000);
BEGIN
l_pos:=0; -- LOcator of the seperaotr
-- Parsing
-- Parsing the tbl and col list
s_pos:=1;
l_cont:=1; -- loop control
i:=0; -- loop control
while (l_cont=1) loop
i:=i+1;
l_k:=l_k+1;
--determine position
l_pos:=instr(a_dytblcoleqp,f_sp,1,i);
if l_pos=0 and i=1 then -- no need to parse ,only 1 record
l_tmp:=a_dytblcoleqp;
l_tblcl_lst(l_k):=l_tmp;
--exit;
l_cont:=0;
elsif l_pos=0 and i!=1 then
l_tmp:=substr(a_dytblcoleqp,s_pos);
l_tblcl_lst(l_k):=l_tmp;
l_k:=l_k-1; re caluclate. nothing else to parse
--exit;
l_cont:=0;
else -- continue parse
l_tmp:=substr(a_dytblcoleqp,s_pos,l_pos-s_pos);
l_tblcl_lst(l_k):=l_tmp;
s_pos:=l_pos+1;
end if;
end loop; -- end of while loop
for j in 1..l_k loop
-- validate sign
if substr(l_tblcl_lst(j),1,1)='-' then
l_tblcl_lst(j):=substr(l_tblcl_lst(j),2);
l_sign_lst(j):='-';
else
l_sign_lst(j):='';
end if;
l_day_lst(j):=substr(l_tblcl_lst(j),1,instr(l_tblcl_lst(j),s_sp,1,1)-1);
l_day_lst(j):=l_sign_lst(j)||l_day_lst(j);
l_tbl_lst(j):=substr(l_tblcl_lst(j),instr(l_tblcl_lst(j),s_sp,1,1)+1,instr(l_tblcl_lst(j),s_sp,1,2)-instr(l_tblcl_lst(j),s_sp,1,1)-1);
l_col_lst(j):=substr(l_tblcl_lst(j),instr(l_tblcl_lst(j),s_sp,1,2)+1,instr(l_tblcl_lst(j),s_sp,1,3)-instr(l_tblcl_lst(j),s_sp,1,2)-1);
l_eqp_lst(j):=substr(l_tblcl_lst(j),(instr(l_tblcl_lst(j),s_sp,1,3)+1));
end loop;
-- Parsing Batch List
s_pos:=1;
l_cont:=1; -- loop control
i:=0; -- loop control
while (l_cont=1) loop
i:=i+1;
l_n:=l_n+1;
--determine position
l_pos:=instr(a_run,f_sp,1,i);
if l_pos=0 and i=1 then -- no need to parse ,only 1 record
l_tmp:=a_run;
l_batch_lst(l_n):=l_tmp;
l_cont:=0;--exit while loop
elsif l_pos=0 and i!=1 then
l_tmp:=substr(a_run,s_pos);
l_batch_lst(l_n):=l_tmp;
l_cont:=0;--exit while loop
else -- continue parse
l_tmp:=substr(a_run,s_pos,l_pos-s_pos);
l_batch_lst(l_n):=l_tmp;
s_pos:=l_pos+1;
end if;
end loop;
--- end of Parsing
-- Build con catenate list
for k in 1..l_n loop
--l_con:=NULL;
--l_con:='(';
--l_con:=l_con||''''||l_batch_lst(k)||''')';
--dbms_output.put_line(l_con);
for j in 1..l_k loop
-- 1 -- Get col desc
begin
select COLUMN_DESCR,COLUMN_TYPE,CAPTURE_DATE
into l_col_desc,l_column_type,l_capture_date
from MDM_ALL_PARAMETER_LIST
where table_name=upper(l_tbl_lst(j))
and column_name=upper(l_col_lst(j));
exception
when others then
l_col_desc:=NULL;
l_column_type:=NULL;
l_capture_date:=NULL;
end;
--dbms_output.put_line(l_batch_lst(k)||'-'||l_tbl_lst(j)||'-'||l_col_lst(j)||'-'||l_col_desc||'-'||to_char(l_capture_date));
--Build Sql Statement
if l_tbl_lst(j)='THAW' then
l_sql:=NULL;
l_sql:='select distinct spinner.BATCH_ID as batch_id,thaw.BIN_NO as bin_no,ipc.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,thaw.'||l_col_lst(j)||','||l_capture_date;
l_sql:=l_sql||' from SPINNER spinner, BIN_HIER bin_hier, THAW thaw,IPC_LIMITS ipc';
l_sql:=l_sql||' where spinner.bin_no = bin_hier.bin_no';
l_sql:=l_sql||' and bin_hier.PROCESS_STEP =30';
l_sql:=l_sql||' and bin_hier.Revival_no = thaw.Revival_no';
l_sql:=l_sql||' and spinner.bin_no=ipc.LOT(+)';
l_sql:=l_sql||' and spinner.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and spinner.BATCH_ID=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
--dbms_output.put_line(l_sql);
elsif l_tbl_lst(j)='THAW_SAMPLES' then
if l_col_lst(j)!='CALC' then
l_sql:=NULL;
l_sql:='select distinct spinner.BATCH_ID as batch_id,thaw_samples.BIN_NO as bin_no,thaw_samples.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,thaw_samples.'||l_col_lst(j)||',thaw_samples.'||l_capture_date;
else
l_sql:=NULL;
--l_sql:='select spinner.BATCH_ID as batch_id,thaw_samples.BIN_NO as bin_no,thaw_samples.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,null as Parameter_value,thaw_samples.'||l_capture_date;
l_sql:='select distinct spinner.BATCH_ID as batch_id,thaw_samples.BIN_NO as bin_no,thaw_samples.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,Get_IPC_Parameter_Value('''||l_tbl_lst(j)||''''||','||''''||l_col_lst(j)||''',spinner.BATCH_ID,thaw_samples.BIN_NO,thaw_samples.DAY_NO),thaw_samples.'||l_capture_date;
end if;
l_sql:=l_sql||' from SPINNER spinner, BIN_HIER bin_hier, THAW thaw,THAW_SAMPLES thaw_samples,IPC_LIMITS ipc';
l_sql:=l_sql||' where spinner.bin_no = bin_hier.bin_no';
l_sql:=l_sql||' and bin_hier.PROCESS_STEP =30';
l_sql:=l_sql||' and bin_hier.Revival_no = thaw.Revival_no';
l_sql:=l_sql||' and thaw_samples.bin_no=thaw.bin_no';
l_sql:=l_sql||' and spinner.bin_no=ipc.LOT(+)';
l_sql:=l_sql||' and spinner.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and spinner.BATCH_ID=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
l_sql:=l_sql||' and ipc.day_no(+)=:5';
l_sql:=l_sql||' and thaw_samples.day_no=:6';
elsif l_tbl_lst(j) in ('F1250L_TEST','F200L_TEST','F4000L_TEST','F8000L_TEST') then
l_sql:=NULL;
l_sql:='select t.batch_id,t.bin_no,t.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,t.'|| l_col_lst(j)||',t.'||l_capture_date;
l_sql:=l_sql||' from '||l_tbl_lst(j)||' t,IPC_LIMITS ipc ';
l_sql:=l_sql||' where 1=1';
l_sql:=l_sql||' and t.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and t.BIN_NO=ipc.LOT(+)';
l_sql:=l_sql||' and t.day_no=ipc.day_no(+)';
l_sql:=l_sql||' and t.batch_id=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
l_sql:=l_sql||' and t.day_no=:5';
elsif l_tbl_lst(j) in ('SPINNER_SAMPLES') then
l_sql:=NULL;
l_sql:='select smp.batch_id,smp.bin_no,smp.DAY_NO as day_no,spn.src_vessel_id as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,smp.'|| l_col_lst(j)||',smp.'||l_capture_date;
l_sql:=l_sql||' from SPINNER spn , SPINNER_SAMPLES smp,IPC_LIMITS ipc ';
l_sql:=l_sql||' where 1=1';
l_sql:=l_sql||' and spn.bin_no=smp.bin_no';
l_sql:=l_sql||' and smp.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and smp.DAY_NO=ipc.DAY_NO(+)';
l_sql:=l_sql||' and smp.BIN_NO=ipc.LOT(+)';
l_sql:=l_sql||' and smp.batch_id=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
l_sql:=l_sql||' and smp.DAY_NO(+)=:5';
l_sql:=l_sql||' and upper(trim(replace(spn.src_vessel_id,'' '')))=:6';
elsif l_tbl_lst(j) in ('SPINNER') then
l_sql:=NULL;
l_sql:='select t.batch_id,t.bin_no,null as day_no,t.src_vessel_id as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,t.'|| l_col_lst(j)||',t.'||l_capture_date;
l_sql:=l_sql||' from '||l_tbl_lst(j)||' t,IPC_LIMITS ipc ';
l_sql:=l_sql||' where 1=1';
l_sql:=l_sql||' and t.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and t.BIN_NO=ipc.LOT(+)';
l_sql:=l_sql||' and t.batch_id=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
l_sql:=l_sql||' and upper(trim(replace(t.src_vessel_id,'' '')))=:5';
else
-- rest
l_sql:=NULL;
l_sql:='select t.batch_id,t.bin_no,ipc.DAY_NO as day_no,NULL as eqp,ipc.PARAMETER_UOM as parameter_uom ,ipc.IPC_ACTION_LIMIT_MAX as ipc_action_limit_max,ipc.IPC_ACTION_LIMIT_MIN as ipc_action_limit_min,ipc.IPC_CONTROL_LIMIT_MAX as ipc_control_limit_max,ipc.IPC_CONTROL_LIMIT_MIN as ipc_control_limit_min,ipc.CENTER_LINE as center_line,t.'|| l_col_lst(j)||',t.'||l_capture_date;
l_sql:=l_sql||' from '||l_tbl_lst(j)||' t,IPC_LIMITS ipc ';
l_sql:=l_sql||' where 1=1';
l_sql:=l_sql||' and t.BATCH_ID=ipc.BATCH_ID(+)';
l_sql:=l_sql||' and t.BIN_NO=ipc.LOT(+)';
l_sql:=l_sql||' and t.batch_id=:1';
l_sql:=l_sql||' and ipc.TABLE_NAME(+)=:2';
l_sql:=l_sql||' and ipc.COLUMN_NAME(+)=:3';
l_sql:=l_sql||' and ipc.SITE_ID(+)=:4';
end if;
-- Open the cursor and filled up object
if l_tbl_lst(j)='THAW_SAMPLES' then
open l_cr for l_sql using l_batch_lst(k),l_tbl_lst(j),l_col_lst(j),1,l_day_lst(j),l_day_lst(j);
loop
null;
fetch l_cr into l_batch_id,l_batch_no,l_day_no,l_eqp,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_parameter_value,l_date;
exit when l_cr%notfound;
--PIPE ROW(PARAMETER_OBJ (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date) );
-- [T]: TO_REMOVE: Changed code to populate the temporary table.
INSERT INTO TMP_PARAMETER VALUES (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date);
end loop;
close l_cr;
elsif l_tbl_lst(j) in ('SPINNER_SAMPLES') then
open l_cr for l_sql using l_batch_lst(k),l_tbl_lst(j),l_col_lst(j),1,l_day_lst(j),l_eqp_lst(j);
loop
null;
fetch l_cr into l_batch_id,l_batch_no,l_day_no,l_eqp,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_parameter_value,l_date;
exit when l_cr%notfound;
--PIPE ROW(PARAMETER_OBJ (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date) );
-- [T]: TO_REMOVE: Changed code to populate the temporary table.
INSERT INTO TMP_PARAMETER VALUES (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date);
end loop;
close l_cr;
null;
elsif l_tbl_lst(j) in ('SPINNER') then
open l_cr for l_sql using l_batch_lst(k),l_tbl_lst(j),l_col_lst(j),1,l_eqp_lst(j);
loop
null;
fetch l_cr into l_batch_id,l_batch_no,l_day_no,l_eqp,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_parameter_value,l_date;
exit when l_cr%notfound;
-- PIPE ROW(PARAMETER_OBJ (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date) );
-- [T]: TO_REMOVE: Changed code to populate the temporary table.
INSERT INTO TMP_PARAMETER VALUES (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date);
end loop;
close l_cr;
elsif l_tbl_lst(j) in ('F1250L_TEST','F200L_TEST','F4000L_TEST','F8000L_TEST') then
null;
open l_cr for l_sql using l_batch_lst(k),l_tbl_lst(j),l_col_lst(j),1,l_day_lst(j);
loop
null;
fetch l_cr into l_batch_id,l_batch_no,l_day_no,l_eqp,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_parameter_value,l_date;
exit when l_cr%notfound;
-- PIPE ROW(PARAMETER_OBJ (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date) );
-- [T]: TO_REMOVE: Changed code to populate the temporary table.
INSERT INTO TMP_PARAMETER VALUES (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date);
end loop;
close l_cr;
else
open l_cr for l_sql using l_batch_lst(k),l_tbl_lst(j),l_col_lst(j),1;
loop
null;
fetch l_cr into l_batch_id,l_batch_no,l_day_no,l_eqp,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_parameter_value,l_date;
exit when l_cr%notfound;
-- PIPE ROW(PARAMETER_OBJ (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date) );
-- [T]: TO_REMOVE: Changed code to populate the temporary table.
INSERT INTO TMP_PARAMETER VALUES (l_batch_id,l_batch_no,l_day_no,l_col_desc,l_parameter_value,l_parameter_uom,l_action_limit_max,l_action_limit_min,l_control_limit_max,l_control_limit_min,l_center_line,l_eqp,'1',l_tbl_lst(j),l_col_lst(j),l_date);
end loop;
close l_cr;
null;
end if;
end loop;-- end of for loop for j in 1..l_k loop
end loop; --end of for j in 1..l_n loop
-- [T]: TO_REMOVE: Return the data from the temporary table into the table type.
-- Return data into table type.
SELECT CAST (MULTISET (SELECT * FROM TMP_PARAMETER)
AS PARAMETER_TYP )
INTO tblParameters FROM DUAL;
-- [T]: TO_REMOVE: Added commit so that the data in the temporary table is deleted.
COMMIT;
-- [T]: TO_REMOVE: Return the table type.
-- return ;
RETURN tblParameters;
EXCEPTION
WHEN OTHERS THEN
--l_sqlerm:=substr(sqlerrm,1,200);
ROLLBACK;
RAISE_APPLICATION_ERROR (-20001, SQLERRM);
return NULL;
END;
# Select sql statement
select *
from table(T_Get_ParameterValue('A03052','-1-SPINNER-CELL_AGE-15L,3-SPINNER-DOUBLING_TIME-15L')) -
Deadlock issue in Oracle 10g Partitioned Tables
Hi ALL,
I am facing an issue of Deadlock while inserting data into a partitioned table.
I get an error "ORA-00600: Deadlock detected". when i see the trace files, following lines are appearing in them:
"Single resource deadlock: blocking enqueue which blocks itself".
Here is the detail of my test case:
1. I have a list-partitioned table, with partitioning defined on some business codes.
2. I have a query that merges data into partitioned table (actually compares unique keys between temporary table and partitioned table and then issue an insert if keys not matched, no update part).
3. The temporary table contains transactional data against many business codes.
3. when calling the above query from multiple (PL/SQL) sessions, i observe that when we merge data in same partition (from different sessions) than deadlock issue occurs, otherwise it is OK.
4. Note that all sessions are executed at same time. Also note that Commit is called after each session is completed. Each session contains 2-3 more queries after the mentioned merge statement.
Is there an issue with oracle merge/insert on same partition (from different sessions)? What is the locking mechanism for this particular case (partitioned tables)?
My oracle version is Oracle 10g (10.2.0.4). Kindly advice.
Thanks,
QQ.Could you print the deadlock tree so we can see the type and mode of the locking. (Please use the 'code' tags - see FAQ at top right of screen - to showthe output in fixed font). can you list any SQL operated by this session that gets reported in the trace file.
Does the table reference itself in a foreign key.
Is this table involved in any referential integrity constraints.
Do you have a global primary key index, or a local primary key index ?
Are there any triggers on the table - if so do they contain autonomous transactions.
At present the only though that springs to mind is that the merge command has to lock the target table to do the insert/update, but it also has to lock any child table. The mode of the child lock depends on whether it has a suitable index or not, and whether the child table IS also the parent table. If you have two merges to the same partition one partition may get its locks, and the other partition may be in a state where it can't get one of the locks because it's wait for the other. (This shouldn't be a self-deadlock, though, but the scenario might be heading in the right direction for a self-deadlock).
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." (Stephen Hawking) -
OEM configuration issue in Oracle 10g
Hi,
I am trying to manually configure OEM on oracle 10g solaris platform (5.10). Earlier I have configured the OEM manually on the same server and then due to customer request de-configure it. But now again, I need to re-configure OEM on same server and facing issue.
Steps which I am following are :-
-> Listener is started
-> Database is up and running.
-> Creating repository through command emca -repos create
-> Configuring the dbconsole through command emca -config dbcontrol db
At this step after providing the information of database name, listener port, Password for SYS user,Password for DBSNMP user,Password for SYSMAN user,Email address for notifications (optional): [email protected],Outgoing Mail (SMTP) server for notifications (optional): wbmlir1.mail.xerox.com, it is giving the below error that db console cannot be started.
Do you wish to continue? [yes(Y)/no(N)]: Y
Aug 22, 2011 10:18:38 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /rdwq/apps/oracle/product/10.2.0.4.2011Q1/cfgtoollogs/emca/rdwq/emca_2011-08-22_10-17-04-AM.log.
Aug 22, 2011 10:18:43 AM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for usa7061ux300
Aug 22, 2011 10:18:44 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsoleINFO: Securing Database Control (this may take a while) ...
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsoleINFO: Database Control secured successfully.
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.DBControlUtil startOMSINFO: Starting Database Control (this may take a while) ...
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin/emctl start dbconsole
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database ControlRefer to the log file at /rdwq/apps/oracle/product/10.2.0.4.2011Q1/cfgtoollogs/emca/rdwq/emca_2011-08-22_10-17-04-AM.log for more details.
Could not complete the configuration. Refer to the log file at /rdwq/apps/oracle/product/10.2.0.4.2011Q1/cfgtoollogs/emca/rdwq/emca_2011-08-22_10-17-04-AM.log for more details.
Below is the content of logfile :-
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
CONFIG: Securing Database Control completed successfully .
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.ParamsManager getParam
CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
CONFIG: Value for env var 'DISPLAY' is '', discarding the same
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.PlatformInterface addEnvVarToList
CONFIG: Value for env var 'ORACLE_HOSTNAME' is '', discarding the same
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.PlatformInterface getEnvProps
CONFIG: Returning env array from cache
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.PlatformInterface getSortedEnvArray
CONFIG: New Env List: [BKUPDIR=/data, CLASSPATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/emca.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/srvm.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/srvmasm.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/emConfigInstall.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/ldapjclnt10.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/ldap.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/share.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/srvmhas.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jlib/netcfg.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib/xmlparserv2.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/assistants/jlib/assistantsCommon.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/sysman/jlib/emCORE.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/oui/jlib/OraInstaller.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/oui/jlib/OraPrereq.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/inventory/prereqs/oui/OraPrereqChecks.jar:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/oui/jlib/OraPrereqChecks.jar:, DYLD_LIBRARY_PATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib32:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/perl/lib, EDITOR=vi, HOME=/rdwq/ap01/rdwsdba, HZ=, LC_COLLATE=en_US.ISO8859-1, LC_CTYPE=en_US.ISO8859-1, LC_MESSAGES=C, LC_MONETARY=en_US.ISO8859-1, LC_NUMERIC=en_US.ISO8859-1, LC_TIME=en_US.ISO8859-1, LD_LIBRARY_PATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jdk/jre/lib/sparc/client:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jdk/jre/lib/sparc:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/jdk/jre/../lib/sparc:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib32:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/perl/lib:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib:/usr/SUNWspro/lib:/usr/openwin/lib:/usr/dt/lib, LIBPATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib32:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/perl/lib, LOGNAME=rdwsdba, MAIL=/usr/mail/rdwsdba, MANPATH=/local/man:/usr/share/man, NEED_EXIT_CODE=1, NLSPATH=/usr/dt/lib/nls/msg/%L/%N.cat, OLDPWD=/rdwq/ap01/rdwsdba, ORACLE_BASE=/rdwq/apps/oracle, ORACLE_DOC=/rdwq/apps/oracle/doc, ORACLE_HOME=/rdwq/apps/oracle/product/10.2.0.4.2011Q1, ORACLE_PATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin, ORACLE_SID=rdwq, ORACLE_TERM=xsun5, ORAENV_ASK=NO, ORATAB=, ORA_NLS=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/ocommon/nls/admin/data, PATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin:/opt/local/scripts:/opt/local/bin:/opt/local/xns:/opt/X11:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/etc:/usr/ccs/bin:/usr/ucb:/usr/openwin:/usr/openwin/bin:/usr/bin/X11:/usr/openwin/bin/X11:/usr/openwin/lib:/usr/lib:/usr/sbin:/usr/local/bin:/app/oracle/local/dba/utilities:/opt/bin:/opt/EDSsrm/bin:/usr/bin, PWD=//rdwq/apps/oracle/product/10.2.0.4.2011Q1/network/admin, SHELL=/bin/bash, SHLIB_PATH=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib32:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/lib:/rdwq/apps/oracle/product/10.2.0.4.2011Q1/perl/lib, SHLVL=1, TERM=vt100, TNS_ADMIN=, TZ=US/Pacific, XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt, _=/rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin/emca]
Aug 22, 2011 10:19:01 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Starting execution: /rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin/emctl start dbconsole
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Exit value of 1
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
CONFIG: Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://usa7061ux300:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 10g Database Control ............................................................................................. failed.
Logs are generated in directory /rdwq/apps/oracle/product/10.2.0.4.2011Q1/usa7061ux300_rdwq/sysman/log
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /rdwq/apps/oracle/product/10.2.0.4.2011Q1/bin/emctl start dbconsole
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.EMConfig perform
SEVERE: Error starting Database Control
Refer to the log file at /rdwq/apps/oracle/product/10.2.0.4.2011Q1/cfgtoollogs/emca/rdwq/emca_2011-08-22_10-17-04-AM.log for more details.
Aug 22, 2011 10:24:21 AM oracle.sysman.emcp.EMConfig perform
CONFIG: Stack Trace:
oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)
at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)
at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)
at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)
Please guide me to resolve this issue.
ThanksHi,
Content of emagent.trc :-
2011-08-22 11:37:07 Thread-1 ERROR http: snmehl_allocateListenerPort: failed to bind socket: Address already in use (errno=125)
2011-08-22 11:37:07 Thread-1 ERROR http: nmehl_startHttpListener: failed to listen to HTTP port for http://usa7061ux300:3938/emd/main
2011-08-22 11:37:07 Thread-1 ERROR main: nmehl_startHttpListener failed starting http listener
Content of emagent.trc :-
2011-08-22 11:37:07 Thread-1 ERROR http: snmehl_allocateListenerPort: failed to bind socket: Address already in use (errno=125)
2011-08-22 11:37:07 Thread-1 ERROR http: nmehl_startHttpListener: failed to listen to HTTP port for http://usa7061ux300:3938/emd/main
2011-08-22 11:37:07 Thread-1 ERROR main: nmehl_startHttpListener failed starting http listener
rdwsdba$ tail -100 emdctl.trc
2011-08-23 07:01:19 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:01:19 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:01:19 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:01:19 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:02:49 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:02:49 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:02:49 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:02:49 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:04:19 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:04:19 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:04:19 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:04:19 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:05:49 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:05:49 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:05:49 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:05:49 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:07:19 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:07:19 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:07:19 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:07:19 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:08:50 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:08:50 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:08:50 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:08:50 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:10:20 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:10:20 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:10:20 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:10:20 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:11:50 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:11:50 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:11:50 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:11:50 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:13:20 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:13:20 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:13:20 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:13:20 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:14:50 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:14:50 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:14:50 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:14:50 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:16:20 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:16:20 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:16:20 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:16:20 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:17:51 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:17:51 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:17:51 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:17:51 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:19:21 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:19:21 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:19:21 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:19:21 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:20:51 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:20:51 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:20:51 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:20:51 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:22:21 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:22:21 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:22:21 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:22:21 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:23:51 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:23:51 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:23:51 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:23:51 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:25:21 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:25:21 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:25:21 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:25:21 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:26:52 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:26:52 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:26:52 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:26:52 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:28:22 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:28:22 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:28:22 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:28:22 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:29:52 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:29:52 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:29:52 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:29:52 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:31:22 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:31:22 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:31:22 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:31:22 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:32:52 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:32:52 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:32:52 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:32:52 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:34:22 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:34:22 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:34:22 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:34:22 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:35:52 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:35:52 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:35:52 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:35:52 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
2011-08-23 07:37:23 Thread-1 WARN http: nmehl_readAgentKey: File access failure
2011-08-23 07:37:23 Thread-1 ERROR ssl: Open wallet failed, ret = 28759
2011-08-23 07:37:23 Thread-1 ERROR ssl: nmehlenv_openWallet failed
2011-08-23 07:37:23 Thread-1 ERROR http: 256: Unable to initialize ssl connection with server, aborting connection attempt
There is no secure.log file.
Thanks -
Issue in oracle 10g thin XA driver with weblogic 7 SP5
Hi there,
We are using oracle 10g thin,thin XA drivers(10.2.0.3) with oracle 10g as back end database and weblogic 7 SP 5. We are getting maximum open cursors exceeded exception after some time.
The issue seems to be with "XAPrepared Statement Cache Size" property. Initially it was set to 5. When transactions are performed the database shows the count of open cursor to 300 which is the limit of open cursors set as database init params.
When we set cache size to zero, the issue disappears and the cursor count is around 45. Even if the statement cahe size is set to 1, after some transactions max open cursor exceeded exception arises.
Can som one elaborate the behavior of this property or the issue which underlies this.
Any help would be greatly appreciated
RegardsHi there,
We are using oracle 10g thin,thin XA drivers(10.2.0.3) with oracle 10g as back end database and weblogic 7 SP 5. We are getting maximum open cursors exceeded exception after some time.
The issue seems to be with "XAPrepared Statement Cache Size" property. Initially it was set to 5. When transactions are performed the database shows the count of open cursor to 300 which is the limit of open cursors set as database init params.
When we set cache size to zero, the issue disappears and the cursor count is around 45. Even if the statement cahe size is set to 1, after some transactions max open cursor exceeded exception arises.
Can som one elaborate the behavior of this property or the issue which underlies this.
Any help would be greatly appreciated
Regards -
Data pump issue for oracle 10G in window2003
Hi Experts,
I try to run data pump in oracle 10G in window 2003 server.
I got a error as
D:\>cd D:\oracle\product\10.2.0\SALE\BIN
D:\oracle\product\10.2.0\SALE\BIN>expdp system/xxxxl@sale full=Y directory=du
mpdir dumpfile=expdp_sale_20090302.dmp logfile=exp_sale_20090302.log
Export: Release 10.2.0.4.0 - Production on Tuesday, 03 March, 2009 8:05:50
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Produc
tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31650: timeout waiting for master process response
However, I can run exp codes and works well.
What is wrong for my data pump?
Thanks
JIMHi Anand,
I did not see any error log at that time. Actually, it did not work any more. I will test it again based on your emial after exp done.
Based on new testing, I got below errors as
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW01" prematurely terminated
ORA-31671: Worker process DW01 had an unhandled exception.
ORA-04030: out of process memory when trying to allocate 4108 bytes (PLS non-lib hp,pdzgM60_Make)
ORA-06512: at "SYS.KUPC$QUEUE_INT", line 277
ORA-06512: at "SYS.KUPW$WORKER", line 1366
ORA-04030: out of process memory when trying to allocate 65036 bytes (callheap,KQL tmpbuf)
ORA-06508: PL/SQL: could not find program unit being called: "SYS.KUPC$_WORKERERROR"
ORA-06512: at "SYS.KUPW$WORKER", line 13360
ORA-06512: at "SYS.KUPW$WORKER", line 15039
ORA-06512: at "SYS.KUPW$WORKER", line 6372
ORA-39125: Worker unexpected fatal error in KUPW$WORKER.DISPATCH_WORK_ITEMS while calling DBMS_METADATA.FETCH_XML_CLOB [PROCOBJ:"SALE"."SQLSCRIPT_2478179"]
ORA-06512: at "SYS.KUPW$WORKER", line 7078
ORA-04030: out of process memory when trying to allocate 4108 bytes (PLS non-lib hp,pdzgM60_Make)
ORA-06500: PL/SQL: storage error
ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu sessi,pmucpcon: tds)
ORA-04030: out of process memory when trying to allocate 16396 bytes (koh-kghu sessi,pmucalm coll)
Job "SYSTEM"."SYS_EXPORT_FULL_01" stopped due to fatal error at 14:41:36
ORA-39014: One or more workers have prematurely exited.
the trace file as
*** 2009-03-03 14:20:41.500
*** ACTION NAME:() 2009-03-03 14:20:41.328
*** MODULE NAME:(oradim.exe) 2009-03-03 14:20:41.328
*** SERVICE NAME:() 2009-03-03 14:20:41.328
*** SESSION ID:(159.1) 2009-03-03 14:20:41.328
Successfully allocated 7 recovery slaves
Using 157 overflow buffers per recovery slave
Thread 1 checkpoint: logseq 12911, block 2, scn 7355467494724
cache-low rba: logseq 12911, block 251154
on-disk rba: logseq 12912, block 221351, scn 7355467496281
start recovery at logseq 12911, block 251154, scn 0
----- Redo read statistics for thread 1 -----
Read rate (ASYNC): 185319Kb in 1.73s => 104.61 Mb/sec
Total physical reads: 189333Kb
Longest record: 5Kb, moves: 0/448987 (0%)
Change moves: 1378/5737 (24%), moved: 0Mb
Longest LWN: 1032Kb, moves: 45/269 (16%), moved: 41Mb
Last redo scn: 0x06b0.9406fb58 (7355467496280)
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 3
Average hash chain = 35384/25746 = 1.4
Max compares per lookup = 3
Avg compares per lookup = 847056/876618 = 1.0
*** 2009-03-03 14:20:46.062
KCRA: start recovery claims for 35384 data blocks
*** 2009-03-03 14:21:02.171
KCRA: blocks processed = 35384/35384, claimed = 35384, eliminated = 0
*** 2009-03-03 14:21:02.531
Recovery of Online Redo Log: Thread 1 Group 2 Seq 12911 Reading mem 0
*** 2009-03-03 14:21:04.718
Recovery of Online Redo Log: Thread 1 Group 1 Seq 12912 Reading mem 0
*** 2009-03-03 14:21:16.296
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 3
Average hash chain = 35384/25746 = 1.4
Max compares per lookup = 3
Avg compares per lookup = 849220/841000 = 1.0
*** 2009-03-03 14:21:28.468
tkcrrsarc: (WARN) Failed to find ARCH for message (message:0x1)
tkcrrpa: (WARN) Failed initial attempt to send ARCH message (message:0x1)
*** 2009-03-03 14:26:25.781
kwqmnich: current time:: 14: 26: 25
kwqmnich: instance no 0 check_only flag 1
kwqmnich: initialized job cache structure
ktsmgtur(): TUR was not tuned for 360 secs
Windows Server 2003 Version V5.2 Service Pack 2
CPU : 8 - type 586, 4 Physical Cores
Process Affinity : 0x00000000
Memory (Avail/Total): Ph:7447M/8185M, Ph+PgF:6833M/9984M, VA:385M/3071M
Instance name: vmsdbsea
Redo thread mounted by this instance: 0 <none>
Oracle process number: 0
Windows thread id: 2460, image: ORACLE.EXE (SHAD)
Dynamic strand is set to TRUE
Running with 2 shared and 18 private strand(s). Zero-copy redo is FALSE
*** 2009-03-03 08:06:51.921
*** ACTION NAME:() 2009-03-03 08:06:51.905
*** MODULE NAME:(expdp.exe) 2009-03-03 08:06:51.905
*** SERVICE NAME:(xxxxxxxxxx) 2009-03-03 08:06:51.905
*** SESSION ID:(118.53238) 2009-03-03 08:06:51.905
SHDW: Failure to establish initial communication with MCP
SHDW: Deleting Data Pump job infrastructure
is it a system memory issue for data pump? my exp works well
How to fix this issue?
JIM
Edited by: user589812 on Mar 3, 2009 5:07 PM
Edited by: user589812 on Mar 3, 2009 5:22 PM -
Issue with Oracle 10g database connectivity
Hi,
Oracle 10g Express edition is been installed in my machine at the location C:\Oracle10g.
When i tried to connect the same from toad it is working fine.
Visual studio-2008 is been installed in machine at loc C:\Program files(x86)\
Problem I am facing is unable to connect Oracle 10g from vb.net application.I am connecting usig Oracle Provider for OLE DB but the program directly coming to exception block
with out connecting to database.
My OS is Windows7 and I am thinking oracle 10g Express will not support completely to this OS.Please suggest me to resolve this issue and comapatable Oracle DB for the same.
Edited by: 1909 on Apr 25, 2011 12:17 AMHi,
Try uninstalling and installing VS at the path which does not include brackets. Have a look at my thread.
Re: Database engine setup for 10.2.0.5
Thanks,
Jignesh -
Java Connection Pooling issue with Oracle 10g Express Edition
Hello
I have a Java based web application that uses the Oracle 10g Express Edition database. I am using a connection pool to get connections to the database.
I use the NetBeans IDE and run my web application on the bundled Tomcat server(5.5.7) that comes with the IDE. Though when I initially run the application from the IDE, the connection pool is set up fine, when I recompile my java code and try to run the application again, I get the following error each time:
Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with the
matching protocol stack.
The logs before the error shows up, indicate that the connection pool object is fine and gives me the number of available connections and the number of active connections and so on, which I have printed from the constructor of the Connection Pool class:
For e.g.:
Cache size = 17
Available Connections = 17
Cache Limit = 1000
Active size = 0
However, if I kill my Tomcat server process and run the application again, it works fine with no error.
I looked around for possible causes and solutions and all I could find
was increasing the processes parameter value in the init.ora file. I have increased the parameter value to from 100 to 20000 now, in increments of 500/1000 each time but it hasnt worked so far.
Someone else suggested that I increase the size of my connection pool; I initially had it set to a minimum limit of 5, an initial limit of 10 and a maximum limit of 1000. However if I set the Initial Limit to anything above 17 connections, I see the following log on the Bundled Tomcat log and my application doesn't run at all:
Log: Loading JDBC Driver : class=oracle.jdbc.driver.OracleDriver ...
Log: Loaded JDBC Driver
Log: Connection with URL=jdbc:oracle:thin:@localhost:1521:xe as username/password
Error code not handled : 0
Exception Message :java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS: no appropriate service handler found
The Connection descriptor used by the client was:
localhost:1521:xe
// End of log
And the Bundled Tomcat server automatically shuts down.
Again the System.out statements from the Connection Pool class constructor show that the cache has been initialized and that currently there are free connections available in the pool.
E.g.
Cache size = 18
Available Connections = 18
Cache Limit = 1000
Active size = 0
Has anyone faced anything similar? Could someone please suggest what I'm doing wrong here and what I should do to set right this problem?
Swethahello, please pardon me, my english is basic. i do of my best. i had the same problem until reading the pdf documentation 2 days for java devvelloper.it is simple, follow this way.
try {OracleDataSource ds;
Connection conn;
ds = new OracleDataSource();
ds.setURL("jdbc:oracle:thin:@localhost");
conn = ds.getConnection("userid","password");
Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
don't forget to Dowload the user client of oracle Express Edition. do the rest of your program and it will work. take a look to the documentation pdf for java develloper. all it is explained. good look -
Unicode font issue in oracle 10g Reports
Hi,
I have install oracle 10g forms and Reports in windows XP system (c:\DevSuiteHome_1).
I have created report for display GUJARATI Language data in PDF. Report is coming but it is displaying junk character instead of GUJARATI data.
Plz help me.Hello,
Do you use Font Subsetting or Font Embedding ?
Regards -
Apostrophe (') issue in Oracle 10g
Hi,
I am using oracle 10g and I inserted a record with apostrophe symbol. After executing the script i checked the data and apostrophe symbol is converted into a special character like below.
Original - Applying of Smart 5 S’ Principles
After insertion - Applying of Smart 5 S¿ Principles
After that i updated the record with apostrophe symbol then also it is not updating. Please help me. Thanks.
Cheers,
ThanaHi,
Have you tried to "escape" the quote by doubling it?
update yourtable
set col1='Applying of Smart 5 S'' Principles';Are you runing your update from a machine which could have a different character set from that one you're running the select?
(ie unix systems have different quotes for example " ` ") ... -
Arabic -English Report direct printing issues in Oracle 10g
Hi,
I am working on Oracle database 10g and application server 10g on windows 2008 platform in Arabic Environment with the following settings.
-- Oracle database NLS_Characterset as AR8IS08859P6
--Oracle Database registery NLS_LANG as ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
--Application Server registery NLS_LANG as ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256
-- font subsetting in uifont.ali for PDF
-- set Reports_BIDI_ALGORITHM = UNICODE
Now I am facing an issue in connection with arabic reports: When user enter the narration in the DATA ENTRY form like ' AP600N حبر طابعة ريكو اسود ' writing from right to left.
it's storing in the database as ' حبر طابعة ريكو اسود AP600N '
Again when its querying in the form, it comes properly as it's written.
Even its coming in the bitmap report in screen as it's written. But when I am printing directly to printer in bitmap mode, its coming as its in the database.
Is there any way to get the print as they wrote in the screen?
Also the Character mode printing comes in left to right in screen as well as in printer.
Please help me...
with thanks & regards,
BJDon't tell so much.
Check the following link
1. PDF Reports in Unicode / Arabic &amp; English | Oracle Community
2. OraFAQ Forum: Reports & Discoverer » Report in Arabic(pdf) (merged)
3. Arabic Report generated to text file giving Jun... | Oracle Community
Hope this helps
Hamid -
Password file issue in Oracle 10g
Hi,
While trying connecting from SQL prompt using command
SQL> CONNECT SYS/PASSWORD@CONNECT_STRING AS SYSDBA
It gives error
ORA-01031 insufficient privilege
If SQL> CONNECT SYS/PASSWORD AS SYSDBA
It works successfully??
After connecting without using connect_string.
Only one DB is running on this machine.
Then SELECT * FROM V$PWFILE_USERS;
0 ROWS RETURNED
Recreated the pwd file same issue persists. What may be the reason?
If SQL> GRANT SYSDBA TO SYS;
ERROR ORA-01994: GRANT FAILED: PASSWORD FILE MISSING OR DISABLED
Password file created using command
orapwd file=/u01/app/oracle/product/10.2.0db_1/dbs/orapwPRIMDB password=pwd entries=5
Please help me.
Thanks in advance.
Edited by: Bharat Kaushik on May 31, 2009 4:20 PMThe first command is a 'remote connection'. To be able to connect as sysdba remotely, spfile remote_login_passwordfile should be set to exclusive.
When there is no password file or the parameter is incorrect this results in ora-1031.
The second command uses O/S authentication, and doesn't use the password file at all.
O/S authentication is set up in sqlnet.ora.
SYS has always SYSDBA, by design. Granting SYSDBA to SYS is redundant.
Obviously in this directory name
/u01/app/oracle/product/10.2.0db_1/dbs/
there is a / missing and it should have been
/u01/app/oracle/product/10.2.0/db_1/dbs/
So you still have no valid passwordfile.
You could have and should have easily spotted this yourself.
Sybrand Bakker
Senior Oracle DBA
Experts: those who did read the documentation. -
Tnsping issues for oracle 10g standby setup
Hi All, i'm setting up standby database,
i'm getting below error while doing tnsping after made all the necessary entries in listene.ora and tnsnames.ora,
in both server listener is up and running.
Please suggest me on this to resolve the issue,
Primary Site
tnsping DEVP
TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 24-OCT-2011 16:09:59
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/arch/oracle/devora/ora10g/network/admin/DEVP_mareno/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =alpha)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEVP)))
OK (10 msec)
tnsping DEVPDR
TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 24-OCT-2011 16:08:37
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/arch/oracle/devora/ora10g/network/admin/DEVP_mareno/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = beta)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEVPDR)(UR=A)))
TNS-12541: TNS:no listener
Standby site
tnsping DEVPDR
TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 24-OCT-2011 10:21:08
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/soft/ora10g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = beta)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEVPDR)(UR=A)))
OK (10 msec)
tnsping DEVP
TNS Ping Utility for Solaris: Version 10.2.0.2.0 - Production on 24-OCT-2011 10:21:29
Copyright (c) 1997, 2005, Oracle. All rights reserved.
Used parameter files:
/oracle/soft/ora10g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = alpha)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEVP)))
TNS-12541: TNS:no listenerHi,
Now tnsping is working in primary site of both
but from standby site,
Used parameter files:
/oracle/soft/ora10g/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = beta.pati.com)(PORT = 1524)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DEVP)))
TNS-12541: TNS:no listener
Please suggest me on this. -
Row chaining issue in Oracle 10g
Hello All,
I was seeing row chaining issue in one of our production DB. Row chaining was present in all tables having LONG RAW columns.
As of now I am not supposed to change these to BLOB/CLOB, so I did exp/imp to solve the issue. However, we are repeating this excercise once every quarter, and now it is time we put a permanent fix to it.
One of such tables has below storage parameters:
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 40K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
)Can I be advised what would be the tuning options in above? Note: All of these tables are in GB's.
For any inputs, please let me know.
Thanks,
SuddhasatwaSELECT table_name,
Round(( blocks * 8 ) / 1024 / 1024, 2)
"Physical Size (GB)",
Round(( num_rows * avg_row_len / 1024 / 1024 / 1024 ), 2)
"Actual Size (GB)",
( Round(( blocks * 8 ) / 1024 / 1024, 2) - Round((
num_rows * avg_row_len / 1024 / 1024 / 1024 ), 2) )
"Wasted Space (GB)"
FROM dba_tables
WHERE owner = 'SYSADM'
AND ( Round(( blocks * 8 ) / 1024, 2) - Round(
( num_rows * avg_row_len / 1024 / 1024 )
, 2) ) > 20
AND table_name IN (SELECT table_name
FROM dba_tab_columns
WHERE data_type IN ( 'RAW', 'LONG RAW', 'LONG' ))
AND table_name IN (SELECT table_name
FROM dba_tab_columns
WHERE data_type LIKE '%LONG%')
ORDER BY ( Round(( blocks * 8 ) / 1024, 2) - Round(
( num_rows * avg_row_len / 1024 / 1024 )
, 2) ) DESC; is the air inside the gas tank on your car considered "Wasted Space"?
would you car run any better if the size of the gas tank got reduced as gasoline was consumed?
Realize & understand that Oracle & does reused FREE SPACE without any manual intervention.
It appears you suffer from Complusive Tuning Disorder! -
To_date function usage in Oracle 11i
Expecting the below output using the query: select sysdate, 'to_date('||''''|| sysdate ||''',''DD-MON-YYYY''),' from dual;
08-OCT-2013 to_date('08-OCT-2013','DD-MON-YYYY'),
But, getting the below output, please provide your inputs.
08-OCT-2013 to_date('08-OCT-13','DD-MON-YYYY'),Hi,
888976 wrote:
Expecting the below output using the query: select sysdate, 'to_date('||''''|| sysdate ||''',''DD-MON-YYYY''),' from dual;
08-OCT-2013 to_date('08-OCT-2013','DD-MON-YYYY'),
But, getting the below output, please provide your inputs.
08-OCT-2013 to_date('08-OCT-13','DD-MON-YYYY'),
SYSDATE returns a DATE, but the operands of || are strings. When you use a DATE in a place where a string is expected, Oracle implicitly converts it to a string, maybe in the format you want, maybe in some different format. Don't rely on implicit conversions. When a string is required, use a string. Use TO_CHAR to convert DATEs to strings when the format is important.
Maybe you are looking for
-
Unable to get job status via BIP web service
Hi, I'm scheduling a report job using the method scheduleReport of the ScheduleService web service. The method returns the jobId correctly, then I check the job status using getScheduledReportStatus. Every time the method returns jobstatus = "Schedul
-
ITunes keeps unexpectedly quitting after installing Leopard
After installing Leopard, iTunes keeps unexpectedly quitting? I've tried recreating the iTunes library with no help.
-
How to create dynamic bucket in Query Designer
Hi , Can anyone suggest me how to fill the data dynamically in bucket calculation in query without using program.? Eg: No age 1 5 2 7 Bucket: 0-5 6-10 11-15 5 7 In future if i get data more than 7 in age(like 10 in age
-
Adapters needed for Fusion Applications
Hello Fusion Apps experts, can you please clarify my concern. Is there anything like OAM Adapter ? I am preparing for FA installation. Already identity management is installed and configured. Regarding adapters, I created 2 adapters for OVD to connec
-
briefly about internal tables standerd internal tables hash internal tables sorted internal tables index internal tables