PLS-00103 Error While Creating Procedure
I am attempting to create the following procedure following the guidelines in Metalink Doc ID #118040.1 and I keep receiving the following error at Line #22:
Error(22,65): PLS-00103: Encountered the symbol ":" when expecting one of the following: := . ( % ; The symbol ":= was inserted before ":" to continue.
Here is my procedure code:
PROCEDURE sw_load_image( position IN NUMBER, filename VARCHAR2) AS
f_lob BFILE;
b_lob BLOB;
image_name VARCHAR2(30);
mime_type VARCHAR2(30);
dot_pos NUMBER;
BEGIN
-- Find the position of the dot ('.') located in the filename
dot_pos := INSTR(filename, '.');
-- Get the filename without extension and use it as image name
image_name := SUBSTR(filename,1,dot_pos-1);
-- Build the mime type. Retrieve the file extension and add it to 'image/'
mime_type := 'image/'||SUBSTR( filename, dot_pos+1, length(filename) );
INSERT INTO sw_images values(position, image_name, mime_type, empty_blob() ) RETURN img_data INTO b_lob;
f_lob := BFILENAME('IMG2LOAD', filename);
dbms_lob.fileopen(f_lob, dbms_lob.file_readonly);
dbms_lob.loadfromfile(b_lob, f_lob, dbms_lob.getlength(f_lob) ):
dbms_lob.fileclose(f_lob);
COMMIT;
END;
Line #22 is the line that starts 'dbms_lob.loadfromfile'. I am not seeing where I have made a mistake. Does anyone else see where I've made a mistake?
This procedure is being created on a 9i database running on W2K server and W2K client.
Thanks,
Jason
Thanks! As many times as I looked at that I can't believe I didn't see that. Thanks again.
Similar Messages
-
Compilation error while creating procedure
Hi,
I am getting compilation error while creating procedure
CREATE OR REPLACE My_CHANGEDATE IS
error_string VARCHAR2(400) := NULL;
BEGIN
Create table set_temp as select * from set;
CURSOR c1 is
SELECT a.SETNUM, b.CHANGEDATE from
set a, setsp_t2 b
where a.setnum = b.setnum
and trunc(a.changedate) < trunc(b.CHANGEDATE);
BEGIN
FOR rec IN c1 LOOP
UPDATE set SET changedate = rec.changedate
WHERE setnum = rec.setnum;
Insert into set_temp select * from set where setnum = rec.setnum;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
error_string := 'My_CHANGEDATE - '||SUBSTR(SQLERRM,1,350);
DBMS_OUTPUT.PUT_LINE(error_string);
RAISE;
END My_CHANGEDATE;I have taken your code and cleaned it up to be more readable. Please see the comments in the code.
CREATE OR REPLACE My_CHANGEDATE
IS
error_string VARCHAR2(400) := NULL;
BEGIN
/* The only way to issue DDL in a procedure is to either user
* DBMS_SQL or EXECUTE IMMEDIATE. Creating objects is generally
* not needed or recommended in frequently run code.
Create table set_temp as select * from set;
/* The cursor declarations need to go in the declaration section of the
* procedure (between IS .. BEGIN).
CURSOR c1 is
SELECT a.SETNUM, b.CHANGEDATE from
set a, setsp_t2 b
where a.setnum = b.setnum
and trunc(a.changedate) < trunc(b.CHANGEDATE);
BEGIN /* Where is the END that goes with this begin? */
/* Single record processing is generally not recommended. It is considered a "slow-by-slow" method. */
FOR rec IN c1 LOOP
UPDATE set SET changedate = rec.changedate
WHERE setnum = rec.setnum;
Insert into set_temp select * from set where setnum = rec.setnum;
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
error_string := 'My_CHANGEDATE - '||SUBSTR(SQLERRM,1,350);
DBMS_OUTPUT.PUT_LINE(error_string);
RAISE;
END My_CHANGEDATE;My general recommendations are as follows:
1. Remove the CREATE TABLE from the procedure altogether.
2. Don't use reserved words for object names (e.g. SET)
3. Remove the record by record processing and consolidate it to a single UDPATE statement as follows (note untested):
UPDATE set s
SET changedate = (
SELECT CHANGEDATE
FROM SET A
, SETSO_T2 B
WHERE A.SETNUM = B.SETNUM
AND S.SETNUM = A.SETNUM
AND TRUNC(A.CHANGEDATE) < TRUNC(B.CHANGEDATE)
WHERE EXISTS(
SELECT NULL
FROM SET A
WHERE A.SETNUM = S.SETNUM
)HTH! -
Error while creating procedure and package
Hi,
I am getting an error while creating an procedure
create or replace procedure mke_test (mke_gender varchar2) is
begin
declare global temporary table mag_hotline_glob
INDIVIDUAL_ID NUMBER,
ONE_MONTH NUMBER,
THREE_MONTH NUMBER,
SIX_MONTH NUMBER,
TWELVE_MONTH NUMBER,
CHILDREN_PRES VARCHAR2(1 BYTE)
) with replace on commit preserve rows not logged;
begin
insert into mag_hotline_glob
select * from magazine_gender;
end;
end;
can anybody plz suggestIt's a total mess. You need to read the documentation first.
Create your table separately
CREATE global temporary table mag_hotline_glob(INDIVIDUAL_ID NUMBER,
ONE_MONTH NUMBER,
THREE_MONTH NUMBER,
SIX_MONTH NUMBER,
TWELVE_MONTH NUMBER,
CHILDREN_PRES VARCHAR2(1 BYTE)) with replace on commit preserve rows not logged;Then use the procedure (I don't know why, this INSERT statement you can fire yourself)
create or replace procedure mke_test(mke_gender varchar2) is
begin
insert into mag_hotline_glob
select * from magazine_gender;
end;If you want to create the GTT inside the procedure(should be avoided) then Use EXECUTE IMMEDIATE.
By the way, where are you using the IN parameter ? It' unnecessary. -
Error while creating procedure
i am creating the procedure which is having year as arguemnt (i am couting total number of user in year)
CREATE OR REPLACE PROCEDURE sample1 (a_year varchar2(4)) IS
BEGIN
select COUNT(*) Total_Count
from users a
where a.create_dt >= TO_DATE('01-JAN-'a_year, 'dd-mon-yyyy' )
and a.create_dt <= TO_DATE('31-DEC'a_year, 'dd-mon-yyyy' );
END sample1;if i am using cursor like below
CREATE OR REPLACE PROCEDURE sample1 (a_year char,p_Parent_RS IN OUT t_CursorPtr) IS
TYPE t_CursorPtr IS REF CURSOR;
BEGIN
OPEN p_Parent_RS FOR
select 'NEW ITEMS CREATED' Column_Name, COUNT(*) Total_Count
from attribs a
where a.create_dt >= TO_DATE('01-JAN-'||a_year, 'dd-mon-yyyy' )
and a.create_dt <= TO_DATE('31-DEC-'||a_year, 'dd-mon-yyyy' )
union all
-- new locations count
select 'NEW LOCATION COUNT' Column_Name, COUNT(*) Total_Count
from location a
where a.create_dt >= TO_DATE('01-JAN-'||a_year, 'dd-mon-yyyy' )
and a.create_dt <= TO_DATE('31-DEC-'||a_year, 'dd-mon-yyyy' )
union all
-- new interface nodes
select 'NEW INTERFACE NODE' Column_Name, COUNT(*) Total_Count
from interface_node a
where A.create_dt >= TO_DATE('01-JAN-'||a_year, 'dd-mon-yyyy' )
and a.create_dt <= TO_DATE('31-DEC-'||a_year, 'dd-mon-yyyy' )
union all
-- # of items with attributes
select 'ITEMS WITH ATTRIBUTE' Column_Name, COUNT(*) Total_Count
from attribs
where label_name_code not like '0'
--and component_code not like '0'
and item_act_inact_status = 'A'
and product_type_code IN ('FG','SF','BULK','SAM')
union all
-- total # of users
select 'TOTAL NUMBER OF USER' Column_Name, COUNT(*) Total_Count
from users a
where a.stat_code = 'A';
END sample1;i am getting below error
PLS-00201: identifier 'T_CURSORPTR' must be declared -
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) -
Error While Creating PAS Procedure
Dear Friends
I am getting following error while creating PAS procedure. I login using Admin
Access to Database Admin.EWK Denied by the Operating System
What might be the reason for this error?
Rgds
SriGHi SriG,
When you try to open a PAS procedure, it creates a temporary editor work file on the client system. This file is created in the directory referenced by the DBHOME variable in the client-side lsserver.ini file. If the user doesn't have permission to write to this directory then the application will be
unable to open any database sets. So make sure your O.S. user has full access to DBHOME.
Regards,
Isabel -
Error while creating KMScheduler:Pls help
Error while creating KMScheduler:
Kind Status Priority Description Resource In Folder Location
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.crt_api.jar'. EPD_APMDM_Dkmsted.com Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.crt_api.jar'. TestSchedule Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.common_api.jar'. EPD_APMDM_Dkmsted.com Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.common_api.jar'. TestSchedule Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.framework_api.jar'. EPD_APMDM_Dkmsted.com Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.framework_api.jar'. TestSchedule Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.global.service.appproperties_api.jar'. EPD_APMDM_Dkmsted.com Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.global.service.appproperties_api.jar'. TestSchedule Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.global.service.mime_api.jar'. EPD_APMDM_Dkmsted.com Build path
Error Missing required library: 'C:Program Files/SAP/IDE/IDE70/eclipse/plugins/com.sap.km.rfwizard/lib/bc.rf.global.service.mime_api.jar'. TestSchedule Build pathHi
Initial excepiton suggest that missing "bc.sf.framework_api.jar " jar file.
check this out might hlep u
https://forums.sdn.sap.com/message.jspa?messageID=7717494
https://forums.sdn.sap.com/message.jspa?messageID=2338288
https://forums.sdn.sap.com/message.jspa?messageID=5676237
Thanks -
Hi Experts,
I am getting a strange error,while creating quantity contract in VA41 .
When ever I am trying to save the quantity contract it gives a in completion Log.
So when I am trying to complete the documents it gives a list of incomplete fields,in those fields I see a field called Net value so when I am clicking on the field its taking me "condition" tab and under that to pricing elements .
I have assigned pricing procedure to sales org.
I am not able to understand how to proceed since incomplete doc would not get saved.
Pls help .This is because the cost pricing for EK01 is missing. In t.code V/08, go to pricing procedure. In the pricing procedure, the pricing condition type is ticked as mandatory, hence you see the details in the imcompletion log. For details on cost using EK01, there are plenty of threads in the forum available. Just search, for example Re: Contion Type Line Items:EK01
Regards, -
Error while creating a new connection in ODSM for OVD
Hi all,
I am getting the following error while creating a new connection in ODSM for OVD.
Error log:
[2012-07-10T14:50:30.005+05:30] [wls_ods1] [ERROR] [] [oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000JXkC9dU3FClqwsJb6G1FyhO000003D,0] [APP: odsm#11.1.1.2.0] Server Exception during PPR, #7[[
javax.servlet.ServletException: Could not initialize class com.octetstring.vde.admin.services.client.VDEAdminServiceSoapBindingStub
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by:
=======
java.lang.NoClassDefFoundError: Could not initialize class
com.octetstring.vde.admin.services.client.VDEAdminServiceSoapBindingStub
at com.octetstring.vde.admin.services.client.ServerMgrServiceLocator.getVDEAdminService(ServerMgrServiceLocator.java:58)
at oracle.ldap.odsm.model.ovd.APServerProxy.connect(APServerProxy.java:248)
at oracle.ldap.odsm.model.ovd.APServerProxy.authenticateAs(APServerProxy.java:684)
at oracle.ldap.odsm.model.ovd.APServerProxy.authenticate(APServerProxy.java:286)
at oracle.ldap.odsm.model.ovd.APServerProxy.init(APServerProxy.java:216)
at oracle.ldap.odsm.model.ovd.APServerProxy.<init>(APServerProxy.java:198)
at oracle.ldap.odsm.model.ovd.OVDRoot.connectOVD(OVDRoot.java:185)
at oracle.ldap.odsm.ui.common.Connection.connect(Connection.java:120)
at oracle.ldap.odsm.ui.common.Visit.createConnection(Visit.java:663)
at oracle.ldap.odsm.ui.common.Login.saveChanges(Login.java:215)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 28 more
How to resolve this issue.Pls suggest me.
Regards,
-Deena.Hi Deena,
This error:
"[2012-07-10T14:50:30.005+05:30] [wls_ods1] [ERROR] [] [oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator] [tid: [ACTIVE].ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000JXkC9dU3FClqwsJb6G1FyhO000003D,0] [APP: odsm#11.1.1.2.0] Server Exception during PPR, #7[[
javax.servlet.ServletException: Could not initialize class com.octetstring.vde.admin.services.client.VDEAdminServiceSoapBindingStub"
is known issue
Go to metalink, article: Unable To Connect To OVD 11g Webinterface Using ODSM. [ID 1282757.1]
You need to apply that patch.
I hope this helps,
Thiago Leoncio. -
Error while creating a new entity row for testEO
Hi All,
I have a 1st page where I enter the employeeNumber and that particular parameter should get displayed in the 2nd page when I click on the "SubmitButton".I am moving to the 2nd page using pageContext.forwardImmediately.I am passing my parameter with this URL.But, I am getting "Error while creating a new entity row for testEO" in my code before i enter anything in " employeeNumber " field in the 1st page.
My CO code is:
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package xxfc.oracle.apps.test.OAProject1.webui;
import com.sun.java.util.collections.HashMap;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.jbo.Row;
import xxfc.oracle.apps.test.OAProject1.server.testVOImpl;
* Controller for ...
public class testCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am =(OAApplicationModule) pageContext.getApplicationModule(webBean);
testVOImpl vo1 = (testVOImpl)am.findViewObject("testVO1");
vo1.executeQuery();
Row r = vo1.first();
System.out.println("**************Error in the below Line**********************");
Row row = vo1.createRow();
vo1.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModule am =(OAApplicationModule) pageContext.getApplicationModule(webBean);
OAViewObject vo1 = (OAViewObject)am.findViewObject("testVO1");
if(!vo1.isPreparedForExecution())
vo1.executeQuery();
Row row = vo1.getCurrentRow();
am.getOADBTransaction().commit();
String strEvent = pageContext.getParameter(EVENT_PARAM);
if (strEvent.equals("update"))
String custId = pageContext.getParameter("CustID");
pageContext.putParameter("CstID",custId);
HashMap hashMap = new HashMap();
hashMap.put("CustomerId",custId);
am.getOADBTransaction().commit();
pageContext.forwardImmediately("OA.jsp?page=/xxfc/oracle/apps/test/OAProject1/webui/popupPG&CustID=custId",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
hashMap, //hashmap
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES
thanks,
AkshataHi Niranjana,
It did not work I am getting the same error.does the WHO column order in the table matters? My WHO columns are in the below order:
LAST_UPDATE_DATE
LAST_UPDATED_BY
LAST_UPDATE_LOGIN
CREATION_DATE
CREATED_BY
my error is:
oracle.jbo.RowCreateException: JBO-25017: Error while creating a new entity row for testEO.
It appears on the top of my page as a message.
Thanks,
Akshata
Edited by: Akshata on Mar 15, 2012 12:29 AM -
Error while Creating form on remote Database
Hi All
I m getting error while creating form on remote database thru
Database link
Line/Column Error
7099/21 PLS-00454: with a returning into clause, the table
expression cannot be remote or a subquery
7099/9 PL/SQL: SQL Statement ignored
7749/16 PLS-00454: with a returning into clause, the table
expression cannot be remote or a subquery
7749/9 PL/SQL: SQL Statement ignored
and statement at line specified is insert statement. and at end
of insert statement Returning caluse is there as follows
RETURNING ROWID INTO "_ROWID";
This returning clause is causing error. Does anybody knows how
to handel it??
Thanks
YogeshYogesh
I haven't seen the ora-03116 problem.
What version of Portal are you running? Are the databases at the same version? Does your table have longs or anything strange in it?
Can you query the table via the synonyms and link in sqlplus as the application schema? This is a good test because it eliminates Portal.
You should try setting up synonyms etc for the emp table. If you still get the problem then Oracle may be able to replicate it. If not, then there's sth funny about your table maybe.
I agree with Vishnu about creating everything in sqlplus. I create all my links and synonyms in sqlplus. They are all public. I have 2 synonyms: one takes you over the link the other takes you to the right schema. It's flexible and it works.
data database: D grants to P (local schema) on table T
public syn T = D.T (sys) (get the right schema)
portal dbase : public db link to data database connecting as P
public syn T = T@dblink (sys) (over the link)
P is a schema created in both databases.
Test is: P in portal dbase can "select * from T" and gets the right data.
I never, ever refer to a schema when defining a form. ie. never P.T or D.T or whatever. I always refer simply to a synonym. For the above my form would be defined simply on the table T.
Hope this helps
Greg -
Error while creating pourchase order
I am getting following error while creating PO
Account assignment mandatory for material 000000000000001335 (enter acc. ***. cat.)
Message no. ME062
Diagnosis
There is no provision for value-based inventory management for this material type in this plant. Account assignment is thus necessary.
Procedure
Please enter an account assignment category.
Please help
Regards
Ranjeeyhi,
As you are mentioning Material Type is -HAWA
Hawa material will have Valuation class as -Trading material
If we have Not ticked -Value and Qty updating for the HAWA material type then eventhrough we maintain Accounting Views. -In configuration
We get the error as a account assignment cat mandatory.
Please maintain Qty and Value update Tick then you can create PO
with regards
Shrinivas gangoor -
Error while creating new projects using api
Hello,
I am having error while creating projects using standard api, PA_PROJECT_PUB.CREATE_PROJECTS. The error I am having is as follow.
Source template ID is invalid.
===
My code is as follow:
SET SERVEROUTPUT ON SIZE 1000000
SET VERIFY OFF
define no=&amg_number
DECLARE
-- Variables used to initialize the session
l_user_id NUMBER;
l_responsibility_id NUMBER;
cursor get_key_members is
select person_id, project_role_type, rownum
from pa_project_players
where project_id = 1;
-- Counter variables
a NUMBER := 0;
m NUMBER := 0;
-- Variables needed for API standard parameters
l_commit VARCHAR2(1) := 'F';
l_init_msg_list VARCHAR2(1) := 'T';
l_api_version_number NUMBER :=1.0;
l_return_status VARCHAR2(1);
l_msg_count NUMBER;
l_msg_data VARCHAR2(2000);
-- Variables used specifically in error message retrieval
l_encoded VARCHAR2(1) := 'F';
l_data VARCHAR2(2000);
l_msg_index NUMBER;
l_msg_index_out NUMBER;
-- Variables needed for Oracle Project specific parameters
-- Input variables
l_pm_product_code VARCHAR2(30);
l_project_in pa_project_pub.project_in_rec_type;
l_key_members pa_project_pub.project_role_tbl_type;
l_class_categories pa_project_pub.class_category_tbl_type;
l_tasks_in pa_project_pub.task_in_tbl_type;
-- Record variables for loading table variables above
l_key_member_rec pa_project_pub.project_role_rec_type;
l_class_category_rec pa_project_pub.class_category_rec_type;
l_task_rec pa_project_pub.task_in_rec_type;
-- Output variables
l_workflow_started VARCHAR2(100);
l_project_out pa_project_pub.project_out_rec_type;
l_tasks_out pa_project_pub.task_out_tbl_type;
-- Exception to call messag handlers if API returns an error.
API_ERROR EXCEPTION;
BEGIN
-- Initialize the session with my user id and Projects, Vision Serves (USA0
-- responsibility:
select user_id into l_user_id
from fnd_user
where user_name = 'SSHAH';
select responsibility_id into l_responsibility_id
from fnd_responsibility_tl
where responsibility_name = 'Projects Implementation Superuser';
pa_interface_utils_pub.set_global_info(
p_api_version_number => l_api_version_number,
p_responsibility_id => l_responsibility_id,
p_user_id => l_user_id,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status);
if l_return_status != 'S' then
raise API_ERROR;
end if;
-- Provide values for input variables
-- L_PM_PRODUCT_CODE: These are stored in pa_lookups and can be defined
-- by the user. In this case we select a pre-defined one.
select lookup_code into l_pm_product_code
from pa_lookups
where lookup_type = 'PM_PRODUCT_CODE'
and meaning = 'Conversion';
-- L_PROJECT_IN: We have to provide values for all required elements
-- of this record (see p 5-13, 5-14 for the definition of the record).
-- Customers will normally select this information from some external
-- source
l_project_in.pm_project_reference := 'AGL-AMG Project &no';
l_project_in.project_name := 'AGL-AMG Project &no';
l_project_in.created_from_project_id := 1;
l_project_in.carrying_out_organization_id := 2864; /*Cons. West*/
l_project_in.project_status_code := 'UNAPPROVED';
l_project_in.start_date := '01-JAN-11';
l_project_in.completion_date := '31-DEC-11';
l_project_in.description := 'Trying Hard';
l_project_in.project_relationship_code := 'Primary';
-- L_KEY_MEMBERS: To load the key member table we load individual
-- key member records and assign them to the key member table. In
-- the example below I am selecting all of the key member setup
-- from an existing project with 4 key members ('EE-Proj-01'):
for km in get_key_members loop
-- Get the next record and load into key members record:
l_key_member_rec.person_id := km.person_id;
l_key_member_rec.project_role_type := km.project_role_type;
-- Assign this record to the table (array)
l_key_members(km.rownum) := l_key_member_rec;
end loop;
-- L_CLASS_CATEGORIES: commented out below should fix the error we get
-- because the template does not have an assigment for the mandatory class
-- 'BAS Test'
l_class_category_rec.class_category := 'Product';
l_class_category_rec.class_code := 'Non-classified';
-- Assign the record to the table (array)
l_class_categories(1) := l_class_category_rec;
-- L_TASKS_IN: We will load in a single task and a subtask providing only
-- the basic fields (see pp. 5-16,5-17,5-18 for the definition of
-- the task record)
l_task_rec.pm_task_reference := '1';
l_task_rec.pa_task_number := '1';
l_task_rec.task_name := 'Construction';
l_task_rec.pm_parent_task_reference := '' ;
l_task_rec.task_description := 'Plant function';
-- Assign the top task to the table.
l_taskS_in(1) := l_task_rec;
-- Assign values for the sub task
l_task_rec.pm_task_reference := '1.1';
l_task_rec.pa_task_number := '1.1';
l_task_rec.task_name := 'Brick laying';
l_task_rec.pm_parent_task_reference := '1' ;
l_task_rec.task_description := 'Plant building';
-- Assign the subtask to the task table.
l_tasks_in(2) := l_task_rec;
-- All inputs are assigned, so call the API:
pa_project_pub.create_project
(p_api_version_number => l_api_version_number,
p_commit => l_commit,
p_init_msg_list => l_init_msg_list,
p_msg_count => l_msg_count,
p_msg_data => l_msg_data,
p_return_status => l_return_status,
p_workflow_started => l_workflow_started,
p_pm_product_code => l_pm_product_code,
p_project_in => l_project_in,
p_project_out => l_project_out,
p_key_members => l_key_members,
p_class_categories => l_class_categories,
p_tasks_in => l_tasks_in,
p_tasks_out => l_tasks_out);
-- Check the return status, if it is not success, then raise message handling
-- exception.
IF l_return_status != 'S' THEN
dbms_output.put_line('Msg_count: '||to_char(l_msg_count));
dbms_output.put_line('Error: ret status: '||l_return_status);
RAISE API_ERROR;
END IF;
-- perform manual commit since p_commit was set to False.
COMMIT;
--HANDLE EXCEPTIONS
EXCEPTION
WHEN API_ERROR THEN
FOR i IN 1..l_msg_count LOOP
pa_interface_utils_pub.get_messages(
p_msg_count => l_msg_count,
p_encoded => l_encoded,
p_msg_index => i,
p_msg_data => l_msg_data,
p_data => l_data,
p_msg_index_out => l_msg_index_out);
dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
END LOOP;
rollback;
WHEN OTHERS THEN
dbms_output.put_line('Error: '||sqlerrm);
FOR i IN 1..l_msg_count LOOP
pa_interface_utils_pub.get_messages(
p_msg_count => l_msg_count,
p_encoded => l_encoded,
p_msg_index => i,
p_msg_data => l_msg_data,
p_data => l_data,
p_msg_index_out => l_msg_index_out);
dbms_output.put_line('ERROR: '||to_char(l_msg_index_out)||': '||l_data);
END LOOP;
rollback;
END;
===
Msg_count: 1
Error: ret status: E
ERROR: 1: Project: 'AGL-AMG Project 1123'
Source template ID is invalid.
PL/SQL procedure successfully completed.I was using a custom Application, which had a id other then 275 (which belongs to Oracle projects)
-
Error while creating MV replication group object
Hi,
I am getting error while creating replication group object. I tried to create using OEM and SQLPlus
OEM error
This error while creating M.V. rep. group object
There is a table or view named SCOTT.EMP.
It must be dropped before a materialized view can be created.
In SQLPLUS
SQL> CONNECT MVIEWADMIN/MVIEWADMIN@SWEET
Connected.
SQL>
SQL> BEGIN
2 DBMS_REPCAT.CREATE_MVIEW_REPOBJECT (
3 gname => 'SCOTT',
4 sname => 'KARTHIK',
5 oname => 'emp_mv',
6 type => 'SNAPSHOT',
7 min_communication => TRUE);
8 END;
9 /
BEGIN
ERROR at line 1:
ORA-23306: schema KARTHIK does not exist
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 2840
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 773
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 5570
ORA-06512: at "SYS.DBMS_REPCAT_SNA", line 82
ORA-06512: at "SYS.DBMS_REPCAT", line 1332
ORA-06512: at line 2
Please not already I have created KARTHIK schema.Arthik,
I think I know what may have happened.
As I can see you are trying to create support for an updateable materialized view.
You have to make sure the name of the schema that owns the materialized view is the same as the schema owner of the master table (at master site).
From the code you have shown, I bet the owner of table EMP is SCOTT.
From the other hand, you want to create materialized view EMP_MV under schema KARTHIK that refers to table SCOTT.EMP at master site.
According to the documentation, the schema name used in DBMS_REPCAT.CREATE_MVIEW_REPOBJECT must be same as the schema that owns the master table.
Please check the documentation at the link below
http://download.oracle.com/docs/cd/B19306_01/server.102/b14227/rarrcatpac.htm#i109228
I tried to reproduce your example in my environment, and I got exactly the same error which actually confirms my assumption that the reason for the error is the fact that you tried to create the materialized view in a schema with different name than the one where master table exists.
I'll skip some of the steps that I used to create the replication environment.
I have two databases, DB1.world and DB2.world
On DB2.world I will generate replication support for table EMP which belongs to user SCOTT
SQL> conn scott/*****@DB2.world
Connected.
SQL>create materialized view log on EMP with primary key;
Materialized view log created.
SQL>
SQL>conn repadmin/*****@DB2.world
Connected.
SQL>BEGIN
2 DBMS_REPCAT.CREATE_MASTER_REPGROUP(
3 gname => 'GROUPA',
4 qualifier => '',
5 group_comment => '');
6* END;
PL/SQL procedure successfully completed.
SQL>BEGIN
2 DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
3 gname => 'GROUPA',
4 type => 'TABLE',
5 oname => 'EMP',
6 sname => 'SCOTT',
7 copy_rows => TRUE,
8 use_existing_object => TRUE);
9* END;
10 /
PL/SQL procedure successfully completed.
SQL> BEGIN
2 DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
3 sname => 'SCOTT',
4 oname => 'EMP',
5 type => 'TABLE',
6 min_communication => TRUE);
7 END;
8 /
PL/SQL procedure successfully completed.
SQL>execute DBMS_REPCAT.RESUME_MASTER_ACTIVITY(gname => 'GROUPA');
PL/SQL procedure successfully completed.
SQL> select status from dba_repgroup;
STATUS
NORMAL Now let's create updateable materialized view at DB1. Before that I want to let you know that I created one sample in DB1 user named MYUSER. MVIEWADMIN is Materialized View administrator.
SQL>conn mviewadmin/****@DB1.world
Connected.
SQL> BEGIN
2 DBMS_REFRESH.MAKE(
3 name => 'MVIEWADMIN.MV_REFRESH_GROUPA',
4 list => '',
5 next_date => SYSDATE,
6 interval => '/*1:Hr*/ sysdate + 1/24',
7 push_deferred_rpc => TRUE,
8 refresh_after_errors => TRUE,
9 parallelism => 1);
10 END;
11 /
PL/SQL procedure successfully completed.
SQL> BEGIN
3 DBMS_REPCAT.CREATE_SNAPSHOT_REPGROUP(
5 gname => 'GROUPA',
7 master => 'DB2.wolrd',
9 propagation_mode => 'ASYNCHRONOUS');
11 END;
12 /
PL/SQL procedure successfully completed.
SQL>conn myuser/*****@DB1.world
Connected.
SQL>CREATE MATERIALIZED VIEW MYUSER.EMP_MV
2 REFRESH FAST
3 FOR UPDATE
4 AS SELECT EMPNO, ENAME, JOB, MGR, SAL, COMM, DEPTNO, HIREDATE
5* FROM [email protected];
Materialized view created.
SQL>conn mviewadmin/******@DB1.world
Connected.
SQL> BEGIN
2 DBMS_REFRESH.ADD(
3 name => 'MVIEWADMIN.MV_REFRESH_GROUPA',
4 list => 'MYUSER.EMP_MV',
5 lax => TRUE);
6 END;
7 /
PL/SQL procedure successfully completed.And now lets run CREATE_MVIEW_REPOBJECT.
SQL> BEGIN
2 DBMS_REPCAT.CREATE_MVIEW_REPOBJECT(
3 gname => 'GROUPA',
4 sname => 'MYUSER',
5 oname => 'EMP_MV',
6 type => 'SNAPSHOT',
7 min_communication => TRUE);
8 END;
9 /
BEGIN
ERROR at line 1:
ORA-23306: schema MYUSER does not exist
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 2840
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 773
ORA-06512: at "SYS.DBMS_REPCAT_SNA_UTL", line 5570
ORA-06512: at "SYS.DBMS_REPCAT_SNA", line 82
ORA-06512: at "SYS.DBMS_REPCAT", line 1332
ORA-06512: at line 3 I reproduced exactly the same error message.
So the problem is clearly in the schema name that owns the materialized view.
Now lets see if what would happen if I create the MV under schema SCOTT which has the same name as the schema on DB2.world where the master table exists.
SQL>conn scott/****@DB1.world
Connected.
SQL>CREATE MATERIALIZED VIEW SCOTT.EMP_MV
2 REFRESH FAST
3 FOR UPDATE
4 AS SELECT EMPNO, ENAME, JOB, MGR, SAL, COMM, DEPTNO, HIREDATE
5* FROM [email protected];
Materialized view created.
SQL>conn mviewadmin/******@DB1.world
Connected.
SQL> BEGIN
2 DBMS_REFRESH.ADD(
3 name => 'MVIEWADMIN.MV_REFRESH_GROUPA',
4 list => 'SCOTT.EMP_MV',
5 lax => TRUE);
6 END;
7 /
PL/SQL procedure successfully completed.And now lets run CREATE_MVIEW_REPOBJECT.
SQL> BEGIN
2 DBMS_REPCAT.CREATE_MVIEW_REPOBJECT(
3 gname => 'GROUPA',
4 sname => 'SCOTT',
5 oname => 'EMP_MV',
6 type => 'SNAPSHOT',
7 min_communication => TRUE);
8 END;
PL/SQL procedure successfully completed.As you can see everything works fine when the name of the schema owner of the MV at DB1.world is the same as the schema owner of the master table at DB2.world .
-- Mihajlo
Message was edited by:
tekicora -
Below is the error while creating a PR.
Plz suggest.
Period 005/Fiscal Year 2008 for not open for FM posting in value type 50
Message no. FI_E018
Diagnosis
Posting for the document of value type 50 was attempted on a date that has not been opened in FM.
Procedure
To define open time intervals for FM postings, use the following transactions:
Individual Maintenance of Open Time Intervals
Mass Maintenance of Open Time IntervalsHi Ashok,
Am not able 2 move further
For convenience am again sending the error message
Period 004/Fiscal Year 2008 for not open for FM posting in value type 50
Message no. FI_E018
Diagnosis
Posting for the document of value type 50 was attempted on a date that has not been opened in FM.
Procedure
To define open time intervals for FM postings, use the following transactions:
Individual Maintenance of Open Time Intervals
Mass Maintenance of Open Time Intervals
Maybe you are looking for
-
I have an apple id for my ipod touch at home. My company is planning to issuing Ipads. Should I use the same apple id on the ipad for those apps I purchase and would like to use on my work ipad?
-
Network speed 100Full resets to 100Half
Hello folks! I have a MBA manually connected to an Enterprise network at 100-full duplex. The user complained of long download/upload file transfer times to a network server. I found that the machine network settings reset to 100-half duplex. When I
-
Hello buddies and first of all Happy new year as it is my first thread for this year. The bloody problem is with nokia PC suite. With the older version I could copy the contacts from the phone to PC and the program would ask me if I would like to sav
-
Dreamweaver CS3 crashing.
Is anybody else getting problems where Dreamweaver CS3 keeps crashing particularly when trying to transfer files from/to a web server. I'm running it on Vista Ultimate using WebDAV as the transfer protocol, is that makes any difference. Cheers, @ndyB
-
Error - The user has no workflow Linkage. Configure workflow.
Hi All, I am getting following error in transaction Users_gen. <i><b>'The user has no workflow linkage. Configure workflow'.</b></i> SAP note says, I need to run transaction BBP_CHECK_USERS and select repair level 2. I followed these instructions bu