View a function in PL/SQL developer

I'm a sql developer, quite new to oracle.
I'm using PL/SQL developer tool. Now I would like to view how a function is defined.
But don't know how to open it.
I can see the function, when right click it I have the option of the following: Refresh, copy comma separated, Test, and describe.
How can I view the function contents?
Thanks

Hi,
You can double click on that function name, you can watch one window in left side.
If you want the bebug the fuction(first you should have the debug rights) just click on test and select ok for debug result, you watch the result step by step.
Regards
Sree

Similar Messages

  • How to debug a Package / function in PL SQL developer ??

    How can we debug a Package / function in PL SQL developer ??
    i want to debug a code line by line

    Karthick_Arp wrote:
    This question does not belong to this fourm. We have a {forum:id=260} forum for such question.Not even there Karthick. PL/SQL Developer is a 3rd party tool, not Oracle's SQL Developer, so it doesn't even belong on the Oracle forums.

  • Viewing the database version in SQL Developer

    Hello there,
    I am using SQL Developer version 1.5.0.53, and I was wondering if there is a way that I can view the database version within SQL Developer?
    I know when you log on in SQL *Plus it shows it, is there anywhere in SQL Developer that it can be viewed?
    Thanks,
    ivalum21

    There is a report.
    Data Dictionary Reports -> About Your database -> Version Banner
    but it is probably just quicker to select * from v$version;

  • Performance problem with slow VIEW from JDBC (fast from SQL Developer)

    Hi all,
    I'm experiencing following problem and would like to know if someone else also hit this one before and has a suggestion how to solve it:
    I have a pretty complicated SELECT statement that per definition returns only a few rows (~30). With no further optimization it takes ~20 seconds to return the full dataset in Oracle SQL Developer. If you add the */+ PUSH_PRED(name_of_some_inner_view) /* hint (hint is correct, stars got eaten by the OTN-forum syntax), the statement takes less than 0.5s to execute (still in SQL Developer). I saved the statement with the hint as VIEW. Selecting from the VIEW in SQL Developer is also fast.
    Now if I call the statement from JDBC (Tomcat webapp), I can see from the server console that the statement is 1:1 100% the same as the one I execute in SQL Developer. Nevertheless it takes about 20 seconds to complete.
    Here my details:
    SELECT banner FROM v$version;
    BANNER                                                                        
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production             
    PL/SQL Release 11.2.0.2.0 - Production                                          
    CORE     11.2.0.2.0     Production                                                        
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production                         
    NLSRTL Version 11.2.0.2.0 - Production                                          
    JDBC Driver used: some old odbc14.jar as well as current odbc6.jar for 11.2.0.2.0 from http://www.oracle.com/technetwork/da...10-090769.html
    SQL Developer: current version 3.2.20.09From my reading this could go wrong:
    - JDBC doesn't know the VIEW's column data types and Oracle behaves mysterious because of this (=there must be more to the SELECT than just the string, some meta-information)
    - For some reason the hint inside the VIEW is not used (unlikely)
    I also tried a Table Function/Pipelined table and selected from it as a workaround, but the result is the same: Selecting from Function is fast from SQL Developer, but slow from JDBC. All other statements that come from JDBC are as fast as they should be. I really don't know what to think of this and where the error might be.
    Is there some setting that tells Oracle not to use hints when called from JDBC?
    Thank you & Best regards,
    Blama

    Hi Bawer,
    that's what I'm thinking. Unfortunately I can't post it, as it is library code (not my lib). But in the debug-output I can see the SQL-String sent to the DB (which does include the hint).
    But I find the 2nd option you mention more likely anyway: Even if I put the hint into a VIEW and select from the view, the time-difference is there (it's even there if I use Table Functions/Pipelined table and select from the function).
    So I'd think it is more likely that something else is happening (e.g. Oracle is configured in a way that it does not use hints when called from JDBC or similar. Or the library sets some session options in order to prevent the usage of hints). But I don't know if there is even the possibility of doing so.
    Does the Oracle JDBC driver have the option to set these options?
    Does the Oracle DB have the option to set sth. like "ALTER SESSION SET dontUseHints = 'Y';"

  • MySQL functionality within Oracle SQL Developer Data Modeler

    Hi all,
    I've read a few forum posts here that lead me to believe that MySQL is not currently supported by the data modeler tool (Link #1 I got to by clicking on the Statement Of Direction link on the main page SQL Developer Data Modeler</title><meta name="Title" content="SQL Developer Data Modeler"&g… Link #2 I got to by doing a search on the word MySQL within the forum search):
    Link 1:
    SQL Developer Data Modeler Statement of Direction
    Link 2:
    Can datamodeler be used with MySQL?
    SQL Developer (not the Data Modeler tool, but the database admin-type tool not for modeling) does support MySQL using the latest MySQL Connector J 5.1 driver but, strangely,  it doesn't seem the Data Modeler supports it, though.  Can anyone please confirm that MySQL is currently unsupported for the Data Modeler tool?  Thanks in advance.

    Hi,
    it doesn't seem the Data Modeler supports it, though.
    Data Modeler doesn't have specific support for MySQL - i.e you cannot generate DDL for MySQL. Though you can import form MySQL server using JDBC connection in standalone DM or using created MySQL connection if you are using DM inside SQL Developer.
    You can import definitions for tables(columns, PK and UK constraints, indexes, foreign keys) and views.
    Philip

  • Viewing table relations inside Oracle SQL Developer

    Hi,
    I'm a PL/SQL beginner and I need to control the table relations for an Oracle database. I'm using the Oracle SQL developer tool.
    Now, how can I see the table relation inside Oracle SQL developer tool?
    Thanks

    itshak wrote:
    When working with tables based on user defined types, the FK relations between the tables are not displayed at the data modeler (and also at the worksheet query builder)
    I don't think that applies here 1041141 mentioned he is a beginner and did not mention any usage of object types.
    If you want to report an issue or possible bug, then please open an extra thread for that. In such a case it helps tremendously if you provide a working test case as well.

  • SQL Developer Data Modeler Viewer - domain datatypes

    I'm using the SQL Developer Data Modeler Viewer (that comes free with SQL Developer) to view a model that was created in Oracle SQL Developer Data Modeler (the chargeable product). The colums have all been defined using domain datatypes. I have an XML file defining the domains but I cannot see where in the viewer you can import a domian file into or where in the model's directory structure the file can be placed to be read by the viewer. Without this the columns are all showing as datatype 'Unknown'.
    Any help much appreciated, thanks.

    two set of domains can be maintained in Data Modeler:
    - per installation - they are in file defaultdomains.xml in "datamodeler\domains" directory
    - per design - they are in "domains" directory under your design directory -
    "Per installation" domains are used in your case - "per design" domains are "attached" to design - when you send the design to someone else, they are in design structure.
    Your solution - to get defaultdomains.xml file from installation where design is created and to put it in your "datamodeler\domains" directory.
    Philip

  • Demonstrating PL/SQL Functions Using SQL Developer

    Good afternoon,
    I'm starting to write some PL/SQL functions to replace some of the SQL that I use most frequently.  A couple of very simple examples would be:
    create or replace function func_test (p_1 number) return number
    is
    x number;
    y number;
    begin
    x :=1;
    y :=2;
    return p_1 * x * y;
    end func_test;
    create or replace function func_test2 (p_1 varchar2) return varchar2
    is
    return_val varchar2(10);
    begin
    select p_1 into return_val from dual;
    return return_val;
    end func_test2;
    However, at my workplace I haven't been granted create function privileges yet until I can demonstrate some examples, which is understandable.
    For the time being, without these privileges, is there a way I can build/test functions in principle locally using SQL Developer without the need to write the functions to our database? I.e. can I demonstrate the above in SQL Developer, but without wrapping in create or replace syntax?
    I hope this isn't too vague.
    Using Oracle 11gR2 (not logged in to workplace database at the moment for specific version no.)
    SQL Developer 3.4
    Thanks,
    TP

    sb92075 02-Nov-2013 19:12 (in response to TinyPenguin)
    populating test DB with data is a solvable problem.
    You don't need client data to test code (functions).
    You only need sample test data; which generally is less than a few dozen records per table.
    Absolutely, of course. Our client database is pretty messy though, and includes data prior to the implementation of more recent business rules that I need to take account of. Useful perspective though, thanks.
    rp0428 02-Nov-2013 19:14 (in response to TinyPenguin)
    Sure, but then I wouldn't have access to all the data in our client database to test functions under various circumstances.
    Huh? Why not? It's your database so what keeps you from creating a database link to your client database where all the data is?
    Also, I suppose it's not good practice to constantly write/replace/drop functions to/from a database when developing them? Better to test the function in principle and then write to the database?
    Huh? Why not? What you think a dev database is for if not for development?
    Based on your two posts so far in this thread it's understandable why they don't want to give you privileges yet. Those sample 'functions' you posted are NOT a good use for functions.
    In sql developer you can just create and save the queries you use most often. There is no need to create functions for that.
    But if you do need an anonymous function now and then just create one using sql*plus syntax:
    Our IT department are pretty sensitive about how they allow access, even to the dev environment. As you've identified, I'm not naturally a programmer so the option to play around with the data to develop some representative examples about how we can simplify and devolve SQL reporting to more members of staff is useful to me. I just wrote those two function quickly for the purpose of posting some sample data, which I thought would be helpful. Thanks for illustrating how to return their output using an anonymous block.
    FrankKulash 02-Nov-2013 19:13 (in response to TinyPenguin)
    Hi,
    The obvious solution is to get the privileges.  If your employer really wants you to do something, they need to give you the necessary privileges to do it.  It's silly for them to tell you to do something, but refuse to let you do it.
    Failing that, you can install Oracle on your own machine, as suggested above.  It's free and legitimate if you're only using it for learning and developing.  Oracle Express Edition is very easy to install.
    As a last resort, you can write functions and procedures that are local to an anonymous block, like this:
    Thanks Frank. Yeah I'm going to speak with our DBA next week about privileges. I've got XE/SQL Developer installed on my own computer - I wrote those sample functions using them - I just wasn't sure how to call/return anonymous blocks as both you and rp identified to develop at work as an interim solution.
    Thanks a lot All,
    TP.

  • SQL Developer Data Modeler - 3000$???

    The price is a joke, isn't it?
    In which point is that tool better than the PL/SQL-Developer from Allround Automations for 180$?

    You're not comparing the same things.
    Oracle SQL Developer is FREE - compare that with All Round Automations in terms of functionality.
    Oracle SQL Developer Data Modeler is a separate tool. It's a separate product and is comparable to tools like CA Erwin Data Modeler and Embarcadero's ER Studio - which are certainly not free.
    Sue

  • Package Body from SQL Developer ?

    Team I am using SQL Developer Version 2.1.1.64 But I can not able to see the package body.
    Right click on the package provides an option to 'Save Package Spec and Body', but when I save it .. it only store the package spec ..
    Is it not possible to view the package body from SQL Developer ?
    Can anyone confirm ... how to get code of package body ... ?

    Hi Bipul,
    Although there might be people here using that specific tool, there is still the dedicated SQL Developer forum to ask in:
    SQL Developer
    Regards
    Peter

  • Error ORA-28534 in sql developer

    I have an insert to a remote SQLServer database via database link. One of the inserted values is a TO_DATE function. In SQL Developer i get the ORA-28534. But in TOAD or the SQLPLUS the insert works fine.
    Database is 10.2.0.4. Sql server is 2005 accessed through oracle gateway for ODBC and easysoft ODBC driver.
    Anyone knows why would this error appear only in SQL developer?
    Detailed error:
    SQL Error: ORA-28534: Heterogeneous Services preprocessing error
    28534. 00000 - "Heterogeneous Services preprocessing error"
    *Cause:    One of the things that the Heterogeneous Services can do is
    to preprocess parts of SQL statements that contain implicit
    coercions or calls to explicit coercion functions like TO_CHAR
    TO_NUMBER or TO_DATE. For example, it could convert a call to
    TO_DATE to a bind variable, pre-evaluate the TO_DATE function
    call and pass the resulting value to the non-Oracle system as
    the bind value. This behavior is controlled by some coercion
    related capabilities. If the capabilities are set incorrectly,
    the HS could encounter errors when it attempts to do the
    preprocessing. If it does then this error will be signaled.
    *Action:   The capability table settings are controlled by the agent
    vendor and can be modified by the DBA. Contact your DBA and
    agent vendor and get the correct set of capabilities installed.
    Edited by: dsmoljanovic on Nov 13, 2009 3:35 PM
    Edited by: dsmoljanovic on Nov 13, 2009 3:36 PM

    If the code is correct, and when submitted by one client successfully and not by another client, it is reasonable to assume that one client is using different settings/environment/configuration than the other.
    And the error you've posted seems to indicate this too.

  • Still Using OLD SQL Developer - Concerns about Direction / Quality

    I've been an avid user and supporter of SQL Developer for a little over a year now; prior to that I was a Quest TOAD advocate and had been for about 10 years. I use the tool every day, primarily for object browse and PL/SQL development and debugging. I'm a DBA so I don't do a lot of development, but I really like the functionality offered in SQL Developer and find that it's a great supplement to my SQL*Plus command-line scripts. However, I'm still using v1.0.0.15.57 and don't feel like I have much incentive to update. Each time a new release comes out I get hopeful and check out the release notes, but it always seems that there are more problems introduced than bugs fixed. I have been a vocal advocate of the tool here, working to replace aging products like TOAD and SQL Navigator and singing the praises of a community-developed product like SQL Dev, but my fervor is starting to falter a bit. What's happening to the QC on this product? Seems to me that the focus has shifted from offering a compact, high-performance tool for Oracle developers and administrators in favor of a more feature-rich but less stable product. I'd like to know what others out there think about this. Am I just missing the boat?

    I just love how the community, through the SQL Developer Exchange, influences on the direction to take.
    In general, I don't have any objections on which new features get implemented when. Although some basic functionality is still lacking, like file-based development. If you support a feature, support it fully, or it will explode in your face.
    Really, the only dreadful mistake in the product is the incredibly poor Quality Assurance.
    I can't believe these guys work for the so well known reliable Oracle.
    The framework is a present from the JDeveloper team, so they should be able to focus 100% on database functionality, but as you discovered every new release introduces at least 2 new bugs for every bug fixed, plus the regression of previous fixed bugs!
    Sporting a free product is no excuse for screwing up.
    Second mistake is let the majority of bugs reported through this forum slip by. They've got us as they're most valuable QA, but often just say: "log a bug through Metalink", or just don't respond to the reported issue.
    There are several unrecoverable crashes, which really are showstoppers (issues which should be fixed before releasing), but release after release just don't get fixed, not even acknowledged. I understand some reports get buried inside threads that really have a different subject, but I've even tried putting in bold: "Unrecoverable crash:" in a new post's title, but without getting any response.
    If I can follow the posts in this forum, working for another company, surely the team can do so also, especially when it's their job for which they get paid!
    Let's just hope the next release meets the promises of improving the stability and fixing flawed features.
    Regards,
    K.

  • Query on SQL Developer Connections Tree Does Not Display Objects

    Hi Gurus, Could you please clarify on the below. As per the note ID 1458753.1, SQL Developer Connections Tree Does Not Display Objects to user in order to access database objects outside the owned schema/account. ------------------------- By default, and without granting wide privileges such as DBA, a user will only see his or her own objects in the first level object nodes under their connection.  Objects in other schemas must be accessed via the Other Users node under the connection. This is the intended functionality/display in SQL Developer. ------------------------- Is there any other way we can achieve this? Requirement is very common - user A owns all objects and user B granted read/read-write privileges on user A objects. Now user B wants to Display user A objects in the corresponding objects node of SQL developer. Could any one shed some light here? Thanks Venu

    First off, there is a dedicated SQL Developer forum where lots of the developers hang out. Those folks are way more knowledgable that we are about the tool.
    That said, I have no problem displaying dates. Do you just have a problem with this particular query/ field/ table? Or does it affect all dates? What version of SQL Developer are you using? 1.1 is out now.
    Justin

  • Load .JAR file using SQL Developer

    Hi,
    I have couple of .JAR files on my local machine which has to be loaded on to the oracle server (11g). I tried using the load Java functionality in the SQL Developer but realised one could load a java class only if you had the source code.
    Is my understanding correct or is there a way to load a JAR file using sql developer ?
    Thanks

    K,
    Thanks for the answer.
    Do you know if you have to restart oracle after loading .jar files ? I ask this because I am not aware if oracle/jvm automatically knows that the jar files have been uploaded.
    Thanks

  • Sql Developer - View source code of procedures, functions & packages in another schema

    Our developers need the ability to view procedures, function, packages etc. in the production database (using SQL DEVELOPER).  They don't have access to sign on as the owner of these
    objects in Production.  They must use their own limited access UserID for this purpose.
    This limited access UserID has been granted select privilege on DBA_SOURCE & DBA_OBJECTS.  The developers need the ability to view the source of these object via
    the tree view in SQL DEV.  They should be able to click on "other users" in the SQL DEV tree view and see a listing of the owner schema objects.  Then they should
    be able to select the desired object and view the source code.  These developers are used to using GUI interfaces.  Selecting from DBA_SOURCE would not be an
    option for them.
    I understand that if the limited user is granted SELECT ANY DICTIONARY or SELECT_CATALOG_ROLE then this functionality will work.  The problem is those
    privileges/roles  provide much more access than should be granted to these limited access users. Granting DBA to these users is also not an option.
    In TOAD and other end-user tools this functionality works when only select privilege on DBA_SOURCE & DBA_OBJECTS has been granted.  We need this same functionality
    in SQL DEV.
    While searching this forum and the internet, I see that other installations have this same issue.
    Please enhance SQL Developer with this functionality. 
    Thank you, ellen

    Just to double check that I'm interpreting the problem correctly, is the following true:
    select * from all_objects where object_name = 'DBA_SOURCE'
    returns nothing
    select * from dba_source where name = your PL/SQL module
    returns all the code

Maybe you are looking for