Let us say there is an oracle table A. How do i find out what stored procedures/packages/views are using this table A.
Reason to know: When some DDL changes happen on table A, how do i know what are the impacted sp/pkg/views which should also be modified. Is there any query with which i can find this?
No errors. BEGIN * ERROR at line 1: ORA-28546: connection initialization failed, probable Net8 admin error ORA-06512: at "CDSC.ENCRYPTPW", line 1 ORA-06512: at line 2
No errors. SQL>
I TRIES TO TEST SERVICE NAMES CONNECTION FROM NETMANAGER, I CAN CONNECT TO DATABASE BUT I WHEN I TRY I CONNECT TO EXTERNAL PROCEDURE IT FAILS
MY LISTENER.ORA AND TNSNAME.ORA ARE CONFIGURED AS FOLLOWS LISTENER\: SID_LIST_LISTENER = (SID_LIST =
I come from a Microsoft SQL background and am having trouble adjusting to the PL/SQL syntax. I'd like to build this up to pass back a certain value back into a web form.
IF (SELECT COUNT(*) FROM EXCURSION WHERE EXCURSION_ID = 75)= 1 THEN DBMS_OUTPUT.PUT_LINE 'True'; ELSE DBMS_OUTPUT.PUT_LINE 'False'; END IF;
I'm having trouble writing values out at the moment
oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production PL/SQL Release 11.1.0.6.0 - Production "CORE 11.1.0.6.0 Production"
I have created two new procedures. When I log in as ADMIN, I can execute these procedures.. but when i log in as WC_GUEST or WC_TECH, I cannot.. One of the procedure name is WCL_RPRTD_PARTS_REP_SEARCH, to which, I have given this: grant execute on WCL_RPRTD_PARTS_REP_SEARCH to WC_GUEST,WC_TECH;
Also, I have changed the ROLE of ADMIN, to the same role as these two users and tried.. it works fine.
I have to run queries on a gov't computer. There are errors in some of the stored procedures that will NEVER go away. Fact of life, and I have to live with it (I'm just a data analyst--not the developer of the procedures)So I do this, in the hope of trapping the error
BEGIN run_stored_proc (my_cursor, my_id, param3); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE ('ERROR IN ID (' || my_id || '). The error was ' || SQLCODE || ' -ERROR- ' ||SQLERRM); END;Well, it can still crash. SQL> @c:mysql un_test ERROR IN ID (2692). The error was -20100 -ERROR- ORA-20100: Exception occurred in some_other_stored_procedure
ORA-01422: exact fetch returns more than requested number of rowsSo it looks like run_stored_proc calls some_other_stored_procedure which is having issues. I was hoping that by trying to capture the error in the top level procedure, it would also capture the error in a lower-level "sub-procedure". This is the way a TRY-CATCH in java works. If an error happens anywhere along the way inside the TRY-CATCH, it is caught. Sure, PL/SQL ins't java, but is there a way for me to catch a lower level error and not have this code crash?
Fortunately for me, it actually doesn't crash that often. But I have to put this code in a loop, and run it for many different my_id's. And when it does crash, it isn't significant from a data analysis standpoint. I can't do without a small percentage of the data. But I'd love to be able to just run my script and not have to watch it for unexpected crashes.
Why do stored procedures and functions improve performance?
A. They reduce network round trips. B. They reduce the number of calls to the database and decrease network traffic by bundling commands. C. They reduce the number of calls to the database and decrease network traffic by using the local PL/SQL engine. D. They allow the application to perform high-speed processing locally. E. They postpone PL/SQL parsing until run time.
I think the answer should be A and B but i came across answers as B and E Can u explain me what is the difference between option A and B and does it postpone parsing till run time?
I am trying to return a value of an oracle stored procedure using Excel VBA.
OS: Win XP SP3 Excel 2003 Ora Client: 11g
By trying different things I have noticed, that I could have troubles with the ODBC-connection. Maybe I am not using the right one. To store data returned from select statements I have an ODBC-Connection (Driver: Oracle in XE), which works perfectly, e.g.:
'----------------------- Sub Extract_Data() Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim db_name, UserName, Password As String cn.Open db_name, USerName, Password
[code]....
When debugging the connection string, I find the Provider=MSDASQL5.1.
Am using Oracle 9i and developing stored procedures in SQL Developer. Have a situation where one stored procedure A is calling another B. Stored proc B builds the SQL based on parameters passed in. For one of the parameters i would like to use a bind variable in the SQL that proc B builds. The bind var is passed back to proc A as a part of the SQL string. In proc A, i then try to bind that variable to a parameter(value), however, the bind does not seeem to work.
The SQL string contained in v_SQLStatement defined as VARCHAR(4000) that is passed back to proc A looks like:
SELECT em.event_title AS event_name, e.start_date AS start_date, e.end_date AS end_date FROM d_event_ml em inner join d_event e ON em.event_id = e.event_id WHERE em.language_id = 46 AND e.end_date >= SYSDATE AND e.stream_id IN ( :v_x1 ) AND e.event_id IN (SELECT event_id FROM d_events_seas [code]....
and o_EventList is defined as REF CURSOR. i'm experiencing is that :v_x1 stays as :v_x1 and does not change.This is my first attempt at using bind vars. URL....
i need to pass table as input parameter in stored procedures. during the run time, i am getting error
CREATE OR replace TYPE emp_type IS OBJECT ( id NUMBER(4), ename VARCHAR2(10)); CREATE OR replace TYPE emp_type_tab IS TABLE OF EMP_TYPE; CREATE OR replace PROCEDURE Test_proc (in_emp_type IN EMP_TYPE_TAB) AS BEGIN FOR i IN 1.. in_emp_type.COUNT LOOP dbms_output.Put_line(in_emp_type.Id(i)); END LOOP; END; /
We are trying to use the methods/constructors in the object types and find it more similar to the procedures and functions in the packages. I am wondering how they are different from stored procs and functions and what are the advantages?
I would like to send an email with attachment using a STORE PROCEDURE, with a PL/SQL, I was testing a package called SRW.RUN_REPORT but the problem is that the report generate a pdf file but this file is storage in application server because the report server run over the application, wo we can not get the physical file to send as attach.
the problem is generate the pdf file save in a place that we can get easier.
C:UsersAdministrator>sqlplus SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 21 16:03:04 2013 Copyright (c) 1982, 2010, Oracle. All rights reserved. Enter user-name: sys@orcl as sysdba Enter password:
Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database; NAME --------- ORCL SQL> @ F:oracleproduct10.2.0db_1RDBMSADMINutlmail.sql
Requirement is to build procedure where it has 10-12 input variables but some of them (input variables) may at times be NULL.Based on this, i thought of getting into EXECUTE IMMEDIATE but this would just return rows i mean DML stmt for EXECUTE IMMEDIATE.Also, on the requirment is all parameters are present then result set be based on range on start and end date.
CREATE OR REPLACE PROCEDURE SCOTT.GetEmpList(p_recordset OUT SYS_REFCURSOR) AS BEGIN OPEN p_recordset FOR SELECT * FROM scott.emp WHERE deptno=10; END GetEmpList;
Now i would like to execute this procedure in sqlplus which will display the following:
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO 7782 CLARK MANAGER 7839 6/9/1981 2450 10 7839 KING PRESIDENT 11/17/1981 5000 10 7934 MILLER CLERK 7782 1/23/1982 1300 10
I want to execute a dynamic query which is stored in a Table.
Output of that query should be stored in database server.
Is there any way i can create a dynamic procedure? I have created a sample code but issue is i cannot make the below data type dynamic as per the query.
en com_fund_info_m%ROWTYPE; CREATE TABLE TEMP (SQLSTATEMENT VARCHAR2(100)) DECLARE TYPE r_cursor IS REF CURSOR; c_emp r_cursor; en com_fund_info_m%ROWTYPE;
I just started to play with this system and don't understand how to execute the the stored procedure (that creates report) from the APEX page. I know that they have sample documentation and java script call (show below):
<script language=”JavaScript” type=”text/javascript”> function callMyRep() { var formVal1 = document.getElementById(’P_PAR1′).value; var url; url = ‘rep1?p_session_id=&SESSION.’+'&p_par1=’+ formVal1; window.location.href=”f?p=&APP_ID.:12:&SESSION.”; w = open(url,”winRep”,”Scrollbars=1,resizable=1,width=800,height=600″); Close here. X [code]....
In this example rep1 is the stored procedure that creates report.How can I execute it using url?
I would like to create a trigger that will execute a stored procedure when a package/function/procedure is compiled. I tried creating an update trigger on user_objects, but it statues aI cannot create that trigger tyoe on views.