Hello Ruby please i need your help when i run api i get this error . *ORA-30678: too many open connections* ** * *
*ORA-06512: at "SYS.UTL_TCP", line 28*
* *
*ORA-06512: at "SYS.UTL_TCP", line 257*
* *
*ORA-06512: at "SYS.UTL_SMTP", line 116*
* *
*ORA-06512: at "SYS.UTL_SMTP", line 139*
* *
*ORA-06512: at "APPS.SEND_MAIL", line 12*
* *
*ORA-06512: in Package EAM*
note / first time i run it it created 16 rows succesfully but rows after
16 get this error . and when i want to run it again i must kill all open
connections every time .
how i can solve this problem .
For API please find attached file .
thank you
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
oracle apps 11.5.10.2
DBA 10.0.2.0
----------------------
API
---
DECLARE
g_return_status VARCHAR2 (1 BYTE);
g_msg_count NUMBER;
g_msg_data VARCHAR2 (2000 BYTE);
g_object_id NUMBER;
--------
v_org_id number := 696 ;
v_loc_id number;
v_item_id number;
v_dep_id number;
msg varchar2(32000);
CURSOR ASSET_CUR IS
SELECT *
FROM xx_ASSET_num
WHERE SEQ BETWEEN 83 AND 98 ;
-- 'PQ00G2A000000-SP01';
-- 'VB29T2900000-LI02' ;
begin
fnd_global.apps_initialize ( user_id =>
5120,
resp_id =>
23118,
resp_appl_id =>
426 );
for I in ASSET_CUR
loop
msg:=null;
begin
SELECT msi.INVENTORY_ITEM_ID into v_item_id
FROM mtl_system_items_b msi
WHERE msi.segment1 =I.ITEM_SEG1
and msi.ORGANIZATION_ID = v_org_id ;
exception when others then
msg:=msg||' Item Not Found ';
end ;
begin
select bd.DEPARTMENT_ID into v_dep_id
from bom_departments bd
where bd.DEPARTMENT_CODE =
I.OWNING_DEPARTMENT_CODE
and ORGANIZATION_ID= v_org_id;
exception when others then
msg:=msg||' Owning Department Not Found ';
end;
if msg is null then
EAM_ASSETNUMBER_PUB .INSERT_ASSET_NUMBER
(
p_api_version => 1.0,
p_init_msg_list =>
fnd_api.g_false,
p_commit =>
fnd_api.g_false,
p_validation_level =>
fnd_api.g_valid_level_full,
x_return_status =>
g_return_status,
x_msg_count =>
g_msg_count,
x_msg_data =>
g_msg_data,
x_object_id =>
g_object_id,
p_INVENTORY_ITEM_ID => v_item_id
,
p_SERIAL_NUMBER =>
I.Asset_Number ,
p_CURRENT_STATUS => 3 ,
p_DESCRIPTIVE_TEXT =>
I.DESCRIPTIVE_TEXT,
p_CURRENT_ORGANIZATION_ID => 696,
p_ATTRIBUTE4 => 'YES' ,
p_WIP_ACCOUNTING_CLASS_COD => 'UFMCO' ,
p_MAINTAINABLE_FLAG => 'Y',
p_OWNING_DEPARTMENT_ID => v_dep_id
,
p_EAM_LOCATION_ID =>
I.EAM_LOCATION_ID
);
DBMS_OUTPUT.put_line ('Asset Number Status' || ' ' ||
g_return_status);
DBMS_OUTPUT.put_line ('Error Message' || g_msg_data);
DBMS_OUTPUT.put_line ('Message' || g_msg_count);
IF g_msg_count >0 THEN
FOR I IN 1..g_msg_count
LOOP
dbms_output.put_line(I||'.
'||SubStr(FND_MSG_PUB.Get(p_encoded =>FND_API.G_FALSE ), 1, 255));
END LOOP;
end if;
end if ;
end loop ;
end ;
/
-- This procedure is used to insert records in ----- inv.MTL_SERIAL_NUMBERS
----- table
-- EAM_ASSETNUMBER_PUB
/*
SELECT A.SEQ , A.ASSET_NUMBER ,
A.ITEM_SEG1,A.OWNING_DEPARTMENT_CODE,A.DESCRIPTIVE_TEXT,A.EAM_LOCATION_ID,
A.PARENT_SERIAL_NUMBER , B.SERIAL_NUMBER
FROM xx_ASSET_num a , inv.MTL_SERIAL_NUMBERS b
WHERE A.ASSET_NUMBER = B.SERIAL_NUMBER
and serial_number = 'QQGOA01000000-PFR5';
*/
