PL/SQL :: Find Out In Database Package Where Package Is Installed

May 28, 2013

I need to find out in DB Package where this Package is installed (in which schema). The problem is this DB Package can be installed in various schemas. This means that I can't use select user from dual or system environment SYS_CONTEXT('USERENV', 'OS_USER').

What I would need is something like $$PLSQL_UNIT

View 8 Replies


ADVERTISEMENT

PL/SQL :: How To Find Who Modified Package Code At Last

May 13, 2013

how to find who modified a package code at last? I can only find the latest modified date with USER_OBJECTS.

View 3 Replies View Related

SQL & PL/SQL :: Global Exception In Package Available Outside Package?

Jan 15, 2012

I have a package with several procedures which raise and catch an error if a foreign key constraint has been violated. I put the the following code in my package body:

e_ouder_niet_gevonden EXCEPTION;
PRAGMA EXCEPTION_INIT(e_ouder_niet_gevonden,-2291);

Now all the procedures inside the package which catch this exception in the EXCEPTION block work fine. I would like to be able to use that exception outside of my package as well though, how would I do this?

View 4 Replies View Related

Client Tools :: How To Replicate A Package In One Database To Other

Sep 4, 2013

I have a package called getEmpData in database orcl. I want to move/creat the same package on other database called ora. I want to do/simplyfy this work through PLSQL DEVELOPER.

View 3 Replies View Related

Trace Particular Object (procedure / Package) On Database?

Dec 13, 2012

How do I trace an particular object (procedure/package) on the database. my database version is Oracle 11g(11.2.0.2)

View 2 Replies View Related

Forms :: How To Call Database Package From Oracle 6i

Apr 23, 2013

I've created a database package which is having record type and one procedure. I want to execute or call this package from oracle 6i form. How to do this.

View 7 Replies View Related

How To Provide The Description And Parameters Of Job Which Calls Package On Database

Nov 3, 2011

how to provide the description and parameters of job which calls package on database

package name is some 'xxxxx'

we need to find the job which call the package 'xxxxxx'.

View 2 Replies View Related

Application Express :: Creating Procedure Using Database Package

Oct 23, 2012

I have created a procedure within a database package, but when I want to create a form based on procedure but I can't call it. I think that I have to use prefix, I am a beginner in database and I don't know how to do this.

View 4 Replies View Related

SQL & PL/SQL :: Dynamic Statement In Database Package - Missing Expression

Feb 29, 2012

I have the following statement dynamic sql statement in a database package.

begin
EXECUTE IMMEDIATE 'SELECT REPLACE(SUBSTR('||V_WHERE_CLAUSE||',1,3, ''AND'', NULL) INTO V_WHERE_FILTER FROM DUAL';
EXCEPTION
NULL;
end;

When executed it gives following error.

ORA-20000: ORA-20000: ORA-00936: missing expression
### TRACE ### ORA-06512: at "NDSS.DUP_SRCH_PKG_MOD", line 931
### END TRACE ###
### TRACE ### ORA-06512: at "NDSS.DUP_SRCH_PKG_MOD", line 935
ORA-06512: at "NDSS.DUP_SRCH_PKG_MOD", line 164
### END TRACE ###
ORA-06512: at "NDSS.DUP_SRCH_PKG_MOD", line 184
ORA-06512: at line 9

View 4 Replies View Related

SQL & PL/SQL :: Creation Of Package

Jan 12, 2011

Why Package has to be created as two parts

1) Package spec
2) Package Body ?
Quote:PLS-00304: cannot compile body of '<PACKAGE_NAME>' without its specification

I learned it as a Thumb of rule! But IF there is any rule for it give that URL/link for that.

View 25 Replies View Related

SQL & PL/SQL :: Two Different Package Can Contain Same Procedure?

Mar 31, 2011

is it possible that two different package can contain same procedure?

View 1 Replies View Related

SQL & PL/SQL :: Package To Calculate Pay

Oct 20, 2010

Trying to accomplish:

I am trying to calculate pay with a package which consists of four functions for calculations and a procedure that calls the functions to calculate net pay.

DML DDL and package

I the DML and DDL and the package as an attachment.

Problem

Errors below

32/9 PLS-00103: Encountered the symbol "E" when expecting one of the following:

, ; for group having intersect minus order start union where connect The symbol "having" was substituted for "E" to continue.

32/54 PLS-00103: Encountered the symbol ")" when expecting one of the following:

