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.
Similar Messages
-
ORA-12571 error while creating packages from Windows clients
Hello,
We are facing the ORA-12571 error while creating / replacing packages from Windows Clients connected to a 8.1.7.2.0 db on a Solaris server.
However, there are
1. no errors in connecting and creating transactions from a Sql session
2. no errors in creating / replacing unwrapped/wrapped small (few lines) packages
3. no errors in connecting from a Unix session (remote telnet sessions inclusive).
This happens only when creating wrapped/unwrapped packages, source code of which is greater than 500 kb approx.
Can somebody help me resolve this issue. Any Help would be greatly appreciated.
Regards.
Lakshmanan, KUpdate: I had unintentionally left my custom tablespace in READONLY state after an earlier experiment with transportable tablespaces. After putting the tablespace back into READ WRITE mode and creating a new template, I was successfully able to create a new db from the template.
I'm still a little curious why this procedure wouldn't work properly with a READONLY tablespace, however.
Ben -
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-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. -
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 -
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;
-
Errors while executing packages
Hi All,
we see this error repeatedly and i dont see any locks or blocking session ....i tried restarting the DB
A database error occurred while executing Stored Procedure "EDA_PUB_TRAN.READ_PUBLISH_TRANSACTION".
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
ORA-06512: at "TCMDBUSER.EDA_PUB_TRAN", line 206
ORA-06512: at line 1
In the alert log i see this message
ORA-24756: transaction does not exist
Tue Oct 18 12:57:57 2011
DISTRIB TRAN 44444444.5130F91B718F1440B94F85C6C4E5E6E700000000
is local tran 58.26.61 (hex=3a.1a.3d)
insert pending prepared tran, scn=85458496 (hex=0.0517fe40
would appreciate any help on this
Thanks874152 wrote:
Hi All,
we see this error repeatedly and i dont see any locks or blocking session ....i tried restarting the DB
A database error occurred while executing Stored Procedure "EDA_PUB_TRAN.READ_PUBLISH_TRANSACTION".
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
ORA-06512: at "TCMDBUSER.EDA_PUB_TRAN", line 206
ORA-06512: at line 1
In the alert log i see this message
ORA-24756: transaction does not exist
Tue Oct 18 12:57:57 2011
DISTRIB TRAN 44444444.5130F91B718F1440B94F85C6C4E5E6E700000000
is local tran 58.26.61 (hex=3a.1a.3d)
insert pending prepared tran, scn=85458496 (hex=0.0517fe40
would appreciate any help on this
Thanks
>Hi All,
we see this error repeatedly and i dont see any locks or blocking session ....i tried restarting the DB
A database error occurred while executing Stored Procedure "EDA_PUB_TRAN.READ_PUBLISH_TRANSACTION".
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
ORA-06512: at "TCMDBUSER.EDA_PUB_TRAN", line 206
ORA-06512: at line 1
In the alert log i see this message
ORA-24756: transaction does not exist
Tue Oct 18 12:57:57 2011
DISTRIB TRAN 44444444.5130F91B718F1440B94F85C6C4E5E6E700000000
is local tran 58.26.61 (hex=3a.1a.3d)
insert pending prepared tran, scn=85458496 (hex=0.0517fe40
would appreciate any help on this
Thanks
It is a real challenge to debug code that can not be seen.
You have a mystery & we have no clues. -
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 -
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 -
Ora-01031 error while starting oracle9i server on linux advanced redhat 3.1
I am encountering some errors while trying to start the oracle9i database on linux server.
I am getting the error ora-01031 while trying to connect to the server as sysdba.
I give the following commands
sqlplus /nolog
Sql> conn sys/xxxx as sysdba
ERROR:
ORA-01031: insufficient privileges
The listener service is started. The user "oracle" belongs to the groups oinstall and dba on linux.
When I try to connect to the sys account through enterprise manager console, it connects.
But when I try to start the database it says
ERROR:
ORA-01031: insufficient privileges
I am trying to solve this problem since the past two days but to no avail.
The last time the database was used it was not shutdown properly (we had rebooted the linux server through command prompt).
Might be this has caused some problem.
I would be very grateful to you if you could spare some time and look into this problem.Listen Sheikh Abdullah, if u don't need remote access to that server over secure conn., don't use password file authentification but change REMOTE_LOGIN_PASSWORDFILE to NONE and when u conn thru OEM as sysdba try to change his pass and then try conn thru command promt(CP) usin that new pass.
Or recreate pass file adding new pass in it, set REMOTE_LOGIN_PASSWORDFILE to exclusive or shared and conn thru CP using password file pass.
Try this possible solutions in order u wish. -
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 900 error while executing MERGE statement
Hi All,
I am using Oracle 11 Rg1.
I have a summarization process running daily where the process of execution is as follows:-
1. Data loads every 10 min into a transaction table from external dat files
2. I have a package with 13 stored procedures - each procedure has a MERGE logic to summarize data from the above table into a summarization table. Each procedure select data depending on the business requirement
3. A wrapper file is invoked by a crontab daily to execute each procedue in the above package sequentially
4. Each of the 13 procs is executed and data summarized daily into the summarization tables
From a few days, I have been getting a strange error - where 5 of the stored procs are failing with the error code and description as ORA 900 - invalid sql statement. The structure of all the 13 procs is the same. The only difference is in the MERGE logic WHERE clauses.
Due to some data loss occurence I introduced conditions the WHERE clause that take into account pl/sql variables.
I shall paste one procedure here and provide additional details as the discussion progress to avoid making this first post very lengthy.
This logic is failing with ORA 900 when invoked from the wrapper in unix as :-
exec PKG_ODS_AV_SUMMARY.SP_LOAD_ODS_AV_SUMMARY_BYSRCCD(sysdate-1,'');
create or replace PACKAGE PKG_AV_SUMMARY AS
PROCEDURE SP_LOAD_SUMMARY_BYSRCCD (pv_sum_enddate IN DATE, pv_summm_type_indicator IN VARCHAR2);
END PKG_AV_SUMMARY;
create or replace
PACKAGE BODY PKG_AV_SUMMARY AS
--Girish:07June2011 global variables
-- Declaring package variables to hold common constant values
c_status_inprogress VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_INPROGRESS');
c_status_success VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_SUCCESS');
c_status_failure VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSTATUS_FAILURE');
c_summaryType_fullLoad VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSUMMTYPE_FULL');
c_summaryType_incrementLoad VARCHAR2(50) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSSUMMTYPE_INCR');
c_errordesc_summparamisN VARCHAR2(100) := PKG_SUMMARY_COMMON.FN_GET_CONSTANTVALUE('SUMMARIZATION','ODSSUMMARYPARAMETERSERRORDESC_SUMMPARAMISN');
PROCEDURE SP_LOAD_SUMMARY_BYSRCCD (pv_sum_enddate IN DATE, pv_summm_type_indicator IN VARCHAR2)
AS
lv_table_name VARCHAR2(30) := 'AV_SUMMARY_BYSRCCD';
ln_count NUMBER;
lv_summarizationrequired VARCHAR2(2);
lv_summm_type_indicator VARCHAR2(5);
lv_sum_startdate DATE;
lv_sum_enddate DATE;
lv_partitioned_start_date DATE;
lv_partitioned_end_date DATE;
ln_errorcode NUMBER;
lv_errormsg VARCHAR2(200);
e_exception exception;
BEGIN
-- lv_summm_type_indicator is used as IN OUT parameter for SP_INS_SUMMARY_PARAMETERS procedure.
lv_summm_type_indicator := pv_summm_type_indicator;
PKG_SUMMARY_COMMON.SP_INS_SUMMARY_PARAMETERS(lv_table_name, pv_sum_enddate, lv_summm_type_indicator,
lv_sum_startdate, lv_sum_enddate, ln_errorcode, lv_errormsg);
--raise e_exception;
IF ( lv_errormsg IS NOT NULL or LENGTH(lv_errormsg) <> 0 ) THEN
raise e_exception;
END IF;
lv_summarizationrequired := PKG_SUMMARY_COMMON.FN_fetch_summarizationRequired(lv_table_name);
IF( lv_summarizationrequired = 'Y' ) THEN
BEGIN
IF( lv_summm_type_indicator = c_summaryType_fullLoad) THEN
PKG_SUMMARY_COMMON.SP_FETCH_PARTITION_DATE('ARTICLE_VIEWS',lv_sum_startdate,lv_sum_enddate,lv_partitioned_start_date,lv_partitioned_end_date);
ELSE
lv_partitioned_start_date := lv_sum_startdate;
lv_partitioned_end_date := lv_sum_enddate;
END IF;
MERGE INTO av_summary_bysrccd
USING
(SELECT LAST_DAY(TRUNC(to_timestamp(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))) AS SUMMARY_DATE,
os.acctnum,
ol.sourcecode AS sourcecode,
ol.sourcename AS sourcename,
count(1) cnt_articleview
FROM article_views os , master_sourcecode ol
where os.sourcecode = ol.sourcecode
AND os.acctnum IS NOT NULL
AND ol.sourcecode IS NOT NULL
AND os.requestdatetime IS NOT NULL
AND UPPER(os.success_ind) = 'S'
AND (
(lv_summm_type_indicator = c_summaryType_fullLoad
AND (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
AND os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
OR (lv_summm_type_indicator = c_summaryType_incrementLoad
AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
group by LAST_DAY(TRUNC(to_timestamp(os.requestdatetime, 'yyyymmddhh24:mi:ss.ff4'))),
os.acctnum,ol.sourcecode,ol.sourcename) mrg_query
ON (av_summary_bysrccd.acctnum = mrg_query.acctnum AND
av_summary_bysrccd.summary_date=mrg_query.summary_date AND
av_summary_bysrccd.sourcecode=mrg_query.sourcecode)
WHEN NOT MATCHED THEN
INSERT (SUMMARY_date,ACCTNUM,SOURCECODE,SOURCENAME,CNT_ARTICLEVIEW,ENTRY_LASTUPDATEDDATE)
VALUES(mrg_query.summary_date,mrg_query.acctnum,mrg_query.sourcecode,mrg_query.sourcename,
mrg_query.cnt_articleview,sysdate)
WHEN MATCHED THEN
UPDATE SET ods_av_summary_bysrccd.cnt_articleview=
CASE WHEN NVL(lv_summm_type_indicator,c_summaryType_incrementLoad) = c_summaryType_fullLoad THEN mrg_query.cnt_articleview
ELSE av_summary_bysrccd.cnt_articleview+mrg_query.cnt_articleview
END,
av_summary_bysrccd.entry_lastupdateddate=sysdate;
PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_success,'');
END;
ELSE
PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_failure,c_errordesc_summparamisN);
END IF;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
BEGIN
ROLLBACK;
lv_errormsg := SQLERRM;
ln_errorcode := SQLCODE;
ln_count := PKG_SUMMARY_COMMON.FN_GET_COUNTOFTABLEINSUMMPARAM(lv_table_name,c_status_inprogress);
IF ( ln_count <> 0 ) THEN
PKG_SUMMARY_COMMON.SP_UPD_SUMMARY_PARAMETERS(lv_table_name,c_status_inprogress,c_status_failure,lv_errormsg);
END IF;
COMMIT;
raise_application_error(-20004,lv_errormsg);
END;
END SP_LOAD_SUMMARY_BYSRCCD;
END PKG_AV_SUMMARY;Edited by: Chaitanya on Aug 29, 2011 1:56 AM
Edited by: Chaitanya on Aug 29, 2011 2:06 AMHi Sven,
Unfortunately, requestdatetime is a varchar2 column. The source table which has this column had been created a long back and recently we have started to take care of this issue by loading data after converting it into date format.
We have managed to locate the place in the logic where the error is occuring, but not why it might be occuring. Its due to the logic:-
AND (
(lv_summm_type_indicator = c_summaryType_fullLoad
AND (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
AND os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
OR (lv_summm_type_indicator = c_summaryType_incrementLoad
AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
)When I hardcoded the values for lv_summm_type_indicator, c_summaryType_fullLoad and c_summaryType_incrementLoad, the logic worked fine:
AND (
('INCR' = 'FULL'
AND (get_date_timestamp(os.requestdatetime) BETWEEN lv_sum_startdate AND lv_sum_enddate
AND os.entry_CreatedDate BETWEEN lv_partitioned_start_date AND lv_partitioned_end_date
OR ('INCR' = 'INCR'
AND os.entry_createddate BETWEEN lv_sum_startdate AND lv_sum_enddate )
)But, the data for the pl sql variables is coming properly as I used dbms_output statements to check. So not sure what exactly is happening. -
ORA-01653 error while executing a select query over DBLINK
Hi,
We have a query that is running to extract some data from a remote DB over DBLINK.
The query is failing by throwing the error "ORA-01653 -- Unable to extend.........".
Is this a problem with the "temp" tablespace of local database or is this with the "temp" tablespace of remote DB.
As far as my knowledge goes, I guess any statement , selecting data over dblink where the query is being fired actually in remote db over dblink uses the temp tablespace of that DB only and hence the problem should be with the temp tablespace of remote db only but I am not very sure about this.
Is there any chance that it can be problem with "temp" tablespace of local DB from where the query is being fired over dblink.
It would be really helpful if anyone can throw some light on this.
ThanksThe error stack will normally tell you if the exception is raised in the remote database.
You might try using the driving_site hint (see performance guide) to push work to the remote site or pull it local. It all depends on your particular query and explain plan.
Remember to use { code } (without the embedded spaces) tags to frame your code and explain plan so it remains formatted, if you post it here. -
Getting Error while Execute SSIS Package from Console Application
Dear All,
SSIS package working fine directly.
I got following error while execute SSIS package from C# console application.
The connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
OLE DB Destination failed validation and returned error code 0xC004800B.
One or more component failed validation.
There were errors during task validation.
Code :
public static string RunDTSPackage()
Package pkg;
Application app;
DTSExecResult pkgResults;
Variables vars;
app = new Application();
pkg = app.LoadPackage(@"D:\WORK\Package.dtsx", null);
Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = pkg.Execute();
I have recreate the application with again new connection in SSIS.
Still not working, Please provide solution if any one have.
DB : SQL Server 2008 R2
Thanks and regards,
Hardik RamwaniThe connection "{79D920D4-9229-46CA-9018-235B711F04D9}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Cannot find the connection manager with ID "{79D920D4-9229-46CA-9018-235B711F04D9}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "OLE DB Destination.Connections[OleDbConnection]"
in the connection manager collection of "OLE DB Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
Are you sure that you are running the same package via .NET which works fine from Visual Studio?
By reading error message, I can say that you have copied OLEDB task from another package OR you have deleted one OLEDB connection manager. Now when package is run this task tries to use the connection manager and not found thus throws error message.
Open all OLEDB destination tasks and you find connection manager missing. Connection Manager name should be provided there
Cheers,
Vaibhav Chaudhari
MCSA - SQL Server 2012 -
Debug error: Errors while executing step
Hi gurus:
While debugging a complex mapping, I received the following error.
DEPENDENCY: EXPR executing...
Errors while executing step
DEBUG INPUT ROW: 1
TABLE: DBG$ID2_MTL_SYSTEM_ITEM_B_GR
STATEMENT: TRACE177:TRACE180:
"GE_8_SY"
("DBG$ID2_MTL_SYSTEM_ITEM_B_GR_I$1"):=
""DW_PG".GET_COURSE("MT_1_IN$2"
("DBG$ID2_MTL_SYSTEM_ITEM_B_GR_I$1"), "MT_2_OR$2"
("DBG$ID2_MTL_SYSTEM_ITEM_B_GR_I$1"), 'CATEGORIES', 5)/*ATTRIBUTE EXPR.OUTGRP1.ID2:EXPRESSION*/;
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 41
ORA-06512: at "SYS.UTL_FILE", line 478
ORA-06512: at "DW_PKG", line 377
ORA-06512: at "DW_PKG", line 3424
ORA-01403: no data found
As a background, the error occurred at EXPR step which is calling a function. Function calls additional tables in the source schema (tables not brought into Staging) I have imported the Package from the DB (Target) Do I need to do something special for the function to be able to access the tables in the source schema?
Thanks in advance for your help.I ran into a similar problem about a year ago. Very random, but kept happening at least once a week. Finally figured out that the static IP address for our server was left in the dynamic IP address pool. So every so often, the address was dynamically assigned to a second machine. Which caused a similar type of problem that you are seeing. I don't know if this is your problem. But it sounds familiar.
Hope it helps.
Mike
Maybe you are looking for
-
Multiple values from a single function to be used SQL
I have some pl/sql code that calculates multiple values in the same procedure (multiple out parameters). Now I want to use these separate values in an SQL select. One way to do it, is creating functions for each separate value. Performance wise, I do
-
When I try to sync my I Phone at home it wants to delete my music, that I have put on from work with I tunes
-
Transfer Contacts from iPhone 3g to iPhone 4
I have around 70 contacts on my iPhone 3g and just got an iPhone 4, I don't want to have to type in every name and number again, is there an easy way to transfer contacts from my iPhone 3g to my iPhone 4?
-
My iTunes is asking me for a password to restore my latest back up, but I never set one and none of my passwords I use work, how am I supposed to restore?
-
I use openbox WM with compton and when I move tab in google-chrome, I see ugly shadow: How to remove shadows from this? Last edited by LinX (2012-12-11 20:28:16)