ORA-06550 error while executing procedure
HI Friends,
I have written a proc for the below process.
SP_Control (table)
sno campgn_id campgn_typ campgn_no current_wave
1 ET07001 ONB ONB01 1
2 ET07001 ONB CNB01 1
3 ET03053 IAL IAL1A A
4 ET03053 IAL IAL2A A
5 ET03053 IAL IAL3A A
6 ET03053 IAL IAL4A A
After calling the procedures with bellow parameters
Get_next_campgn(‘ONB01’,’ONB’);
Get_next_campgn(‘CNB01’,’ONB’);
Get_next_campgn(‘IAL1A’,’IAL’);
Get_next_campgn(‘IAL2A’,’IAL’);
Get_next_campgn(‘IAL3A’,’IAL’);
Get_next_campgn(‘IAL4A’,’IAL’);
…………… it should update the table with below data.
sno campgn_id campgn_typ campgn_no current_wave
1 ET07001 ONB ONB02 2
2 ET07001 ONB CNB02 2
3 ET03053 IAL IAL1B B
4 ET03053 IAL IAL2B B
5 ET03053 IAL IAL3B B
6 ET03053 IAL IAL4B B
I have written a procedure like this and its compliled successfully.
But throws error while executing like
execute Get_next_campgn(‘ONB01’,’ONB’);
create or replace procedure Get_next_campgn(p_campgn varchar2,p_type varchar2)
as
begin
update SP_Control set campgn_no = substr(p_campgn,1,length(p_campgn)-1)||to_char(ascii(substr(p_campgn,-1,1))+1) ,
curr_wave = to_char(ascii(curr_wave)+1)
where campgn_type = p_type
and campgn_no = p_campgn ;
exception
when others then
dbms_output.put_line(sqlerrm);
end Get_next_campgn;
Error::::
Error starting at line 15 in command:
execute Get_next_campgn(‘ONB01’,’ONB’)
Error report:
ORA-06550: line 1, column 24:
PLS-00103: Encountered the symbol "" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Please suggest....
The procedure executed successfully for me.
drop table sp_control;
create table sp_control
campgn_no varchar2(20),
curr_wave varchar2(20),
campgn_type varchar2(20)
insert into sp_control values ('ONB01', '1', 'ONB');
insert into sp_control values ('IAL1A', 'A', 'IAL');
create or replace procedure Get_next_campgn(p_campgn varchar2,p_type varchar2)
as
begin
update SP_Control set campgn_no = substr(p_campgn,1,length(p_campgn)-1)||to_char(ascii(substr(p_campgn,-1,1))+1) ,
curr_wave = to_char(ascii(curr_wave)+1)
where campgn_type = p_type
and campgn_no = p_campgn ;
exception
when others then
dbms_output.put_line(sqlerrm);
end Get_next_campgn;
begin
Get_next_campgn('ONB01','ONB');
end;
select * from sp_control;
--Output as Follows:
drop table sp_control succeeded.
create table succeeded.
1 rows inserted
1 rows inserted
procedure Get_next_campgn(p_campgn Compiled.
anonymous block completed
CAMPGN_NO CURR_WAVE CAMPGN_TYPE
ONB050 50 ONB
IAL1A A IAL
2 rows selectedJust a hunch, in the Procedure call
execute Get_next_campgn(‘ONB01’,’ONB’);the "Single Quotes" does not appear correct. They were probably typed into some other editor.
When executed as
execute Get_next_campgn(‘ONB01’,’ONB’);
Error starting at line 1 in command:
begin
Get_next_campgn(‘ONB01’,’ONB’);
end;
Error report:
ORA-06550: line 2, column 19:
PLS-00103: Encountered the symbol "‘" when expecting one of the following:
( ) - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table continue avg count current exists max min prior sql
stddev sum variance execute multiset the both leading
trailing forall merge year month day hour minute second
timezone_hour timezone_minute timezone_region timezone_abbr
time timestamp interval date
<a string literal with character set specification>
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:So, just replace them in any SQL editor and your Invoker block shall work properly.
Regards,
P.
Similar Messages
-
ORA-06550 error while executing Dynamic Sql
EXECUTE IMMEDIATE 'BEGIN :out := ' || lv_formula || '; END;' using out RESULT ;
here lv_formula:= ((capcost * rate / 100) + (ob + (ob * interestrate / 100)))
lv_formula is varchar2(360);
and capcost,rate,ob & interestrate are my column names . Here I m declaring variables same as these columns and datatype is number.
I am not getting any compilation error. syntax is correct
while executing this sql i m getting ora-06550.
can any one help me for resolving this error.
Thanks In Advance
hoping for more resposeThanks Billy for your response,
but i still didn't get my desired solution so i am pasting my whole plsql code here. so that u can get better picture.
/* Formatted on 2010/11/22 15:23 (Formatter Plus v4.8.5) */
PROCEDURE xb (
l_refno IN VARCHAR2,
l_billtyp IN VARCHAR2,
infor IN VARCHAR2,
aresult OUT NUMBER
IS
--A NUMBER:=10; B NUMBER :=5;
lv_formula VARCHAR2 (270); --:=(A+B)*2+5;
l_agtmnt VARCHAR2 (18);
l_type VARCHAR2 (2);
RESULT NUMBER;
refno afxbrmst.refno%TYPE;
billtyp afxbrmst.billtyp%TYPE;
ob afxbrmst.ob%TYPE;-- := 45283;
status afxbrmst.status%TYPE -- := 0;
dueamt afxbrmst.dueamt%TYPE -- := 0;
duedate afxbrmst.duedate%TYPE;
frequency afxbrmst.frequency%TYPE;
lastrevrate afxbrmst.lastrevrate%TYPE -- := 0;
penaltyamt afxbrmst.penaltyamt%TYPE -- := 0;
accounted afxbrmst.accounted%TYPE;
lastbillraised afxbrmst.lastbillraised%TYPE;
noofstaff afxbrmst.noofstaff%TYPE;
items afxbrmst.items%TYPE;
area afxbrmst.area%TYPE;
LENGTH afxbrmst.LENGTH%TYPE -- := 0;
interest afxbrmst.interest%TYPE -- := 0;
capcost NUMBER; afxbrmst.capcost%TYPE; :=1;
-- := 1509432;
periodfrom afxbrrate.periodfrom%TYPE;
periodto afxbrrate.preiodto%TYPE;
rcsrate afxbrrate.rcsrate%TYPE -- := 0;
length_area afxbrrate.length_area%TYPE;
rate afxbrrate.rate%TYPE --:= 0;
-- :=3;
erate afxbrrate.erate%TYPE -- := 0;
feamount afxbrrate.feamount%TYPE -- := 0;
interestrate afxbrrate.interestrate%TYPE -- := 0;
-- :=12;
fiamount afxbrrate.fiamount%TYPE --:= 0;
penaltyrate afxbrrate.penaltyrate%TYPE -- := 0;
l_ob afxbrmst_test.ob%TYPE -- := 0;
l_capcost afxbrmst.capcost%TYPE -- := 0;
raise_application_trigger EXCEPTION;
inti INTEGER;
BEGIN
--break;
lv_formula :=
TO_NUMBER ((capcost * rate / 100) + (ob + (ob * interestrate / 100)));
--infor;
l_agtmnt := l_refno;
l_type := l_billtyp;
BEGIN
SELECT a.refno, a.billtyp, a.ob, a.status, a.dueamt, a.duedate,
a.frequency, a.lastrevrate, a.penaltyamt, a.accounted,
a.lastbillraised, a.noofstaff, a.items, a.area, a.LENGTH,
a.interest, a.capcost
INTO refno, billtyp, ob, status, dueamt, duedate,
frequency, lastrevrate, penaltyamt, accounted,
lastbillraised, noofstaff, items, area, LENGTH,
interest, capcost
FROM afxbrmst_test a
WHERE billtyp = l_type AND refno = l_agtmnt;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
END;
BEGIN
SELECT b.periodfrom, b.preiodto, b.rcsrate, b.length_area, b.rate,
b.erate, b.feamount, b.interestrate, b.fiamount, b.penaltyrate
INTO periodfrom, periodto, rcsrate, length_area, rate,
erate, feamount, interestrate, fiamount, penaltyrate
FROM afxbrrate b
WHERE billtype = l_type;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
END;
EXECUTE IMMEDIATE 'BEGIN :out := ' || lv_formula || '; END;'
USING OUT RESULT; --USING OUT RESULT;
aresult := RESULT;
END;
-- Procedure
here i m passing the parameter through my form builder and calling this procedure.
can you tell me where i am making wrong
Thanks again -
Ora -06550 error while executing the mapping
Hi,
I am using owb client 11.2.0.3 . I have mapping map_emlap_src in this mapping i have import tables from different scehema and i have done one to one mapping on both the table .
While executing the mapping i got the following error .
ORA-06550: line 1, column 1082:
PLS-00302: component 'MAP_EMLAP_SRC' must be declared
ORA-06550: line 1, column 1062:
PL/SQL: Statement ignoredgrant execute on owner_name.MAP_EMLAP_SRC to user_name;
-
Error while executing procedure for excel upload
Hi Friends
Pl. find below error while executing procedure for loading excel data. pl. verify and suggest for any changes in the format of data.
Rgds
SriGIf reading Excel as a database you would use "Access LSLINK"
Access external means you are reading a file. I don't think it is possible to treat Excel as a file because the internal structure is complex.
In the past I have saved the Excel as a CSV or as a Tab delimeted file. Then I use something like
ACCESS External
USE &filename
BEGIN
DESCRIPTION free ,
Variables text 20
Organisation text 20
'July 2008' numeric 20
'August 2008' numeric 20
'September 2008' numeric 20
'October 2008' numeric 20
'November 2008' numeric 20
'December 2008' numeric 20
'January 2009' numeric 20
'February 2009' numeric 20
'March 2009' numeric 20
'April 2009' numeric 20
'May 2009' numeric 20
'June 2009' numeric 20
END
peek
read
... quit the access sub system
END -
Error while executing procedure in TOAD which contains parameter and dblink
Hi all,
I am getting error while executing the following code in TOAD and APEX.
It contains parameter( start_date and end_date) and dblink(@TO_FUT).
When I hardcode the parameter values, It works fine.
When I dont give hardcoded values in the procedure, the error comes.
When I comment the lines whereever parameter comes, still the error comes.
I am not sure whether it is parameter issue or dblink issue or some other issue
Is anybody having any clue about this error?
Your help is very much appreciated.
The code:
CREATE OR REPLACE PROCEDURE PROC_ENR_ACC(START_DATE DATE,END_DATE DATE)
AS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE OUTPUT_TABLE';
INSERT INTO OUTPUT_TABLE
(FIRST_NAME ,LAST_NAME,HID ,EFF_DT,CID,PLAN, FLAG)
SELECT
TEMP1.FIRST_NAME,
TEMP1.LAST_NAME,
TEMP1.HID,
TEMP1.EFF_DT,
TEMP1.CID,
TEMP1.PLAN,
NVL((SELECT 'Y'
FROM FADMIN.MEMI_TABLE@TO_FUT MEMI
WHERE MEMI.MEME_CK = TEMP1.MEME_CK
AND MEMI.TXN_EFF_DT = TEMP1.EFF_DT
AND MEMI.PBP = TEMP1.PLAN
AND MEMI.MEMI_TXN_CD IN ('AC','RE')
AND MEMI.MEMI_SEQ_NO = (SELECT MAX (MI.MEMI_SEQ_NO)
FROM FADMIN.MEMI_TABLE@TO_FUT MI
WHERE MI.MEME_CK = MEMI.MEME_CK
AND MI.TXN_EFF_DT = MEMI.TXN_EFF_DT
AND MI.PBP = MEMI.PBP
AND MI.MEMI_TXN_CD IN ('AC','RE')
AND MI.MEMI_INTF_STS = 03 )),'N') AS FLAG
FROM
( SELECT
M1.FIRST_NAME ,
M1.LAST_NAME ,
M1.HID ,
M1.EFF_DT,
M1.CID,
M1.PLAN ,
(SELECT MEME.MEME_CK
FROM FADMIN.MEME_TABLE@TO_FUT MEME, FADMIN.GRGR_TABLE@TO_FUT GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID
)AS MEME_CK
FROM FADMIN.METR_TABLE@TO_FUT M1,
( SELECT M3.HID, M3.EFF_DT FROM FADMIN.METR_TABLE@TO_FUT M3
WHERE M3.TYPE IN ('60','61')
AND M3.REPLY IN ('117','118')
AND TRUNC (M3.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M3.SYIN_INST = (SELECT MAX (M4.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M4
WHERE M4.HID = M3.HID
AND M4.TYPE IN ('60','61')
AND M4.REPLY IN ('117','118')
AND TRUNC (M4.EFF_DT) = TRUNC (M3.EFF_DT))
) TEMP
WHERE M1.TYPE IN ('60','61')
AND M1.REPLY ='011'
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60','61')
AND M2.REPLY ='011'
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
AND M1.HID = TEMP.HID (+)
AND M1.EFF_DT = TEMP.EFF_DT (+)
AND TEMP.HID IS NULL
UNION
SELECT
M1.FIRST_NAME ,
M1.LAST_NAME ,
M1.HID ,
M1.EFF_DT,
M1.CID,
M1.PLAN ,
(SELECT MEME.MEME_CK
FROM FADMIN.MEME_TABLE@TO_FUT MEME, FADMIN.GRGR_TABLE@TO_FUT GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID
)AS MEME_CK
FROM FADMIN.METR_TABLE@TO_FUT M1
WHERE M1.TYPE IN ('60','61')
AND M1.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60','61')
AND M2.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
)TEMP1 ;
END;
The error:
ORA-00918: column ambiguously defined
ORA-02063: preceding line from TO_FUT
ORA-06512: at "PROC_ENR_ACC", line 5
ORA-06512: at line 5Okay
Here's the code formatted
CREATE OR REPLACE PROCEDURE PROC_ENR_ACC (START_DATE DATE, END_DATE DATE)
AS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE OUTPUT_TABLE';
INSERT INTO OUTPUT_TABLE (FIRST_NAME,
LAST_NAME,
HID,
EFF_DT,
CID,
PLAN,
FLAG)
SELECT TEMP1.FIRST_NAME,
TEMP1.LAST_NAME,
TEMP1.HID,
TEMP1.EFF_DT,
TEMP1.CID,
TEMP1.PLAN,
NVL (
(SELECT 'Y'
FROM MEMI_TABLE MEMI
WHERE MEMI.MEME_CK = TEMP1.MEME_CK
AND MEMI.TXN_EFF_DT = TEMP1.EFF_DT
AND MEMI.PBP = TEMP1.PLAN
AND MEMI.MEMI_TXN_CD IN ('AC', 'RE')
AND MEMI.MEMI_SEQ_NO = (SELECT MAX (MI.MEMI_SEQ_NO)
FROM MEMI_TABLE MI
WHERE MI.MEME_CK = MEMI.MEME_CK
AND MI.TXN_EFF_DT = MEMI.TXN_EFF_DT
AND MI.PBP = MEMI.PBP
AND MI.MEMI_TXN_CD IN ('AC', 'RE')
AND MI.MEMI_INTF_STS = 03)
),'N') FLAG
FROM (SELECT M1.FIRST_NAME,
M1.LAST_NAME,
M1.HID,
M1.EFF_DT,
M1.CID,
M1.PLAN,
(SELECT MEME.MEME_CK
FROM MEME_TABLE MEME, GRGR_TABLE GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
FROM METR_TABLE M1,
(SELECT M3.HID, M3.EFF_DT
FROM METR_TABLE M3
WHERE M3.TYPE IN ('60', '61')
AND M3.REPLY IN ('117', '118')
AND TRUNC (M3.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M3.SYIN_INST = (SELECT MAX (M4.SYIN_INST)
FROM METR_TABLE M4
WHERE M4.HID = M3.HID
AND M4.TYPE IN ('60', '61')
AND M4.REPLY IN ('117', '118')
AND TRUNC (M4.EFF_DT) = TRUNC (M3.EFF_DT))
) TEMP
WHERE M1.TYPE IN ('60', '61') AND M1.REPLY = '011'
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM METR_TABLE M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60', '61')
AND M2.REPLY = '011'
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
AND M1.HID = TEMP.HID(+)
AND M1.EFF_DT = TEMP.EFF_DT(+)
AND TEMP.HID IS NULL
UNION
SELECT M1.FIRST_NAME,
M1.LAST_NAME,
M1.HID,
M1.EFF_DT,
M1.CID,
M1.PLAN,
(SELECT MEME.MEME_CK
FROM MEME_TABLE MEME, GRGR_TABLE GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
FROM METR_TABLE M1
WHERE M1.TYPE IN ('60', '61')
AND M1.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM METR_TABLE M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60', '61')
AND M2.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
) TEMP1;
END;
/When posting code if you put {noformat}{noformat} (with the curly brackets and in lower case) above and below it you can preserve formatting.
To your original question...
Is the link name supposed to be variable?
What do you mean by 'hard coding' the values, do you mean in the procedure itself so you'd actually PROC_ENR_ACC();?
What happens when you run this?DECLARE
start_date DATE;
end_date DATE;
BEGIN
start_date := '01-JAN-2009';
end_date := '01-FEB-2009';
PROC_ENR_ACC(start_date, end_date);
END;
I need to know exactly how to recreate your error...
Cheers
Ben
http://www.munkyben.wordpress.com
+Don't forget to mark replies helpful or correct+ ;) -
ORA-01722: Error while executing query in Query Designer
Hi All;
I am getting the below error while executing a query
ORA-01722: invalid number
Error reading the data of InfoProvider
Error while reading data; navigation is possible
Have anyone encountered this before? How do i resolve this?
Thanks!
~ Arun KKHi,
Did you checked all the setting required to run this query are present in the Qualtiy system??
Which means all the characteristics,key figures are in active state.
Also all the cubes are in active state with no issues with the involved in the dimensions used for the query.
Also do a check in the query and if you have authorization try to save the same query and execute the saved one again in quality and see if the same error happens again.
Thanks
Ajeet -
ORA-27092 Error while executing any query from client
Hello
I am getting following error while executing any query from client remotly.
IAMDBA@TEST_OAT.ABCD > select userid from dual;
select userid from dual
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/u01/prod/system/system01.dbf'
ORA-27092: size of file exceeds file size limit of the process
Additional information: 131071
Additional information: 286209
But while local connection,its working.hi,
ulimit command- Limit user resources
su - oracle
ulimit -n (this command will show you the current value for ulimit the default value is 1024)
to increase its value:---
ulimit -n <some value> ( this command will change value for current session only)
example
ulimit -n 101062
once done check the value as:--
ulimit -n( for verification)
search in google for more explanation or revert back to me for any suggestions.... :)
Edited by: varun4dba on Jan 31, 2011 4:09 PM -
Error while executing procedure : ORA-06550 and PLS-00103
Hi I have created the Stored Procedure as,
CREATE OR REPLACE PACKAGE BODY APPS.TMP_IMPORT_ITEMS_PKG AS
PROCEDURE LOAD_INTERFACE_TABLE(organization_code IN VARCHAR2, errbuf OUT VARCHAR2, retcode OUT NUMBER) IS
org_code varchar2(3);
BEGIN
org_code:= organization_code;
DBMS_OUTPUT.PUT_LINE('Organization Code is...' || org_code);
END LOAD_TABLE;
END TMP_IMPORT_ITEMS_PKG;
And here is the code what i am trying to execute:
DECLARE
V_ERRBUF VARCHAR2(1000);
V_RETCODE NUMBER;
BEGIN
EXEC TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', V_ERRBUF, V_RETCODE);
END;
when i run the above code i am getting the following error:
ORA-06550: line 5, column 10:
PLS-00103: Encountered the symbol "TMP_IMPORT_ITEMS_PKG" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "TMP_IMPORT_ITEMS_PKG" to continue.
Can any body tell me what's wrong with the above code
Thanks in Advance,
Kumar K
Edited by: user2054206 on Dec 17, 2008 9:09 PM
Edited by: user2054206 on Dec 17, 2008 9:27 PMBEGIN
EXEC TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', '', null);
END;why are you executing it like that , it should be
EXEC TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', '', null);or as Prabhakar said in PL/SQL
BEGIN
TMP_IMPORT_ITEMS_PKG.LOAD_INTERFACE_TABLE('x1', '', null);
END;Edited by: Rajneesh Kumar on Dec 18, 2008 11:08 AM -
Getting ORA-06512/ORA-00972 ERROR WHILE EXECUTING THE PROCEDURE????
Hi ,
while executing this procedure , I am getting follwoing errors:
Create or Replace procedure ADD_CUSTOM_INDEX is
INDX_NOT_EXIST Number;
CREATE_SQL_STATMENT VARCHAR2(1500);
ALTER_SQL_STATMENT VARCHAR2(150);
CURSOR C1 IS select INDEX_NAME,CREATE_DDL FROM W_CUSTOM_TEST, WC_COMPANY_G WHERE W_CUSTOM_TEST.SYS_TENANT_ID = WC_COMPANY_G.BU_ID;
BEGIN
for V_ROW in C1 loop
SELECT COUNT(USER_INDEXES.INDEX_NAME) INTO INDX_NOT_EXIST FROM USER_INDEXES WHERE USER_INDEXES.INDEX_NAME = V_ROW.index_name;
IF INDX_NOT_EXIST = 0 THEN
CREATE_SQL_STATMENT := ''|| '"'|| V_ROW.CREATE_DDL ||'"' ||'PARALLEL NOLOGGING';
EXECUTE IMMEDIATE CREATE_SQL_STATMENT;
ALTER_SQL_STATMENT := 'ALTER INDEX ' ||'"'|| V_ROW.INDEX_NAME ||'"'|| ' NOPARALLEL LOGGING';
EXECUTE IMMEDIATE ALTER_SQL_STATMENT;
END IF;
END LOOP;
END ADD_CUSTOM_INDEX;
ERROR at line 1:
ORA-00972: identifier is too long
ORA-06512: at "LOLAP.ADD_CUSTOM_INDEX", line 13
ORA-06512: at line 1.
sturtuce of W_custom_test table is as below:
CREATE TABLE "LOLAP"."W_CUSTOM_TEST"
("INDEX_NAME" VARCHAR2(30) NOT NULL ENABLE,
"SYS_TENANT_ID" VARCHAR2(15) NOT NULL ENABLE,
"CREATE_DDL" VARCHAR2(1200),
"COMMENTS" VARCHAR2(200),
"STAT_CD" VARCHAR2(30) DEFAULT 'Active' NOT NULL ENABLE,
"CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"LAST_UPD" DATE DEFAULT SYSDATE NOT NULL ENABLE
Any Pointer??????Hi
Instead of giving as below, go for the not null constraints.
"STAT_CD" VARCHAR2(30) DEFAULT 'Active' NOT NULL ENABLE,
"CREATED" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"LAST_UPD" DATE DEFAULT SYSDATE NOT NULL ENABLE
That should help
Regards
Sudheer -
Error while executing procedure
Hi,
I am executing a procedure, which will write a query result into a spreadsheet and it will store it into the local PC. i am trying to run this procedure using TEST username.
Now i created a utl_file directory like below:
create directory MYDIR5 AS 'c:\raj';
and i tried to assign permission like below :
grant read,write on directory MYDIR5 to TEST
i got the below error, while i am executing the GRANT stmt:
ORA-01749: you may not GRANT/REVOKE privileges to/from yourself
So who has to grant privileges for this. I tried to execute the procedure without granting privileges but it end up with ORA-29283: error.
So pls help me on this issue.
Thanks in advance!!!You looked up the CREATE DIRECTORY statement right? What does it say under "Prerequisites"?
> I am executing a procedure, which will write a query result into a spreadsheet and it will store it into the local PC
Is the database also on your local PC? UTL_FILE runs on the database server. -
ORA-01031 error while executing package..
Hi All,
user is getting an error ORA-01031 while executing a procedure (i.e create or replace procedure).
Please let me know how I can trobuleshoot it..let me know the script to check the required privileges..
Thanks a lot.......It's not a bug, check Oracle doc,
System Privileges Needed to Create or Alter a Procedure
http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/authoriz.htm#i1009241
To create a procedure, you must have been explicitly granted the necessary privileges (system or object) on all objects referenced by the procedure. You cannot have obtained the required privileges through roles. This includes the EXECUTE privilege for any procedures that are called inside the procedure being created. -
Mapping with Match and Merge operater giving ORA-06550 error while deploy..
Created a simplet mapping to source from Customer table to tstcustomer table thru' Match and Merge operator. The mapping validated successful but giving ORA-06550 line x column y error while deploying the mapping.
It is a simple mapping consisting of source Customer table, Match and Merge operator, tstcustomer target table.
Could anyone advise me on how to resolve this?The test mapping basically consists of :
source table - sh.customers
target table - tstcustomers (similar to sh.customers)
Match-Merge operator.
The mapping validation was successful but when attempt was made to deploy, its giving errors starting with ORA-06550.
I saved the code and executed thru' SQL Plus and the error details are as follows:
SQL> show errors;
Errors for PACKAGE BODY MMTEST4:
LINE/COL ERROR
594/6 PL/SQL: Statement ignored
594/37 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
601/6 PL/SQL: Statement ignored
601/36 PLS-00306: wrong number or types of arguments in call to 'RTRIM'
1017/655 PL/SQL: SQL Statement ignored
30
1020/27 PL/SQL: ORA-00942: table or view does not exist
2163/6 PL/SQL: Statement ignored
2163/43 PLS-00201: identifier 'CUSTOMERS_0_CUST_GENDER' must be declared
2170/6 PL/SQL: Statement ignored
LINE/COL ERROR
2170/42 PLS-00201: identifier 'CUSTOMERS_0_COUNTRY_ID' must be declared
2586/655 PL/SQL: SQL Statement ignored
30
2589/27 PL/SQL: ORA-00942: table or view does not exist
SQL>
For your info, the same mapping without Match-Merge Operator is getting deployed and executed successfully.
But with Match-Merge operator, after setting Match bins, Match rules, Merge rules etc the mapping is validated successfully but errorring out while deployment.
Pls advise on how to resolve this.
I understand that the Match-Merge Operator gives Pl/Sql output from the documentation.
thanks
Naren. -
ORA-01008 Error while executing VO Query
HI,
I have a VO to get the heirarchy for the selected Business. On selecting appropriate business, ppr is fired to build up available heirarchies for that business. The query for VO is
SELECT pos.name ||' ('||DECODE(pos.primary_structure_flag,'Y','Primary', 'N', 'Non-Primary','')||')' name , posv.org_structure_version_id org_structure_version_id
FROM per_organization_structures pos,per_org_structure_versions posv
WHERE pos.business_group_id = :1
AND pos.organization_structure_id = posv.organization_structure_id
AND pos.business_group_id = posv.business_group_id
AND posv.date_to IS NULL
While executing the query, it throws ORA-01008 exception saying "Not all Variables are bound". During debugging i saw that the selected business group id is available in AM before calling the VO execution.
Any help will be appreciated.
Thanks,Hi Tapash,
The following is the information you have requested
1. VO defn from the xml file
<?xml version="1.0" encoding='windows-1252'?>
<!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
<ViewObject
Name="HierarchyVO"
BindingStyle="Oracle"
CustomQuery="true"
RowClass="ge.oracle.apps.per.orghierarchy.poplist.server.HierarchyVORowImpl"
ComponentClass="ge.oracle.apps.per.orghierarchy.poplist.server.HierarchyVOImpl"
MsgBundleClass="oracle.jbo.common.JboResourceBundle"
UseGlueCode="false" >
<SQLQuery><![CDATA[
SELECT pos.name ||' ('||DECODE(pos.primary_structure_flag,'Y','Primary', 'N', 'Non-Primary','')||')' name , posv.org_structure_version_id org_structure_version_id
FROM per_organization_structures pos,per_org_structure_versions posv
WHERE pos.business_group_id = :1
AND pos.organization_structure_id = posv.organization_structure_id
AND pos.business_group_id = posv.business_group_id
AND posv.date_to IS NULL
]]></SQLQuery>
<DesignTime>
<Attr Name="_isCodegen" Value="true" />
<Attr Name="_version" Value="9.0.3.12.53" />
<Attr Name="_CodeGenFlagNew" Value="36" />
</DesignTime>
<ViewAttribute
Name="Name"
IsPersistent="false"
Precision="44"
Type="java.lang.String"
AliasName="NAME"
ColumnType="VARCHAR2"
Expression="NAME"
SQLType="VARCHAR" >
<DesignTime>
<Attr Name="_DisplaySize" Value="44" />
</DesignTime>
</ViewAttribute>
<ViewAttribute
Name="OrgStructureVersionId"
IsPersistent="false"
IsNotNull="true"
Type="oracle.jbo.domain.Number"
AliasName="ORG_STRUCTURE_VERSION_ID"
ColumnType="VARCHAR2"
Expression="ORG_STRUCTURE_VERSION_ID"
SQLType="NUMERIC" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</ViewAttribute>
</ViewObject>
2. the method in AM
public void getHierarchy(String strBusinessGrpId)
try
HierarchyVOImpl vo = getHierarchyVO1();
Number BusinessGroupId = new Number("0");
if(strBusinessGrpId!=null && !strBusinessGrpId.equals(""))
BusinessGroupId = new Number(strBusinessGrpId);
//vo.setWhereClause(null);
//vo.setWhereClauseParam(0,BusinessGroupId);
vo.executeQuery();
catch(Exception e)
throw new OAException(e.toString(),OAException.ERROR);
} //end of getHierarchy
3. calling code in CO
if ("changeBusiness".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
String businessGrpId = pageContext.getParameter("BusinessGroup");
Serializable[] parameters = { businessGrpId };
mAM.invokeMethod("handleChangeBusiness", parameters);
mAM.invokeMethod("getHierarchy", parameters);
Thanks,
Mohammadi -
Error while executing procedure for FTP
Hi all,
I am facing error while copying l the csv files from FTP to local directory on my machine.
I have created a procedure & selected technology jython . please find the code below.
import snpsftp
ftp = snpsftp.SnpsFTP('ftp://noid-misa-01-pp/', 'indiaftp', 'PWD')
ftp.setmode('ASCII')
ftp.mget('INT/GPInput(AU)/', '*.csv', 'C:\D_DRIVE_NEERAJ\reading')
ftp.close()
The error i am receiving is :
org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
File "<string>", line 2, in ?
File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 50, in __init__
File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 58, in connect
File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\ftplib.py", line 118, in connect
File "C:\OraHome_1\oracledi\bin\..\lib\scripting\Lib\socket.py", line 135, in connect
java.net.UnknownHostException: ftp://noid-misa-01-pp/If reading Excel as a database you would use "Access LSLINK"
Access external means you are reading a file. I don't think it is possible to treat Excel as a file because the internal structure is complex.
In the past I have saved the Excel as a CSV or as a Tab delimeted file. Then I use something like
ACCESS External
USE &filename
BEGIN
DESCRIPTION free ,
Variables text 20
Organisation text 20
'July 2008' numeric 20
'August 2008' numeric 20
'September 2008' numeric 20
'October 2008' numeric 20
'November 2008' numeric 20
'December 2008' numeric 20
'January 2009' numeric 20
'February 2009' numeric 20
'March 2009' numeric 20
'April 2009' numeric 20
'May 2009' numeric 20
'June 2009' numeric 20
END
peek
read
... quit the access sub system
END -
Very weird ORA-06502 error while creating procedure
Hi All,
i try to create the following procedure (on a 10.2 database):
create or replace procedure audit_report
as
cursor c_audit_user (b_start_date date, b_end_date date)
is
select user_id
, os_user
, session_id
, host
, last_program
, last_action
, last_module
, to_char(logon_day,'dd-mm-yyyy') logon_day
, logon_time
, to_char(logoff_day,'dd-mm-yyyy') logoff_day
, logoff_time
, elapsed_minutes
from audit_user
where logon_day >= b_start_date
and logon_day < b_end_date
order by logon_day desc
cursor c_audit_ddl (b_start_date in date, b_end_date in date)
is
select user_name
, to_char(ddl_date,'dd-mm-yyyy hh24:mi:ss') ddl_date
, ddl_type
, object_type
, owner
, object_name
, sql_text
from audit_ddl
where ddl_date >= b_start_date
and ddl_date < b_end_date
order by ddl_date desc
cursor c_audit_trail (b_start_date in date, b_end_date in date)
is
select os_username
, username
, to_char(timestamp,'dd-mm-yyyy hh24:mi:ss') timestamp
, owner
, obj_name
, to_char(action) action
, action_name
, decode(ses_actions,'---S------------','DELETE',
'------S---------','INSERT',
'---------S------','SELECT',
'----------S-----','UPDATE',
'---S--S--S------','DELETE/INSERT/SELECT',
'---S--S--SS-----','DELETE/INSERT/SELECT/UPDATE',
'------S--S------','INSERT/SELECT',
'------S--SS-----','INSERT/SELECT/UPDATE',
'---------SS-----','SELECT/UPDATE',
'DDL ACTION') ses_actions
, priv_used
from dba_audit_Trail
where username <> 'DBSNMP'
and timestamp >= b_start_date
and timestamp < b_end_date
order by timestamp desc
v_header_user varchar2(255);
v_sep_user varchar2(255);
v_header_ddl varchar2(255);
v_sep_ddl varchar2(255);
v_header_dml varchar2(255);
v_sep_dml varchar2(255);
v_record_user varchar2(255);
v_record_ddl varchar2(255);
v_record_dml varchar2(255);
v_report utl_file.file_type;
v_file_dir varchar2(255);
v_file_name varchar2(255);
v_start_date date;
v_end_date date;
v_db_name varchar2(255);
begin
-- Find start and end date of previous week (Sunday to Monday)
if to_char(sysdate,'DAY') = 'MONDAY' then
v_start_date := trunc(sysdate-8);
v_end_date := trunc(sysdate-1);
elsif
to_char(sysdate,'DAY') = 'TUESDAY' then
v_start_date := trunc(sysdate-9);
v_end_date := trunc(sysdate-2);
elsif
to_char(sysdate,'DAY') = 'WEDNESDAY' then
v_start_date := trunc(sysdate-10);
v_end_date := trunc(sysdate-3);
elsif
to_char(sysdate,'DAY') = 'THURSDAY' then
v_start_date := trunc(sysdate-11);
v_end_date := trunc(sysdate-4);
elsif
to_char(sysdate,'DAY') = 'FRIDAY' then
v_start_date := trunc(sysdate-12);
v_end_date := trunc(sysdate-5);
elsif
to_char(sysdate,'DAY') = 'SATURDAY' then
v_start_date := trunc(sysdate-13);
v_end_date := trunc(sysdate-6);
elsif
to_char(sysdate,'DAY') = 'SUNDAY' then
v_start_date := trunc(sysdate-14);
v_end_date := trunc(sysdate-7);
end if;
--Fill headers
v_header_user := 'USER_ID OS_USER SESSION_ID HOST LAST_PROGR'||
' LAST_ACTION LAST_MODULE LOGON_DAY'||
' LOGON_TI LOGOFF_DAY LOGOFF_T ELAPSED_MINUTES';
v_sep_user := '---------- --------- ---------- -------- ----------'||
'-------------------- ----------- ----------- ---------'||
v_header_ddl := 'USER_NAME DDL_DATE DDL_TYPE OBJECT_TYPE'||
' OWNER OBJECT_NAME SQL_TEXT';
v_sep_ddl := '---------- --------------------- ---------- -----------'||
'--------- ---------- -------------------- -------------'||
v_header_dml := 'OS_USERNAME USERNAME TIMESTAMP OWNER'||
' OBJ_NAME ACTION ACTION_NAME SES_ACTIONS'||
' PRIV_USED';
v_sep_dml := '----------- ---------- --------------------- ---------- '||
'--------------- ------ --------------- ------------------'||
--Create audit report file
v_file_dir := 'AUDIT_REPORT_DIR';
select name
into v_db_name
from v$database;
v_file_name := 'audit_report_'||v_db_name||'_'||to_char(v_start_date,'yyyymmdd')||'-'||to_char(v_end_date-1,'yyyymmdd')||'.log';
v_report := utl_file.fopen(v_file_dir, v_file_name, 'w');
--Report Header
utl_file.put_line(v_report,'AUDIT REPORT');
utl_file.put_line(v_report,'------------');
utl_file.put_line(v_report,'Database: '||v_db_name);
utl_file.put_line(v_report,'From : '||to_char(trunc(v_start_date),'dd-mm-yyyy'));
utl_file.put_line(v_report,'To : '||to_char(trunc(v_end_date),'dd-mm-yyyy'));
utl_file.put_line(v_report,'Created : '||to_char(sysdate,'dd-mm-yyyy hh24:mi:ss'));
utl_file.new_line(v_report);
--Report Detail records
utl_file.put_line(v_report,v_header_user);
utl_file.put_line(v_report,v_sep_user);
for r_audit_user in c_audit_user(v_start_date,v_end_date) loop
v_record_user := rpad(r_audit_user.user_id,11,' ')||
rpad(r_audit_user.os_user,11,' ')||
rpad(r_audit_user.session_id,11,' ')||
rpad(r_audit_user.host,9,' ')||
rpad(r_audit_user.last_program,31,' ')||
rpad(r_audit_user.last_action,12,' ')||
rpad(r_audit_user.last_module,12,' ')||
rpad(r_audit_user.logon_day,11,' ')||
rpad(r_audit_user.logon_time,9,' ')||
rpad(r_audit_user.logoff_day,11,' ')||
rpad(r_audit_user.logoff_time,9,' ')||
lpad(r_audit_user.elapsed_minutes,15,' ');
utl_file.put_line(v_report,v_record_user);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report,v_header_ddl);
utl_file.put_line(v_report,v_sep_ddl);
for r_audit_ddl in c_audit_ddl(v_start_date,v_end_date) loop
v_record_ddl := rpad(r_audit_ddl.user_name,11,' ')||
rpad(r_audit_ddl.ddl_date,22,' ')||
rpad(r_audit_ddl.ddl_type,11,' ')||
rpad(r_audit_ddl.object_type,21,' ')||
rpad(r_audit_ddl.owner,11,' ')||
rpad(r_audit_ddl.object_name,21,' ')||
rpad(r_audit_ddl.sql_text,100,' ');
utl_file.put_line(v_report,v_record_ddl);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report,v_header_dml);
utl_file.put_line(v_report,v_sep_dml);
for r_audit_trail in c_audit_trail(v_start_date,v_end_date) loop
v_record_dml := rpad(r_audit_trail.os_username,12,' ')||
rpad(r_audit_trail.username,11,' ')||
rpad(r_audit_trail.timestamp,22,' ')||
rpad(r_audit_trail.owner,11,' ')||
rpad(r_audit_trail.obj_name,16,' ')||
rpad(r_audit_trail.action,7,' ')||
rpad(r_audit_trail.action_name,16,' ')||
rpad(r_audit_trail.ses_actions,19,' ')||
rpad(r_audit_trail.priv_used,20,' ');
utl_file.put_line(v_report,v_record_dml);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report, '*** End of report ***');
utl_file.fclose(v_report);
end;
This gives me the following error:
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 8
When i try to create the procedure as this, i get the same error:
create or replace procedure audit_report
as
/*cursor c_audit_user (b_start_date date, b_end_date date)
is
select user_id
, os_user
, session_id
, host
, last_program
, last_action
, last_module
, to_char(logon_day,'dd-mm-yyyy') logon_day
, logon_time
, to_char(logoff_day,'dd-mm-yyyy') logoff_day
, logoff_time
, elapsed_minutes
from audit_user
where logon_day >= b_start_date
and logon_day < b_end_date
order by logon_day desc
cursor c_audit_ddl (b_start_date in date, b_end_date in date)
is
select user_name
, to_char(ddl_date,'dd-mm-yyyy hh24:mi:ss') ddl_date
, ddl_type
, object_type
, owner
, object_name
, sql_text
from audit_ddl
where ddl_date >= b_start_date
and ddl_date < b_end_date
order by ddl_date desc
cursor c_audit_trail (b_start_date in date, b_end_date in date)
is
select os_username
, username
, to_char(timestamp,'dd-mm-yyyy hh24:mi:ss') timestamp
, owner
, obj_name
, to_char(action) action
, action_name
, decode(ses_actions,'---S------------','DELETE',
'------S---------','INSERT',
'---------S------','SELECT',
'----------S-----','UPDATE',
'---S--S--S------','DELETE/INSERT/SELECT',
'---S--S--SS-----','DELETE/INSERT/SELECT/UPDATE',
'------S--S------','INSERT/SELECT',
'------S--SS-----','INSERT/SELECT/UPDATE',
'---------SS-----','SELECT/UPDATE',
'DDL ACTION') ses_actions
, priv_used
from dba_audit_Trail
where username <> 'DBSNMP'
and timestamp >= b_start_date
and timestamp < b_end_date
order by timestamp desc
v_header_user varchar2(255);
v_sep_user varchar2(255);
v_header_ddl varchar2(255);
v_sep_ddl varchar2(255);
v_header_dml varchar2(255);
v_sep_dml varchar2(255);
v_record_user varchar2(255);
v_record_ddl varchar2(255);
v_record_dml varchar2(255);
v_report utl_file.file_type;
v_file_dir varchar2(255);
v_file_name varchar2(255);
v_start_date date;
v_end_date date;*/
v_db_name varchar2(255);
begin
/*-- Find start and end date of previous week (Sunday to Monday)
if to_char(sysdate,'DAY') = 'MONDAY' then
v_start_date := trunc(sysdate-8);
v_end_date := trunc(sysdate-1);
elsif
to_char(sysdate,'DAY') = 'TUESDAY' then
v_start_date := trunc(sysdate-9);
v_end_date := trunc(sysdate-2);
elsif
to_char(sysdate,'DAY') = 'WEDNESDAY' then
v_start_date := trunc(sysdate-10);
v_end_date := trunc(sysdate-3);
elsif
to_char(sysdate,'DAY') = 'THURSDAY' then
v_start_date := trunc(sysdate-11);
v_end_date := trunc(sysdate-4);
elsif
to_char(sysdate,'DAY') = 'FRIDAY' then
v_start_date := trunc(sysdate-12);
v_end_date := trunc(sysdate-5);
elsif
to_char(sysdate,'DAY') = 'SATURDAY' then
v_start_date := trunc(sysdate-13);
v_end_date := trunc(sysdate-6);
elsif
to_char(sysdate,'DAY') = 'SUNDAY' then
v_start_date := trunc(sysdate-14);
v_end_date := trunc(sysdate-7);
end if;
--Fill headers
v_header_user := 'USER_ID OS_USER SESSION_ID HOST LAST_PROGR'||
' LAST_ACTION LAST_MODULE LOGON_DAY'||
' LOGON_TI LOGOFF_DAY LOGOFF_T ELAPSED_MINUTES';
v_sep_user := '---------- --------- ---------- -------- ----------'||
'-------------------- ----------- ----------- ---------'||
v_header_ddl := 'USER_NAME DDL_DATE DDL_TYPE OBJECT_TYPE'||
' OWNER OBJECT_NAME SQL_TEXT';
v_sep_ddl := '---------- --------------------- ---------- -----------'||
'--------- ---------- -------------------- -------------'||
v_header_dml := 'OS_USERNAME USERNAME TIMESTAMP OWNER'||
' OBJ_NAME ACTION ACTION_NAME SES_ACTIONS'||
' PRIV_USED';
v_sep_dml := '----------- ---------- --------------------- ---------- '||
'--------------- ------ --------------- ------------------'||
--Create audit report file
v_file_dir := 'AUDIT_REPORT_DIR';
select name
into v_db_name
from v$database;
v_file_name := 'audit_report_'||v_db_name||'_'||to_char(v_start_date,'yyyymmdd')||'-'||to_char(v_end_date-1,'yyyymmdd')||'.log';
v_report := utl_file.fopen(v_file_dir, v_file_name, 'w');
--Report Header
utl_file.put_line(v_report,'AUDIT REPORT');
utl_file.put_line(v_report,'------------');
utl_file.put_line(v_report,'Database: '||v_db_name);
utl_file.put_line(v_report,'From : '||to_char(trunc(v_start_date),'dd-mm-yyyy'));
utl_file.put_line(v_report,'To : '||to_char(trunc(v_end_date),'dd-mm-yyyy'));
utl_file.put_line(v_report,'Created : '||to_char(sysdate,'dd-mm-yyyy hh24:mi:ss'));
utl_file.new_line(v_report);
--Report Detail records
utl_file.put_line(v_report,v_header_user);
utl_file.put_line(v_report,v_sep_user);
for r_audit_user in c_audit_user(v_start_date,v_end_date) loop
v_record_user := rpad(r_audit_user.user_id,11,' ')||
rpad(r_audit_user.os_user,11,' ')||
rpad(r_audit_user.session_id,11,' ')||
rpad(r_audit_user.host,9,' ')||
rpad(r_audit_user.last_program,31,' ')||
rpad(r_audit_user.last_action,12,' ')||
rpad(r_audit_user.last_module,12,' ')||
rpad(r_audit_user.logon_day,11,' ')||
rpad(r_audit_user.logon_time,9,' ')||
rpad(r_audit_user.logoff_day,11,' ')||
rpad(r_audit_user.logoff_time,9,' ')||
lpad(r_audit_user.elapsed_minutes,15,' ');
utl_file.put_line(v_report,v_record_user);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report,v_header_ddl);
utl_file.put_line(v_report,v_sep_ddl);
for r_audit_ddl in c_audit_ddl(v_start_date,v_end_date) loop
v_record_ddl := rpad(r_audit_ddl.user_name,11,' ')||
rpad(r_audit_ddl.ddl_date,22,' ')||
rpad(r_audit_ddl.ddl_type,11,' ')||
rpad(r_audit_ddl.object_type,21,' ')||
rpad(r_audit_ddl.owner,11,' ')||
rpad(r_audit_ddl.object_name,21,' ')||
rpad(r_audit_ddl.sql_text,100,' ');
utl_file.put_line(v_report,v_record_ddl);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report,v_header_dml);
utl_file.put_line(v_report,v_sep_dml);
for r_audit_trail in c_audit_trail(v_start_date,v_end_date) loop
v_record_dml := rpad(r_audit_trail.os_username,12,' ')||
rpad(r_audit_trail.username,11,' ')||
rpad(r_audit_trail.timestamp,22,' ')||
rpad(r_audit_trail.owner,11,' ')||
rpad(r_audit_trail.obj_name,16,' ')||
rpad(r_audit_trail.action,7,' ')||
rpad(r_audit_trail.action_name,16,' ')||
rpad(r_audit_trail.ses_actions,19,' ')||
rpad(r_audit_trail.priv_used,20,' ');
utl_file.put_line(v_report,v_record_dml);
end loop;
utl_file.new_line(v_report);
utl_file.put_line(v_report, '*** End of report ***');
utl_file.fclose(v_report);*/
null;
end;
So all code is commented out, but still the error.
Any ideas?
Kind regards,
Davejust out of interest, what output do you get if you desc user_source?
I get:
NAME VARCHAR2(30)
TYPE VARCHAR2(12)
LINE NUMBER
TEXT VARCHAR2(4000)
Maybe you are looking for
-
I have a Windows Vista Full Installer disc and a Windows 7 Upgrade Disc. I am currently running a Mid-2012 MacBook Pro 13" with Mountain Lion, Boot Camp Version 5. Can I install Windows Vista through Boot Camp, then upgrade to Windows 7 or Windows 8
-
Dual Stack NW 7.0 installation with R/3 Backend as UME
I have a quick question guys. I am about to install a dual stack NW system with ADS(SQL server database on windows) and will use a R/3 Enterprise running on unix as the UME datasource. Now this R/3 enterprise backend already acts as bakend for Portal
-
How to count number of checkboxes selected from a table in sapui5
Hi I have a table in which one of the column is checkbox. Now user can check 'n' number of checkboxes in the same column. So now i need to count the number of checkboxes selected in that column. how to do that..?? Please help me on this. Thanks Sathi
-
Can't Upgrade Bootcamp With Leopard Install Disc
Hi Everyone, I just installed Leopard and wanted to upgrade my Bootcamp partition. However, when I start up in Windows and then try to install the new version, all it does is hang at Marvell Ethernet (which is the first driver to be installed). Now,
-
DataSource problem - JBossManagedConnectionPool
I'm using a datasource. The database is Oracle 9i. Everthing works fine, but after a certain time I receive these errors: [STDERR] org.jboss.util.NestedSQLException: No ManagedConnections available within configured blocking timeout ( 5000 [ms] ); -