LINE/COL ERROR
-------- ----------------------------------------------------------------
. ( * @ % & - + ; / at for mod remainder rem <an exponent (**)> and or group having intersect minus order start union where connect || multiset

33/9 PLS-00103: Encountered the symbol "INTO" when expecting one of the following:

. ( ) , * @ % & = - + < / > at in is mod remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or like like2 like4 likec between || member submultiset

View 39 Replies View Related

SQL & PL/SQL :: Package And Procedure?

Jul 17, 2012

In package specification, there 3 procedures But in package body, there are 2 procedures...will this execute?

View 14 Replies View Related

SQL & PL/SQL :: Cause Of Invalid Package?

Mar 8, 2012

There are 4 packages got invalid 2 days back. when I analyze the database I came to know that there are 5 tables got truncated and 2 tables got altered during the issue period through the code. Those truncated tables have the indirect relationship with these 4 packages.but there is no any relation between these packages and altered table.

Also during that time I got the below error in my alert log.I am sure the cause this error is the invalid packages.

ORA-00600: internal error code, arguments: [kkxprpic8], [], [], [], [], [], [], []

I know if any alteration happens in a table, the refrence package will be getting as invalid. Apart from this, is there anyother cause to bring the package into invalid status? How to proceed further to find the root cause of thses invalid package?

View 6 Replies View Related

SQL & PL/SQL :: Package For Web Service

Nov 22, 2011

We are working on a POC to build Web services from Oracle PL/SQL packages. For this we need to create a PL-SQL package having a stored procedure which will accept one input parameter and sends out data sets with multiple rows.

The type of the output parameter should be compatible with JDBC so as to publish the package as a web service. We tried using an Array and Ref cursor in PL/SQL but it didn't work with JDBC.

what type of PL/SQL output we should use here?

Our Environment : Oracle 10.2.0.3.0, Jdeveloper (to convert PL/SQL package into to Web Service) and Web Logic 11G server to deploy the services.

View 4 Replies View Related

Using Dbms_rectifier_diff Package

Apr 27, 2007

I ran the dbms_rectifier_diff.differences package successfully just to know the differences after it i droppped the all tables from the schema but now I have some funny table names exist in my schema like BIN$SHabcAN0slsAAdjhf0/ABQCiA==$0. I want to remove it but dont know how, when I run the following command on sql prompt i get error message says 'sql command not properly ended'.

SQL>drop table BIN$SHabcAN0slsAAdjhf0/ABQCiA==$0;

View 1 Replies View Related

SQL & PL/SQL :: How To Debug Package

Apr 20, 2013

I have written a package including 13 procedures to insert data into a temp table but i am getting duplicate rows in dat table how to track from which procedure i am getting duplicate rows.

step 1 : procedures are inserting data using some joins into a temp table.
step 2: from temp table data will get stored into a target table where if the data already exist it will update the target table else will insert the data.(its a procedure where i used merge).

as i have duplicate data on temp table i am not able to update data on target table.

View 6 Replies View Related

PL/SQL :: Run Package In TOAD?

Jun 11, 2012

I have created a PL/SQL package and complied it and I got a meaasge with no errors.But I dont know how do I run the package to check whether the data has been populated in tables or not.I want to know do I need to write any code for execution to see the output.If I need to write how can I do it in TOAD.

View 6 Replies View Related

SQL & PL/SQL :: How To Use DBMS_SQL Package

Apr 27, 2010

How to use DBMS_SQL package. I tried with the following procedure.

CREATE OR replace PROCEDURE Crt_tab_inst(tab_name VARCHAR2,
col1_name VARCHAR2,
col1_value VARCHAR2)
IS
cur BINARY_INTEGER := dbms_sql.open_cursor;
fdbk BINARY_INTEGER;
[code]........

But when Iam executing the procedure, it is throwing the below error. This is the error Iam getting:

SQL> EXEC crt_tab_inst('MYTAB','MYCOL','NAME1');
BEGIN crt_tab_inst('MYTAB','MYCOL','NAME1'); END;
*
ERROR at line 1:
ORA-00984: column not allowed here
ORA-06512: at "SYS.DBMS_SYS_SQL", line 909
ORA-06512: at "SYS.DBMS_SQL", line 39
ORA-06512: at "SCOTT.CRT_TAB_INST", line 21
ORA-06512: at line 1

View 10 Replies View Related

PL/SQL :: Lock On Package

Feb 14, 2013

I am unable to compile my package because of a lock being held on it . Let me provide the details for better clarity .

select * from dba_ddl_locks where session_id=111 and owner='RAHUL';

session_id  owner       name                type                           mode_held         mode_requested
111           RAHUL     RAHUL_PKG        BODY                          NULL              None
111           RAHUL     RAHUL_PKG     Table/Procedure/Type      NULL              NoneThe session details of the session id 111 is as below

select sid,serial#,user#,username,command,status,process,sql_exec_start from v$session where sid=122

sid          serial#          user#                   username                     command                             status                     process      SQL_EXEC_START
111          3558             222                         RAHUL                      47                                   KILLED                   4420            13-DEC-12 02.00.00 AM

The strange this is that we have tried killing this session and the status above even shows ' 'KILLED', stilll the dba_ddl_locks is showing the lock details on the package RAHUL_PKG and we are unable to compile the package (the locking session is running since 13-Dec-2012 ) and we are unable to kill that . Also , is it like if i have executed a package that is referencing some other package then we wont be able to compile the referenced package until and unless the dependent package has completed its execution ??

View 6 Replies View Related

Executing WHOLE Package (of Procedures) At Once?

Aug 30, 2007

I could execute a package for eg if i had a package with procedures related to statistics and i run them each night, could i just do an exec on the package and it would run all those procedures??

Its not possible but i could call each procedure from ONE procedure

View 2 Replies View Related

Call A Procedure From Another Package?

Dec 10, 2007

in a certain procedure I'm trying to call a procedure from another package in the same Schema. Package-name: Haku_Hops, procedure-name: veto and submitted is a parameter called opnum. So the following brings no problem:

Hops_Haku.veto(opnum);

But what if in the beginning of the package body I create the following variable: hak_pah := 'Hops_Haku.'; Is it then in anyway possible to call this other procedure through this variable, like e.g. hak_pah||veto(opnum);?

Until now I've only gotten error, even after declaring the variable in the declaration part.

View 6 Replies View Related

Executing Function In A Package?

Mar 24, 2008

I have created one function in the package.

function : Tier_wh
package : Order_DESC

Function defined as

function TIER_WH( message in out Xorder_desc)
...
...
end;

Xorder_desc is defined as

create or replace type Xorder_desc type
(order number(10),
location number(10),
wh varchar2(20)
);

how to execute this function which is defined in the package .

View 1 Replies View Related

Truncate Partition From PL/SQL Package

May 8, 2013

I have an Oracle Package with a procedure in which

package with a procedure in which there is a truncate partition, ALTER TABLE table_name TRUNCATE partition_name DROP STORAGE and the all is run with an EXECUTE IMMEDIATE 'alter table ...' .

The point is that the procedure in the package is started from another DB via DB Link (schema USER1) and doesn't work because of lack of privileges.

Instead, if the same procedure is started as a procedure, standalone, not in the package but from the same user (USER1) it works perfectly.

Don't understand why and which privileges must give to the user to run the procedure from inside the package.

View 3 Replies View Related

SQL & PL/SQL :: Compiling Package And Seeing Error

Jun 11, 2012

How to see the error Oracle is returning?

SQL> select owner, object_name, object_type from sys.dba_objects
2 where status = 'INVALID' order by owner;

OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE
-------------------
CRMAPP
CRM
PACKAGE BODY

SQL> alter package CRMAPP.CRM compile;

Warning: Package altered with compilation errors.

SQL> show errors;
No errors.

SQL> select owner, object_name, object_type from sys.dba_objects
2 where status = 'INVALID' order by owner;

OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE
-------------------
CRMAPP
CRM
PACKAGE BODY

View 2 Replies View Related

SQL & PL/SQL :: How To Write Package For Deletion

Apr 21, 2012

how to write the package for deletion?

View 1 Replies View Related

SQL & PL/SQL :: Running Procedure Within A Package?

May 24, 2011

I have a package which has two procedures in it.

The second of which was put in just as a test:

PROCEDURE DST_RPT_INVOICE_REPRINT(refCur OUT Dsti_Rpt_Init_Pkg.RC, param_locationid VARCHAR2,
param_companycode VARCHAR2, param_frominvdate DATE, param_toinvdate DATE, param_project VARCHAR2,
param_invtype VARCHAR2, param_printed NUMBER) AS.....
Dsti_Rpt_Init_Pkg.PRINT_OUTPUT(strSql);
END DST_RPT_INVOICE_REPRINT

All this has within is an SQL statement which is built up (using the string, 'strSql') How can I view the output of a refCur to check what the final strSql is?

View 3 Replies View Related

SQL & PL/SQL :: Can Use Htp Package In Oracle Function

May 14, 2010

can we use htp package in function?

something like

if event_id = p_event_id THEN
htp.tableRowOpen;
htp.tableData(htf.bold('Evnt'), 'RIGHT', cattributes=>'CLASS=bptext');
htp.tableRowClose;
end if;

View 4 Replies View Related

SQL & PL/SQL :: Information On Package Contents

Oct 25, 2012

I am developing some automated test packages for my PL/SQL Packaged code. Going forward I can code the test package in conjunction with the code but I have some historic packages that I would like to develop these test packages for.

To save time I would like to employ oracle data dictionary views in order to construct the framework for my test package. This includes using SQL to get a list of procedures / functions within the package in order to create the test procedures (spec and body). I can do this in a basic way using the user_procedure view with something like...

SELECT 'PROCEDURE test_' || LOWER(procedure_name)
|| ' (p_result OUT VARCHAR2 IS BEGIN JTA.ACCOUNT_PROFILE_MAINT.' || procedure_name || ' END '
|| LOWER(procedure_name) || ';'
FROM user_procedures WHERE object_name = 'ACCOUNT_PROFILE_MAINT' AND subprogram_id != 0 ORDER BY subprogram_id;

However, the above only really works (in simplistic form.. without parameters) for procedures within the package. I would also like to be able to determine if the procedure listed is actually a function or procedure (so that I can alter the syntax accordingly to generate a correctly formatted string calling the program unit).

So, initially how do I determine the type of package program unit I have (Proc/Function)? Do I need to go to all_source to get this information or are there other views available I can join to?

Eventually I would like to extend this to be able to automatically include any parameters in the generated calling string.. again, is there any other option apart from all_source to get this information?

View 3 Replies View Related

Pl/sql Package For Giving Grants?

Mar 30, 2013

I am looking for a pl sql package which can give the following grants:

1. select_catalog_role
2 select any table

we want to run this package multiple names and each time we will give username as input during runtime.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved