Debugging the procedure

Hi, How can we debug the procedure in a package without sufficient privilages, is it possible ?
if possible / if not possible which is the best way/tool for debugging the stored procedures
thanks a lot

Perhaps the answer is to research Oracle security vulnerabilities and attempt a privilege escalation hack. Oh... Pete Finnigan can help to find some security holes...
Nicolas.

Similar Messages

  • Debug the procedure of "REVOKE" object privilege

    I creates two procedures, one for "GRANT ... on object" and other for "REVOKE.. from object".
    # for GRANT
    CREATE or REPLACE PROCEDURE grant_proc AS
    own VARCHAR2(30);
    nam VARCHAR2(30);
    v_cur INTEGER;
    cursor pkgs is
    select ora_dict_obj_owner, ora_dict_obj_name from SYS.event_table;
    begin
    open pkgs;
    loop
    fetch pkgs into own, nam;
    exit when pkgs%notfound;
    v_cur := dbms_sql.open_cursor;
    dbms_sql.parse(v_cur, 'GRANT SELECT ON ' || own || '.' ||nam|| ' to READ_BAANDB', dbms_sql.native);
    dbms_sql.close_cursor(v_cur);
    commit;
    delete from sys.event_table;
    commit;
    end loop;
    end;
    # for REVOKE
    CREATE or REPLACE PROCEDURE revoke_proc AS
    own VARCHAR2(30);
    nam VARCHAR2(30);
    v_cur INTEGER;
    cursor pkgs is
    select ora_dict_obj_owner, ora_dict_obj_name from SYS.event_table;
    begin
    open pkgs;
    loop
    fetch pkgs into own, nam;
    exit when pkgs%notfound;
    v_cur := dbms_sql.open_cursor;
    dbms_sql.parse(v_cur, 'REVOKE SELECT ON ' || own || '.' ||nam|| ' from READ_BAANDB', dbms_sql.native);
    dbms_sql.close_cursor(v_cur);
    commit;
    delete from sys.event_table;
    commit;
    end loop;
    end;
    The problem is at the "delete from sys.event_table". The GRANT procedure works fine, but the same syntax in REVOKE procedure did not execute, despite the "REVOKE SELECT..." run ok. So how can I debug / write out any error from the step in the procedure?

    It took me a while to remember how to write out the result of a query.
    As you can see from the metalink note example which "GRANT SELECT... to user" when I created a table in the schema. And I added DROP event in the trigger and wrote my "REVOKE SELECT..from user" procedure similar to that of GRANT. So everytime when a table was CREATED or DROPPED from schema, system would return 1 rowcount of the event_table before the GRANT or REVOKE process run.
    I also checked the total row count before and after both GRANT and REVOKE procedures in either trigger and in grant_job procedure, the total row count return from before and after is always 1 no matter whether is GRANT or REVOKE process. The end of trigger commits everything. However, only the GRANT commits completely, ie delete from sys.event_table; not the REVOKE section.
    SQL> set serveroutput on
    SQL> create table a1 (c number);
    row count before: 1
    row count after: 1
    Table created.
    SQL> select * from sys.event_table;
    no rows selected
    SQL> drop table a1;
    row count before: 1
    row count after: 1
    Table dropped.
    SQL> select * from sys.event_table;
    ORA_DICT_OBJ_OWNER ORA_DICT_OBJ_NAME
    BAANDB A1
    Message was edited by:
    CIATECPCV

  • What is meant by debugging? and the procedure of debugging?

    what is meant by debugging? and the procedure of debugging?

    What is mean by debugging ? http://en.wikipedia.org/wiki/Debugging
    The procedure is many: use your own methods like dbms_output, utl_file to debug your program, some third party debugger like PL/SQL developer (my favorite), TOAD or SQL Developer.

  • How to get the debug sqlserver procedure calling from powerbuilder

    How to get sqlserver debug while calling   the procedure from PowerBuilder. Please can you help
    Many Thanks
    Pol

    You are better off doing this through the native SQL server tools.  You can debug your PB code to find the variables being sent to the stored proc (if any) from PB and then use them in SQL Server Management Studio or similar.

  • Unable to debug the Data Template Error in the Log file

    Hi,
    I am unable to debug the log file error message Please can anybody explain me in detail where the error lies and how to solve the error.The log file shows the following message.
    XDO Data Engine ver 1.0
    Resp: 50554
    Org ID : 204
    Request ID: 2865643
    All Parameters: USER_ID=1318:REPORT_TYPE=Report Only:P_SET_OF_BOOKS_ID=1:TRNS_STATUS=Posted:P_APPROVED=Not Approved:PERIOD=Sep-05
    Data Template Code: ILDVAPDN
    Data Template Application Short Name: CLE
    Debug Flag: Y
    {TRNS_STATUS=Posted, REPORT_TYPE=Report Only, PERIOD=Sep-05, USER_ID=1318, P_SET_OF_BOOKS_ID=1, P_APPROVED=Not Approved}
    Calling XDO Data Engine...
    java.lang.NullPointerException
         at oracle.apps.xdo.dataengine.DataTemplateParser.getObjectVlaue(DataTemplateParser.java:1424)
         at oracle.apps.xdo.dataengine.DataTemplateParser.replaceSubstituteVariables(DataTemplateParser.java:1226)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeData(XMLPGEN.java:398)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeGroupStructure(XMLPGEN.java:281)
         at oracle.apps.xdo.dataengine.XMLPGEN.processData(XMLPGEN.java:251)
         at oracle.apps.xdo.dataengine.XMLPGEN.processXML(XMLPGEN.java:192)
         at oracle.apps.xdo.dataengine.XMLPGEN.writeXML(XMLPGEN.java:222)
         at oracle.apps.xdo.dataengine.DataProcessor.processData(DataProcessor.java:334)
         at oracle.apps.xdo.oa.util.DataTemplate.processData(DataTemplate.java:236)
         at oracle.apps.xdo.oa.cp.JCP4XDODataEngine.runProgram(JCP4XDODataEngine.java:272)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:148)
    Start of log messages from FND_FILE
    Start of After parameter Report Trigger Execution..
    Gl Set of Books.....P
    Organization NameVision Operations
    Entering TRNS STATUS POSTED****** 648Posted
    end of the trns status..687 Posted
    currency_code 20USD
    P_PRECISION 272
    precision 332
    GL NAME 40Vision Operations (USA)
    Executing the procedure get format ..
    ExecutED the procedure get format and the Result..
    End of Before Report Execution..
    End of log messages from FND_FILE
    Executing request completion options...
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 2865643 on node AP615CMR at 28-SEP-2006 07:58:26.
    Post-processing of request 2865643 failed at 28-SEP-2006 07:58:38 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 28-SEP-2006 07:58:38
    Thanks & Regards
    Suresh Singh

    Generally the DBAs are aware of the OPP service log. They can tell you the cause of the problem.
    Anyway, how did you resolve the issue?

  • How can we debug a procedure?

    we need to debug a procedure but we lost the way after oracle moved the procedure builder to enterprise manager. we can execute it via em but we need a tool for writing,debugging and executing new ones.

    An SQLPlus window and either dbms_output or an anonymous log writing procedure is all you need to develop and debug home grown code.
    Most routines can be written as anonymous pl/sql code and tested then collected together into stored procedures or packages.
    You do not need a GUI tool, but if you must use one there is a product called PL/SQL Developer that some of our developers use. The developers seem to like it a lot.
    HTH -- Mark D Powell --

  • Debugging stored procedure in SQL Server 2012

    Hi,
    Please I need your help.
    I used to debug stored procedures in SQL server 2008, 2008 R2. I'm debugging the stored procedure using SQL Server management studio. I just create a break point then I click on the debug button
    and start debugging without any problems.
    I'm talking about my local machine which I have administrator privileges on the machine. My account in the administrators group and I'm assigned in the sysadmin role in SQL server but I couldn't
    debug the stored procedure. When I create a break point and try to debug the stored procedure I'm getting a popup screen saying "To continue debugging, the firewall needs to be configured. Configuring the firewall requires privileges."
    I tried to figure out the issue but unfortunately until now I'm not able to resolve it.
    Thanks. 

    The problem resolved with help of Microsoft support but it was really strange situation.
    First, the following is my environment.
    OS is Windows 8 Pro
    SQL Server 2012
    I did try everything firewall, Anti-Virus and other thing as well. I usually type (local) on the server name TextBox. I did close my Anti-Virus program, turn off windows firewall and run SQL server as administrator but I’m still
    unable to debug.
    I just do one thing and one thing only, changed the (local) on the server name TextBox to the actual server name and everything work fine. I did try that with everything close/open my Anti-Virus program, turn
    off/one windows firewall and still work fine, and I was able to debug any T-SQL in SQL server 2012 but run it as administrator.
    Anyway, I’m happy to back on the road again.
    Thank you every single one of you who try his best to help.
    Cheers.

  • Granting system privileges DEBUG ANY PROCEDURE and CONNECT SESSION in 10gXE

    I am using Oracle DB 10g Express Edition and trying out SQL Developer. Whenever I want to debug a procedure I got the error:
    This session requires DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE user privileges.
    But I don't see these privileges to grant in the XE GUI for users.
    Does anybody know if this is supported in XE.
    Thanks.

    Hi
    Use SQL*Plus (or the apex interface), logon as dba and type this sql statements:
    grant DEBUG CONNECT SESSION to <username>;
    grant CONNECT SESSION to <username>;

  • How to debug a procedure in SQL Developer

    i am a plsql writer .... i use SQL Developer to connect to oracle on windows platform ... iam using oracle
    version 10g some time i need to debug a procedure or i want to run a procedure in debug mode
    please tell me how to do this SQL Developer

    There's great help inside sqldev, just follow the Help Contents - Concepts and usage - Running and debugging...
    Have fun,
    K.

  • How to debug the smart forms

    Hi All,
    Can any body guide me how to debug the smart forms.
    Thanks & Regards,
    Satish.

    Hi,
    The the best way to debug the form is to put a breakpoint in the function module generated by the smartform.
    Procedure:
    Open the smartform we want to debug.
    Goto Environment -> Function module name.
    Open the function module in SE37. From the menu GOTO -> main program. Open the last include.
    This incude contains the entire code ie the code we have written in initalization + form routines + program lines + sap generated code.
    Even we can search for the text nodes, folders, templates, tables, graphics, address nodes etc with their names.
    Put a breakpoint at any point you want.
    If we issue any doc which triggers this form, when the control reaches the break point it will stop.
    Please note that hard-coding the break points in the code ( Program lines ) is not recommended and it can´t be done unless if it is development server.
    So, always put a session break point in the related function module.
    We can use SFTRACE transaction to know the sequence of the control flow.
    If you want to break at each and every text that is printed on the output form put the break points in the forms.
    1. %write_text  to break at text element.
    2. %WRITE_TEXT_MODULE  to break at text module.
    3. %WRITE_INCLUDE_TEXT  to break at include text.
    Please put a break point at the first sy-subrc check.
    If the control reaches this point, you can find the name of the element in the varible NAME and the content in the text node in %TEXT.
    Its easy to understand the sequence of the printing if we put a breakpoint as stated above.
    Regards,
    Satish.

  • How can we Debug the workflow?

    Hi,
    How can we debug the workflow?
    Please help  me on debugging the workflow in step by step procedure?
    Early reply is highely appriciable.
    Regards,
    Chow.

    Hi,
    If you want to set breakpoints in method which is used in workflow task then it is possible
    till ECC5 am afraid about ECC6
    you can see the graphical view of workflow through transactions said by Kalpesh
    you can also use swwl (delete workflow) for viewing the container elements of the workflow.
    SWI2_ADM1:Workitem without agents
    SWI2_DIAG:Workflow with error
    these transactions are also helpful
    Thanks & Regards
    Hari Sankar M

  • How to debug Stored Procedures on Runtime?

    Is there any way or any tool available using which I could debug stored procedures on runtime ? Please also pass the links if you know any.

    Check out the PL/SQL Developer tool:
    http://www.allroundautomations.nl/plsqldev.html
    You can download a fully functional version for a 30 day trial. Much less expensive than TOAD, and better yet, it actually works (the TOAD PL/SQL debugger in version 8 is so buggy as to render it useless)

  • Can we debug the package pa_project_pvt.add_class_categories which is called in Pa_project_pub.create_project?

    We are trying to create a project using the api code pa_project_pub.create_project. But we are unable to create due to some unexpected error status flag when pa_project_pvt.add_class_categories is executed. We  tried by going through the code but it was in vain.
    So couple of questions from our side.
    1) Can we debug the package procedure pa_project_pvt.add_class_categories by any chance?
    2) If yes, then what is the debugging process?
    Any help in this regard would be helpful.
    Thanks in advance.

    Hi,
    you may try to enable debugging via Sysadmin responsibility by setting following profile options, either for a certain user (preferred) or a certain responsibility:
    - "FND: Debug Log Enabled" set it to yes
    - "FND: Debug Log Level" set it to 1 (but only temporarily, as it generates lots of loggings)
    - "FND: Debug Log Module" set it to "pa" or "PA"
    You'll have to log off and login to apps again for the profile options to come into effect.
    Before you start your process, have a look at fnd_log_messages table (write down last value LOG_SEQUENCE,
    so you can identify the loggings for your process easier) by filtering column log_sequence, module and user_id
    (which is the user_id coming from fnd_user table).
    Make sure that you set apps context (fnd_global.apps_initialize) correctly before the logic of your api call starts.
    Regards.

  • Debug Package/Procedure in Oracle

    Hi,
    Please let me know the procedure to debug a package/procedure in oracle ( Apart from dbms_output commands). We are using Toad.
    Other option would be to
    1. Set tracing on for a particular session and analyze logs generated through tkprof
    2. Turn on Logon trigger for a user to capture all the SQLs fired.
    The issue with above options is that all system fired SQL's are also captured. It would be a tough task to wade through all the SQL's fired.
    PLease suggest the best option to debug a complex procedure/package.
    Thanks in advance.

    Create one table and caputure all results in that... Thanks!

  • DEBUG ANY PROCEDURE

    Oracle 9.2.0.6, soon to be 11.1.0.7...
    Please double-check my understanding of the documentation.
    We have at least one developer who likes to use the PL/SQL Debugger functionality, which requires DEBUG ANY PROCEDURE (http://docs.oracle.com/cd/B10501_01/appdev.920/a96590/adg10pck.htm#37819).
    Our system DBAs are wisely hesitant in granting an "ANY" privilege. My understanding is that even though this privilege has "ANY" in the name, it is not highly privileged like ALTER ANY TABLE, EXECUTE ANY PROCEDURE, etc.
    Should I (or the system DBAs) have any reservation with this privilege in development and test environments?
    The SQL reference notes that it is equivalent to granting DEBUG on every applicable object. (http://docs.oracle.com/cd/B10501_01/server.920/a96540/statements_912a.htm#2075179).
    If I read this right, and if a DBA will not grant DEBUG ANY PROCEDURE, I should be able to grant DEBUG on each PL/SQL object to the developer to get the same result?
    Thanks

    in my opinion the Debug is quite safe privilege. It will not alter the procedure.
    however still I chose not to grant it in Prod environment since it may cause locking issue (library cache pin).

Maybe you are looking for

  • Unable to clear open items for Bank GL

    Hi Experts, I have scenario where I am unable to clear bank clearing account through F-03. The Bank Clearing GL account master is NOT managed as "Balances in Local Currency only' Current issue is: Invoice is posted with USD currency Ex: $100 (1st Apr

  • My macbook pro can't "find" my disc (?!)

    I've just got the sims 3 island paradise and I've inserted the disc my macbook pro can't "find it". It asks me to insert the disc for me to be able to play when it's already in!? Why? Please help!!

  • Why No Apple Support return calls?

    Scheduled 3 calls with Apple Support, got one call and then hung up on. Called AppleCare directly, busy signal. Never had this happen before. Is anyone else having this problem? My iPhone is on, my sound is on, I used it earlier for a call, no proble

  • Unable to create PDF in Quark

    When trying to print to PDF file in Quark I receive error "Invalid Adobe PDF printer properties: Do not change spooler settings. Please select "Print directly to the printer" option (from Adobe PDF printer properties "Advanced" tab). I didn't change

  • Clearing google history from searchbar on Safari

    Yesterday my 85 year old neighbour rang in a panic thinking as he'd 'done something' and had **** on his ipad.  I went round to have a look and what I think he'd done was somehow visited an, er...'dodgy' site and bookmarked one of the pages however,