Dbms_utility.get_time
Hi,
I am running a procedure, but i am not able to find out the time taking in each step of the procedure as it is taking huge time to execute..
I got a point that through dbms_utility.get_time, one can trace out, the time taking for each step inside the procedure...
But i am not aware of use of dbms_utility.get_time....Could any one help me on this...
or is there any other dbms_utility packages where i can trace out which part of the code is taking how much time to execute....
My moto is to find out, while executing the proc, i need to trace out how much time is taking in every step...I am using the trial version of toad, so i am not able go to profiler part...
Your help would make my day....
Thanks,
Haraprasad...
Check how dbms_utility.get_time used.
SQL> declare
2 type rc is ref cursor;
3 l_rc rc;
4 l_dummy all_objects.object_name%type;
5 l_start number default dbms_utility.get_time;
6 begin
7 for i in 1 .. 1000
8 loop
9 open l_rc for
10 'select object_name
11 from all_objects
12 where object_id = :x'
13 using i;
14 fetch l_rc into l_dummy;
15 close l_rc;
16 end loop;
17 dbms_output.put_line
18 ( round( (dbms_utility.get_time-l_start)/100, 2 ) ||
19 ' seconds...' );
20 end;
21 /
.52 seconds...
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.18
SQL>
Similar Messages
-
How to use DBMS_UTILITY.GET_TIME?
I am using DBMS_UTILITY.GET_TIME to calculate the performance of my procedures.
its returning the values before and after the execution of my procedure. How to get the difference in seconds?
Currently i am dividing the difference by 1000.Is it correct?
-RamSorry to disturb you all again..
Declare
l_start number;
l_end number;
l_diff number;
Begin
l_start := DBMS_UTILITY.GET_TIME ;
For i in 1..100 loop
Dbms_output.put_line('gjksdk');
end loop;
l_end := DBMS_UTILITY.GET_TIME ;
l_diff := (l_end-l_start)/100;
Dbms_output.put_line('Elapsed Time'|| l_diff ||'secs');
END;
I tried like the above PL/SQL block.
It printed the output like
gjksdk-100times
Elapsed Time0secs
But i assume that there will be atleast some fraction of seconds to print that data.Why did it returned 0 Secs.
Anything mistake in my side? If please can u help me to get that time? -
Simple calculation dbms_ulitility.get_time , how do i get the time?
hi guys,
in the documentation, it says
<i>s function determines the <b>current time</b> in 100th's of a second </i>
so i am wondering, how does it convert a current time
let say 13:01:05 to centiseconds ? and how to convert it back ?
regards,
noobSee Note:118444.1 Negative Number Returned When DBMS_UTILITY.GET_TIME is Used. It's stated that the reference is the startup time of the system and when the system is running for a long time this value may become negative because the size of the variable has passed
the border. So there's no way to get the wall clock time using this function.
Enrique -
How can I load my data faster? Is there a SQL solution instead of PL/SQL?
11.2.0.2
Solaris 10 sparc
I need to backfill invoices from a customer. The raw data has 3.1 million records. I have used pl/sql to load these invoices into our system (dev), however, our issue is the amount of time it's taking to run the load - effectively running at approx 4 hours. (Raw data has been loaded into a staging table)
My research keeps coming back to one concept: sql is faster than pl/sql. Where I'm stuck is the need to programmatically load the data. The invoice table has a sequence on it (primary key = invoice_id)...the invoice_header and invoice_address tables use the invoice_id as a foreign key. So my script takes advantage of knowing the primary key and uses that on the subsequent inserts to the subordinate invoice_header and invoice_address tables, respectively.
My script is below. What I'm asking is if there are other ideas on the quickest way to load this data...what am I not considering? I have to load the data in dev, qa, then production so the sequences and such change between the environments. I've dummied down the code to protect the customer; syntax and correctness of the code posted here (on the forum) is moot...it's only posted to give the framework for what I currently have.
Any advice would be greatly appreciated; how can I load the data faster knowing that I need to know sequence values for inserts into other tables?
DECLARE
v_inv_id invoice.invoice_id%TYPE;
v_inv_addr_id invoice_address.invoice_address_id%TYPE;
errString invoice_errors.sqlerrmsg%TYPE;
v_guid VARCHAR2 (128);
v_str VARCHAR2 (256);
v_err_loc NUMBER;
v_count NUMBER := 0;
l_start_time NUMBER;
TYPE rec IS RECORD
BILLING_TYPE VARCHAR2 (256),
CURRENCY VARCHAR2 (256),
BILLING_DOCUMENT VARCHAR2 (256),
DROP_SHIP_IND VARCHAR2 (256),
TO_PO_NUMBER VARCHAR2 (256),
TO_PURCHASE_ORDER VARCHAR2 (256),
DUE_DATE DATE,
BILL_DATE DATE,
TAX_AMT VARCHAR2 (256),
PAYER_CUSTOMER VARCHAR2 (256),
TO_ACCT_NO VARCHAR2 (256),
BILL_TO_ACCT_NO VARCHAR2 (256),
NET_AMOUNT VARCHAR2 (256),
NET_AMOUNT_CURRENCY VARCHAR2 (256),
ORDER_DT DATE,
TO_CUSTOMER VARCHAR2 (256),
TO_NAME VARCHAR2 (256),
FRANCHISES VARCHAR2 (4000),
UPDT_DT DATE
TYPE tab IS TABLE OF rec
INDEX BY BINARY_INTEGER;
pltab tab;
CURSOR c
IS
SELECT billing_type,
currency,
billing_document,
drop_ship_ind,
to_po_number,
to_purchase_order,
due_date,
bill_date,
tax_amt,
payer_customer,
to_acct_no,
bill_to_acct_no,
net_amount,
net_amount_currency,
order_dt,
to_customer,
to_name,
franchises,
updt_dt
FROM BACKFILL_INVOICES;
BEGIN
l_start_time := DBMS_UTILITY.get_time;
OPEN c;
LOOP
FETCH c
BULK COLLECT INTO pltab
LIMIT 1000;
v_err_loc := 1;
FOR i IN 1 .. pltab.COUNT
LOOP
BEGIN
v_inv_id := SEQ_INVOICE_ID.NEXTVAL;
v_guid := 'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff');
v_str := str_parser (pltab (i).FRANCHISES); --function to string parse - this could be done in advance, yes.
v_err_loc := 2;
v_count := v_count + 1;
INSERT INTO invoice nologging
VALUES (v_inv_id,
pltab (i).BILL_DATE,
v_guid,
'111111',
'NONE',
TO_TIMESTAMP (pltab (i).BILL_DATE),
TO_TIMESTAMP (pltab (i).UPDT_DT),
'READ',
'PAPER',
pltab (i).payer_customer,
v_str,
'111111');
v_err_loc := 3;
INSERT INTO invoice_header nologging
VALUES (v_inv_id,
TRIM (LEADING 0 FROM pltab (i).billing_document), --invoice_num
NULL,
pltab (i).BILL_DATE, --invoice_date
pltab (i).TO_PO_NUMBER,
NULL,
pltab (i).net_amount,
NULL,
pltab (i).tax_amt,
NULL,
NULL,
pltab (i).due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
TO_TIMESTAMP (SYSDATE),
TO_TIMESTAMP (SYSDATE),
PLTAB (I).NET_AMOUNT_CURRENCY,
(SELECT i.bc_value
FROM invsvc_owner.billing_codes i
WHERE i.bc_name = PLTAB (I).BILLING_TYPE),
PLTAB (I).BILL_DATE);
v_err_loc := 4;
INSERT INTO invoice_address nologging
VALUES (invsvc_owner.SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH INITIAL',
pltab (i).BILL_DATE,
NULL,
pltab (i).to_acct_no,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 5;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_ACCT_NO,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 6;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH2',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_CUSTOMER,
pltab (i).to_name,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 7;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH3',
pltab (i).BILL_DATE,
NULL,
'SOME PROPRIETARY DATA',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 8;
INSERT
INTO invoice_event nologging (id,
eid,
root_eid,
invoice_number,
event_type,
event_email_address,
event_ts)
VALUES ( SEQ_INVOICE_EVENT_ID.NEXTVAL,
'111111',
'222222',
TRIM (LEADING 0 FROM pltab (i).billing_document),
'READ',
'some_user@some_company.com',
SYSTIMESTAMP);
v_err_loc := 9;
INSERT INTO backfill_invoice_mapping
VALUES (v_inv_id,
v_guid,
pltab (i).billing_document,
pltab (i).payer_customer,
pltab (i).net_amount);
IF v_count = 10000
THEN
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (
pltab (i).billing_document,
pltab (i).payer_customer,
errString || ' ' || v_err_loc
COMMIT;
END;
END LOOP;
v_err_loc := 10;
INSERT INTO backfill_invoice_timing
VALUES (
ROUND ( (DBMS_UTILITY.get_time - l_start_time) / 100,
2)
|| ' seconds.',
(SELECT COUNT (1)
FROM backfill_invoice_mapping),
(SELECT COUNT (1)
FROM backfill_invoice_errors),
SYSDATE
COMMIT;
EXIT WHEN c%NOTFOUND;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (NULL, NULL, errString || ' ' || v_err_loc);
COMMIT;
END;Hello
You could use insert all in your case and make use of sequence.NEXTVAL and sequence.CURRVAL like so (excuse any typos - I can't test without table definitions). I've done the first 2 tables, so it's just a matter of adding the rest in...
INSERT ALL
INTO invoice nologging
VALUES ( SEQ_INVOICE_ID.NEXTVAL,
BILL_DATE,
my_guid,
'111111',
'NONE',
CAST(BILL_DATE AS TIMESTAMP),
CAST(UPDT_DT AS TIMESTAMP),
'READ',
'PAPER',
payer_customer,
parsed_francises,
'111111'
INTO invoice_header
VALUES ( SEQ_INVOICE_ID.CURRVAL,
TRIM (LEADING 0 FROM billing_document), --invoice_num
NULL,
BILL_DATE, --invoice_date
TO_PO_NUMBER,
NULL,
net_amount,
NULL,
tax_amt,
NULL,
NULL,
due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
SYSTIMESTAMP,
NET_AMOUNT_CURRENCY,
bc_value,
BILL_DATE)
SELECT
src.billing_type,
src.currency,
src.billing_document,
src.drop_ship_ind,
src.to_po_number,
src.to_purchase_order,
src.due_date,
src.bill_date,
src.tax_amt,
src.payer_customer,
src.to_acct_no,
src.bill_to_acct_no,
src.net_amount,
src.net_amount_currency,
src.order_dt,
src.to_customer,
src.to_name,
src.franchises,
src.updt_dt,
str_parser (src.FRANCHISES) parsed_franchises,
'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff') my_guid,
i.bc_value
FROM BACKFILL_INVOICES src,
invsvc_owner.billing_codes i
WHERE i.bc_name = src.BILLING_TYPE;Some things to note
1. Don't commit in a loop - you only add to the run time and load on the box ultimately reducing scalability and removing transactional integrity. Commit once at the end of the job.
2. Make sure you specify the list of columns you are inserting into as well as the values or columns you are selecting. This is good practice as it protects your code from compilation issues in the event of new columns being added to tables. Also it makes it very clear what you are inserting where.
3. If you use WHEN OTHERS THEN... to log something, make sure you either rollback or raise the exception. What you have done in your code is say - I don't care what the problem is, just commit whatever has been done. This is not good practice.
HTH
David
Edited by: Bravid on Oct 13, 2011 4:35 PM -
PL/SQL to Java Interface - Overwhelming Overhead?
My company is running Oracle 10g R2. I am currently exploring the use of java classes from PL/SQL. This is because we have multiple code bases, including Java, PowerBuilder (which can interface with Java), and PL/SQL (which can interface with Java).
Doing some performance testing, I found some rather alarming results. Running a simple java function 1 million times, I tested performance of PL./SQL to java and PowerBuilder to Java.
In PL/SQL, the 1 mil calls executed in ~120 s.
In PowerBuilder, the 1 mil calls executed in ~54 s.
Is it possible that our database is incorrectly configured for best java performance? Not only does it appear that PowerBuilder, a much less pervasive language than PL/SQL, is over twice as fast, but the PB test was run on my laptop, which is no where near as powerful as the database server that the PL/SQL procedure ran against, leading me to believe that the performance gap is actually much wider.
Anyone have any tips to improve the performance? Or is this simply the nature of the beast? I can't seem to find any posts on the net about people experiencing huge PL/SQL to Java overhead, so I'm hoping it is just something I am doing wrong.
Thanks for your help!
-Brett BirschbachBelow is my test code. Any suggestions are appreciated.
Thanks!
-Brett
==================================================
Java Class:
public class TestConvert {
// For running straight from Java
public static void main(String[] args){
System.out.println(callAndTime());
// For running 1 mil calls with only one call from PowerBuilder or PL/SQL
public static long callAndTime(){
TestConvert.convertEsnDecToHex("13005454488");
long start = System.currentTimeMillis();
for (int i = 0; i < 1000000; i++){
TestConvert.convertEsnDecToHex("13005454488");
long end = System.currentTimeMillis();
return end-start;
// For performing the actual work
public static String convertEsnDecToHex(String esn) {
String result = null;
result = Integer.toHexString(new Integer(esn.substring(0, 3)).intValue());
result += Integer.toHexString(new Integer(esn.substring(3)).intValue());
return result.toUpperCase();
// Non-static wrapper necessary for PowerBuilder
public String callAndTimeNS(){
return String.valueOf(callAndTime());
// Non-static wrapper necessary for PowerBuilder
public String convertEsnDecToHexNS(String esn){
return convertEsnDecToHex(esn);
}PL/SQL Script for 1 Million Java Calls:
DECLARE
var VARCHAR2( 20 );
t_begin NUMBER;
t_end NUMBER;
BEGIN
var := testconvert.convertesndectohex( '13005454488' );
t_begin := DBMS_UTILITY.get_time;
FOR i IN 1 .. 1000000
LOOP
var := testconvert.convertesndectohex( '13005454488' );
END LOOP;
t_end := DBMS_UTILITY.get_time;
DBMS_OUTPUT.put_line( var );
DBMS_OUTPUT.put_line( ( t_end - t_begin ) / 100 || ' seconds' );
END;
/PowerBuilder for 1 Million Java Calls:
EJBConnection lEJBConn
TestConvert lnv_test
String ls_ret
Long i
Time t_begin, t_end
lEJBConn = CREATE EJBConnection
lEJBConn.CreateJavaInstance( lnv_test, "TestConvert")
ls_ret = lnv_test.convertesndectohexns("13005454488")
t_begin = now()
FOR i = 1 TO 1000000
ls_ret = lnv_test.convertesndectohexns("13005454488")
NEXT
t_end = now()
MessageBox("Hex Version",ls_ret + " - " + String(SecondsAfter(t_begin, t_end)) + " seconds")
DESTROY lEJBConn -
PL/SQL Performance problem
I am facing a performance problem with my current application (PL/SQL packaged procedure)
My application takes data from 4 temporary tables, does a lot of validation and
puts them into permanent tables.(updates if present else inserts)
One of the temporary tables is parent table and can have 0 or more rows in
the other tables.
I have analyzed all my tables and indexes and checked all my SQLs
They all seem to be using the indexes correctly.
There are 1.6 million records combined in all 4 tables.
I am using Oracle 8i.
How do I determine what is causing the problem and which part is taking time.
Please help.
The skeleton of the code which we have written looks like this
MAIN LOOP ( 255308 records)-- Parent temporary table
-----lots of validation-----
update permanent_table1
if sql%rowcount = 0 then
insert into permanent_table1
Loop2 (0-5 records)-- child temporary table1
-----lots of validation-----
update permanent_table2
if sql%rowcount = 0 then
insert into permanent_table2
end loop2
Loop3 (0-5 records)-- child temporary table2
-----lots of validation-----
update permanent_table3
if sql%rowcount = 0 then
insert into permanent_table3
end loop3
Loop4 (0-5 records)-- child temporary table3
-----lots of validation-----
update permanent_table4
if sql%rowcount = 0 then
insert into permanent_table4
end loop4
-- COMMIT after every 3000 records
END MAIN LOOP
Thanks
Ashwin N.Do this intead of ditching the PL/SQL.
DECLARE
TYPE NumTab IS TABLE OF NUMBER(4) INDEX BY BINARY_INTEGER;
TYPE NameTab IS TABLE OF CHAR(15) INDEX BY BINARY_INTEGER;
pnums NumTab;
pnames NameTab;
t1 NUMBER(5);
t2 NUMBER(5);
t3 NUMBER(5);
BEGIN
FOR j IN 1..5000 LOOP -- load index-by tables
pnums(j) := j;
pnames(j) := 'Part No. ' || TO_CHAR(j);
END LOOP;
t1 := dbms_utility.get_time;
FOR i IN 1..5000 LOOP -- use FOR loop
INSERT INTO parts VALUES (pnums(i), pnames(i));
END LOOP;
t2 := dbms_utility.get_time;
FORALL i IN 1..5000 -- use FORALL statement
INSERT INTO parts VALUES (pnums(i), pnames(i));
get_time(t3);
dbms_output.put_line('Execution Time (secs)');
dbms_output.put_line('---------------------');
dbms_output.put_line('FOR loop: ' || TO_CHAR(t2 - t1));
dbms_output.put_line('FORALL: ' || TO_CHAR(t3 - t2));
END;
Try this link, http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm#23723 -
Unable to reach Workspace Login Page
Hi,
First some background - I am an Apex developer / administrator. I do not have a DBA background. DBAs install the Apex software and I administer the webserver (although my experience with webservers is that which I've picked up using Apex) and develop applications.
We are currently upgrading our DEV, QA and PROD APEX installations from 2.2.1 to 3.1.1 (specifically 3.1.1.00.09).
We are using Oracle HTTP Server from the Oracle 10.1 companion disk.
We completed this for our DEV and QA environments without a problem. We have not done this for our PROD environment yet.
We also installed APEXLIB 1.7 in both DEV and QA. This was working successfully in DEV. We had not tried it yet in QA.
Both 3.1.1 upgraded environments have been running successfully for about 10 days since the upgrade.
However our QA environment (Oracle 10.2.0.3 running on HP-UX B.11.11 ) experienced a problem yesterday - we can no longer access any Apex applications including the Workspace login pages or application login pages.
The error we get in the browser is:
Expecting p_company or wwv_flow_company cookie to contain security group id of application owner.
Error ERR-7620 Could not determine workspace for application ().
We experienced a problem with our QA environment before (prior to upgrade) and we needed to flush the shared pool a few months ago as a temporary fix for this as has been noted on this forum. The problem in question was addressed in this forum post: Re: ORA-06502:PL/SQL: numeric or value error: NULL index table key value
However, with the current problem, flushing the shared pool has not solved the issue. It may not be related.
When we access the workspace login page: http://our_url/apex/crmqa/f?p=4550:1, I see nothing in the Apache logs to indicate an error.
The access_log.xxx file in the Apache logs lists this ...
ip_address_here - apex_public_user [16/Jul/2008:15:15:15 -0500] "GET /apex/crmqa/f?p=4550:1 HTTP/1.1" 200 455
The error_log.xxx file is empty.
I temporarily turned on mod_plsql logging
When I tried to access http://our_url/apex/crmqa/f?p=4550:1
The cid1.log file contained...
<337703562 ms>[ReqStartTime: 16/Jul/2008:15:23:43]
<337703562 ms>Request ID ReqID:6136_1216239823
<337703562 ms>Connecting to database with connect string : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ip_address_here)(PORT=1526)))(CONNECT_DATA=(SID=crmqa1)))"
<337704171 ms>Doing alter session set nls_language= "AMERICAN" nls_territory= "AMERICA"
<337704171 ms>OpenCursor
<337704234 ms>Altered session to nls_language=AMERICAN nls_territory=AMERICA
<337704234 ms>DeinitCursor
<337704234 ms>OpenCursor
<337704453 ms>DBCharSet is AMERICAN_AMERICA.WE8ISO8859P1, OWAVersion 10.1.2.0.6, 1001020006 (rc=0)
<337704453 ms>DeinitCursor
<337704453 ms>OpenCursor
<337704453 ms>(wpd.c,1757) Logged in as (unknown)
<337704453 ms>(wpx.c,559) Going to select...
<337704453 ms>(wpx.c,613) Have been asked to execute a request
<337704453 ms>(wppa.c,326) Building Arglist based on Parsed Content from WRB
<337704453 ms>(wppa.c,1007) Enter ParseUrlData
<337704453 ms>GET
<337704453 ms>(wppa.c,1056) Getting Values from QUERY_STRING
<337704453 ms>[headers begin]
<337704453 ms>[headers end]
<337704453 ms>p=4550:1
<337704453 ms>(wppa.c,1499) indx = 1, entryCnt = 1
<337704453 ms>(wppa.c,1849) Listing distinct actual names:
<337704453 ms>(wppa.c,1851) p
<337704453 ms>(wppa.c,1853) Listing actuals of array with large entries:
<337704453 ms>(wppa.c,1858) Listing distinct actual names and values:
<337704453 ms>(wppa.c,1890) p, type = 0, value (7) = 4550:1
<337704453 ms>(wppa.c,421) Arglist built, 1 unique entries
<337704453 ms>(wpx.c,620) Going to wpprodb_OciDoBlock...
<337704453 ms>(wpd.c,2734) Cache enabled. Gathering cache information.
<337704453 ms>(wpd.c,2752) Language for this request is en-us
<337704453 ms>(wpd.c,2803) Using user apex_public_user for caching.
<337704453 ms>cache: Checking for user level hit
<337704453 ms>cache: Cache MISS user - D:\oracle\product\10.1.0\db_1/Apache/modplsql/cache\plsql\712\2063
<337704453 ms>cache: Checking for system level hit
<337704453 ms>cache: Cache MISS system - D:\oracle\product\10.1.0\db_1/Apache/modplsql/cache\plsql\sys\878\4773
<337704453 ms>(wppr.c,393) start working with f
<337704453 ms>(wppr.c,1005) The CALL block: len=503, bind_count=9
declare
rc__ number;
start_time__ binary_integer;
begin
start_time__ := dbms_utility.get_time;
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 84;
null;
null;
null;
null;
f(p=>:p);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
:rc__ := rc__;
:db_proc_time__ := dbms_utility.get_time - start_time__;
end;
<337704453 ms>(wppr.c,462) Pl/sql block parsed...
<337704453 ms>(wpdenv.c,1495) CGI Environment has 29 vars. Max name len 128, Max Value Len 128
<337704453 ms> PLSQL_GATEWAY(14)=(6)WebDb
<337704453 ms> GATEWAY_IVERSION(17)=(2)2
<337704453 ms> SERVER_SOFTWARE(16)=(59)Oracle-Application-Server-10g/9.0.4.0.0 Oracle-HTTP-Server
<337704453 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<337704453 ms> SERVER_PORT(12)=(3)80
<337704453 ms> SERVER_NAME(12)=(12)server_name_here
<337704453 ms> REQUEST_METHOD(15)=(4)GET
<337704453 ms> QUERY_STRING(13)=(9)p=4550:1
<337704453 ms> PATH_INFO(10)=(3)/f
<337704453 ms> SCRIPT_NAME(12)=(12)/apex/crmqa
<337704453 ms> REMOTE_ADDR(12)=(14)remote_ip_address_here
<337704453 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<337704453 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<337704453 ms> REMOTE_USER(12)=(17)apex_public_user
<337704453 ms> HTTP_USER_AGENT(16)=(95)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
<337704453 ms> HTTP_HOST(10)=(12)hostname_here
<337704453 ms> HTTP_ACCEPT(12)=(4)*/*
<337704453 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<337704453 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-us
<337704453 ms> HTTP_ORACLE_ECID(17)=(37)1216239823:ecid_ip_address_here??:7200:6136:1,0
<337704453 ms> WEB_AUTHENT_PREFIX(19)=(1)
<337704453 ms> DAD_NAME(9)=(6)crmqa
<337704453 ms> DOC_ACCESS_PATH(16)=(5)docs
<337704453 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<337704453 ms> PATH_ALIAS(11)=(1)
<337704453 ms> REQUEST_CHARSET(16)=(5)UTF8
<337704453 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<337704453 ms> SCRIPT_PREFIX(14)=(6)/apex
<337704453 ms> HTTP_IV_USER(13)=(1)
<337704453 ms>StrArrPosBind pos 2 Charset Id : 871
<337704453 ms>StrArrPosBind pos 3 Charset Id : 871
<337704453 ms>StrArrPosBind pos 6 Charset Id : 871
<337704781 ms>(wpd.c,1954) Begin header parsing...
<337704781 ms>(wpd.c,2003) Got a line (47 bytes): X-ORACLE-IGNORE: IGNORE
<337704781 ms>(wpd.c,2021) X-ORACLE-IGNORE parsed
<337704781 ms>(wpd.c,2003) Got a line (47 bytes): X-ORACLE-IGNORE: IGNORE
<337704781 ms>(wpd.c,2021) X-ORACLE-IGNORE parsed
<337704781 ms>(wpd.c,2003) Got a line (47 bytes): X-ORACLE-IGNORE: IGNORE
<337704781 ms>(wpd.c,2021) X-ORACLE-IGNORE parsed
<337704781 ms>(wpd.c,2003) Got a line (47 bytes): X-ORACLE-IGNORE: IGNORE
<337704781 ms>(wpd.c,2021) X-ORACLE-IGNORE parsed
<337704781 ms>(wpd.c,2003) Got a line (77 bytes): Content-type: text/html; charset=UTF-8
<337704781 ms>(wpd.c,2102) Parsed header - Content-Type:text/html; charset=UTF-8
<337704781 ms>(wpd.c,2003) Got a line (49 bytes): X-DB-Content-length: 443
<337704781 ms>(wpd.c,2162) Parsed header - X-DB-Content-length:443
<337704781 ms>(wpd.c,2003) Got a line (1 bytes):
<337704781 ms>(wpd.c,2010) End of headers detected
<337704843 ms>(wpcs.c, 76) Executed 'begin dbms_session.reset_package; end;' (rc=0)
<337704843 ms>(wpd.c,1812) Going to close cursor
<337704843 ms>DeinitCursor
<337704843 ms>(wpx.c,626) Normal completion
<337704843 ms>(wpx.c,654) Shutdown has been called
<337704843 ms>(wpx.c,666) Going to logoff
<337704843 ms>Logoff: Pooling this connection
<337704843 ms>[ReqEndtime: 16/Jul/2008:15:23:44]
<337704843 ms>[ReqExecTime: 1281 ms]
and the 6136.log file contained...
<337703562 ms>[ReqStartTime: 16/Jul/2008:15:23:43]
<337703562 ms>Request ID ReqID:6136_1216239823
<337703562 ms>(wpdenv.c,663) script_name='/apex/crmqa' path_info='/f'script_prefix='/apex' dad_name='crmqa'
<337703562 ms>(wpdenv.c,776) User-Agent is Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
<337703562 ms>(wpdenv.c,1388) dadname = 'crmqa', path_info = 'f'
<337703562 ms>(wpdenv.c,1427) Service will NOT use dynamic auth
<337703562 ms>(wpx.c,387) Initialized successfully 0
<337703562 ms>(wpx.c,309) SetRemoteUser : Remote User set to apex_public_user for this request.
<337703562 ms>(wpx.c,476) Auth info from .APP file is being used
<337703562 ms>(wpd.c,1724) Attempting to logon with '(unknown)'
<337704843 ms>Maximum memory allocated by the request is 75158 bytes
<337704843 ms>[ReqEndtime: 16/Jul/2008:15:23:44]
<337704843 ms>[ReqExecTime: 1281 ms]
The DAD config file contains the following entries...
# ============================================================================
# mod_plsql DAD Configuration File
# ============================================================================
# 1. Please refer to dads.README for a description of this file
# ============================================================================
# /i contains version 221 images
Alias /i "D:\oracle\product\10.1.0\db_1\Apache\Apache\images"
Alias /i31 "D:\oracle\product\10.1.0\db_1\Apache\Apache\images311"
<Location /apex/crmqa>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlCGIEnvironmentList HTTP_IV_USER
PlsqlDatabaseUsername apex_public_user
PlsqlDatabasePassword xxx
PlsqlDatabaseConnectString ip_address:port_number:crmqa1
PlsqlDefaultPage apex
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlAuthenticationMode Basic
PlsqlNLSLanguage AMERICAN_AMERICA.UTF8
</Location>
<Location /apex/crmdev>
SetHandler pls_handler
Order deny,allow
Allow from all
AllowOverride None
PlsqlCGIEnvironmentList HTTP_IV_USER
PlsqlDatabaseUsername apex_public_user
PlsqlDatabasePassword xxx
PlsqlDatabaseConnectString ip_address:port_number:crmdev1
PlsqlDefaultPage apex
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDocumentPath docs
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlAuthenticationMode Basic
PlsqlNLSLanguage AMERICAN_AMERICA.UTF8
</Location>
The DAD entries above point to databases on which Apex is version 3.1.1 and we have modified the image prefix on these database to be a value of /i31, using the script reset_image_prefix.sql.
This DAD file also contains DAD entries (not included above) for other database running Apex 2.2.1 which are using the default image prefix value of /i
I can ping the database ip address from the machine on which the OHS webserver is running.
I have installed OHS on my local laptop and have the same problems.
I can however execute a procedure on the database using the same OHS / DAD configuration running something like http://our_url/apex/crmqa/schema_name.test_connection?v_wait=1where the proc test_connection proc sleeps for v_wait seconds before returning a simple html page confirming that it worked.
I can login to the apex_public_user account via my SQL Developer client
At this point I do not know what else to try to resolve this issue. I am about to start trawling through metalink for related issues if I can find anything.
Any assistance is very much appreciated...
Thank you.
AlanI also see this post on Metalink - could it be related?
https://metalink.oracle.com/metalink/plsql/f?p=130:14:12042222629340980284::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,429261.1,1,1,1,helvetica
Subject: After upgrading database to 10.2.0.X, getting ORA-06502: PL/SQL: numeric or value error:
Doc ID: Note:429261.1 Type: PROBLEM
Last Revision Date: 08-MAY-2008 Status: MODERATED
In this Document
Symptoms
Changes
Cause
Solution
References
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.
Applies to:
Oracle Application Express (formerly HTML DB) - Version: 2.0.0.0.49
This problem can occur on any platform.
Symptoms
On the Application builder page, when attempting to click details to view the applications, the following error occurs:
ORA-06502: PL/SQL: numeric or value error: NULL index table key value
However, the problem seems to disappear after a while..
Changes
Upgrade of database (from any version to 10.2.0.1 or 10.2.0.2)
Cause
The reason is due to database Bug 4752541 Abstract: APPSST 10G: ORA-6550 AFTER UPGRADE TO 10.2.0.1. However Patch 47552541 is obsoleted and not available via metalink, it was superceded by Patch 5705795.
This bug is fixed in patchset 10.2.0.4 and above. For current and older versions, Patch 5705795 must be applied. If the patch cannot be found for a particular version or O/S , log a service request with Oracle Support to obtain the patch.
This is also documented in the Apex forum page: Re: wwv_flow.accept error lists the following bug as
root cause.
Solution
Interim solution:
Flush the database shared pool when the problem occurs
Permanent solution:
Upgrade database to 10.2.0.4 or above
OR
Download and apply database Patch 5705795. If the version for your database is not available , create a new Service request from metalink under product RDBMS to request for a patch
References
Bug 4752541 - APPSST 10G: ORA-6550 AFTER UPGRADE TO 10.2.0.1
Keywords
UPGRADE~DATABASE; UPGRADE~TO~10.2.0.4; UPGRADE~TO~10.2.0.1; APPLICATION~DETAILS; UPGRADE~FROM~10.2.0.2; UPGRADE~TO~10.2.0.3; VIEW~DETAILS; -
hi
I am getting the following error while calling the procedure in the batch process
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
Could you please help me on this? As this is getting affected in the live databases.
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
CREATE OR REPLACE PROCEDURE Send_To_Spg(
PTRANSACTION_ID IN VARCHAR2,
PCHANNEL_TYPE IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NUMBER IN VARCHAR2 DEFAULT NULL,
PTELEPHONE_NUMBER IN VARCHAR2 DEFAULT NULL,
PSCENARIO_TYPE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_DATE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_TIME IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_REASON IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_NOTES IN VARCHAR2 DEFAULT NULL,
PSMPF_RETENTION IN VARCHAR2 DEFAULT NULL,
PEMERGENCY_WINBACK IN VARCHAR2 DEFAULT NULL,
PCSS_PROJECT_ID IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NOTES IN VARCHAR2 DEFAULT NULL,
PREASON_FOR_CESSATION IN VARCHAR2 DEFAULT NULL,
P_RESPONSE OUT VARCHAR2,
PSMART_USER_ID IN VARCHAR2 DEFAULT NULL,
PORACLE_ERROR OUT VARCHAR2,
PORACLE_ERROR_MESSAGE OUT VARCHAR2,
PRESPONSE_TIME OUT NUMBER,
PDATA_TRANSFER_STATUS OUT VARCHAR2)
IS
v_scenario_type VARCHAR2(20); -- Varialble to Hold Time Out of every request to SPG
v_transaction_time NUMBER; -- Total time in which Request to SPG was processed
v_record_inserted_at DATE; -- Date/Time about the record insertion to the Error Handler
v_start_time NUMBER; -- Variable to hold Start Time for calculationg Transaction Time
v_url VARCHAR2(32767);-- URL to use when sending data to SPG
vtransaction_id VARCHAR2(18); -- Variable to hold Transaction ID for the request
v_buffer VARCHAR2(32760);-- Variable to read response from the SPG interface
v_timeout PLS_INTEGER; -- Time Out for each Transaction
v_oracle_err_msg VARCHAR2(600); -- Variable to hold Oracle Error Message
v_resp UTL_HTTP.RESP; -- Response Object
v_req UTL_HTTP.REQ; -- Request Object
v_userid_pwd SMT_ORACLE_PARAMETERS%ROWTYPE; --Variable declared to contain User ID & Password
vl_RetCode VARCHAR2(5000);
vl_std_returnCode VARCHAR2(3000);
--PDATA_TRANSFER_STATUS Holds the Data Transfer Status which can have possible values as
-- N => Data Has not been sent to SPG
-- Y => Received Successful response from SPG
-- F => On the First try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- S => On the Second try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- T => Data Has been transferred to the Error Log Table
-- X => Data need not be transfered to Error Log Table.
--Location of the timeout, URL & User Id & Password in Standing Data.
c_url_stopwlr SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_WLR';-- Stop WLR URL
c_url_cancelown SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OWN';-- Cancel own URL
c_url_cancelother SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OTH';-- Cancel other URL
c_url_amendcrd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_CRD';--Amend CRD URL
c_spg_useridpwd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPGIDPWD'; --Contains user id and pwd
ctimeout smt_parameters.parameter_code%TYPE:='SPGTO'; --This holds the timeout parameter
BEGIN
--In case the calling batch process can pass this value this SQL read will not be required & can be deleted
--Read data transfer status for the transaction Id
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS FROM SPG_INTERFACE_TABLE
WHERE transaction_id = PTRANSACTION_ID;
--Record the start time
v_start_time:=DBMS_UTILITY.GET_TIME;
--If Data transfer status is S then send the record to error handler
IF PDATA_TRANSFER_STATUS = 'S' THEN
Error_Handler(PTRANSACTION_ID,PSMART_USER_ID,PORACLE_ERROR,PORACLE_ERROR_MESSAGE,v_record_inserted_at,PDATA_TRANSFER_STATUS);
ELSE
--In case Data Tranfer Status is something other than S then send the request to SPG
--Initialise other variables which will be populated during the journey
P_RESPONSE := '';
PORACLE_ERROR := NULL;
PORACLE_ERROR_MESSAGE := NULL;
PRESPONSE_TIME := 0;
--Read timeout parameter from standing data.
BEGIN
SELECT VALUE INTO v_timeout FROM smt_parameters WHERE parameter_code=ctimeout;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_timeout:=30;
WHEN OTHERS THEN
v_timeout:=30;
END;
-- Construct the URL for Stop WLR Scenario
IF PSCENARIO_TYPE = 'STOP_WLR' THEN
BEGIN
-- Read the Initial URL from Standing Data
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_stopwlr
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL depending on the parameters to be passed to the url
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' || Smart_Urlencode('xmloverhttp') || '&';
v_url := v_url || 'p_channel_type=' || Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' || Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' || Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' || Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_take_over_time=' || Smart_Urlencode(PCUSTOMER_REQUIRED_TIME)|| '&';
v_url := v_url || 'p_retainsmpf=' || Smart_Urlencode(PSMPF_RETENTION)|| '&';
--v_url := v_url || 'p_emergency_winback=' || Smart_Urlencode(PEMERGENCY_WINBACK)|| '&';
v_url := v_url || 'p_projectno=' || Smart_Urlencode(PCSS_PROJECT_ID)|| '&';
v_url := v_url || 'p_ordernotes=' || Smart_Urlencode(PCSS_ORDER_NOTES)|| '&';
v_url := v_url || 'p_reason_cessation=' || Smart_Urlencode(PREASON_FOR_CESSATION);
ELSIF PSCENARIO_TYPE='CANCEL_OWN' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelown
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON)|| '&';
v_url:= v_url || 'p_cancel_notes=' ||Smart_Urlencode(PCANCELLATION_NOTES);
ELSIF PSCENARIO_TYPE='CANCEL_OTHER' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelother
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_stop_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON);
ELSIF Pscenario_type='AMEND_CRD' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_amendcrd
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' ||Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_css_change_order_numbers='||Smart_Urlencode(PCANCELLATION_REASON);
END IF;
--this is start of setting parameters for utl http object. the show begins...
utl_http.set_transfer_timeout(v_timeout);
--Set the wallet
--XXXXX e.g.UTL_HTTP.SET_WALLET(?file:DirectoryPath?,'put password here?);
--Set proxy
--YYYYY e.g. utl_http.set_proxy(p_proxy_in, p_no_proxy_domains_in);
v_url := REPLACE(v_url,'%27%27','%27'); -- Fix to ensure Double Quotes are converted to Single Quotes
--set the required URL to utl http.
v_req := utl_http.begin_request(v_url);
--Authentication setting
--Fetch the user id and password from stnding data.
BEGIN
SELECT *
INTO v_userid_pwd
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE=c_spg_useridpwd
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
WHEN OTHERS THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
END;
--utl_http.set_authentication(v_req, p_username_in, p_password_in);
utl_http.set_authentication(v_req, v_userid_pwd.description, v_userid_pwd.VALUE);
v_resp := utl_http.get_response(v_req);
--Fill in the the response time
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
IF v_resp.reason_phrase = 'OK' THEN
-- Fetch the response
BEGIN
LOOP
utl_http.read_line(v_resp, v_buffer);
P_RESPONSE := P_RESPONSE || v_buffer;
END LOOP;
utl_http.end_response(v_resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(v_resp);
P_RESPONSE := P_RESPONSE || v_buffer;
END;
ELSIF v_resp.reason_phrase <> 'OK' OR P_RESPONSE = '' THEN
--error handling starts
--If the HTTP Status is not OK then store the error information
PORACLE_ERROR_MESSAGE := 'Status Code: '|| v_resp.STATUS_CODE||'. Reason Phrase ' ||v_resp.reason_phrase;
P_RESPONSE := 'ORACLE_ERROR: '|| ' Reason Phrase ' || v_resp.reason_phrase;
PORACLE_ERROR := v_resp.STATUS_CODE;
END IF;
--In case we got successful response from SPG
IF P_RESPONSE LIKE '%<RetCde>0</RetCde>%' THEN
PDATA_TRANSFER_STATUS := 'Y';
ELSE
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
END;
--In case there was an error do not update Data Transfer Status
IF PORACLE_ERROR <> NULL AND INSTR(vl_std_returnCode, PORACLE_ERROR || ',', 1, 1) <> 0 THEN
PDATA_TRANSFER_STATUS:=PDATA_TRANSFER_STATUS;
ELSE
vl_RetCode := SUBSTR(P_RESPONSE, INSTR(P_RESPONSE,'<RetCde>', 1, 1),
INSTR(P_RESPONSE,'</RetCde>',1,1)+9 - INSTR(P_RESPONSE,'<RetCde>', 1, 1));
BEGIN
SELECT VALUE
INTO vl_std_returnCode
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE='SPGRCS'
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
WHEN OTHERS THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
END;
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--needs not to re attempted.
PDATA_TRANSFER_STATUS:='X';
ELSE
--In case we did'nt got SUCCESSFUL response FROM SPG THEN UPDATE the Data Transfer Status so that the failed requests can be picked up BY the NEXT batch job RUN
IF PDATA_TRANSFER_STATUS='N' THEN
--initially if data transfer status was N then update it now to F
PDATA_TRANSFER_STATUS := 'F';
ELSIF PDATA_TRANSFER_STATUS='F' THEN
--initially if data transfer status was N then update it now to S
PDATA_TRANSFER_STATUS := 'S';
END IF;
END IF;
END IF;
END IF;
--Now Update all the modified Values
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
--Handling the unhandled exception
PORACLE_ERROR := SQLCODE;
PORACLE_ERROR_MESSAGE := SQLERRM;
P_RESPONSE := 'ORACLE_ERROR: '|| PORACLE_ERROR_MESSAGE;
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS
FROM SPG_INTERFACE_TABLE
WHERE transaction_id=PTRANSACTION_ID;
--New functionality to update the oracle error and oracle error message and not the Data Transfer Status
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,';
END;
vl_RetCode := PORACLE_ERROR || ',';
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--If the error is found in above maintained standing data do not change the Data Transfer Status
pdata_transfer_status:=pdata_transfer_status;
ELSE
IF pdata_transfer_status='N' THEN
PDATA_TRANSFER_STATUS := 'F';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSIF pdata_transfer_status='F' THEN
PDATA_TRANSFER_STATUS := 'S';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSE
DBMS_OUTPUT.PUT_LINE('Failure WHEN sending data TO Error LOG. Data Transfer Status IS ' || PDATA_TRANSFER_STATUS || '. TRANSACTION ID '|| PTRANSACTION_ID);
END IF;
END IF;
--Now update all the information gathered above to the table
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END;
/I have fixed the problem by own.
Seems there are some while space in the endpoint url.
Fix
http_req:= utl_http.begin_request
trim(l_endpoint_url)
,'POST'
,'HTTP/1.1'
It works...
Regards
BS -
Use of FOR Cursor and BULK COLLECT INTO
Dear all,
in which case we prefer to use FOR cursor and cursor with BULK COLLECT INTO? The following contains two block that query identically where one is using FOR cursor, the other is using BULK COLLECT INTO . Which one that performs better given in the existing task? How do we measure performance between these two?
I'm using sample HR schema:
declare
l_start number;
BEGIN
l_start:= DBMS_UTILITY.get_time;
dbms_lock.sleep(1);
FOR employee IN (SELECT e.last_name, j.job_title FROM employees e,jobs j
where e.job_id=j.job_id and e.job_id LIKE '%CLERK%' AND e.manager_id > 120 ORDER BY e.last_name)
LOOP
DBMS_OUTPUT.PUT_LINE ('Name = ' || employee.last_name || ', Job = ' || employee.job_title);
END LOOP;
DBMS_OUTPUT.put_line('total time: ' || to_char(DBMS_UTILITY.get_time - l_start) || ' hsecs');
END;
declare
l_start number;
type rec_type is table of varchar2(20);
name_rec rec_type;
job_rec rec_type;
begin
l_start:= DBMS_UTILITY.get_time;
dbms_lock.sleep(1);
SELECT e.last_name, j.job_title bulk collect into name_rec,job_rec FROM employees e,jobs j
where e.job_id=j.job_id and e.job_id LIKE '%CLERK%' AND e.manager_id > 120 ORDER BY e.last_name;
for j in name_rec.first..name_rec.last loop
DBMS_OUTPUT.PUT_LINE ('Name = ' || name_rec(j) || ', Job = ' || job_rec(j));
END LOOP;
DBMS_OUTPUT.put_line('total time: ' || to_char(DBMS_UTILITY.get_time - l_start) || ' hsecs');
end;
/In this code, I put timestamp in each block, but they are useless since they both run virtually instantaneous...
Best regards,
ValIf you want to get 100% benifit of bulk collect then it must be implemented as below
declare
Cursor cur_emp
is
SELECT e.last_name, j.job_title
FROM employees e,jobs j
where e.job_id=j.job_id
and e.job_id LIKE '%CLERK%'
AND e.manager_id > 120
ORDER BY e.last_name;
l_start number;
type rec_type is table of varchar2(20);
name_rec rec_type;
job_rec rec_type;
begin
l_start:= DBMS_UTILITY.get_time;
dbms_lock.sleep(1);
/*SELECT e.last_name, j.job_title bulk collect into name_rec,job_rec FROM employees e,jobs j
where e.job_id=j.job_id and e.job_id LIKE '%CLERK%' AND e.manager_id > 120 ORDER BY e.last_name;
OPEN cur_emp;
LOOP
FETCH cur_emp BULK COLLECT INTO name_rec LIMIT 100;
EXIT WHEN name_rec.COUNT=0;
FOR j in 1..name_rec.COUNT
LOOP
DBMS_OUTPUT.PUT_LINE ('Name = ' || name_rec(j) || ', Job = ' || job_rec(j));
END LOOP;
EXIT WHEN cur_emp%NOTFOUND;
END LOOP;
CLOSE cur_emp;
DBMS_OUTPUT.put_line('total time: ' || to_char(DBMS_UTILITY.get_time - l_start) || ' hsecs');
end;
/ -
PL/SQL Procedure guidelines
I need to load the records from one table and insert and/or update it into different tables based on the column values. If any one has any template or guidelines for doing similar tasks, it would be give me a proper refernce. This is what I came up with based on the reading and other online examples. My concerns are about memory, commit & rollback points and performances. If anyone could point out any potential problems or any better ways of doing it, it would be greatly appreciated. There would be 30-40,000 records per day and this procedure is scheduled to run every evening. Please bear with me for this lengthy post.
--@test_pkg.sql;
--exec test_pkg.load_records(200);
create or replace package test_pkg
is
procedure load_records (fetch_limit in number := 200, log_lvl in number := 4);
procedure new_record (retKey out number);
procedure update_record(recKey in number);
procedure ins_upd_attribute (id1 in number, id2 in char, id3 in number, val in varchar2);
procedure log_msg(msg_type in number := 0, msg in varchar2);
function get_fk (col5 in varchar2) return number;
end test_pkg;
create or replace package body test_pkg
is
cursor test_cur
is
select col1, col2, col3, col4, col5,col6, name, phone, address1, city, state, zip, birthdate,
email, col7,lastdate, process_flag
from table1
where process_flag = 'N' for update of process_flag;
type test_cur_type is table of test_cur%rowtype;
cur_rec test_cur_type;
LOG_OFF number := 0;
LOG_FATAL number := 1;
LOG_ERROR number := 2;
LOG_WARNING number := 3;
LOG_INFO number := 4;
LOG_DEBUG number := 5;
log_level number := LOG_INFO;
i number := 1;
last_change_user number := 261;
last_change_date date; /* Sysdate */
rec_num, new_rec_count, error_record_count, total_record_count number;
start_time, end_time, processing_time number;
procedure load_records (fetch_limit in number := 200, log_lvl in number := 4)
is
begin
log_level := log_lvl;
start_time := dbms_utility.get_time;
log_msg(LOG_INFO, start_time||':test_pkg.load_records procedure started...');
select sysdate into last_change_date from dual;
new_rec_count := 0;
col2_count := 0;
col3_count := 0;
col4_count := 0;
attr_records_added := 0;
attr_records_updated := 0;
error_record_count := 0;
total_record_count := 0;
end_time := 0;
processing_time := 0;
open test_cur;
loop
fetch test_cur bulk collect into cur_rec limit fetch_limit;
for i in 1..cur_rec.count
loop
rec_num := 0;
if ((cur_rec(i).col5 > 0) and
(cur_rec(i).col1 = 'Y') or
(cur_rec(i).col2 = 'Y') or
(cur_rec(i).col3 = 'Y') or
(cur_rec(i).col4 = 'Y'))
then
if cur_rec(i).col1 = 'Y' then
new_record(rec_num);
else
rec_num := get_fk(cur_rec(i).col5);
end if;
log_msg(LOG_DEBUG, 'col5<'||cur_rec(i).col5||'> rec_num<'||rec_num||'>');
if rec_num <= 0 then
log_msg(LOG_INFO, 'Invalid record. rec#<'||cur_rec(i).col5||'> cx<'||rec_num||'>. No matching record found in card table');
else
if cur_rec(i).col2 = 'Y' then
ins_upd_attribute(rec_num, 'C', 191, 'Y');
end if;
if cur_rec(i).col3 = 'Y' then
ins_upd_attribute(rec_num, 'C', 192, 'Y');
end if;
if cur_rec(i).col4 = 'Y' then
ins_upd_attribute(rec_num, 'P', 193, 'Test');
end if;
if cur_rec(i).col6 = 'Y' then
update_record(cur_rec(i).col5);
end if;
end if;
else
log_msg(LOG_INFO, cur_rec(i).col5||' is an invalid record...No options selected.');
error_record_count := error_record_count + 1;
end if;
total_record_count := total_record_count + 1;
end loop;
exit when test_cur%notfound;
end loop;
close test_cur;
commit;
end_time := sys.dbms_utility.get_time;
--processing_time := mod (((end_time - start_time) + power(2,32)), power(2,32));
processing_time := end_time - start_time;
log_msg(LOG_INFO, '*********** Execution Summary ***********');
log_msg(LOG_INFO, ' New record requests: ' || new_rec_count);
log_msg(LOG_INFO, ' Invalid option records: ' || error_record_count);
log_msg(LOG_INFO, ' Total records processed: ' || total_record_count);
log_msg(LOG_INFO, ' Total processing time: ' || processing_time || ' ms');
log_msg(LOG_INFO, '*****************************************');
exception
when others then
log_msg(LOG_INFO, 'Other exceptions occured...');
--loghandler.log(sqlcode, sqlerrm,'load_records');
end load_records;
procedure new_record (retKey out number)
is
key1, key2, key3 number;
begin
retKey := 0;
--log_msg(LOG_INFO, start_time||':test_pkg.new_record procedure started...');
select value into key1 from keyTable where parameter = 'KEY1' for update;
update keyTable set value = key1 + 1 where parameter = 'KEY1';
select value into key2 from keyTable where parameter = 'KEY2' for update;
update keyTable set value = key2 + 1 where parameter = 'KEY2';
select value into key3 from keyTable where parameter = 'KEY3' for update;
update keyTable set value = key3 + 1 where parameter = 'KEY3';
log_msg(LOG_DEBUG, 'rec#<'||cur_rec(i).col4||'> key1<'||key1||'> key2<'||key2||'> key3<'||key3||'>');
insert into table1 (col1, col2, col3, col4, rectype, lastchangedate, lastchangeuserid)
values (key1, key2, key3, cur_rec(i).col4,'Unknown',last_change_date,last_change_user);
log_msg(LOG_DEBUG, 'Table1 record inseted...');
insert into table2 (col1, col2, col3, col4)
values(key2, key3, key1, cur_rec(i).name);
log_msg(LOG_DEBUG, 'Table2 record inseted...');
insert into table3 (col1, col2, col3, phone, addr, postalcode, lastchangedate, lastchangeuserid)
values (key3, key1, key2, cur_rec(i).phone, cur_rec(i).address1, cur_rec(i).zip, last_change_date,last_change_user);
log_msg(LOG_DEBUG, 'Table3 record inseted...');
retKey := key1;
new_rec_count := new_rec_count + 1;
exception
when others then
log_msg(LOG_INFO, 'Other exceptions occured...sqlcode: '||sqlcode||' sqlerrm: '|| sqlerrm);
end new_record;
procedure ins_upd_attribute (id1 in number, id2 in char, id3 in number, val in varchar2) is
record_count number := 0;
begin
log_msg(LOG_DEBUG, start_time||':test_pkg.ins_upd_attribute procedure started...');
select count(1) into record_count from attributeTable where col1 = id1 and col2 = id2 and col3 = id3;
if record_count = 1
then
update attributeTable set value = val where col1 = id1 and col2 = id2 and col3 = id3;
attr_records_updated := attr_records_updated + 1;
else
insert into attributeTable(col1,col2,col3,value ) values(id1,id2,id3,val);
attr_records_added := attr_records_added + 1;
end if;
exception
when others then
log_msg(LOG_INFO, 'Other exceptions occured...sqlcode: '||sqlcode||' sqlerrm: '|| sqlerrm);
end ins_upd_attribute;
procedure update_record (recKey in number) is
id1 number := 0;
begin
log_msg(LOG_DEBUG, start_time||':test_pkg.update_record procedure started...');
select col4 into id1 from table1 where col1 = recKey;
if id1 > 1
then
update tabl3 set phone = cur_rec(i).phone,
addr = cur_rec(i).address1, postalcode =cur_rec(i).zip where id =id1;
end if;
exception
when others then
log_msg(LOG_INFO, 'Other exceptions occured...sqlcode: '||sqlcode||' sqlerrm: '|| sqlerrm);
end update_record;
function get_fk (recKey in varchar2) return number is
rec_num number := 0;
begin
select key4 into rec_num from table1 where col4 = recKey;
return rec_num;
exception
when no_data_found then
log_msg(LOG_INFO, 'No Data found exceptions occured...recKey<'||recKey||'>');
when others then
log_msg(LOG_INFO, 'Other exceptions occured...sqlcode: '||sqlcode||' sqlerrm: '|| sqlerrm);
end get_fk;
procedure log_msg(msg_type in number := 0, msg in varchar2) is
begin
if msg_type <= log_level
then
log_msg(LOG_DEBUG, start_time||':test_pkg.ins_upd_attribute procedure started...');
--loghandler.log(sqlcode, sqlerrm,'load_records')
end if;
exception
when others then
log_msg(LOG_INFO, 'Other exceptions occured...sqlcode: '||sqlcode||' sqlerrm: '|| sqlerrm);
end log_msg;
end test_pkg;
/Thanks for your reply. No. I can not use insert into or merge into options. My scenario is like this.
Read the staging table records where processed_flag is 'N'
if (col1 !='Y' and col2 !='Y' or col3 !='Y' or col4 !='Y') and col5 = 0 then
log this record. goto the next record.
else
if col1 = 'Y' then
rec_key = new_record(rec_num);
else
rec_key = get_fk(col5);
end if;
if col2 = 'Y' then
ins_upd_attribute(rec_key,'C', 191, 'Y');
end if;
if col3 = 'Y' then
ins_upd_attribute(rec_key,'C', 192, 'Y');
end if;
if col4 = 'Y' then
ins_upd_attribute(rec_key,'P', 193, 'Test');
end if;
if col6 = 'Y' then
update_record(col5);
end if;
update the processed flag to 'Y';
end if;
procedure new_record(retKey out number) is
Select the next values for 3 keys from keyTable. update keyTable column values with +1.
Insert new records into table1, table2 and table3
end new_record;
procedure ins_upd_attribute (id1 in number, id2 in char, id3 in number, val in varchar2) is
if a record exists in attributeTable then
update the attributeTable record
else
insert new record into attributeTable.
end if;
end ins_upd_attribute;
function get_fk (recKey in varchar2) return number is
if a record exist in table1 then
return record key
else
return 0;
end if;
end get_fk;
procedure update_record (recKey in number) is
if a record exists in table1 then
update table3 using the key from table1
end if;
end update_record;
Should I commit after processing each record in the staging table or commit after processing all records?
Should I combine all procedures and functions into one large procedure (load_records) or leave it the way it is now? Does any one see any potential problems with my current approach? Any advice will be sincerely appreciated.
Message was edited by:
new2sql -
How can I get the elapse time for execution of a Query for a session
Hi ,
How can I get the elapse time for execution of a Query for a session?
Example - I have a report based on the procedure ,when the user execute that it takes say 3 min. to return rows.
Is there any possible way to capture this session info. for this particular execution of query along with it's execution elapse time?
Thanks in advance.Hi
You can use the dbms_utility.get_time tool (gives binary_integer type value).
1/ Initialize you time and date of beginning :
v_beginTime := dbms_utility.get_time ;
2/ Run you procedure...
3/ Get end-time with :
v_endTime := dbms_utility.get_time ;
4/ Thus, calculate elapsed time by difference :
v_elapsTime := v_endTime - v_beginTime ;
This will give you time elapsed in of 100th of seconds...
Then you can format you result to give correct print time.
Hope it will help you.
AL -
How to insert 10 rows at a time in the oracle
how ti insert r update 10 query at a time in the oracle
You can do a small test to find it out.
SQL> set serveroutput on
SQL> drop table t
2 /
Table dropped.
SQL> drop table s
2 /
Table dropped.
SQL> create table s(no integer, name varchar2(4000))
2 /
Table created.
SQL> create table t(no integer, name varchar2(4000))
2 /
Table created.
SQL> insert into s
2 select level, rpad('*',4000,'*')
3 from dual
4 connect by level <= 10000
5 /
10000 rows created.
SQL> commit
2 /
Commit complete.
SQL> declare
2 ltime integer;
3 begin
4 ltime := dbms_utility.get_time;
5
6 for i in (select * from s)
7 loop
8 insert into t(no, name) values(i.no,i.name);
9 end loop;
10
11 ltime := dbms_utility.get_time - ltime;
12
13 dbms_output.put_line('Exec Time:'||ltime/100||' Seconds...');
14 commit;
15 end;
16 /
Exec Time:17.22 Seconds...
PL/SQL procedure successfully completed.
SQL> truncate table t
2 /
Table truncated.
SQL> declare
2 type my_type is table of s%rowtype;
3 lType my_type;
4 ltime integer;
5 begin
6 ltime := dbms_utility.get_time;
7
8 select * bulk collect into lType from s;
9
10 forall i in 1..lType.count
11 insert into t values lType(i);
12
13 ltime := dbms_utility.get_time - ltime;
14
15 dbms_output.put_line('Exec Time:'||ltime/100||' Seconds...');
16
17 commit;
18 end;
19 /
Exec Time:6.27 Seconds...
PL/SQL procedure successfully completed.
SQL> truncate table t
2 /
Table truncated.
SQL> declare
2 ltime integer;
3 begin
4 ltime := dbms_utility.get_time;
5
6 insert into t select * from s;
7
8 ltime := dbms_utility.get_time - ltime;
9
10 dbms_output.put_line('Exec Time:'||ltime/100||' Seconds...');
11
12 commit;
13 end;
14 /
Exec Time:3.26 Seconds...
PL/SQL procedure successfully completed.Thanks,
Karthick. -
Error when installing the supporting objects of OLL Packaged Application
Hello,
I am trying to install OLL Packaged Application|http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/apex/r41/inst_pkgapp/inst_pkgapp.htm#top
but when installing the supporting objects, I got error when executing the code of "create_package_body"
Error at line 274: PLS-00201: identifier 'UTL_TCP' must be declared
create or replace package body eba_oll_log
as
g_start_time number;
procedure log_init
is
begin
g_start_time := dbms_utility.get_time;
end log_init;
procedure log_page_view
is
begin
insert into eba_oll_page_views
( APEX_USER,
PAGE_ID,
PAGE_NAME,
VIEW_DATE,
TS,
ELAPSED_TIME,
IP_ADDRESS,
AGENT,
APEX_SESSION_ID,
CONTENT_ID,
CONTENT_TITLE )
values
( v('APP_USER'),
v('APP_PAGE_ID'),
wwv_flow.g_step_title,
trunc(sysdate,'DD'),
systimestamp,
(dbms_utility.get_time-g_start_time)*(.01),
owa_util.get_cgi_env('REMOTE_ADDR'),
owa_util.get_cgi_env('HTTP_USER_AGENT'),
v('APP_SESSION'),
case when v('APP_PAGE_ID') = 24
then v('P24_CONTENT_ID')
else null
end,
case when v('APP_PAGE_ID') = 24
then v('P24_CONTENT_TITLE')
else null
end );
if v('APP_PAGE_ID') = 24 then
insert into eba_oll_content_views
( APEX_USER,
VIEW_DATE,
TS,
IP_ADDRESS,
AGENT,
APEX_SESSION_ID,
CONTENT_ID,
CONTENT_TITLE,
NOTE )
values
( v('APP_USER'),
trunc(sysdate,'DD'),
systimestamp,
owa_util.get_cgi_env('REMOTE_ADDR'),
owa_util.get_cgi_env('HTTP_USER_AGENT'),
v('APP_SESSION'),
v('P24_CONTENT_ID'),
v('P24_CONTENT_TITLE'),
'Viewed' );
end if;
commit;
end log_page_view;
procedure log_content_click
is
begin
insert into eba_oll_content_views
( APEX_USER,
VIEW_DATE,
TS,
IP_ADDRESS,
AGENT,
APEX_SESSION_ID,
CONTENT_ID,
CONTENT_TITLE,
NOTE )
values
( v('APP_USER'),
trunc(sysdate,'DD'),
systimestamp,
owa_util.get_cgi_env('REMOTE_ADDR'),
owa_util.get_cgi_env('HTTP_USER_AGENT'),
v('APP_SESSION'),
v('P24_CONTENT_ID'),
v('P24_CONTENT_TITLE'),
'Launched' );
commit;
end log_content_click;
end eba_oll_log;
create or replace package body eba_oll_api
as
function gen_id
return number
is
l_id number;
begin
select to_number(sys_guid(), 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
into l_id
from dual;
return l_id;
end gen_id;
function eba_oll_tags_cleaner (
p_tags in varchar2,
p_case in varchar2 default 'U' ) return varchar2
is
type tags is table of varchar2(255) index by varchar2(255);
l_tags_a tags;
l_tag varchar2(255);
l_tags apex_application_global.vc_arr2;
l_tags_string varchar2(32767);
i integer;
begin
l_tags := apex_util.string_to_table(p_tags,',');
for i in 1..l_tags.count loop
--remove all whitespace, including tabs, spaces, line feeds and carraige returns with a single space
l_tag := substr(trim(regexp_replace(l_tags(i),'[[:space:]]{1,}',' ')),1,255);
if l_tag is not null and l_tag != ' ' then
if p_case = 'U' then
l_tag := upper(l_tag);
elsif p_case = 'L' then
l_tag := lower(l_tag);
end if;
--add it to the associative array, if it is a duplicate, it will just be replaced
l_tags_a(l_tag) := l_tag;
end if;
end loop;
l_tag := null;
l_tag := l_tags_a.first;
while l_tag is not null loop
l_tags_string := l_tags_string||l_tag;
if l_tag != l_tags_a.last then
l_tags_string := l_tags_string||', ';
end if;
l_tag := l_tags_a.next(l_tag);
end loop;
return substr(l_tags_string,1,4000);
end eba_oll_tags_cleaner;
procedure eba_oll_tag_sync (
p_new_tags in varchar2,
p_old_tags in varchar2,
p_content_type in varchar2,
p_content_id in number )
as
type tags is table of varchar2(255) index by varchar2(255);
l_new_tags_a tags;
l_old_tags_a tags;
l_new_tags apex_application_global.vc_arr2;
l_old_tags apex_application_global.vc_arr2;
l_merge_tags apex_application_global.vc_arr2;
l_dummy_tag varchar2(255);
i integer;
begin
l_old_tags := apex_util.string_to_table(p_old_tags,', ');
l_new_tags := apex_util.string_to_table(p_new_tags,', ');
if l_old_tags.count > 0 then --do inserts and deletes
--build the associative arrays
for i in 1..l_old_tags.count loop
l_old_tags_a(l_old_tags(i)) := l_old_tags(i);
end loop;
for i in 1..l_new_tags.count loop
l_new_tags_a(l_new_tags(i)) := l_new_tags(i);
end loop;
--do the inserts
for i in 1..l_new_tags.count loop
begin
l_dummy_tag := l_old_tags_a(l_new_tags(i));
exception when no_data_found then
insert into eba_oll_tags (tag, content_id, content_type )
values (l_new_tags(i), p_content_id, p_content_type );
l_merge_tags(l_merge_tags.count + 1) := l_new_tags(i);
end;
end loop;
--do the deletes
for i in 1..l_old_tags.count loop
begin
l_dummy_tag := l_new_tags_a(l_old_tags(i));
exception when no_data_found then
delete from eba_oll_tags where content_id = p_content_id and tag = l_old_tags(i);
l_merge_tags(l_merge_tags.count + 1) := l_old_tags(i);
end;
end loop;
else --just do inserts
for i in 1..l_new_tags.count loop
insert into eba_oll_tags (tag, content_id, content_type )
values (l_new_tags(i), p_content_id, p_content_type );
l_merge_tags(l_merge_tags.count + 1) := l_new_tags(i);
end loop;
end if;
for i in 1..l_merge_tags.count loop
merge into eba_oll_tags_type_sum s
using (select count(*) tag_count
from eba_oll_tags
where tag = l_merge_tags(i) and content_type = p_content_type ) t
on (s.tag = l_merge_tags(i) and s.content_type = p_content_type )
when not matched then insert (tag, content_type, tag_count)
values (l_merge_tags(i), p_content_type, t.tag_count)
when matched then update set s.tag_count = t.tag_count;
merge into eba_oll_tags_sum s
using (select sum(tag_count) tag_count
from eba_oll_tags_type_sum
where tag = l_merge_tags(i) ) t
on (s.tag = l_merge_tags(i) )
when not matched then insert (tag, tag_count)
values (l_merge_tags(i), t.tag_count)
when matched then update set s.tag_count = t.tag_count;
end loop;
end eba_oll_tag_sync;
procedure render_tag_cloud (
p_selection in varchar2 default null,
p_app_id in number,
p_session_id in number,
p_min_nbr_tags in number default 1,
p_max in number default 100,
p_limit in number default 10000,
p_link_to_page in varchar2 default '2',
p_tag_item_filter in varchar2 default 'P2_TAGS',
p_clear_cache in varchar2 default '2,CIR,RIR',
p_more_page in varchar2 default '62' )
as
l_printed_records number := 0;
l_available_records number := 20;
l_max number;
l_min number;
l_class_size number;
l_class varchar2(30);
type l_tagtype is table of varchar2(2000);
l_tags l_tagtype;
type l_numtype is table of number;
l_cnts l_numtype;
l_size number;
l_total number :=0;
l_buffer varchar2(32676);
CURSOR c_all_tags
IS
select tag, c from (
select t.tag, count(*) c
from eba_oll_content c,
eba_oll_tags t
where c.content_id = t.content_id
and c.display_yn = 'Y'
and (p_selection is null or
(p_selection is not null and
( (substr(p_selection,1,1) = 'R' and
substr(p_selection,2) in (select release_id
from eba_oll_content_products cp
where cp.content_id = c.content_id))
or (substr(p_selection,1,1) = 'C' and
substr(p_selection,2) in (select product_id
from eba_oll_content_products cp
where cp.content_id = c.content_id))
or (substr(p_selection,1,1) = 'P' and
(substr(p_selection,2) in (select product_id
from eba_oll_content_products cp
where cp.content_id = c.content_id) or
substr(p_selection,2) in (select p.parent_product_id
from eba_oll_content_products cp,
eba_oll_products p
where cp.content_id = c.content_id
and cp.product_id = p.product_id)))
or (substr(p_selection,1,1) = 'G' and
(substr(p_selection,2) in (select pg.group_id
from eba_oll_product_groupings pg,
eba_oll_content_products cp
where pg.product_id = cp.product_id
and cp.content_id = c.content_id) or
substr(p_selection,2) in (select pg.group_id
from eba_oll_product_groupings pg,
eba_oll_products p,
eba_oll_content_products cp
where pg.product_id = p.parent_product_id
and p.product_id = cp.product_id
and cp.content_id = c.content_id)))
group by tag
) x where rownum < p_limit
and c >= p_min_nbr_tags
order by upper(tag) ;
begin
-- Fetch tags into arrays
open c_all_tags;
loop
fetch c_all_tags bulk collect into l_tags,l_cnts limit p_limit;
exit;
end loop;
close c_all_tags;
l_available_records := l_tags.count;
-- Determine total count and maximum tag counts
l_max := 0;
l_min := 1000;
FOR i in l_cnts.first..l_cnts.last loop
l_total := l_total + l_cnts(i);
if l_cnts(i) > l_max then
l_max := l_cnts(i);
end if;
if l_cnts(i) < l_min then
l_min := l_cnts(i);
end if;
end loop;
if l_max = 0 then l_max := 1; end if;
l_class_size := round((l_max-l_min)/6);
-- Generate tag cloud --
sys.htp.prn('<div class="tagCloud"><ul>');
for i in l_tags.first..l_tags.last loop
l_printed_records := l_printed_records + 1;
if l_cnts(i) < l_min + l_class_size then
l_class := 'size1';
elsif l_cnts(i) < l_min + (l_class_size*2) then
l_class := 'size2';
elsif l_cnts(i) < l_min + (l_class_size*3) then
l_class := 'size3';
elsif l_cnts(i) < l_min + (l_class_size*4) then
l_class := 'size4';
elsif l_cnts(i) < l_min + (l_class_size*5) then
l_class := 'size5';
else l_class := 'size6';
end if;
l_buffer := '<li><a class="'||l_class||'" href="'||
'f?p='||p_app_id||':'||p_link_to_page||':'||p_session_id||':::'||p_clear_cache||':'||
p_tag_item_filter||':'||htf.escape_sc(l_tags(i))||'">'||
htf.escape_sc(l_tags(i)) || '<span>' || l_cnts(i) || '</span></a></li>';
sys.htp.prn(l_buffer);
l_buffer := '';
if l_printed_records > p_max then
exit;
end if;
end loop;
sys.htp.prn('</ul></div>');
-- print if there's more
if l_tags.count - l_printed_records != 0 then
htp.prn('<p><a href="f?p='||p_app_id||':'||htf.escape_sc(p_more_page)||
':'||p_session_id||':::'||htf.escape_sc(p_more_page)||'">View all tags</a></p>');
end if;
exception when others then
sys.htp.prn('<p>No tags found.</p>');
end render_tag_cloud;
procedure email_when_feedback (
p_feedback_id in number,
p_host_url in varchar2,
p_app_id in number )
is
l_body clob;
l_body_html clob;
begin
for c1 in (
select f.feedback_comment, f.feedback_by,
c.title, nvl(ct.feedback_contacts,'[email protected]') email
from eba_oll_content_feedback f,
eba_oll_content c,
eba_oll_team ct
where f.id = p_feedback_id
and f.content_id = c.content_id
and c.team_id = ct.team_id (+) )
loop
l_body := 'You have received feedback for a piece of content you own in the Oracle Learning Library (OLL) Application.
Content: '|| c1.title || utl_tcp.crlf || '
Feedback: '|| c1.feedback_comment || utl_tcp.crlf || '
Left by: '|| lower(c1.feedback_by) ||'
You can respond via the OLL Application, '||p_host_url||'f?p='||p_app_id||':47:::NO::P47_ID:' || p_feedback_id || '.';
l_body_html := '<div style="border: 1px solid #DDD; background-color: #F8F8F8; width: 460px; margin: 0 auto; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding: 20px;">
<p style="font: bold 12px/16px Arial, sans-serif; margin: 0 0 10px 0; padding: 0;">
You have received feedback for a piece of content you own in the Oracle Learning Library (OLL) Application.
</p>
<table style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Content</td>
<td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;"><a href="#" style="color: #000">'||c1.title||'</a></td>
</tr>
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Feedback</td>
<td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.feedback_comment,CHR(10),'<br/>')||'</td>
</tr>
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Left by</td>
<td style="font: bold 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||lower(c1.feedback_by)||'</td>
</tr>
<tr>' || utl_tcp.crlf || '
<td colspan="2" style="text-align: center; font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">
<a href="'||p_host_url||'f?p='||p_app_id||':47:::NO::P47_ID:' || p_feedback_id ||'" style="display: block; padding: 10px; background-color: #EEE; font: bold 16px/16px Arial, sans-serif; color: #444">Respond to this Feedback</a>
</td>
</tr>
</table>
</div>';
apex_mail.send (
p_to => c1.email,
p_from => '[email protected]',
p_subj => 'OLL - New Feedback for your team',
p_body => l_body,
p_body_html => l_body_html );
end loop;
end email_when_feedback;
procedure email_when_response (
p_feedback_id in number,
p_host_url in varchar2,
p_app_id in number )
is
l_body clob;
l_body_html clob;
begin
for c1 in (
select f.feedback_comment, f.feedback_by, f.response, c.title
from eba_oll_content_feedback f,
eba_oll_content c
where f.id = p_feedback_id
and f.content_id = c.content_id )
loop
l_body := 'You have received a response to your feedback left in the Oracle Learning Library (OLL) Application.
Content: '|| c1.title || '
Feedback: '|| c1.feedback_comment || '
Response: '|| c1.response || '
You can also view this response via the OLL Application, '||p_host_url||'f?p='||p_app_id||':60:::NO::IR_ID:' || p_feedback_id || '.';
l_body_html := '<div style="border: 1px solid #DDD; background-color: #F8F8F8; width: 460px; margin: 0 auto; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding: 20px;">
<p style="font: bold 12px/16px Arial, sans-serif; margin: 0 0 10px 0; padding: 0;">
You have received a response to your feedback left in the Oracle Learning Library (OLL) Application.
</p>
<table style="width: 100%;" cellspacing="0" cellpadding="0" border="0">
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Content</td>
<td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;"><a href="#" style="color: #000">'||c1.title||'</a></td>
</tr>
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Feedback</td>
<td style="font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.feedback_comment,CHR(10),'<br/>')||'</td>
</tr>
<tr>' || utl_tcp.crlf || '
<td style="font: bold 12px/16px Arial, sans-serif; color: #666; padding: 0 10px 10px 0; vertical-align: top;">Response</td>
<td style="font: bold 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">'||replace(c1.response,CHR(10),'<br/>')||'</td>
</tr>
<tr>' || utl_tcp.crlf || '
<td colspan="2" style="text-align: center; font: normal 12px/16px Arial, sans-serif; padding: 0 10px 10px 0; vertical-align: top;">
<a href="'||p_host_url||'f?p='||p_app_id||':60:::NO::IR_ID:' || p_feedback_id ||'" style="display: block; padding: 10px; background-color: #EEE; font: bold 16px/16px Arial, sans-serif; color: #444">View Response in OLL Application</a>
</td>
</tr>
</table>
</div>';
apex_mail.send (
p_to => c1.feedback_by,
p_from => '[email protected]',
p_subj => 'Oracle Learning Library - Response to your Feedback',
p_body => l_body,
p_body_html => l_body_html );
end loop;
end email_when_response;
end eba_oll_api;
/Error at line 274: PLS-00201: identifier 'UTL_TCP' must be declared
Edited by: Fateh on Jan 13, 2012 7:32 AMThanks & Sorry for not mentioning the full information about my environment.
it was:
Oracle 11g xe R2 on Windows 7 machine
Apex listener deployed on Glass Fish server 3.1 on Windows 7 machine
Apex 4.1
Google Chrome
So, to have OLL application worked locally . we need the following:
grant execute on utl_tcp to [your_schema_name]And to
Configure an Application Express Application as a Partner Application in Oracle AS Single Sign-On http://www.oracle.com/technetwork/testcontent/sso-partner-app-100552.html.
I think I am going to install on my work space on apex.oracle.com.
Regards,
Fateh
Edited by: Fateh on Jan 15, 2012 9:38 AM -
Following on from the previous problem I had with Error 33331, we moved the application to a new APEX installation. Everything was fine for 30 mintes until
we started getting this error :-
PLS-00306: wrong number or types of arguments in call to 'SHOW'
I've put in tracing in the httpd.conf file at info level and switched on mod_plsql tracing. Everything went fine for another 40 minutes but we're now getting the same errors, the following is one of the mod_plsql trace files.
I have a hunch caching is at the root of the problem ?
<5952 ms>[ReqStartTime: 6/Feb/2008:16:13:59]
<5952 ms>Request ID ReqID:528620_1202314439
<5953 ms>Connecting to database with connect string : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mohawk)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=htmldb_p.world)))"
<5975 ms>Doing alter session set nls_language= "AMERICAN" nls_territory= "AMERICA"
<5975 ms>OpenCursor
<5976 ms>Altered session to nls_language=AMERICAN nls_territory=AMERICA
<5976 ms>DeinitCursor
<5976 ms>OpenCursor
<5977 ms>Status 1 (rc=0)
<5977 ms>DeinitCursor
<5977 ms>OpenCursor
<5978 ms>DBCharSet is AMERICAN_AMERICA.WE8ISO8859P1, OWAVersion 10.1.2.0.0, 1001020000 (rc=0)
<5978 ms>DeinitCursor
<5978 ms>OpenCursor
<5978 ms>(wpd.c,1765) Logged in as (unknown)
<5978 ms>(wpx.c,598) Going to select...
<5978 ms>(wpx.c,652) Have been asked to execute a request
<5978 ms>(wppa.c,334) Building Arglist based on Parsed Content from WRB
<5978 ms>(wppa.c,1016) Enter ParseUrlData
<5978 ms>POST
<5978 ms>(wpu.c,257) Attempting to read 147 bytes
<5978 ms>(wpu.c,262) We read 147, had 0, to get 0 bytes
<5978 ms>[headers begin]
<5978 ms>[headers end]
<5978 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=2989139092861589&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=
<5978 ms>[form_data]
<5978 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=2989139092861589&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=
<5978 ms>(wppa.c,1523) indx = 6, entryCnt = 6
<5978 ms>(wppa.c,1844) Listing distinct actual names:
<5978 ms>(wppa.c,1846) p_request
<5978 ms>(wppa.c,1846) p_instance
<5978 ms>(wppa.c,1846) p_flow_id
<5978 ms>(wppa.c,1846) p_flow_step_id
<5978 ms>(wppa.c,1846) p_arg_names
<5978 ms>(wppa.c,1846) p_arg_values
<5978 ms>(wppa.c,1848) Listing actuals of array with large entries:
<5978 ms>(wppa.c,1853) Listing distinct actual names and values:
<5978 ms>(wppa.c,1885) p_request, type = 0, value (35) = APPLICATION_PROCESS=get_Level23XML
<5978 ms>(wppa.c,1885) p_instance, type = 0, value (17) = 2989139092861589
<5978 ms>(wppa.c,1885) p_flow_id, type = 0, value (5) = 1122
<5978 ms>(wppa.c,1885) p_flow_step_id, type = 0, value (2) = 0
<5978 ms>(wppa.c,1885) p_arg_names, type = 0, value (15) = TEMPORARY_ITEM
<5978 ms>(wppa.c,1885) p_arg_values, type = 0, value (1) =
<5978 ms>(wppa.c,429) Arglist built, 6 unique entries
<5978 ms>(wpx.c,659) Going to wpprodb_OciDoBlock...
<5978 ms>(wpd.c,2750) Cache enabled. Gathering cache information.
<5978 ms>(wpd.c,2768) Language for this request is en-gb
<5978 ms>(wpd.c,2819) Using user APEX_PUBLIC_USER for caching.
<5978 ms>cache: Checking for user level hit
<5979 ms>cache: Cache MISS user - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/073/9629
<5979 ms>cache: Checking for system level hit
<5979 ms>cache: Cache MISS system - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/sys/374/2755
<5979 ms>(wppr.c,460) start working with wwv_flow.show
<5979 ms>(wppr.c,1164) The CALL block: len=1115, bind_count=14
declare
rc__ number;
start_time__ binary_integer;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
start_time__ := dbms_utility.get_time;
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 63;
null;
null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms\_%';
simple_list__(3) := 'utl\_%';
simple_list__(4) := 'owa\_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
if ((owa_match.match_pattern('wwv_flow.show', simple_list__, complex_list__, true))) then
rc__ := 2;
else
null;
null;
wwv_flow.show(p_request=>:p_request,p_instance=>:p_instance,p_flow_id=>:p_flow_id,p_flow_step_id=>:p_flow_step_id,p_arg_names=>:p_arg_names,p_arg_values=>:p_arg_values);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
end if;
:rc__ := rc__;
:db_proc_time__ := dbms_utility.get_time - start_time__;
end;
<5979 ms>(wppr.c,520) Pl/sql block parsed...
<5979 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<5979 ms> PLSQL_GATEWAY(14)=(6)WebDb
<5979 ms> GATEWAY_IVERSION(17)=(2)2
<5979 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<5979 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<5979 ms> SERVER_PORT(12)=(5)7777
<5979 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<5979 ms> REQUEST_METHOD(15)=(5)POST
<5979 ms> PATH_INFO(10)=(15)/wwv_flow.show
<5979 ms> SCRIPT_NAME(12)=(10)/pls/apex
<5979 ms> REMOTE_ADDR(12)=(9)10.0.2.0
<5979 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<5979 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<5979 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<5979 ms> HTTP_CONTENT_LENGTH(20)=(4)147
<5979 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<5979 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<5979 ms> HTTP_HOST(10)=(12)mohawk:7777
<5979 ms> HTTP_ACCEPT(12)=(4)*/*
<5979 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<5979 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<5979 ms> HTTP_REFERER(13)=(123)http://mohawk:7777/pls/apex/f?p=1122:1:2989139092861589::::F101_CACHED_NTID,P1_STRADNAME,P2_STRADNAME:sw2802,sw2802,sw2802
<5979 ms> HTTP_ORACLE_ECID(17)=(36)1202314439:10.30.96.8:528620:0:22,0
<5979 ms> WEB_AUTHENT_PREFIX(19)=(1)
<5979 ms> DAD_NAME(9)=(5)apex
<5979 ms> DOC_ACCESS_PATH(16)=(5)docs
<5979 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<5979 ms> PATH_ALIAS(11)=(1)
<5979 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<5979 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<5979 ms> SCRIPT_PREFIX(14)=(5)/pls
<5979 ms>StrArrPosBind pos 2 Charset Id : 873
<5979 ms>StrArrPosBind pos 3 Charset Id : 873
<5979 ms>StrArrPosBind pos 11 Charset Id : 873
<5984 ms>Execute: ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<5984 ms>(wppr.c,640) Execute:declare
objnum NUMBER;
objtyp NUMBER;
prename VARCHAR2(31);
name VARCHAR(31);
subname VARCHAR(31);
dblnk VARCHAR(31);
begin
dbms_utility.name_resolve(:objname, 1, prename, name, subname,
dblnk, objtyp, objnum);
if (name is null) then
sys.wpiutl.subpparam(objnum,subname,null,prename,:2,:3,:4,:5,:6,:7);
else
sys.wpiutl.subpparam(objnum,name,subname,prename,:2,:3,:4,:5,:6,:7);
end if;
exception
when others then :5 := 1;
end;
<5984 ms>(wppr.c,660) 6 parameter names
<5984 ms>StrArrPosBind pos 2 Charset Id : 873
<5984 ms>StrArrPosBind pos 3 Charset Id : 873
<5984 ms>StrArrPosBind pos 4 Charset Id : 873
<5985 ms>(wppr.c,704) misdefl=0, nenamei=0
<5985 ms>(wppr.c,744) print list of name, types, typeflags
<5985 ms>(wppr.c,797) parameter name: P_REQUEST, type: VARCHAR2, typeflags: 000
<5985 ms>(wppr.c,797) parameter name: P_INSTANCE, type: VARCHAR2, typeflags: 000
<5985 ms>(wppr.c,797) parameter name: P_FLOW_ID, type: VARCHAR2, typeflags: 000
<5985 ms>(wppr.c,797) parameter name: P_FLOW_STEP_ID, type: VARCHAR2, typeflags: 000
<5985 ms>(wppr.c,759) Array graduation (1=>4, 15=>32)
<5985 ms>(wppr.c,797) parameter name: P_ARG_NAMES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<5985 ms>(wppr.c,759) Array graduation (1=>4, 1=>32)
<5985 ms>(wppr.c,797) parameter name: P_ARG_VALUES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<5985 ms>(wppr.c,520) Pl/sql block parsed...
<5985 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<5985 ms> PLSQL_GATEWAY(14)=(6)WebDb
<5985 ms> GATEWAY_IVERSION(17)=(2)2
<5985 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<5985 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<5985 ms> SERVER_PORT(12)=(5)7777
<5985 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<5985 ms> REQUEST_METHOD(15)=(5)POST
<5985 ms> PATH_INFO(10)=(15)/wwv_flow.show
<5985 ms> SCRIPT_NAME(12)=(10)/pls/apex
<5985 ms> REMOTE_ADDR(12)=(9)10.0.2.0
<5985 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<5985 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<5985 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<5985 ms> HTTP_CONTENT_LENGTH(20)=(4)147
<5985 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<5985 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<5985 ms> HTTP_HOST(10)=(12)mohawk:7777
<5985 ms> HTTP_ACCEPT(12)=(4)*/*
<5985 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<5985 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<5985 ms> HTTP_REFERER(13)=(123)http://mohawk:7777/pls/apex/f?p=1122:1:2989139092861589::::F101_CACHED_NTID,P1_STRADNAME,P2_STRADNAME:sw2802,sw2802,sw2802
<5985 ms> HTTP_ORACLE_ECID(17)=(36)1202314439:10.30.96.8:528620:0:22,0
<5985 ms> WEB_AUTHENT_PREFIX(19)=(1)
<5985 ms> DAD_NAME(9)=(5)apex
<5985 ms> DOC_ACCESS_PATH(16)=(5)docs
<5985 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<5985 ms> PATH_ALIAS(11)=(1)
<5985 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<5985 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<5985 ms> SCRIPT_PREFIX(14)=(5)/pls
<5985 ms>StrArrPosBind pos 2 Charset Id : 873
<5985 ms>StrArrPosBind pos 3 Charset Id : 873
<5985 ms>StrArrPosBind pos 8 Charset Id : 873
<5985 ms>StrArrPosBind pos 9 Charset Id : 873
<5985 ms>StrArrPosBind pos 11 Charset Id : 873
<5990 ms>ORA-6550 Execute ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<5991 ms>/pls/apex/wwv_flow.show HTTP-404 ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<5991 ms>(wpu.c,595) longjumping back to the beginning
<5991 ms>(wpu.c,458) cleaning up before longjmp
<5991 ms>(wpu.c,462) doing a rollback
<5991 ms>(wpcs.c, 77) Executed 'rollback' (rc=0)
<5991 ms>(wpcs.c, 77) Executed 'begin dbms_session.reset_package; end;' (rc=0)
<5991 ms>(wpd.c,1820) Going to close cursor
<5991 ms>DeinitCursor
<5991 ms>(wpx.c,693) Shutdown has been called
<5991 ms>(wpx.c,705) Going to logoff
<5991 ms>Logoff: Pooling this connection
<5991 ms>[ReqEndtime: 6/Feb/2008:16:13:59]
<5991 ms>[ReqExecTime: 39 ms]
<3240798667 ms>[ReqStartTime: 6/Feb/2008:16:14:06]
<3240798667 ms>Request ID ReqID:528620_1202314446
<3240798667 ms>Connecting to database with connect string : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mohawk)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=htmldb_p.world)))"
<3240798667 ms>OpenCursor
<3240798667 ms>(wpd.c,1765) Logged in as (unknown)
<3240798667 ms>(wpx.c,598) Going to select...
<3240798667 ms>(wpx.c,652) Have been asked to execute a request
<3240798667 ms>(wppa.c,334) Building Arglist based on Parsed Content from WRB
<3240798667 ms>(wppa.c,1016) Enter ParseUrlData
<3240798667 ms>POST
<3240798667 ms>(wpu.c,257) Attempting to read 147 bytes
<3240798667 ms>(wpu.c,262) We read 147, had 0, to get 0 bytes
<3240798667 ms>[headers begin]
<3240798667 ms>[headers end]
<3240798667 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=2989139092861589&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=
<3240798667 ms>[form_data]
<3240798667 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=2989139092861589&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=
<3240798667 ms>(wppa.c,1523) indx = 6, entryCnt = 6
<3240798667 ms>(wppa.c,1844) Listing distinct actual names:
<3240798667 ms>(wppa.c,1846) p_request
<3240798667 ms>(wppa.c,1846) p_instance
<3240798667 ms>(wppa.c,1846) p_flow_id
<3240798667 ms>(wppa.c,1846) p_flow_step_id
<3240798667 ms>(wppa.c,1846) p_arg_names
<3240798667 ms>(wppa.c,1846) p_arg_values
<3240798668 ms>(wppa.c,1848) Listing actuals of array with large entries:
<3240798668 ms>(wppa.c,1853) Listing distinct actual names and values:
<3240798668 ms>(wppa.c,1885) p_request, type = 0, value (35) = APPLICATION_PROCESS=get_Level23XML
<3240798668 ms>(wppa.c,1885) p_instance, type = 0, value (17) = 2989139092861589
<3240798668 ms>(wppa.c,1885) p_flow_id, type = 0, value (5) = 1122
<3240798668 ms>(wppa.c,1885) p_flow_step_id, type = 0, value (2) = 0
<3240798668 ms>(wppa.c,1885) p_arg_names, type = 0, value (15) = TEMPORARY_ITEM
<3240798668 ms>(wppa.c,1885) p_arg_values, type = 0, value (1) =
<3240798668 ms>(wppa.c,429) Arglist built, 6 unique entries
<3240798668 ms>(wpx.c,659) Going to wpprodb_OciDoBlock...
<3240798668 ms>(wpd.c,2750) Cache enabled. Gathering cache information.
<3240798668 ms>(wpd.c,2768) Language for this request is en-gb
<3240798668 ms>(wpd.c,2819) Using user APEX_PUBLIC_USER for caching.
<3240798668 ms>cache: Checking for user level hit
<3240798668 ms>cache: Cache MISS user - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/073/9629
<3240798668 ms>cache: Checking for system level hit
<3240798668 ms>cache: Cache MISS system - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/sys/374/2755
<3240798668 ms>(wppr.c,460) start working with wwv_flow.show
<3240798668 ms>(wppr.c,1164) The CALL block: len=1115, bind_count=14
declare
rc__ number;
start_time__ binary_integer;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
start_time__ := dbms_utility.get_time;
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 63;
null;
null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms\_%';
simple_list__(3) := 'utl\_%';
simple_list__(4) := 'owa\_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
if ((owa_match.match_pattern('wwv_flow.show', simple_list__, complex_list__, true))) then
rc__ := 2;
else
null;
null;
wwv_flow.show(p_request=>:p_request,p_instance=>:p_instance,p_flow_id=>:p_flow_id,p_flow_step_id=>:p_flow_step_id,p_arg_names=>:p_arg_names,p_arg_values=>:p_arg_values);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
end if;
:rc__ := rc__;
:db_proc_time__ := dbms_utility.get_time - start_time__;
end;
<3240798668 ms>(wppr.c,520) Pl/sql block parsed...
<3240798668 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<3240798668 ms> PLSQL_GATEWAY(14)=(6)WebDb
<3240798668 ms> GATEWAY_IVERSION(17)=(2)3
<3240798668 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<3240798668 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<3240798668 ms> SERVER_PORT(12)=(5)7777
<3240798668 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<3240798668 ms> REQUEST_METHOD(15)=(5)POST
<3240798668 ms> PATH_INFO(10)=(15)/wwv_flow.show
<3240798668 ms> SCRIPT_NAME(12)=(10)/pls/apex
<3240798668 ms> REMOTE_ADDR(12)=(9)10.0.2.0
<3240798668 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<3240798668 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<3240798668 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<3240798668 ms> HTTP_CONTENT_LENGTH(20)=(4)147
<3240798668 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<3240798668 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<3240798668 ms> HTTP_HOST(10)=(12)mohawk:7777
<3240798668 ms> HTTP_ACCEPT(12)=(4)*/*
<3240798668 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<3240798668 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<3240798668 ms> HTTP_REFERER(13)=(123)http://mohawk:7777/pls/apex/f?p=1122:1:2989139092861589::::F101_CACHED_NTID,P1_STRADNAME,P2_STRADNAME:sw2802,sw2802,sw2802
<3240798668 ms> HTTP_ORACLE_ECID(17)=(36)1202314446:10.30.96.8:528620:0:35,0
<3240798668 ms> WEB_AUTHENT_PREFIX(19)=(1)
<3240798668 ms> DAD_NAME(9)=(5)apex
<3240798668 ms> DOC_ACCESS_PATH(16)=(5)docs
<3240798668 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<3240798668 ms> PATH_ALIAS(11)=(1)
<3240798668 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<3240798668 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<3240798668 ms> SCRIPT_PREFIX(14)=(5)/pls
<3240798668 ms>StrArrPosBind pos 2 Charset Id : 873
<3240798668 ms>StrArrPosBind pos 3 Charset Id : 873
<3240798668 ms>StrArrPosBind pos 11 Charset Id : 873
<3240798673 ms>Execute: ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240798673 ms>(wppr.c,640) Execute:declare
objnum NUMBER;
objtyp NUMBER;
prename VARCHAR2(31);
name VARCHAR(31);
subname VARCHAR(31);
dblnk VARCHAR(31);
begin
dbms_utility.name_resolve(:objname, 1, prename, name, subname,
dblnk, objtyp, objnum);
if (name is null) then
sys.wpiutl.subpparam(objnum,subname,null,prename,:2,:3,:4,:5,:6,:7);
else
sys.wpiutl.subpparam(objnum,name,subname,prename,:2,:3,:4,:5,:6,:7);
end if;
exception
when others then :5 := 1;
end;
<3240798673 ms>(wppr.c,660) 6 parameter names
<3240798673 ms>StrArrPosBind pos 2 Charset Id : 873
<3240798673 ms>StrArrPosBind pos 3 Charset Id : 873
<3240798673 ms>StrArrPosBind pos 4 Charset Id : 873
<3240798674 ms>(wppr.c,704) misdefl=0, nenamei=0
<3240798674 ms>(wppr.c,744) print list of name, types, typeflags
<3240798674 ms>(wppr.c,797) parameter name: P_REQUEST, type: VARCHAR2, typeflags: 000
<3240798674 ms>(wppr.c,797) parameter name: P_INSTANCE, type: VARCHAR2, typeflags: 000
<3240798674 ms>(wppr.c,797) parameter name: P_FLOW_ID, type: VARCHAR2, typeflags: 000
<3240798674 ms>(wppr.c,797) parameter name: P_FLOW_STEP_ID, type: VARCHAR2, typeflags: 000
<3240798674 ms>(wppr.c,759) Array graduation (1=>4, 15=>32)
<3240798674 ms>(wppr.c,797) parameter name: P_ARG_NAMES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<3240798674 ms>(wppr.c,759) Array graduation (1=>4, 1=>32)
<3240798674 ms>(wppr.c,797) parameter name: P_ARG_VALUES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<3240798674 ms>(wppr.c,520) Pl/sql block parsed...
<3240798674 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<3240798674 ms> PLSQL_GATEWAY(14)=(6)WebDb
<3240798674 ms> GATEWAY_IVERSION(17)=(2)3
<3240798674 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<3240798674 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<3240798674 ms> SERVER_PORT(12)=(5)7777
<3240798674 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<3240798674 ms> REQUEST_METHOD(15)=(5)POST
<3240798674 ms> PATH_INFO(10)=(15)/wwv_flow.show
<3240798674 ms> SCRIPT_NAME(12)=(10)/pls/apex
<3240798674 ms> REMOTE_ADDR(12)=(9)10.0.2.0
<3240798674 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<3240798674 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<3240798674 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<3240798674 ms> HTTP_CONTENT_LENGTH(20)=(4)147
<3240798674 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<3240798674 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<3240798674 ms> HTTP_HOST(10)=(12)mohawk:7777
<3240798674 ms> HTTP_ACCEPT(12)=(4)*/*
<3240798674 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<3240798674 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<3240798674 ms> HTTP_REFERER(13)=(123)http://mohawk:7777/pls/apex/f?p=1122:1:2989139092861589::::F101_CACHED_NTID,P1_STRADNAME,P2_STRADNAME:sw2802,sw2802,sw2802
<3240798674 ms> HTTP_ORACLE_ECID(17)=(36)1202314446:10.30.96.8:528620:0:35,0
<3240798674 ms> WEB_AUTHENT_PREFIX(19)=(1)
<3240798674 ms> DAD_NAME(9)=(5)apex
<3240798674 ms> DOC_ACCESS_PATH(16)=(5)docs
<3240798674 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<3240798674 ms> PATH_ALIAS(11)=(1)
<3240798674 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<3240798674 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<3240798674 ms> SCRIPT_PREFIX(14)=(5)/pls
<3240798674 ms>StrArrPosBind pos 2 Charset Id : 873
<3240798674 ms>StrArrPosBind pos 3 Charset Id : 873
<3240798675 ms>StrArrPosBind pos 8 Charset Id : 873
<3240798675 ms>StrArrPosBind pos 9 Charset Id : 873
<3240798675 ms>StrArrPosBind pos 11 Charset Id : 873
<3240798679 ms>ORA-6550 Execute ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240798680 ms>/pls/apex/wwv_flow.show HTTP-404 ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240798680 ms>(wpu.c,595) longjumping back to the beginning
<3240798680 ms>(wpu.c,458) cleaning up before longjmp
<3240798680 ms>(wpu.c,462) doing a rollback
<3240798680 ms>(wpcs.c, 77) Executed 'rollback' (rc=0)
<3240798680 ms>(wpcs.c, 77) Executed 'begin dbms_session.reset_package; end;' (rc=0)
<3240798680 ms>(wpd.c,1820) Going to close cursor
<3240798680 ms>DeinitCursor
<3240798680 ms>(wpx.c,693) Shutdown has been called
<3240798680 ms>(wpx.c,705) Going to logoff
<3240798680 ms>Logoff: Pooling this connection
<3240798680 ms>[ReqEndtime: 6/Feb/2008:16:14:06]
<3240798680 ms>[ReqExecTime: 13 ms]
<3240796167 ms>[ReqStartTime: 6/Feb/2008:16:23:03]
<3240796167 ms>Request ID ReqID:528620_1202314983
<3240796167 ms>Connecting to database with connect string : "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mohawk)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=htmldb_p.world)))"
<3240796167 ms>OpenCursor
<3240796167 ms>(wpd.c,1765) Logged in as (unknown)
<3240796168 ms>(wpx.c,598) Going to select...
<3240796168 ms>(wpx.c,652) Have been asked to execute a request
<3240796168 ms>(wppa.c,334) Building Arglist based on Parsed Content from WRB
<3240796168 ms>(wppa.c,1016) Enter ParseUrlData
<3240796168 ms>POST
<3240796168 ms>(wpu.c,257) Attempting to read 162 bytes
<3240796168 ms>(wpu.c,262) We read 162, had 0, to get 0 bytes
<3240796168 ms>[headers begin]
<3240796168 ms>[headers end]
<3240796168 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=1776222419881214&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=Balance%20query
<3240796168 ms>[form_data]
<3240796168 ms>p_request=APPLICATION_PROCESS%3Dget_Level23XML&p_instance=1776222419881214&p_flow_id=1122&p_flow_step_id=0&p_arg_names=TEMPORARY_ITEM&p_arg_values=Balance%20query
<3240796168 ms>(wppa.c,1523) indx = 6, entryCnt = 6
<3240796168 ms>(wppa.c,1844) Listing distinct actual names:
<3240796168 ms>(wppa.c,1846) p_request
<3240796168 ms>(wppa.c,1846) p_instance
<3240796168 ms>(wppa.c,1846) p_flow_id
<3240796168 ms>(wppa.c,1846) p_flow_step_id
<3240796168 ms>(wppa.c,1846) p_arg_names
<3240796168 ms>(wppa.c,1846) p_arg_values
<3240796168 ms>(wppa.c,1848) Listing actuals of array with large entries:
<3240796168 ms>(wppa.c,1853) Listing distinct actual names and values:
<3240796168 ms>(wppa.c,1885) p_request, type = 0, value (35) = APPLICATION_PROCESS=get_Level23XML
<3240796168 ms>(wppa.c,1885) p_instance, type = 0, value (17) = 1776222419881214
<3240796168 ms>(wppa.c,1885) p_flow_id, type = 0, value (5) = 1122
<3240796168 ms>(wppa.c,1885) p_flow_step_id, type = 0, value (2) = 0
<3240796168 ms>(wppa.c,1885) p_arg_names, type = 0, value (15) = TEMPORARY_ITEM
<3240796168 ms>(wppa.c,1885) p_arg_values, type = 0, value (14) = Balance query
<3240796168 ms>(wppa.c,429) Arglist built, 6 unique entries
<3240796168 ms>(wpx.c,659) Going to wpprodb_OciDoBlock...
<3240796168 ms>(wpd.c,2750) Cache enabled. Gathering cache information.
<3240796168 ms>(wpd.c,2768) Language for this request is en-gb
<3240796168 ms>(wpd.c,2819) Using user APEX_PUBLIC_USER for caching.
<3240796168 ms>cache: Checking for user level hit
<3240796168 ms>cache: Cache MISS user - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/022/4760
<3240796168 ms>cache: Checking for system level hit
<3240796168 ms>cache: Cache MISS system - /u01/app/oracle/product/10.2.0.1_html/Apache/modplsql/cache/plsql/sys/341/1694
<3240796168 ms>(wppr.c,460) start working with wwv_flow.show
<3240796168 ms>(wppr.c,1164) The CALL block: len=1115, bind_count=14
declare
rc__ number;
start_time__ binary_integer;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
start_time__ := dbms_utility.get_time;
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := 63;
null;
null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms\_%';
simple_list__(3) := 'utl\_%';
simple_list__(4) := 'owa\_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
if ((owa_match.match_pattern('wwv_flow.show', simple_list__, complex_list__, true))) then
rc__ := 2;
else
null;
null;
wwv_flow.show(p_request=>:p_request,p_instance=>:p_instance,p_flow_id=>:p_flow_id,p_flow_step_id=>:p_flow_step_id,p_arg_names=>:p_arg_names,p_arg_values=>:p_arg_values);
if (wpg_docload.is_file_download) then
rc__ := 1;
wpg_docload.get_download_file(:doc_info);
null;
null;
null;
commit;
else
rc__ := 0;
null;
null;
null;
commit;
owa.get_page(:data__,:ndata__);
end if;
end if;
:rc__ := rc__;
:db_proc_time__ := dbms_utility.get_time - start_time__;
end;
<3240796168 ms>(wppr.c,520) Pl/sql block parsed...
<3240796168 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<3240796168 ms> PLSQL_GATEWAY(14)=(6)WebDb
<3240796168 ms> GATEWAY_IVERSION(17)=(2)3
<3240796168 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<3240796168 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<3240796168 ms> SERVER_PORT(12)=(5)7777
<3240796168 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<3240796168 ms> REQUEST_METHOD(15)=(5)POST
<3240796168 ms> PATH_INFO(10)=(15)/wwv_flow.show
<3240796168 ms> SCRIPT_NAME(12)=(10)/pls/apex
<3240796168 ms> REMOTE_ADDR(12)=(12)10.0.10.222
<3240796168 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<3240796168 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<3240796168 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<3240796168 ms> HTTP_CONTENT_LENGTH(20)=(4)162
<3240796168 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<3240796168 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<3240796168 ms> HTTP_HOST(10)=(12)mohawk:7777
<3240796168 ms> HTTP_ACCEPT(12)=(4)*/*
<3240796168 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<3240796168 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<3240796168 ms> HTTP_REFERER(13)=(61)http://mohawk:7777/pls/apex/f?p=1122:1:1776222419881214:::::
<3240796168 ms> HTTP_ORACLE_ECID(17)=(36)1202314983:10.30.96.8:528620:0:63,0
<3240796168 ms> WEB_AUTHENT_PREFIX(19)=(1)
<3240796168 ms> DAD_NAME(9)=(5)apex
<3240796168 ms> DOC_ACCESS_PATH(16)=(5)docs
<3240796168 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<3240796168 ms> PATH_ALIAS(11)=(1)
<3240796168 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<3240796168 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<3240796168 ms> SCRIPT_PREFIX(14)=(5)/pls
<3240796168 ms>StrArrPosBind pos 2 Charset Id : 873
<3240796168 ms>StrArrPosBind pos 3 Charset Id : 873
<3240796168 ms>StrArrPosBind pos 11 Charset Id : 873
<3240796174 ms>Execute: ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240796174 ms>(wppr.c,640) Execute:declare
objnum NUMBER;
objtyp NUMBER;
prename VARCHAR2(31);
name VARCHAR(31);
subname VARCHAR(31);
dblnk VARCHAR(31);
begin
dbms_utility.name_resolve(:objname, 1, prename, name, subname,
dblnk, objtyp, objnum);
if (name is null) then
sys.wpiutl.subpparam(objnum,subname,null,prename,:2,:3,:4,:5,:6,:7);
else
sys.wpiutl.subpparam(objnum,name,subname,prename,:2,:3,:4,:5,:6,:7);
end if;
exception
when others then :5 := 1;
end;
<3240796174 ms>(wppr.c,660) 6 parameter names
<3240796174 ms>StrArrPosBind pos 2 Charset Id : 873
<3240796174 ms>StrArrPosBind pos 3 Charset Id : 873
<3240796174 ms>StrArrPosBind pos 4 Charset Id : 873
<3240796176 ms>(wppr.c,704) misdefl=0, nenamei=0
<3240796176 ms>(wppr.c,744) print list of name, types, typeflags
<3240796176 ms>(wppr.c,797) parameter name: P_REQUEST, type: VARCHAR2, typeflags: 000
<3240796176 ms>(wppr.c,797) parameter name: P_INSTANCE, type: VARCHAR2, typeflags: 000
<3240796176 ms>(wppr.c,797) parameter name: P_FLOW_ID, type: VARCHAR2, typeflags: 000
<3240796176 ms>(wppr.c,797) parameter name: P_FLOW_STEP_ID, type: VARCHAR2, typeflags: 000
<3240796176 ms>(wppr.c,759) Array graduation (1=>4, 15=>32)
<3240796176 ms>(wppr.c,797) parameter name: P_ARG_NAMES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<3240796176 ms>(wppr.c,759) Array graduation (1=>4, 14=>32)
<3240796176 ms>(wppr.c,797) parameter name: P_ARG_VALUES, type: FLOWS_030000.WWV_FLOW_GLOBAL.VC_ARR2, typeflags: 001
<3240796176 ms>(wppr.c,520) Pl/sql block parsed...
<3240796176 ms>(wpdenv.c,1527) CGI Environment has 30 vars. Max name len 128, Max Value Len 128
<3240796176 ms> PLSQL_GATEWAY(14)=(6)WebDb
<3240796176 ms> GATEWAY_IVERSION(17)=(2)3
<3240796176 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.0.0 Oracle-HTTP-Server
<3240796176 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
<3240796176 ms> SERVER_PORT(12)=(5)7777
<3240796176 ms> SERVER_NAME(12)=(22)mohawk.ventura-uk.com
<3240796176 ms> REQUEST_METHOD(15)=(5)POST
<3240796176 ms> PATH_INFO(10)=(15)/wwv_flow.show
<3240796176 ms> SCRIPT_NAME(12)=(10)/pls/apex
<3240796176 ms> REMOTE_ADDR(12)=(12)10.0.10.222
<3240796176 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
<3240796176 ms> REQUEST_PROTOCOL(17)=(5)HTTP
<3240796176 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
<3240796176 ms> HTTP_CONTENT_LENGTH(20)=(4)162
<3240796176 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
<3240796176 ms> HTTP_USER_AGENT(16)=(75)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
<3240796176 ms> HTTP_HOST(10)=(12)mohawk:7777
<3240796176 ms> HTTP_ACCEPT(12)=(4)*/*
<3240796176 ms> HTTP_ACCEPT_ENCODING(21)=(14)gzip, deflate
<3240796176 ms> HTTP_ACCEPT_LANGUAGE(21)=(6)en-gb
<3240796176 ms> HTTP_REFERER(13)=(61)http://mohawk:7777/pls/apex/f?p=1122:1:1776222419881214:::::
<3240796176 ms> HTTP_ORACLE_ECID(17)=(36)1202314983:10.30.96.8:528620:0:63,0
<3240796176 ms> WEB_AUTHENT_PREFIX(19)=(1)
<3240796176 ms> DAD_NAME(9)=(5)apex
<3240796176 ms> DOC_ACCESS_PATH(16)=(5)docs
<3240796176 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
<3240796176 ms> PATH_ALIAS(11)=(1)
<3240796176 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
<3240796176 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
<3240796176 ms> SCRIPT_PREFIX(14)=(5)/pls
<3240796176 ms>StrArrPosBind pos 2 Charset Id : 873
<3240796176 ms>StrArrPosBind pos 3 Charset Id : 873
<3240796176 ms>StrArrPosBind pos 8 Charset Id : 873
<3240796176 ms>StrArrPosBind pos 9 Charset Id : 873
<3240796176 ms>StrArrPosBind pos 11 Charset Id : 873
<3240796181 ms>ORA-6550 Execute ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240796181 ms>/pls/apex/wwv_flow.show HTTP-404 ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PLS-00306: wrong number or types of arguments in call to 'SHOW'
ORA-06550: line 25, column 3:
PL/SQL: Statement ignored
<3240796181 ms>(wpu.c,595) longjumping back to the beginning
<3240796181 ms>(wpu.c,458) cleaning up before longjmp
<3240796181 ms>(wpu.c,462) doing a rollback
<3240796181 ms>(wpcs.c, 77) Executed 'rollback' (rc=0)
<3240796182 ms>(wpcs.c, 77) Executed 'begin dbms_session.reset_package; end;' (rc=0)
<3240796182 ms>(wpd.c,1820) Going to close cursor
<3240796182 ms>DeinitCursor
<3240796182 ms>(wpx.c,693) Shutdown has been called
<3240796182 ms>(wpx.c,705) Going to logoff
<3240796182 ms>Logoff: Pooling this connection
<3240796182 ms>[ReqEndtime: 6/Feb/2008:16:23:03]
<3240796182 ms>[ReqExecTime: 15 ms]Loanshark, this forum is for Oracle Portal caching questions, try posting your question in the APEX forum.
Cheers,
Mick. -
I have some code where I copy records from one partition to another partition the table has the
followin partition.
PARTITION BY RANGE (CREATE_DATE)
I would like to change the date to a new value for the destination record but keep the time.
Here is my code, can somebody provide an example of how I can do this
CREATE OR REPLACE PROCEDURE C0HARPA.mtas_req_feat_copy_part
(p_create_date in DATE, p_create_date1 in DATE)
IS
-- desc mtas.mtas_req_feat;
-- REQUEST_SEQ NUMBER NOT NULL,
-- MTAS_SYSTEM VARCHAR2(15 BYTE) NOT NULL,
-- FEATURE VARCHAR2(64 BYTE) NOT NULL,
-- FLAG VARCHAR2(16 BYTE),
-- CREATE_DATE DATE
TYPE myarray IS TABLE OF mtas.mtas_req_feat%ROWTYPE;
l_data myarray;
myREQUEST_SEQ mtas.mtas_req_feat.request_seq%TYPE;
CURSOR r IS
SELECT * FROM mtas.mtas_req_feat r
WHERE r.create_date >= p_create_date
AND r.create_date < p_create_date + interval '1' day;
l_start number default dbms_utility.get_time;
rows_processed number :=0;
BEGIN
-- To prevent ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
DBMS_OUTPUT.ENABLE (buffer_size => NULL);
select max(REQUEST_SEQ) into myREQUEST_SEQ from mtas.mtas_req_feat;
DBMS_OUTPUT.PUT_LINE('High Value REQUEST_SEQ is '||myREQUEST_SEQ);
OPEN r;
LOOP
FETCH r BULK COLLECT INTO l_data LIMIT 10000;
FOR j IN 1 .. l_data.COUNT
LOOP
l_data(j).create_date := p_create_date1 || (NEED TIME FROM SOURCE RECORD);
myREQUEST_SEQ := myREQUEST_SEQ +1;
l_data(j).request_seq := myREQUEST_SEQ;
INSERT INTO c0harpa.mtas_req_feat VALUES l_data(j);
rows_processed := rows_processed+1;
END LOOP;
FORALL i IN 1..l_data.COUNT
INSERT INTO c0harpa.mtas_req_feat VALUES l_data(i);
COMMIT;
EXIT WHEN r%NOTFOUND;
END LOOP;
COMMIT;
dbms_output.put_line
(round((dbms_utility.get_time-l_start)/100, 2) ||' Seconds...' || rows_processed || ' Rows Processed' );
CLOSE r;
END mtas_req_feat_copy_part;
I am calling like this:
sqlplus / <<EOT >> $LOG 2>&1
set serveroutput on
SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF;
set heading off;
set line 200
exec C0HARPA.mtas_request_copy_part ( to_date( '2011-09-01', 'YYYY-MM-DD' ),
to_date( '2011-09-02', 'YYYY-MM-DD' ))
exit;
EOTThanks to all who answer840386 wrote:
I have some code where I copy records from one partition to another partition the table has the
followin partition.
PARTITION BY RANGE (CREATE_DATE)
I would like to change the date to a new value for the destination record but keep the time.
Here is my code, can somebody provide an example of how I can do this
CREATE OR REPLACE PROCEDURE C0HARPA.mtas_req_feat_copy_part
(p_create_date in DATE, p_create_date1 in DATE)
IS
-- desc mtas.mtas_req_feat;
-- REQUEST_SEQ NUMBER NOT NULL,
-- MTAS_SYSTEM VARCHAR2(15 BYTE) NOT NULL,
-- FEATURE VARCHAR2(64 BYTE) NOT NULL,
-- FLAG VARCHAR2(16 BYTE),
-- CREATE_DATE DATE
TYPE myarray IS TABLE OF mtas.mtas_req_feat%ROWTYPE;
l_data myarray;
myREQUEST_SEQ mtas.mtas_req_feat.request_seq%TYPE;
CURSOR r IS
SELECT * FROM mtas.mtas_req_feat r
WHERE r.create_date >= p_create_date
AND r.create_date < p_create_date + interval '1' day;
l_start number default dbms_utility.get_time;
rows_processed number :=0;
BEGIN
-- To prevent ORA-20000: ORU-10027: buffer overflow, limit of 2000 bytes
DBMS_OUTPUT.ENABLE (buffer_size => NULL);
select max(REQUEST_SEQ) into myREQUEST_SEQ from mtas.mtas_req_feat;
DBMS_OUTPUT.PUT_LINE('High Value REQUEST_SEQ is '||myREQUEST_SEQ);
OPEN r;
LOOP
FETCH r BULK COLLECT INTO l_data LIMIT 10000;
FOR j IN 1 .. l_data.COUNT
LOOP
l_data(j).create_date := p_create_date1 || (NEED TIME FROM SOURCE RECORD);
myREQUEST_SEQ := myREQUEST_SEQ +1;
l_data(j).request_seq := myREQUEST_SEQ;
INSERT INTO c0harpa.mtas_req_feat VALUES l_data(j);
rows_processed := rows_processed+1;
END LOOP;
FORALL i IN 1..l_data.COUNT
INSERT INTO c0harpa.mtas_req_feat VALUES l_data(i);
COMMIT;
EXIT WHEN r%NOTFOUND;
END LOOP;
COMMIT;
dbms_output.put_line
(round((dbms_utility.get_time-l_start)/100, 2) ||' Seconds...' || rows_processed || ' Rows Processed' );
CLOSE r;
END mtas_req_feat_copy_part;
I am calling like this:
sqlplus / <<EOT >> $LOG 2>&1
set serveroutput on
SET PAGESIZE 0
SET FEEDBACK OFF
SET VERIFY OFF;
set heading off;
set line 200
exec C0HARPA.mtas_request_copy_part ( to_date( '2011-09-01', 'YYYY-MM-DD' ),
to_date( '2011-09-02', 'YYYY-MM-DD' ))
exit;
EOTThanks to all who answersince we don't have your tables or data, we can't run or improve posted code.
to_date( '2011-09-02', 'YYYY-MM-DD' ))time component for DATE above will be all zeros (00:00:00)
Maybe you are looking for
-
How to check the show base class members in teststand programatically using c#
I need to check the checkbox indicating show base class members in teststand using .Net adapter programatically through c#.can I get any help.Using CallMethod , I need to call a method "GetItemByName" .It is only possible by enabling the show Base Cl
-
ORA-1653: nable to extend table
Hi guys. Had this error in the alert.log file. Mon Jun 26 09:10:37 2006 ORA-1653: unable to extend table APPLSYS.WF_LOCAL_ROLES_STAGE by 4849950 in tablespace APPLSYSD The tablespace have three datafiles of which its both datafiles are only 40% full.
-
Toshiba - I cannot run Recovery DVDs successfully
I appreciate if somebody can help me to solve my problem as explained below. My Toshiba laptop L650 developed some problems that is when I decided to resotore to its original form by running Recover DVDs which I created earlier using Toshiba Tempro.
-
Pls immediate help required log files are getting big size than 1GB
oc4j_DBConsole_mbcvizpilot3.mbc.uae_vizrtdb\log
-
my 7th g nano keeps shuffling even if i turn off the shake/shuffle setting