Error ORA-06533: executing dbms_odm.CreateStdFactmv
Hi,
I have been defined and validated a metamodel for a cube and their dimensions, using CWM2 package. I obtained the scripts for dimension materialized view with dbms_odm.CreateDimmv_gs, I run them successfully, but when I try to run dbms_odm.CreateStdFactmv to generate fact table materialized view I get:
ORA-06533: Subscript beyond count
ORA-06512: at "OLAPSYS.DBMS_ODM", line 4771
ORA-06512: at line 2
and I'm running Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Can someone help me???
Hi,
No body have answered me, but I found the solution, if somebody has the same problem, check the value of parameter dimkeymap before to execute
cwm2_olap_table_map.map_facttbl_levelkey and cwm2_olap_table_map.map_facttbl_measure
dimkeymap is a string enclose in single quotes like as follows
'DIM:dim1_name/HIER:hier_name/LVL:level_name/COL:map_column;DIM:.......'
You must to be carefull to write the lowest level name for each hierarchy.
Similar Messages
-
Error ORA-06533: Subscript beyond count - Please help
Hi All,
Please help me on below error
I Created two Objects and two Type like below
CREATE OR REPLACE TYPE P_IN_OBJ AS OBJECT
A1 VARCHAR2(5),
A2 VARCHAR2(5),
A3 VARCHAR2(30));
CREATE OR REPLACE TYPE P_IN AS TABLE OF P_IN_OBJ;
CREATE OR REPLACE TYPE P_OUT_OBJ AS OBJECT
(B1 VARCHAR2(1),
B2 VARCHAR2(100),
B3 NUMBER,
B4 VARCHAR2(100));
CREATE OR REPLACE TYPE P_OUT AS TABLE OF P_OUT_OBJ;
CREATE OR REPLACE PACKAGE PKG_P1 AS
PROCEDURE PRC_P1(P_IN_VALUE IN P_IN ,
P_OUT_VALUE OUT P_OUT);
END PKG_P1;
CREATE OR REPLACE PACKAGE BODY PKG_SEG_QS AS
PROCEDURE PRC_SEG_QS(P_IN_VALUE IN P_IN ,
P_OUT_VALUE OUT P_OUT ) AS
P_OUT_VAL P_OUT := P_OUT();
element INTEGER := 1;
BEGIN
IF P_IN_VALUE.EXISTS(1) = TRUE THEN
FOR I IN 1..P_IN_VALUE.COUNT
LOOP
FOR ALL_QS IN
(SELECT E1, E2, E3, E4
FROM MV_SEG_QS MVSQ
WHERE MVSQ.Z1 = P_IN_VALUE.A1
AND MVSQ.Z2 = P_IN_VALUE.A2
AND MVSQ.Z3 = P_IN_VALUE.A3
LOOP
P_OUT_VAL(element).B1 := ALL_QS.E1;
P_OUT_VAL(element).B2 := ALL_QS.E2;
P_OUT_VAL(element).B3 := ALL_QS.E3;
P_OUT_VAL(element).B4 := ALL_QS.E4;
element := element+1;
END LOOP;
END LOOP;
END IF;
P_OUT_VALUE:= P_SEG_OUT;
END PRC_P1;
END PKG_P1;
When I call this Package I am getting the below Error
ORA-06533: Subscript beyond count
Please somebody help me in this issue its very urgent for me.
Thanks,
Anu.Anu wrote:
Hi All,
Please help me on below error
I Created two Objects and two Type like below
CREATE OR REPLACE TYPE P_IN_OBJ AS OBJECT
A1 VARCHAR2(5),
A2 VARCHAR2(5),
A3 VARCHAR2(30));
CREATE OR REPLACE TYPE P_IN AS TABLE OF P_IN_OBJ;
CREATE OR REPLACE TYPE P_OUT_OBJ AS OBJECT
(B1 VARCHAR2(1),
B2 VARCHAR2(100),
B3 NUMBER,
B4 VARCHAR2(100));
CREATE OR REPLACE TYPE P_OUT AS TABLE OF P_OUT_OBJ;
CREATE OR REPLACE PACKAGE PKG_P1 AS
PROCEDURE PRC_P1(P_IN_VALUE IN P_IN ,
P_OUT_VALUE OUT P_OUT);
END PKG_P1;
CREATE OR REPLACE PACKAGE BODY PKG_SEG_QS AS
PROCEDURE PRC_SEG_QS(P_IN_VALUE IN P_IN ,
P_OUT_VALUE OUT P_OUT ) AS
P_OUT_VAL P_OUT := P_OUT();
element INTEGER := 1;
BEGIN
IF P_IN_VALUE.EXISTS(1) = TRUE THEN
FOR I IN 1..P_IN_VALUE.COUNT
LOOP
FOR ALL_QS IN
(SELECT E1, E2, E3, E4
FROM MV_SEG_QS MVSQ
WHERE MVSQ.Z1 = P_IN_VALUE.A1
AND MVSQ.Z2 = P_IN_VALUE.A2
AND MVSQ.Z3 = P_IN_VALUE.A3
LOOP
P_OUT_VAL(element).B1 := ALL_QS.E1;
P_OUT_VAL(element).B2 := ALL_QS.E2;
P_OUT_VAL(element).B3 := ALL_QS.E3;
P_OUT_VAL(element).B4 := ALL_QS.E4;
element := element+1;
END LOOP;
END LOOP;
END IF;
P_OUT_VALUE:= P_SEG_OUT;
END PRC_P1;
END PKG_P1;
When I call this Package I am getting the below Error
ORA-06533: Subscript beyond count
Please somebody help me in this issue its very urgent for me.
Thanks,
Anu.Anu,
Correct your package code, its not working.
Cheers,
Manik. -
Error: ORA-06533: Subscript beyond count
when i run the below command;
ERROR at line 1:
ORA-06533: Subscript beyond count
ORA-06512: at line 10
sp_table will be like
SPLITID DELIMITERLENGTH
1 1
2 1
3 1
4 1
declare strx varchar2(4000) :='11111111111111111111111111111111111111111111111111111111111111111111111111111111';
delarray np_type:=np_type(1,2,3,4,5);
execstr varchar2(4000);
cn cn_type :=cn_type();
cxn cxn_type :=cxn_type();
xpos number:=1;
begin
for i in 1..5 loop
select Delimiterlength into cn(i) from sp_table where Splitid = delarray(i);
select substr(strx,xpos,cn(i)) into cxn(i) from dual;
execstr:='insert into test values(' || cxn(i) || ',';
xpos:=length(cxn(i));
end loop;
execstr:=substr(execstr,1,length(execstr)-1);
execstr:=execstr || ')';
dbms_output.put_line(execstr);
--execute immediate execstr;
end;
/Something like this?
SET SERVEROUTPUT ON
DROP TABLE sp_table;
CREATE TABLE sp_table(splitid NUMBER,delimiterlength NUMBER);
INSERT INTO sp_table values(1,4);
INSERT INTO sp_table values(2,7);
INSERT INTO sp_table values(3,9);
INSERT INTO sp_table values(4,1);
INSERT INTO sp_table values(5,2);
INSERT INTO sp_table values(6,6);
COMMIT;
DECLARE
TYPE varchar2_table IS TABLE OF VARCHAR2(120)
INDEX BY BINARY_INTEGER;
TYPE number_table IS TABLE OF NUMBER
INDEX BY BINARY_INTEGER;
delarray number_table;
cn number_table;
cxn varchar2_table;
xpos NUMBER :=1;
strx VARCHAR2(4000) :='11111111111111111111111111111111111111111111111111111111111111111111111111111111';
execstr VARCHAR2(4000);
BEGIN
delarray(1) := 1;
delarray(2) := 2;
delarray(3) := 3;
delarray(4) := 4;
delarray(5) := 5;
execstr := 'insert into test values(';
FOR i IN 1..delarray.COUNT LOOP
SELECT delimiterlength
INTO cn(i)
FROM sp_table
WHERE splitid = delarray(i);
cxn(i) := SUBSTR(strx,xpos,cn(i));
execstr :=execstr || cxn(i) || ',';
xpos :=LENGTH(cxn(i));
END LOOP;
execstr := RTRIM(execstr,',')|| ')';
dbms_output.put_line(execstr);
--execute immediate execstr;
END;
insert into test values(1111,1111111,111111111,1,11)I used associative arrays, so I don't have to extend them.
Edited by: Marwim on 25.10.2012 10:17 -
ORA-06533: Subscript beyond count.
Hi ,
I am getting an error ORA-06533: Subscript beyond count.
I read a few post and tried extending the collections as suggested in various post but it doesnt seem to be helping.
Can anyone suggest where i am going wrong. below is my piece of code.
PROCEDURE validate_records ( p_retcode OUT VARCHAR2
, p_errbuf OUT VARCHAR2
IS
g_ret_success CONSTANT VARCHAR2(1) := '0';
g_ret_exception CONSTANT VARCHAR2(1) := '2';
g_procedure VARCHAR2(30) := g_validate_rec;
l_batch_name ra_batch_sources_all.name%TYPE;
l_supplier_payee_code hz_cust_accounts_all.cust_account_id%TYPE;
l_supplier_code hz_cust_accounts_all.cust_account_id%TYPE;
l_term_name ra_terms.name%TYPE;
l_term ra_terms.name%TYPE;
l_receipt_method fnd_lookup_values.meaning%TYPE;
l_func_seg fnd_flex_values_vl.attribute1%TYPE;
l_tax_inc_flag fnd_flex_values_vl.attribute3%TYPE;
l_set_of_books_id gl_ledgers.ledger_id%TYPE;
l_cust_bill_to_add_ref hz_cust_acct_sites.orig_system_reference%TYPE;
l_cust_ship_to_add_ref hz_cust_acct_sites.orig_system_reference%TYPE;
l_costcenter fnd_flex_values_vl.attribute1%TYPE;
l_company fnd_flex_values_vl.attribute2%TYPE;
l_account fnd_flex_values_vl.attribute1%TYPE;
l_function fnd_flex_values_vl.attribute2%TYPE;
l_cust_trx_type_name fnd_flex_values_vl.attribute4%TYPE;
l_bill_sku fnd_flex_values_vl.attribute5%TYPE;
l_ship_from fnd_flex_values_vl.attribute6%TYPE;
l_inventory_id NUMBER;
l_warehouse_id NUMBER;
l_date DATE;
l_date_term DATE;
l_combination_check VARCHAR2(10);
l_location_ship VARCHAR2(10);
l_location_bill VARCHAR2(10);
l_line_type VARCHAR2(10);
l_error_message VARCHAR2(4000);
l_err_stage VARCHAR2(4000);
l_return_status VARCHAR2(1);
l_errbuf VARCHAR2(4000);
l_retcode VARCHAR2(10);
l_cnt NUMBER;
l_update_tax VARCHAR2(1);
l_error_count NUMBER;
ex_dml_errors EXCEPTION;
PRAGMA EXCEPTION_INIT(ex_dml_errors, -24381);
CURSOR c_get_bill_data
IS
SELECT program_type
, dc
, CONCAT(supplier_code,'SMF') supplier_code1
, CONCAT(substr(supplier_payee_code,0,4),'SMF')supplier_payee_code1
, supplier_code
, supplier_payee_code
, line_type
, payment_type
, sfm_bill_number
, due_date
, ROUND(total_inv_recv_amt,2) invoice_amount
, record_status
, ROWID
FROM xxom_ar_sfs03_bill_info_stg
WHERE record_status = g_new_rec_status
AND conc_request_id = fnd_global.conc_request_id;
CURSOR c_new_rec_count
IS
SELECT COUNT(*)
FROM xxom_ar_sfs03_bill_info_stg
WHERE record_status = g_new_rec_status
AND conc_request_id = fnd_global.conc_request_id;
-- to fetch total invoice lines for an invoice
CURSOR c_get_invoice_no(p_bill in varchar2)
IS
SELECT sfm_bill_number
FROM xxom_ar_sfs03_bill_info_stg
WHERE sfm_bill_number = p_bill
AND conc_request_id = fnd_global.conc_request_id;
-- to fetch total err lines for an invoice
CURSOR c_get_err_line
IS
SELECT sfm_bill_number
FROM xxom_ar_sfs03_bill_info_stg
WHERE record_status = 'E'
AND conc_request_id = fnd_global.conc_request_id;
CURSOR c_batch_src_exist
IS
SELECT name
FROM ra_batch_sources
WHERE name = g_batch_source_name
AND batch_source_type = 'FOREIGN'
AND status = 'A';
CURSOR c_set_book_id_exist
IS
SELECT gl.ledger_id
FROM gl_ledgers gl
, hr_operating_units hru
WHERE gl.ledger_id = hru.set_of_books_id
AND hru.organization_id = g_org_id
AND gl.name = g_ledger_name;
CURSOR c_cust_num_exist( p_cust_no IN hz_cust_accounts.orig_system_reference%TYPE
IS
SELECT cust_account_id
FROM hz_parties HP
, hz_cust_accounts HCC
WHERE HP.party_id = HCC.party_id
AND HP.status = 'A'
AND HCC.status = 'A'
AND HCC.orig_system_reference LIKE p_cust_no;
CURSOR c_cust_payee_exist( p_cust_no IN hz_cust_accounts.attribute2%TYPE)
IS
SELECT cust_account_id
FROM hz_parties HP
, hz_cust_accounts HCC
WHERE HP.party_id = HCC.party_id
AND HP.status = 'A'
AND HCC.status = 'A'
AND HCC.orig_system_reference = p_cust_no;
CURSOR c_pgm_type_exist(p_pgm_type IN VARCHAR)
IS
SELECT FFVV.attribute1
, FFVV.attribute2
, FFVV.attribute3
, FFVV.attribute4
, FFVV.attribute5
, FFVV.attribute6
FROM fnd_flex_value_sets FFVS
, fnd_flex_values_vl FFVV
WHERE flex_value_set_name = g_pgm_valueset
AND FFVV.flex_value_set_id = FFVS.flex_value_set_id
AND FFVV.flex_value = p_pgm_type
AND enabled_flag = 'Y'
AND TRUNC(SYSDATE) BETWEEN NVL(start_date_active,TRUNC(SYSDATE))
AND NVL(end_date_active,TRUNC(SYSDATE));
CURSOR c_validate_dc(p_dc IN fnd_flex_values_vl.flex_value%TYPE)
IS
SELECT FFVV.attribute1
, FFVV.attribute2
FROM fnd_flex_value_sets FFVS
, fnd_flex_values_vl FFVV
WHERE flex_value_set_name = 'OM_LEGACY_DC'
AND FFVV.flex_value_set_id = FFVS.flex_value_set_id
AND FFVV.flex_value = p_dc
AND enabled_flag = 'Y';
CURSOR c_get_location( p_cust_id IN hz_cust_accounts.cust_account_id%TYPE
, p_location_use IN VARCHAR2
IS
SELECT HCAS.orig_system_reference
FROM hz_cust_acct_sites HCAS
, hz_cust_site_uses HCSU
WHERE cust_account_id = p_cust_id
AND HCAS.cust_acct_site_id = HCSU.cust_acct_site_id
AND HCAS.status = 'A'
AND primary_flag = 'Y'
AND HCSU.site_use_code = p_location_use;
CURSOR c_validate_line_type(p_line_type IN VARCHAR2)
IS
SELECT flv.lookup_code
FROM fnd_lookup_values flv
WHERE flv.lookup_type = g_line_typ_lookup
AND flv.lookup_code = p_line_type
AND flv.enabled_flag = 'Y'
AND TRUNC(SYSDATE) BETWEEN NVL(flv.start_date_active,TRUNC(SYSDATE))
AND NVL(flv.end_date_active,TRUNC(SYSDATE));
CURSOR c_validate_receipt_type(p_receipt_method IN VARCHAR2)
IS
SELECT flv.meaning
FROM fnd_lookup_values flv
WHERE flv.lookup_type = g_receipt_lookup
AND flv.lookup_code = p_receipt_method
AND flv.enabled_flag = 'Y'
AND TRUNC(SYSDATE) BETWEEN NVL(flv.start_date_active,TRUNC(SYSDATE))
AND NVL(flv.end_date_active,TRUNC(SYSDATE));
CURSOR c_validate_term_name (p_term_name IN ra_terms.name%TYPE)
IS
SELECT name
FROM ra_terms
WHERE name = p_term_name
AND TRUNC(SYSDATE) BETWEEN NVL(start_date_active,TRUNC(SYSDATE))
AND TRUNC(SYSDATE);
CURSOR c_check_combination( p_attribute IN ra_customer_trx_all.attribute1%TYPE
IS
SELECT 1
FROM ra_customer_trx_all
WHERE attribute1 = p_attribute
AND attribute_category = 'SFM';
CURSOR c_get_inventory_item_id (p_org_code IN VARCHAR2
,p_item_description IN VARCHAR2)
IS
SELECT msi.inventory_item_id
, msi.organization_id warehouse_id
FROM mtl_system_items_b msi
, hr_all_organization_units haou
, org_organization_definitions ood
WHERE haou.organization_id = msi.organization_id
AND haou.organization_id = ood.organization_id
AND ood.disable_date IS NULL
AND msi.enabled_flag = 'Y'
AND ood.organization_code = p_org_code
AND segment1 = p_item_description
AND TRUNC(SYSDATE) BETWEEN NVL(msi.start_date_active,TRUNC(SYSDATE))
AND NVL(msi.end_date_active,TRUNC(SYSDATE));
TYPE type_bill_dtl_update_tbl IS RECORD
ledger_id gl_ledgers.ledger_id%TYPE
, cust_ship_to_add_ref hz_cust_acct_sites_all.orig_system_reference%TYPE
, pay_term_name ra_terms.name%TYPE
, receipt_method fnd_lookup_values.meaning%TYPE
, cust_bill_to_add_ref hz_cust_acct_sites_all.orig_system_reference%TYPE
, company_seg gl_code_combinations.segment1%TYPE
, costcenter_seg gl_code_combinations.segment2%TYPE
, function_seg gl_code_combinations.segment3%TYPE
, account_seg gl_code_combinations.segment4%TYPE
, cust_trx_type fnd_flex_values_vl.attribute4%TYPE
, inventory_item_id fnd_flex_values_vl.attribute5%TYPE
, warehouse_id fnd_flex_values_vl.attribute6%TYPE
, tax_flag VARCHAR2(1)
, invoice_amount NUMBER
, record_status VARCHAR2(1)
, error_message VARCHAR2(1000)
, row_id ROWID
TYPE t_get_bill_data IS TABLE OF c_get_bill_data%ROWTYPE;
l_get_bill_data t_get_bill_data:= t_get_bill_data() ;
TYPE t_bill_dtl_update_tbl IS TABLE OF type_bill_dtl_update_tbl;-- INDEX BY BINARY_INTEGER;
l_bill_dtl_update_rec t_bill_dtl_update_tbl:= t_bill_dtl_update_tbl() ;
TYPE t_bill_no IS TABLE OF c_get_invoice_no%ROWTYPE;
l_bill_no t_bill_no;
TYPE t_bill_err_lines IS TABLE OF c_get_err_line%ROWTYPE;
l_bill_err_lines t_bill_err_lines;
BEGIN
p_retcode := g_ret_success;
p_errbuf := NULL;
g_procedure := g_validate_rec;
l_set_of_books_id := NULL;
l_cnt := 1;
OPEN c_new_rec_count;
FETCH c_new_rec_count INTO g_new_rec_count;
CLOSE c_new_rec_count;
OPEN c_get_bill_data;
FETCH c_get_bill_data BULK COLLECT INTO l_get_bill_data;
CLOSE c_get_bill_data;
FOR i IN 1..l_get_bill_data.COUNT LOOP
FND_FILE.PUT_LINE (FND_FILE.LOG,'count'||i);
l_get_bill_data.EXTEND;
l_return_status := NULL;
l_batch_name := NULL;
l_supplier_code := NULL;
l_supplier_payee_code := NULL;
l_cust_bill_to_add_ref := NULL;
l_cust_ship_to_add_ref := NULL;
l_line_type := NULL;
l_combination_check := NULL;
l_term_name := NULL;
l_receipt_method := NULL;
l_tax_inc_flag := NULL;
l_update_tax := NULL;
l_date_term := NULL;
l_date := NULL;
l_term := NULL;
l_cust_trx_type_name := NULL;
l_bill_sku := NULL;
l_ship_from := NULL;
l_inventory_id := NULL;
l_warehouse_id := NULL;
l_location_ship := 'SHIP_TO';
l_location_bill := 'BILL_TO';
l_err_stage := NULL;
l_error_message := NULL;
l_costcenter := NULL;
l_company := NULL;
l_account := NULL;
l_function := NULL;
-- Validation for set_of_books and org_id
l_err_stage := 'Validation for Set_of_books_id and org_id .' ;
IF (g_ledger_name IS NOT NULL) AND (g_org_id IS NOT NULL) THEN
OPEN c_set_book_id_exist;
FETCH c_set_book_id_exist into l_set_of_books_id;
CLOSE c_set_book_id_exist;
IF l_set_of_books_id IS NULL THEN
p_errbuf := 'Please check the setup for set_of_books name'||g_ledger_name;
p_retcode := g_ret_exception;
xxom_int_common.post_record_msg( p_message => 'Please check the setup for set_of_books name :'||g_ledger_name
, p_severity => xxom_int_common.c_level_error
END IF;--set of books
ELSE
p_errbuf := 'Please check the setup for set_of_books name'||g_ledger_name||'and org_id '||g_org_id||'cannot be null';
p_retcode := g_ret_exception;
xxom_int_common.post_record_msg( p_message => 'Please check the setup for set_of_books name'||g_ledger_name||'and org_id '||g_org_id||'cannot be null'
, p_severity => xxom_int_common.c_level_error
END IF;--Validation for set_of_books and org_id
--Validation for batch name
l_err_stage := 'Validation for batch name.' ;
IF g_batch_source_name IS NOT NULL THEN
OPEN c_batch_src_exist;
FETCH c_batch_src_exist INTO l_batch_name ;
CLOSE c_batch_src_exist;
IF l_batch_name IS NULL THEN
p_errbuf := 'Please check the setup for batch_source_name'||g_batch_source_name;
p_retcode := g_ret_exception;
xxom_int_common.post_record_msg( p_message => 'Please check the setup for batch_source_name'||g_batch_source_name
, p_severity => xxom_int_common.c_level_error
END IF;
END IF ;--l_get_bill_data(i).batch_source_name IS NOT NULL
--Validation for supplier code
l_err_stage := 'Validation for Supplier Code.';
IF l_get_bill_data(i).supplier_code IS NOT NULL THEN
OPEN c_cust_num_exist( p_cust_no => l_get_bill_data(i).supplier_code1
FETCH c_cust_num_exist INTO l_supplier_code;
CLOSE c_cust_num_exist;
IF l_supplier_code IS NULL THEN
l_error_message := l_error_message||'Supplier Code ('||l_get_bill_data(i).supplier_code||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'Supplier Code is not valid : '||l_get_bill_data(i).supplier_code||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
ELSE
OPEN c_get_location( p_cust_id => l_supplier_code
, p_location_use => l_location_ship);
FETCH c_get_location INTO l_cust_ship_to_add_ref;
CLOSE c_get_location;
IF l_cust_ship_to_add_ref IS NULL THEN
l_error_message := l_error_message||'Customer ship to location is null.';
xxom_int_common.post_record_msg( p_message => 'Customer ship to location is null. '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
END IF ;
END IF;-- l_get_bill_data(i).supplier_code IS NOT NULL
--Validation for Supplier payee code
l_err_stage := 'Validation for Supplier payee code.';
IF l_get_bill_data(i).supplier_payee_code IS NOT NULL THEN
OPEN c_cust_payee_exist ( p_cust_no => l_get_bill_data(i).supplier_payee_code1);
FETCH c_cust_payee_exist INTO l_supplier_payee_code;
CLOSE c_cust_payee_exist;
IF l_supplier_payee_code IS NULL THEN
l_error_message := l_error_message||'Supplier Payee Code ('||l_get_bill_data(i).supplier_payee_code||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'Supplier Payee Code is not valid: '||l_get_bill_data(i).supplier_payee_code||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
ELSE
OPEN c_get_location( p_cust_id => l_supplier_payee_code
, p_location_use => l_location_bill);
FETCH c_get_location INTO l_cust_bill_to_add_ref;
CLOSE c_get_location;
IF l_cust_bill_to_add_ref IS NULL THEN
l_error_message := l_error_message||'Customer bill to location is null.';
xxom_int_common.post_record_msg( p_message => 'Customer bill to location is null. '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
END IF;
ELSE
l_error_message := l_error_message ||' Supplier Payee code is null';
xxom_int_common.post_record_msg( p_message => 'Supplier Payee code is null. '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF ;--supplier_payee_code IS NOT NULL
--Validation for DC
l_err_stage := 'Validation for DC.';
IF l_get_bill_data(i).dc IS NOT NULL THEN
OPEN c_validate_dc(p_dc => l_get_bill_data(i).dc);
FETCH c_validate_dc INTO l_costcenter
, l_company;
CLOSE c_validate_dc;
IF l_costcenter IS NULL THEN
l_error_message := l_error_message||'DC ('||l_get_bill_data(i).dc||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'DC is not valid : '||l_get_bill_data(i).dc||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
ELSE
l_error_message := l_error_message||'DC is null';
xxom_int_common.post_record_msg( p_message => 'DC is null. '||l_get_bill_data(i).dc||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
--Validation for program type
l_err_stage := 'Validation for program type.';
IF l_get_bill_data(i).program_type IS NOT NULL THEN
OPEN c_pgm_type_exist(p_pgm_type => l_get_bill_data(i).program_type);
FETCH c_pgm_type_exist INTO l_account
, l_function
, l_tax_inc_flag
, l_cust_trx_type_name
, l_bill_sku
, l_ship_from;
CLOSE c_pgm_type_exist;
--to fetch warehouse_id and inventory_id
OPEN c_get_inventory_item_id(p_org_code => l_ship_from
,p_item_description =>l_bill_sku );
FETCH c_get_inventory_item_id INTO l_inventory_id
,l_warehouse_id;
CLOSE c_get_inventory_item_id;
IF l_tax_inc_flag IS NULL THEN
l_error_message := l_error_message||'Program type ('||l_get_bill_data(i).program_type||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'Program type is not valid : '||l_get_bill_data(i).program_type||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
ELSIF l_tax_inc_flag ='No' THEN
l_update_tax := 'N';
ELSE
l_update_tax := 'Y';
END IF;
ELSE
l_error_message := l_error_message||'Program type is null';
xxom_int_common.post_record_msg( p_message => 'Program type is null. '||l_get_bill_data(i).program_type||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF; --IF l_get_bill_data.program_type IS NOT NULL
--Validation for Line type
l_err_stage := 'Validation for Line type.';
IF l_get_bill_data(i).line_type IS NOT NULL THEN
OPEN c_validate_line_type(p_line_type => l_get_bill_data(i).line_type);
FETCH c_validate_line_type INTO l_line_type;
CLOSE c_validate_line_type;
IF l_line_type IS NULL THEN
l_error_message := l_error_message||'Line type ('||l_get_bill_data(i).line_type||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'Line type is not valid : '||l_get_bill_data(i).line_type||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
ELSE
l_error_message := l_error_message ||' Line type is null';
xxom_int_common.post_record_msg( p_message => 'Line type is null '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;--l_get_bill_data(i).line_type IS NOT NULL
--Validation for Payment Type
l_err_stage := 'Validation for Payment Type.';
IF l_get_bill_data(i).payment_type IS NOT NULL AND l_get_bill_data(i).payment_type IN ('D') THEN
debug_print('Receipt'||i||l_get_bill_data(i).payment_type);
OPEN c_validate_receipt_type(p_receipt_method => l_get_bill_data(i).payment_type);
FETCH c_validate_receipt_type INTO l_receipt_method;
CLOSE c_validate_receipt_type;
IF l_receipt_method IS NULL THEN
l_error_message := l_error_message||'Payment type ('||l_get_bill_data(i).payment_type||' ) is not valid.';
xxom_int_common.post_record_msg( p_message => 'Payment type is not valid : '||l_get_bill_data(i).payment_type||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF ;
END IF;--l_get_bill_data(i).payment_type NOT NULL
--Validation for term name
IF l_get_bill_data(i).due_date IS NOT NULL THEN
IF l_get_bill_data(i).due_date <= 0 THEN
l_term_name:='IMMEDIATE';
ELSIF l_get_bill_data(i).due_date BETWEEN 1 AND 30 THEN
l_term_name:='NET30';
ELSIF l_get_bill_data(i).due_date BETWEEN 31 AND 60 THEN
l_term_name:='NET60';
ELSIF l_get_bill_data(i).due_date BETWEEN 61 AND 90 THEN
l_term_name:='NET90';
ELSIF l_get_bill_data(i).due_date BETWEEN 91 AND 120 THEN
l_term_name:='NET120';
ELSIF l_get_bill_data(i).due_date BETWEEN 121 AND 150 THEN
l_term_name:='NET150';
ELSIF l_get_bill_data(i).due_date BETWEEN 151 AND 180 THEN
l_term_name:='NET180';
ELSIF l_get_bill_data(i).due_date BETWEEN 181 AND 210 THEN
l_term_name:='NET210';
ELSIF l_get_bill_data(i).due_date BETWEEN 211 AND 240 THEN
l_term_name:='NET240';
ELSE
l_term_name:='NET365';
END IF;
IF l_term_name IS NOT NULL THEN
OPEN c_validate_term_name(p_term_name =>l_term_name);
FETCH c_validate_term_name INTO l_term;
CLOSE c_validate_term_name;
IF l_term IS NULL THEN
l_error_message := l_error_message ||'The term name is not a valid term';
xxom_int_common.post_record_msg( p_message => 'The term name is not a valid term '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF;
END IF;--l_term_name IS NOT NULL THEN
ELSE
l_error_message := l_error_message ||'The data provided for term name is null';
xxom_int_common.post_record_msg( p_message => 'The data provided for term name is null '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF; --l_get_bill_data(i).due_date IS NOT NULL */
--Validation for unique interface_line_context and interface_line_attribute1 combination AND Amount
IF l_get_bill_data(i).invoice_amount IS NOT NULL THEN
OPEN c_check_combination( p_attribute=> l_get_bill_data(i).sfm_bill_number
FETCH c_check_combination INTO l_combination_check;
CLOSE c_check_combination;
IF l_combination_check IS NOT NULL THEN
l_error_message := l_error_message||'The interface_line_context and interface_header_attribute1 combination ('||l_get_bill_data(i).sfm_bill_number||' and '|| ' SFM' ||' ) already exist .Please provide different combination';
xxom_int_common.post_record_msg( p_message => 'The interface_line_context and interface_header_attribute1 combination already exist .Please provide different combination ' ||l_get_bill_data(i).sfm_bill_number ||' and '||'SFM'
, p_severity => xxom_int_common.c_level_warning
END IF;
ELSE
l_error_message := l_error_message||'Amount cannot be null';
xxom_int_common.post_record_msg( p_message => 'Amount cannot be null '||' (Sfm Bill Number : '||l_get_bill_data(i).sfm_bill_number||')'
, p_severity => xxom_int_common.c_level_warning
END IF; --l_get_bill_data(i).total_inv_recv_amt IS NOT NULL
/* end of validation*/
l_bill_dtl_update_rec.EXTEND;
l_bill_dtl_update_rec(l_cnt).ledger_id := l_set_of_books_id;
l_bill_dtl_update_rec(l_cnt).cust_ship_to_add_ref := l_cust_ship_to_add_ref;
l_bill_dtl_update_rec(l_cnt).cust_bill_to_add_ref := l_cust_bill_to_add_ref;
l_bill_dtl_update_rec(l_cnt).receipt_method := l_receipt_method;
l_bill_dtl_update_rec(l_cnt).company_seg := l_company;
l_bill_dtl_update_rec(l_cnt).account_seg := l_account;
l_bill_dtl_update_rec(l_cnt).costcenter_seg := l_costcenter;
l_bill_dtl_update_rec(l_cnt).function_seg := l_function;
l_bill_dtl_update_rec(l_cnt).tax_flag := l_update_tax;
l_bill_dtl_update_rec(l_cnt).pay_term_name := l_term;
l_bill_dtl_update_rec(l_cnt).cust_trx_type := l_cust_trx_type_name;
l_bill_dtl_update_rec(l_cnt).inventory_item_id := l_inventory_id;
l_bill_dtl_update_rec(l_cnt).warehouse_id := l_warehouse_id;
l_bill_dtl_update_rec(l_cnt).invoice_amount := l_get_bill_data(i).invoice_amount;
l_bill_dtl_update_rec(l_cnt).row_id := l_get_bill_data(i).rowid;
IF l_error_message IS NULL THEN
l_bill_dtl_update_rec(l_cnt).record_status := g_valid_status;
l_bill_dtl_update_rec(l_cnt).error_message := NULL;
ELSE
l_bill_dtl_update_rec(l_cnt).record_status := g_err_status;
l_bill_dtl_update_rec(l_cnt).error_message := l_error_message;
END IF;
l_cnt := l_cnt + 1;
END LOOP;
FORALL i in 1..l_bill_dtl_update_rec.COUNT SAVE EXCEPTIONS
UPDATE xxom_ar_sfs03_bill_info_stg
SET cust_bill_to_add_ref = l_bill_dtl_update_rec(i).cust_bill_to_add_ref
, cust_ship_to_add_ref = l_bill_dtl_update_rec(i).cust_ship_to_add_ref
, term_name = l_bill_dtl_update_rec(i).pay_term_name
, receipt_method = l_bill_dtl_update_rec(i).receipt_method
, set_of_books_id = l_bill_dtl_update_rec(i).ledger_id
, company_seg = l_bill_dtl_update_rec(i).company_seg
, account_seg = l_bill_dtl_update_rec(i).account_seg
, costcenter_seg = l_bill_dtl_update_rec(i).costcenter_seg
, function_seg = l_bill_dtl_update_rec(i).function_seg
, cust_trx_type = l_bill_dtl_update_rec(i).cust_trx_type
, inventory_item_id = l_bill_dtl_update_rec(i).inventory_item_id
, warehouse_id = l_bill_dtl_update_rec(i).warehouse_id
, tax_flag = l_bill_dtl_update_rec(i).tax_flag
, total_inv_recv_amt = l_bill_dtl_update_rec(i).invoice_amount
, record_status = l_bill_dtl_update_rec(i).record_status
, error_message = l_bill_dtl_update_rec(i).error_message
, conc_request_id = fnd_global.conc_request_id
, last_update_date = SYSDATE
, last_updated_by = FND_GLOBAL.USER_ID
WHERE ROWID = l_bill_dtl_update_rec(i).row_id;
COMMIT;
-- Submitting the invoice_error procedure at end of validate procedure.
debug_print('Submitting the invoice_error procedure at end of validate_records procedure. ');
--reject all line of an invoice with a single error line
OPEN c_get_err_line;
FETCH c_get_err_line BULK COLLECT INTO l_bill_err_lines;
CLOSE c_get_err_line;
FOR i IN 1..l_bill_err_lines.COUNT LOOP
OPEN c_get_invoice_no(p_bill =>l_bill_err_lines(i).sfm_bill_number );
FETCH c_get_invoice_no BULK COLLECT INTO l_bill_no;
CLOSE c_get_invoice_no;
FOR j IN 1..l_bill_no.COUNT LOOP
UPDATE xxom_ar_sfs03_bill_info_stg
SET error_message = NULL
, record_status ='E'
, last_update_date = SYSDATE
WHERE record_status = 'V'
AND sfm_bill_number = l_bill_no(i).sfm_bill_number;
COMMIT;
END LOOP;
END LOOP;
EXCEPTION
WHEN ex_dml_errors THEN
l_error_count := SQL%BULK_EXCEPTIONS.count;
FOR i IN 1 .. l_error_count LOOP
l_error_message := l_error_message||SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE);
END LOOP;--OR i IN 1 .. l_error_count LOOP
WHEN OTHERS THEN
IF c_get_bill_data%ISOPEN THEN
CLOSE c_get_bill_data;
END IF;
IF c_batch_src_exist%ISOPEN THEN
CLOSE c_batch_src_exist;
END IF;
IF c_set_book_id_exist%ISOPEN THEN
CLOSE c_set_book_id_exist;
END IF;
IF c_get_location%ISOPEN THEN
CLOSE c_get_location;
END IF;
IF c_validate_line_type%ISOPEN THEN
CLOSE c_validate_line_type;
END IF;
IF c_validate_receipt_type%ISOPEN THEN
CLOSE c_validate_receipt_type;
END IF;
IF c_check_combination%ISOPEN THEN
CLOSE c_check_combination;
END IF;
IF c_validate_receipt_type%ISOPEN THEN
CLOSE c_validate_receipt_type;
END IF;
IF c_pgm_type_exist%ISOPEN THEN
CLOSE c_pgm_type_exist;
END IF;
IF c_validate_term_name%ISOPEN THEN
CLOSE c_validate_term_name;
END IF;
IF c_new_rec_count%ISOPEN THEN
CLOSE c_new_rec_count;
END IF;
IF c_cust_payee_exist%ISOPEN THEN
CLOSE c_cust_payee_exist;
END IF;
IF c_get_invoice_no%ISOPEN THEN
CLOSE c_get_invoice_no;
END IF;
IF c_get_err_line%ISOPEN THEN
CLOSE c_get_err_line;
END IF;
p_retcode := g_ret_exception;
p_errbuf := 'The Error at XXOM_SFS_03_BILL_INFO_PKG.validate_records ' || l_err_stage|| '-'|| SUBSTR ( SQLERRM ,1,240 );
END validate_records;
Thanks in advance.Another version
SET SERVEROUTPUT ON
DECLARE
TYPE empno_nt IS TABLE OF VARCHAR2 (40);
l_empno_nt empno_nt;
BEGIN
l_empno_nt := empno_nt ('Suri');
dbms_output.put_line(l_empno_nt(1));
END;
Enhanced version:
DECLARE
TYPE empno_nt IS TABLE OF VARCHAR2 (40);
l_empno_nt empno_nt;
BEGIN
l_empno_nt := empno_nt ('Suri', 'Test','Ranit');
FOR rec IN l_empno_nt.FIRST .. l_empno_nt.LAST
LOOP
DBMS_OUTPUT.put_line (l_empno_nt (rec));
END LOOP;
END;
Simplified version :
select * from table( sys.odcivarchar2list('Suri','Test','Ranit') ) ;
Cheers,
Manik.
Message was edited by: Manik -
Error ORA-04031 while executing a stored procedure from Pro C++ code
I am getting the error ORA-04031(Unable to allocate 4096 bytes of shared memory("Shared Pool",.....)) while trying to execute a stored procedure from my pro*C application. This happens only after a few hours since the application has been running. I am closing the cursor after every database call.
Does anyone know why it is happening and any possible solutions?
TIA
Srithaj.One thing that can be done is to flush the shared pool before starting the application.
alter system flush shared pool;
Another is to increase the shared pool size by setting the parameter shared_pool_size in init_sid.ora file.
null -
Error: ORA-03113 while executing complex java code from Oracle PL/SQL
Hi,
I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
ERROR:
ORA-03114: not connected to ORACLE
begin
ERROR at line 1:
ORA-03113: end-of-file on communication channel
Process ID: 13685
Session ID: 21 Serial number: 20
Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
Regards,
SaravanaHi Saravana:
You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
Best regards, Marcelo.
PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround. -
SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
Dear Friends,
I executed the following stmsts:
1)CREATE OR REPLACE DIRECTORY TEST_DIR AS 'd:\mydata';
2)GRANT READ, WRITE ON DIRECTORY TEST_DIR TO wonders_mumbai1;
3)CREATE TABLE ext_tab18 (
old_cust VARCHAR2(8),
new_cust VARCHAR2(8)
ORGANIZATION EXTERNAL (
TYPE oracle_loader
DEFAULT DIRECTORY TEST_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
BADFILE TEST_DIR:'bad-upload.bad'
LOGFILE TEST_DIR:'log_upload.log'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
(old_cust,new_cust))
LOCATION ('datafile1.csv')
REJECT LIMIT 0
NOMONITORING;
4)SELECT * FROM ext_tab18;
1 -3 execute successfully.
4 throws up the error:
Error starting at line 1 in command:
SELECT * FROM ext_tab18
Error report:
SQL Error: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-04063: unable to open log file log_upload.log
OS error The system cannot find the file specified.
ORA-06512: at "SYS.ORACLE_LOADER", line 19
29913. 00000 - "error in executing %s callout"
*Cause: The execution of the specified callout caused an error.
*Action: Examine the error messages take appropriate action.
What is to be done?Hi,
Yes if I put it on the server it works.
But if I put the file on the client in a shared folder and put the ip address as below:
10.97.140.59\mydata
it doesn't work.
So it seems that this will work if the file is on the server and not on any client.
If that be the case then it is a definite disadvantage.
thanks for ur reply. -
SQL Error: ORA-29902: error in executing ODCIIndexStart() routine
I am running a SDO_RELATE operation on 2 geometries from 2 different tables. Spatial indexes are already created and the tables are also versioned.
Below is the spatial meta data for both the geometries in user_sdo_geom_metadata table:
DIMINFO is :
MDSYS.SDO_DIM_ELEMENT(MDSYS.SDO_DIM_ELEMENT(Easting,0,700000,0.001),MDSYS.SDO_DIM_ELEMENT(Northing,0,1300000,0.001),MDSYS.SDO_DIM_ELEMENT(Height,-100,2000,0.001))
SRID is 27700
When I use SDO_RELATE or ADO_ANYINTERACT on both the geometires, i am getting the below error.
Error report:
SQL Error: ORA-29902: error in executing ODCIIndexStart() routine
ORA-13243: specified operator is not supported for 3- or higher-dimensional R-tree
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 333
29902. 00000 - "error in executing ODCIIndexStart() routine"
*Cause: The execution of ODCIIndexStart routine caused an error.
*Action: Examine the error messages produced by the indextype code and
take appropriate action.
Could you please let me know what should be the root cause for this issue?Hi
Have you checked this posting?
Re: ORA-13243
Luc -
Hi ,
I am getting below error frequently in alert log of database.
ORA-12012: error on auto execute of job 754461
ORA-29279: SMTP permanent error: ORA-29279: SMTP permanent error: 501 Syntax error, parameters in command "RCPT TO:" unrecognized or missing
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at "APPS.EIS_UTIL_PKG", line 94
ORA-06512: at "APPS.HKD_PO_ADDON_PKG", line 110
ORA-06512: at line 1You have a job running in the database. Its job ID is 754461
It looks as if that job runs APPS.HKD_PO_ADDON_PKG
That job is attempting to send mail using UTL_SMTP and apparently passing some strange value to SMTP server for the RCPT TO: parameter. -
Subscript beyond count ORA-06533
Hi,
I am using Oracle Express with SQL Developer on platform XP.
I am attempting to run a procedure that works error free as an anonymous PL/SQL block.
I have come across a few problems today and would like to Thank the following,
1. Mohana - creating a type.
2. MScallion - Grant Write suggestion.
3. Billy Verreynne - adjusting my VARCHAR2 to correct bytes.
I have been able to remove other errors with the help of the Oracle Forum Search but am gezumped by this one,
Connecting to the database MY_DATABASE.
ORA-06533: Subscript beyond count
ORA-06512: at "MY_DATABASE.WRITE_MY_DDL", line 24
ORA-06512: at line 12
Process exited.
Disconnecting from the database MY_DATABASE.
This is the type I have created (now with revised VARCHAR2(4000)) ...
create or replace TYPE PTB_NUMBER IS TABLE OF VARCHAR2(4000);
This is the procedure I am attempting to run it compiles no worries (Thats what the message log tells me),
create or replace
PROCEDURE WRITE_MY_DDL
( v_object_type OUT VARCHAR2
, v_sqlEnd OUT VARCHAR2
, l_clob OUT CLOB
, n OUT NUMBER
, v_version OUT NUMBER
, ptb_object_type OUT ptb_number
, v_file_open OUT UTL_FILE.FILE_TYPE
, v_file_name OUT VARCHAR2
) AS
BEGIN
n := 14;
ptb_object_type := ptb_number();
SELECT max(version)
INTO v_version
FROM my_ddl;
v_file_name := 'DB_SCRIPT_FOR_'||USER||'_VERSION_'||v_version||'.sql';
v_file_open := utl_file.FOPEN('SCRIPT_DIR',v_file_name,'w');
ptb_object_type(1) := 'SEQUENCE';
ptb_object_type(2) := 'TABLE';
ptb_object_type(3) := 'TRIGGER';
ptb_object_type(4) := 'PRIMARY KEY';
ptb_object_type(5) := 'FORIEGN KEY';
ptb_object_type(6) := 'PROCEDURE';
ptb_object_type(7) := 'FUNCTION';
ptb_object_type(8) := 'VIEW';
ptb_object_type(9) := 'SELECT';
ptb_object_type(10) := 'INSERT';
ptb_object_type(11) := 'UPDATE';
ptb_object_type(12) := 'DELETE';
ptb_object_type(13) := 'REFERENCES';
ptb_object_type(14) := 'EXECUTE';
FOR loop_int IN 1 .. n
LOOP
v_object_type := ptb_object_type(loop_int);
utl_file.PUT_LINE(v_file_open,' ');
utl_file.PUT_LINE(v_file_open,'PROMPT CREATE '|| v_object_type ||'S' );
utl_file.PUT_LINE(v_file_open,' ');
utl_file.PUT_LINE(v_file_open,' ');
FOR c1 IN
(SELECT ROWID
, object_type, object_name
FROM my_ddl
WHERE object_type = v_object_type
AND version = v_version
AND status = 'CURRENT'
LOOP
utl_file.PUT_LINE(v_file_open,'PROMPT CREATE ' ||USER|| ' '||c1.object_type||' '||c1.object_name);
EXECUTE IMMEDIATE 'SELECT ddl FROM my_ddl WHERE ROWID = '|| ''''|| c1.ROWID ||''''
INTO l_clob;
utl_file.PUT_LINE(v_file_open, l_clob);
END LOOP;
END LOOP;
utl_file.FCLOSE(v_file_open);
END WRITE_MY_DDL;
Cheers
Ben???(Not tested)
BEGIN
n := 14;
ptb_object_type := ptb_number();
ptb_object_type.extend(14); -
Error on auto execute of job 1032656.. Where i can get the details?
ORA-12012: error on auto execute of job 1032656
ORA-04063: ORA-04063: package body "ORACLE_OCM.MGMT_DB_LL_METRICS" has errors
ORA-06508: PL/SQL: could not find program unit being called: "ORACLE_OCM.MGMT_DB_LL_METRICS"
ORA-06512: at line 1
ORA-1580 signalled during: alter database backup controlfile to 'backup_control_file.ctl'..
Hi All,
I am getting the above error in my alert log.
When i check in my dba_jobs there were only two jobs having job column 1 & 21.
Where i can see the job 1032656 and its details ?
Regards
ArunHi Arun,
This is due to invalid objects in ORACLE_OCM schema.
Please read metalink note id:
Invalid Objects After Revoking EXECUTE Privilege From PUBLIC [ID 797706.1]
Symptoms
OEM recommends that EXECUTE privilege being revoked from PUBLIC. After revoking the privilege, the following errors appeared in alert log:
ORA-12012: error on auto execute of job 66171
ORA-04063: package body "ORACLE_OCM.MGMT_DB_LL_METRICS" has errors
ORA-06508: PL/SQL: could not find program unit being called: ORACLE_OCM.MGMT_DB_LL_METRICS"
ORA-06512: at line 1 has errors .
Also, the below query returns invalid rows count (approximately 46 rows)
SQL> select object_name, owner, object_type, status from dba_objects where status = 'INVALID';
Owners of invalid objects are ORACLE_OCM and WMSYS
*Cause*
At the time of installation of the database, Oracle execute scripts that test to see if PUBLIC access is granted to all of the routines that ORACLE_OCM and WMSYS need access to. If PUBLIC access is NOT available, Oracle scripts grant specific access rights. However, If EXECUTE privilege is revoked from PUBLIC after installation, then those specific access rights needs to be granted manually.
*Solution*
You will need to grant execute on UTL_FILE and DBMS_SCHEDULER to ORACLE_OCM and WMSYS. The below action plan should solve the issue:
SQL> grant execute on UTL_FILE to oracle_ocm;
SQL> grant execute on DBMS_SCHEDULER to oracle_ocm;
SQL> grant execute on UTL_FILE to wmsys;
SQL> grant execute on DBMS_SCHEDULER to wmsys;
SQL> shutdown immediate;
SQL> startup restrict;
SQL> @utlrp.sql /* $ORACLE_HOME/rdbms/admin/@utlrp.sql */
SQL> shutdown immediate;
SQL> startup;
Regards
Rajesh -
I have a form which uses a customer form/report, drop downs etc..
the debug shows it running this statement
...Execute Statement: begin begin SELECT distinct initcap(RTRIM (LTRIM (e.surname, ' *0123456789-/:.?,'), ' *0123456789-/:.?,') || ', ' || RTRIM (LTRIM (e.first_name, ' *0123456789-/:.?,'), ' *0123456789-/:.?,' )) empname, e.ID bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value FROM dms.dms_employees@dmsprd e, dms.dms_employee_contracts@dmsprd ec WHERE e.ID = ec.emp_id and e.surname like '%%' AND :p75_date BETWEEN ec.start_date AND NVL (ec.end_date, :p75_date) AND e.brh_id = 3654 ORDER BY 1; end; end;
Then says
"report error: ORA-06502: PL/SQL: numeric or value error: character string buffer too small"
Any Ideas?
Thanks
DeanDenes Kubicek wrote:
A select list is limited in size. I am not sure what the limit is but that is definitelly the case.The maximum size for the HTML generated for a select list is 32K.
86 options sounds on the low side to be hitting that limit, but there are other concerns to this as well. Scrolling through hundreds/thousands of options in a select list is a pain for users, and huge select lists produce bloated pages that impact load times and network bandwidth. That list of around 200 countries you find on many sites is about the sensible maximum length for a select list.
You should use popups.Indeed. -
Error : ORA-06508: PL/SQL: could not find program unit being called
Hi
I got surprise issue while testing my Oracle code . Let me explain first the environment detail . Our appliaction built on
Java/J2EE(Weblogic) and backend is Oracle 11g re2 . While calling from java it call thru different user which have been provide
synonym and exectue option for corresponding procdure ,
I created on package EXTRACT_CUSTOMER_INFO_PK which will exract data to text file using UTL_FILE ( direcory , UTL_FILE grant is provided to DB user).
Now this package has been called from rp_execute_procedure_pr -- Here I is the code
CREATE OR REPLACE PROCEDURE RP_EXECUTE_PROCEDURE_PR
i_atlas_job_schedule_fk IN atlas_job_schedule.atlas_job_schedule_pk%TYPE,
i_job_id IN atlas_job.job_id%TYPE,
i_parm_value IN atlas_job_schedule.parm_value%TYPE,
o_status_code OUT NUMBER,
o_status_mesg OUT VARCHAR2
IS
-------Other old code which is not relevent for this issue ----
--------Other old code which is not relevent for this issue ----
----Below code I added ----
ELSIF l_job_id = 'CUST_EXTRACT' THEN
EXTRACT_CUSTOMER_INFO_PK.customer_report ( i_parm_value ,
o_status_code,
o_status_mesg ) ;
-- o_status_code := -99999999;
--o_status_mesg := 'PARTHA PARTHA PARTHAcess terminated!';
ELSE
o_status_code := -20300;
o_status_mesg := 'Job Id : ' || l_job_id || ' NOT found. Process terminated!';
END IF;
update_log_auto
ajs_rec.atlas_job_schedule_pk ,
'Processing End Time (GMT): '
EXCEPTION
WHEN eProcError THEN
o_status_code := SQLCODE;
o_status_mesg := SUBSTR(vMsg ||'-'||SQLERRM, 1, 200);
WHEN OTHERS THEN
o_status_code := -20300;
o_status_mesg := SUBSTR(SQLERRM, 1, 200);
update_log_auto
ajs_rec.atlas_job_schedule_pk ,
'Error : '||SQLERRM||' '
update_log_auto
ajs_rec.atlas_job_schedule_pk,
'Processing End Time (GMT): '
END RP_EXECUTE_PROCEDURE_PR;
Now It compiled sucesfully . And while I did SIT then RP_EXECUTE_PROCEDURE_PR run fine and extracted txt file . But while I called it from Java procedure It gives us error like
Error : ORA-06508: PL/SQL: could not find program unit being called 02-AUG-2012 13:16:51.
As I told RP_EXECUTE_PROCEDURE_PR old proc and used by other proc , So I first suspect issue is newly added code or may be some grant or synonym ( Although it should not be )
so I created public synony amd gave execute grant to my pkg to public .
But it repeat same error .
I did lot of R&D on my pkg but nothing happen . Finally I remane my new pkg RP_EXTRACT_CUSTOMER_INFO_PK and it works fine
I need to know what is the RCA for it . I donot think any dependecy issue as renaming pkg is working fine .
NB my DB user is iATLAS and Javauser is SUDEEP
Thanks in Advance
Debashis MallickFirst of all If i run the main procedure in like below in my Schema it is working fine
begin
-- Call the procedure
rp_execute_procedure_pr(i_atlas_job_schedule_fk => :i_atlas_job_schedule_fk,
i_job_id => :i_job_id,
i_parm_value => :i_parm_value,
o_status_code => :o_status_code,
o_status_mesg => :o_status_mesg);
end;
So thre is no question of parameter .... or Invalid state etc . If it is parameter or Invalid state issue it will give other error.
Here problem is not syntax issue .
let me give u more detail regards this issue
1.. All objects corresponding to procedure all Valid
2.. If I test on the proc on my schema like above code . It works fine
3.rp_execute_procedure_pr is a old procudere which called for differner report generartion based on parameter passing . Also as extract_customer_info_pk called with in rp_execute_procedure_pr So there is no question of synonym or privilage issue for new procedure.
4. Suprising thing is if I rename and recreate package like extract_customer_info_pk _1 or rp_extract_customer_info_pk . Which are exactly same as extract_customer_info_pk and replace those new one with extract_customer_info_pk then it work fine in my java application
I think I make it clear the issue
Edited by: debashisora on Aug 3, 2012 5:31 AM
Edited by: debashisora on Aug 3, 2012 5:40 AM -
Error ORA-24247 after migrating from 10g to 11g
Hi all,
After a migration from a 10.2.0.3 (32bits) database to a 11.2.0.3 (64bits) database, we are facing a problem related to the UTL_SMTP package. I vale already created a ACL, as you can see below:
-- create acl
BEGIN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL (acl => 'user_processos.xml',
description => 'abc',
principal => 'PROCES',
is_grant => TRUE,
privilege => 'connect');
END;
-- assign acl
BEGIN
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (acl => 'user_processos.xml'
host => 'rac-abc',
lower_port => 1521,
upper_port => NULL);
END;The problem is: After we try to execute a procedure that calls UTL_SMTP, with user PROCES the error ORA-24247 is raised. I did some research and they all point to the it is necessary to create an ACL to solve this probles, but the ACL already exists, as you can see above.Hi,
I had the same issue, well multiple issues, with this at first. You should find the solution in one of these links. Make sure you have done each step in the lists and it will work.
[url http://www.ora00600.com/scripts/databaseconfig/ORA-29278.html]ORA-29278 SMTP
[url http://www.ora00600.com/scripts/11g/UTL_SMTP_ORA-06512.html]ORA-06512: at SYS.UTL_SMTP
There are various parameters and configuration steps you need to make sure you have performed for it to work.
Hopefully that helps,
Rob
Edited by: Rob_J on Feb 15, 2013 11:53 AM
*link was not working -
ERROR ORA-00942: table or view does not exist
Hi:
I created a .sql file and a loader file. Running the .sql file with sql * plus Worksheet:
declare
gr sdo_georaster;
begin
select image into gr from gis.RasterImages where geoid=1 for update;
sdo_geor.generatePyramid(gr,'resampling=NN');
update gis.RasterImages set image=gr where geoid=1;
commit;
end;
I trying to create a pyramid,but the error appeared:
ERROR at line 1:
ORA-29400: DATA CONTROL ERROR ORA-00942: table or view does not exist
ORA-06512: 在 "MDSYS.SDO_GEOR_INT", line 162
ORA-06512: 在 "MDSYS.SDO_GEOR", line 826
ORA-06512: 在 line 5
I don't know why?
Anyone can help me?
Thanks.Hi,
I think you are executing the select statement for schema X and the table is in the schema srnr.
And schema X is not having select privilege on the table 'students' present in schema srnr.
Goto schema srnr.
Execute the following statement:
grant select on students to X;
This will give schema X the privilege to query the table students present in srnr.
Regards,
Anupama
Maybe you are looking for
-
Another in the long list of sleep problems. Running the latest & greatest Tiger and all that. I have read and read and READ! the discussions and followed most of the advise to no avail. Here's what's up. When I try to put the PB to sleep, either by c
-
Portege Z930 - Display Driver doesn't work correctly
Hello, we have a Portege Z930 with Windows 7 64 bit in use where the Intel Display Driver seem to work incorrectly. First problem is the slow presentation on display - if we open a picture (simple JPG) and move the window, the window frame will break
-
Search customers by account group
Hi experts, I want to search customers by account group. Please explain the steps to achieve this. Thanks
-
Modify the behaviour of an aggregate function
Hi all, I have to modify the behaviour of a measure (ex: MEASURE) object depending on the value assumed by a dimension (ex:DIMENSION) object. When the dimension objects is a number the measure is sum([measure]) When the dimension is " " (in the DB th
-
How to copy a Module Pool Program from one SAP server to another SAP server
Hi Experts, My requirement is to copy some Module pool programs from one SAP server to another SAP server which do not have any link. Please advise on this. Regards Dipak