SQL & PL/SQL :: How To Debug The Packages
Nov 2, 2011Any ways for Debugging in PLSQL.
Ex:In a package or procedure i have thousands lines of Code how can i Debug.
Any ways for Debugging in PLSQL.
Ex:In a package or procedure i have thousands lines of Code how can i Debug.
how to debug PL/SQL code.
I mean if
procedure1 --calls---> procedure2
procedure2 --calls---> procedure3
procedure3 --calls---> procedure4
If procedure1 is my main procedure how do we know in procedure there is an unhandled exception or bug.
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.
I am not able to debug PL/SQL and i have following error..how I can enable privileges and I want to know the steps of debugging. Connecting to the database My_connection.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUEExecuting PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCPORA-01031: insufficient privilegesORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68ORA-06512: at line 1This session requires DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE user privileges.Process exited.Disconnecting from the database My_connection.
I want to run form 10g in mode debug, however when i set break point in code and press shift+ F9 ( or run Debug by click icon on Form 10) then Form still run but not run in mode debug. Now i want to run form 10g in mode debug, how do i do?
View 2 Replies View RelatedI tried to debug the procedure in Oracle SQL Developer and got the below error,
Connecting to the database TEST.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '****', '4000' )
ORA-30683: failure establishing connection to debugger
ORA-12535: TNS:operation timed out
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
Process exited.
Disconnecting from the database TEST.
Here,
TEST is my database name,
**** is IP address of my local machine
4000 is the port number, also I have set the debug port range as 4000 - 4999 in SQL DEVELOPER.
firewall is not enabled in my machine.
I want to debug the procedure using PLSQL Developer tool?How to use the debug option in that tool?.
View 1 Replies View RelatedI have a set of code being perform in the package body of a program unit I want to debug step by step and see what values are being stored during executing or running the form
/* Without HP and deposit, Down Payment(GST) = Total(GST) */
if nvl(v_deposit, 0) = 0 and nvl(v_loan_amt, 0) = 0 then
v_gst_fr_dps := 0;
v_gst_hp := 0;
v_gst_bal_pay := v_total_gst;
[code].........
Like in the above example I want to see the value in v_gst_fr_dps,v_gst_hp,v_gst_bal_pay etc when executing and display in the screen.
I am trying to debug a remote form ( on AS) in Oracle forms developer 10g . I had done everything as told and attached the port name and number to my local form builder, but debugger window doesn't popup at the time of break point. Also, i don't have any firewall installed on my application server.
View 1 Replies View RelatedWe have recently migrated our database from 10.2.0.4 to 11.2.0.2. We were able to debug procedures using PL/SQL Developer earlier but after 11g migration we are not able to debug the same procedure in 11g database.
Is it that we require 11g PL / SQL developer with 11g client installed to debug?
I'm not sure if this belong to this place. move it to the proper place.
I'm having an annoying problem: (I'm not sure if it is a problem)
- In a package body I'm trying to delete/update/insert/select the contents of a table in other schema.
- The respective synonym exists.
- I had created a role with the respective privileges over the synonym.
- I granted the role to the package's owner.
- I try to compile the package, but it keeps returning compilation errors. (Not table found)
- In standard SQL, I can delete/insert/update/select over the table.
- The only way to compile the package, without errors, is to grant the privileges directly to the package's owner.
Is it supposed to work in this way?
NAME package
---------- --------------
Anand basic Anand pascal Juliana cobol Kamala dbase Mary oracle Mary c Partick c++ Qadir assembly Qadir c Ramesh dbase Remitha c Remitha assembly Revathi pascal Revathi basic
I am currently working in form 10g and i m newbie to that technology...I want to debug my form and also check step step by values of variables which i defined.
View 1 Replies View RelatedI am unable to locate the asm packages for rhel 5 :2.6.8-128 kernel of 32 bit.
Only 64 bit rpm are availbale on OTN.Can ayone suggeet me the URL for 32 bit>
Get following output using user_source(or other) view?
Package_nameProcedure_nameline_startline_end
ABCXYZ1022
In procedure_name column it could be any procedure, function name or any object name exist in package body.
Wanted to know whether it is possible to know a trigger is getting fired due to which all packages/procedures. If it has got fired for a particular transaction say multiple times, then wanted to get details of the packages/procedures which caused an event so that trigger got fired?
View 2 Replies View RelatedI have a little problem when debugging in pl/sql developer. All date variables are always displayed DD-MON-RR. I already changed the values for Date and Time to YYYY-MM-DD HH24:MI:SS in
Tools => Preferences => User Interface / NLS Options.
But when I start debugging and watch a variable I still get eg. 17-OCT-12 without the time. I already restarted pl/sql developer. No change.
I want to debug a function which returns the table of records. When I try to add the parameters and run the debug it gives the error as
PLS-00653: aggregate/table functions are not allowed in PL/SQL scope
if there is any way to debug the function which returns table of records.
We are experiencing an issue with ORA-04068: existing state of packages has been discarded. We're running Oracle 10.2.0.4 on Solaris 10.
I'll provide the timeline of what occurred:
1.) Last night during a maintenance window I recompiled a package and package body. I ran "create or replace" statements from a script via sqlplus to recompile both package and package body. Because I am required to do all DDL under my own login (and not the schema owner login) the scripts require that the schema name be included in the "create or replace" statements. Otherwise an object will be incorrectly created in my schema. This is what happened with the package body. I discovered this when the package body would not compile.
2.) I ran a "drop package body" statement to drop the package body from MY schema.
3.) I added the proper schema name to the script and recompiled both the spec and body under the proper schema.
4.) I ran a script to check for any invalid objects under the application user schema. There were none.
5.) During the night a batch process ran which executed the package. There were several failures with the error ORA-04068: existing state of packages has been discarded.
6.) During the early AM today the error stopped. Not knowing this at the time and believing that the issue was still occurring I began searching the internet for information regarding this issue. One site I found said this could be due to DDL being done on the object (which was the case for us) and there could be an entry in the shared pool marked as invalid which our application's session may be accessing. It recommended running "alter package recompile" for the spec and body. I did this but it seems to have triggered the event again.
I also ran utlrp.sql.
I found some information suggesting the use of DBMS_SESSION.MODIFY_PACKAGE_STATE and/or RESET_PACKAGE but I'm not seeing mention of the risks/implications.
I can verify that the object is no longer in my schema and that the proper object owner has no invalid objects. I am not sure what to do to resolve the issue or keep it from occurring again.
I am trying to use dbms_jobs in Oracle 8i database.
This is the syntax I am using:
begin
dbms_job.submit(:jobno, 'SYSTEM.SHRINK_ROLLBACK_SEGS', '07-FEB-2007', NULL);
commit;
end;
i have defined the variable jobno as number!
And i am getting the error :
*
ERROR at line 1:
ORA-04068: existing state of packages has been discarded
ORA-04063: package body "SYS.DBMS_JOB" has errors
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at line 2
I then go and look at the Sys.dbms_job package and see its not compiling
I have this error:
(1): PLS-00201: identifier 'ANY_INSTANCE' must be declared
(2): PL/SQL: Item ignored
(3): PLS-00801: internal error [21076]
(4): PL/SQL: Item ignored
i dont have access to any Oracle XML related pacakges, however I have to pull the data from the following xml.Eg: The alternativeIdentifier.Name should be a column and the value should be the data for the column. Same applies to other tags under characteristics tag.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:xsi="[url]http://www.w3.org/2001/XMLSchema-instance[/url]"
xmlns:SOAP-ENV="[url]http://schemas.xmlsoap.org/soap/envelope/[/url]"
xmlns:xsd="[url]http://www.w3.org/2001/XMLSchema[/url]"
xmlns:SOAP-ENC="[url]http://schemas.xmlsoap.org/soap/encoding/[/url]"
[code]....
what is the difference using cursor in specifications & body in packages?
View 1 Replies View RelatedOracle Database: Oracle 11g Version: 11.1.0.6.0
Tool: Oracle SQL developer. Version : 1.1.3
Problem:
After completing debug of procedure from SQL Developer, whenever I try to compile that procedure or execute any query from the SQL worksheet, I get the closed connection error message. However I can debug that procedure for any number of times. Any other activity for that database connection gives closed connection error.
we have a database application which is done frequently.in these we load data throught Sql loader, we create an DB instances, we do several DML operation on the database.
now for such task in an application we need to keep an logging track of each task performed in PL/SQl procedure packages.
I am really wondering about data loading to the cloud, I've just read the documentation, but regarding the packages, I have more than 100 package and I have to "add to cart" one by one the problem is that the package body is not added by default, so you have to expand the packages one by one then select the package body right click and add to cart. This task is very tedious, is there any other options.”
View 8 Replies View RelatedI'm trying to install 11g Release 2 on a CentOS (4.9) box, but the pre-req check shows that I'm missing the following packages (I had 9 to begin):
gcc-3.4.6 (X86_64)
gcc-c++-3.4.6(X86_64)
libstdc++-devel-3.4.6
Tried to use the yum command "yum install gcc" but get the following error.
Error: cannot find a valid baseurl for repo:update
I think this is due to the "CentOS-Base.repo" file, which I've tried to update by changing the mirror URL's but no success.Then tried to find the rpms online ([URL]...
INFO: Start output from spawned process:
INFO: ----------------------------------
INFO:
INFO: rm -f ntcontab.*
[code]....
I need to figure out which Oracle Database packages are installed on a certain server.
First problem: no Enterprise Manager available. So I need some command line tools or SQL statements.
I've already found some with them I was able to spot RAC, partitioning and so on. But I'm still missing a option/command to spot
- diagnistic pack
- tuning pack
- web logic
- web server
How to export the procedure,views,function and packages in a database, by using Export commmand.
View 2 Replies View Related i want to do a schema export from Database A. There are hundreds of users under this schema.I have to import this schema into other database say B. My question's are:
1) Do i need to pre-create only schema user or all the users under it.
2) Will the schema export all the roles,procedures,packages,synonyms,funsctions and triggers?
APEX 4.2Oracle 11g Database We are using the standard exception handler that was introduced in APEX 4.1, and we have code in packages & procedures in the database (following proper processes of keeping code in the database where possible). When an exception is found in the procedures/ packages/functions, should the APEX application level exception handler catch any errors that occur or should they be handled in the package/procedure/function they occurred in? Why I ask if, we right now have exception handling code in the pl/code bodies BUT they write their errors to the same table that Apex's Exception handler does, but the errors are NOT presented to the user using the APEX exception handling mechanism.
View 2 Replies View Related