Code beautifier for PL/SQL

Does anyone know of a good code beautifier for PL/SQL?

A tool called "Formatter Plus" is available to do this job. You can download the tool from the Revealnet (recently acquired by Quest software) web site.
The URL is http://www.quest-pipelines.com/
I downloaded the 'free trail' version and it asked my
to enter the license key, which they don't supply!
WHAT A PIECE OF JUNK!

Similar Messages

  • C# Code Example for Configuring SQL 2005 Reporting Services?

    I have found the MSDN articles describing the classes, public methods, etc. for configuring SQL Server 2005 Reporting Services via WMI. I need to initially configure them and just do this:
    - Report Server Virtual Directory
    - Windows Service Identity
    - Web Service Identity
    - Database Setup
    - Email Settings
    - Execution Account
    Is there a C# code example that already exists putting together all of this? I didn't want to reinvent the wheel if I didn't need to.
    -Ed

    Jin,
    Thanks so much! This is great! Your work is awesome!
    I have a couple of issues that came up...
    1) CreateVirtualDirectory.vbs creates the virtual directory for the Report Server just fine. Now how do I distinguish a script to create the virtual directory for the Report Manager?
    2) I decided to go ahead and use what you did for scripting CreateApplicationPool (using http://msdn.microsoft.com/en-us/library/ms155349(SQL.90).aspx). I found the syntax is wrong here when I kept getting an error, so I put PowerShell on the server and pulled the following info:
    Name       : CreateApplicationPool
    MemberType : Method
    Definition : System.Management.ManagementBaseObject CreateApplicationPool(System.String Name, System.Boolean UseBuiltIn
                 Account, System.String Account, System.String Password)
    However, I'd like to use "NT Authority\NetworkService" or "Network Service" as the account (which is an option for the Builtin accounts when I us RSConfigTool.exe). This is the syntax I used:
    objInParam.Properties_.Item(
    "Name") = "ReportServer"
    objInParam.Properties_.Item("UseBuiltInAccount") = true
    objInParam.Properties_.Item("Account") = "NT Authority\NetworkService"
    objInParam.Properties_.Item("Password") = ""
    But I always get an error with a negative number for the HRESULT.
    Any ideas?-Ed

  • SQL State S0001 error code 18456 for named sql server : jdbc errors

    When I try to connect to named instance of SQL Server 2005,the error I get it
    The database user has data reader and writer rights.
    I have used sqljdbc4.jar
    url is jdbc:sqlserver://SERVER_NAME:1433;databaseName=DATABSE_NAME;user=USERNAME;password=USER_PASSWORD
    I also tried using the jtds driver and I get State 28000 error

    You might want to make sure that the instance is specified.
    For example, when connecting to SQL Server 2008 using DBVisualizer (free) with SingleSignOn authentication, you need to use the jTDS driver AND you have to specify the instance on the server in order to connect.
    Instance-less connection requests are rejected with the same error message as wrong password:
    java.sql.SQLException Error Code: 18456

  • Code beautifier for MXML and ActionScript?

    How do people reformat ugly code in FlexBuilder? I can eaisly
    format my Java, JSP, and XML in the same Eclipse environment, but
    why not MXML and ActionScript? I am very surprised this feature is
    missing. It's quite common that I copy code snippets from somewhere
    to FlexBuilder which are not well formatted.

    Hey guys, Be patient...
    Don't forget the years of Java development that have advanced
    Eclipse, not counting the 40 mil or so in prior development that
    IBM donated when they ported and open sourced their Visual Age
    product line. I used VA it back in 96 and it was slow and clunky,
    and never would have sold against Borland's Java products.
    I'm sure the decision was consciously made by Adobe product
    management to get core feature functionality out and concentrate on
    other stuff for the next release.
    The FLEX team has done a great job and for some who have ever
    been under their delivery schedule for the size of this
    undertaking, many can appreciate how well they have done.
    Also, considering that many eclipse plugins that are free are
    worth what you pay for them (I have tested quite a few), the paltry
    $700 bucks for FLEX and the fact that it has a great debugger and
    profiler makes it worth it.
    One final opinion, no matter what anyone says, software is
    not free. You pay in time, learning curve, more time, and
    sometimes, just plain old tail chasing!
    I'm not really being critical, both of you have valid points,
    just be patient, they'll get there.

  • Javadoc for pl/sql

    Hallo,
    does anybody know a tool that automatically generates code documentation for pl/sql like javadoc does for java?
    If not, are there any guidlines or best-practices how to document stored procedures or functions in pl/sql?
    Thanks for any help,
    Michael Frenzel

    See: Re: I can't purge my recyclebin!
    Michael
    P.S. Feel free to use the search engine...

  • Not able to return value for pl/sql to shell

    Hi,
    I'm calling pl/sql script from my shell script. Have set a flag in the pl/sql. Trying to return the value of the flag back to the shell script, but it is not working. My shell is ksh
    Please help....
    SHELL code trysnir.sh file--->
    <code>
    #!/bin/ksh
    flaga=50
    echo $flaga
    flaga=`sqlplus -S user/pass@sid@/opt/local/sql/update.sql > LOGFILE`
    echo aftersql
    echo $flaga
    if [ $flaga -lt 50 ]; then
    error "Previous Load failed"
    exit 3
    fi
    echo complete
    </code>
    SQL CODE file for update.sql--->
    <code>
    variable flaga number
    declare
    sessin_id number;
    begin
    Select Load_Sessin('aaa','xx') into sessin_id from dual;
    if sessin_id is NULL then
    :flaga :=10;
    end if;
    dbms_output.put_line(flaga);
    end;
    exit :flaga
    </code>
    But this returns me --->
    +50+
    aftersql
    PL/SQL procedure successfully completed.
    tyrnir.sh[9]: procedure: unknown test operator
    complete
    Please advise.... I have been trying since past 3 hrs and tried all search and everything i could but in vain.
    Many Thanks....
    Edited by: nss280 on Aug 20, 2009 2:17 AM

    executing this way will return you the last output from the sqlplus command. I think suppressing message PL/SQL procedure successfully completed. and putting a DBMS_OUTPUT.PUT_LINE(vflag) (this you have done already) will give you the desired result. So in update.sql put some extra line as below:
    set feedback off
    set serveroutput on
    <your code goes here>
    Regards.

  • Syntax check for PL/SQL code??

    is there any tool with which we can check the syntax for code written in Pl/ SQL???
    Please help...

    Hi,
    I think Asit is trying to point you to a product called TOAD (Asit, pls correct if I'm wrong):
    http://www.quest.com/toad/
    http://www.toadsoft.com/feats.html
    http://www.samspublishing.com/articles/article.asp?p=31544&rl=1
    Regards,
    Ville

  • Is there any Tools for Code coverage for SQL Azure Database projects

    I need to capture data base code coverage for all the manual and automated test. this is for Azure DB, is there any tools available for the same? Please advise

    Hi,
    In order to code coverage for SQL Azure, use Microsoft Test Manager.
    This Link helps you in understanding and step by step procedures for manual testing.
    http://msdn.microsoft.com/en-us/library/vstudio/hh698492(v=vs.110).aspx
    Along with the above link also refer to
    http://msdn.microsoft.com/en-us/library/jj156172.aspx
    http://msdn.microsoft.com/en-us/library/jj156144.aspx
    Girish Prajwal

  • How to do UT for pl/sql code?

    Are there some tools for doing Unit Test for PL/SQL code?
    Are there any others tools,except the function of test in pl/sql developer?

    I have defined a package named pkg_utplsql_test with 1 function called btwnstr (taken from utplsql samples).
    This package/function exists in schema1@instance1.
    Now I have schema2@instance2. Here I have defiend my test package called ut_pkg_utplsql_test and this has the setup and tear down
    procs as follows:
    procedure ut_setup
    is
        begin
            null;
        end;
    procedure ut_teardown
    is
        begin
             null;
        end;Now I need to add ut_btwnstr to test the proc defined in schema1@instance1. I have defined a dblink named instance1 to
    access the package from instance2. I am confused about writing ut_btwnstr . Here is what I have done and it does compile.
    PROCEDURE ut_btwnstr IS
       BEGIN
          utAssert.eq (
          'Typical valid usage',
          pkg_utplsql_test.btwnstr@instance1(STRING_IN => 'abcdefg',START_IN => 3,END_IN => 5),'cde');
          end ut_btwnstr; Is this correct?
    And now when I need to test it, how do I call. I am confised:(.
    exec utplsql.test('pkg_utplsql_test.btwnstr@instance1',recompile_in => FALSE)

  • Using an NDS statement for a SQL stament run only once in a proceudure

    Hi,
    We're using Oracle 11.1.0.7.0.
    I'm going through code written by someone else. In this package they're using NDS for every SQL call whether it gets called multiple times or just once. Is that a good thing?
    I thought NDS was only reserved for SQL statements that get called over and over again in a procedure with possible varying 'WHERE clause' variables and so on...
    Is there ANY benefit to using NDS for SQL queries called only once in a procedure?
    Thanks

    There is no benefit unless you want to turn PL/SQL into SQL*Plus (parse once, run once)
    Procedures exist to make sure : parse at compile time, run many times.
    The code is shooting itself in its own foot.
    Or the developer must have got hold of Tom Kyte's unpublished one chapter book 'How to write unscalable applications'.
    Sybrand Bakker
    Senior Oracle DBA

  • Error: ORA-03113 while executing complex java code from Oracle PL/SQL

    Hi,
    I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
    ERROR:
    ORA-03114: not connected to ORACLE
    begin
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 13685
    Session ID: 21 Serial number: 20
    Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
    Regards,
    Saravana

    Hi Saravana:
    You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
    Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
    Best regards, Marcelo.
    PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround.

  • Possibility to register Pre-/Post-Procedures for an SQL Template Handler

    I would appreciate to see the possibility to register pre-/post-procedures for an SQL template handler in ORDS 3.0.
    Why:
    We use Oracle VPD/Row-Level-Security to secure data access. Hence a trigger sets a couple of attributes in the database session context at login time which are then used in static RLS predicates to limit which records the user can see/modify.
    With ORDS 3.0 all sessions are opened under the same technical user (e.g. APEX_REST_PUBLIC_USER), hence all users have the same/no attributes in the session context and could see/modify all data.
    To avoid this situation, I need to set the attributes (e.g. the authenticated user) in the database session context before the actual query/plsql handler is executed.
    Also, resetting the session context after the handler is executed would be good.
    This scenario is in line with scenarios 'One Big Application User' and 'Web-based applications' in http://docs.oracle.com/cd/B28359_01/network.111/b28531/vpd.htm#DBSEG98291.
    Different solution approach:
    Kris suggested to write a PL/SQL handler where the pre-procedure is called before the business logic procedure/query. This is ok for me as long as I modify data and only need to return no or little data.
    As soon as I need to return a lot of data (e.g. select c1, c19, c30 from t1), this approach will force me to write a lot of code in the PL/SQL handler in order to marshal the c1, c19 and c30 to JSON and put it in the HTTP response.
    But this is the beauty of ORDS - I can simply define a template, write a GET SQL Handler 'select c1, c19, c30 from t1'  and have the data available as REST service, without writing any code to write JSON marshaled data in the HTTP response.

    I tried to log the request at Oracle REST Data Services (ORDS) but I could only start a new discussion: Possibility to register Pre-/Post-Procedures for an SQL Template Handler
    As I mentioned there, the PL/SQL handler approach works for me as long as I have no or only little data to send back to the client (e.g. put/post/delete succeeded or an error message why the call failed).
    If I need to return a lot of data from the PL/SQL handler I would need to, as far as I understand, to marshal the data to JSON and write it to the response body in the PL/SQL handler.
    I don't want to do the marshaling, because ORDS does it better.
    However, this works for me:
    I write a pipelined stored procedure that takes as input the attributes I need to set in the session context. I then can reference it in the SQL handler:
    select * from table(my_pipelined_function(:USER, ....)
    Now the JSON/HTTP response is created by ORDS again.
    I still needed to code a couple of lines, but it is way better than duplicating the functionality already existing in ORDS.
    With the hooks it would be perfect because I would not have to write any code (apart from the procedure to set the session context attributes), just configure the REST services in ORDS.

  • Stored Procedures for Simple SQL statements

    Hi Guys,
    We are using Oracle 10g database and Web logic for frontend.
    The Product is previously developed in DotNet and SQL Server and now its going to develop into Java (Web Logic) and Oracle 10g database.
    Since the project is developed in SQL Server, there are lot many procedures written for simple sql queries. Now I would like to gather your suggestions / pointers on using procedures for simple select statements or Inserts from Java.
    I have gathered some list for using PL/SQL procedure for simple select queries like
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)
    Simple select statements are much faster than executing them from Procedure
    Pros
    Code changes for modifying select query in PL/SQL much easier than in Java
    Your help in this regard is more valuable. Please post your points / thoughts here.
    Thanks & Regards
    Srinivas
    Edited by: Srinivas_Reddy on Dec 1, 2009 4:52 PM

    Srinivas_Reddy wrote:
    Cons
    If we use procedures for select statements there are lot many Ref Cursors opened for Simple select statements (Open cursors at huge rate)No entirely correct. All SQLs that hit the SQL engine are stored as cursors.
    On the client side, you have an interface that deals with this SQL cursor. It can be a Java class, a Delphi dataset, or a PL/SQL refcursor.
    Yes, cursors are created/opened at a huge rate by the SQL engine. But is is capable of doing that. What you need to do to facilitate that is send it SQLs that uses bind variables. This enables the SQL engine to simply re-use the existing cursor for that SQL.
    Simple select statements are much faster than executing them from ProcedureAlso not really correct. SQL performance is SQL performance. It has nothing to do with how you create the SQL on the client side and what client interface you use. The SQL engine does not care whether you use a PL/SQL ref cursor or a Java class as your client interface. That does not change the SQL engine's performance.
    Yes, this can change the performance on the client side. But that is entirely in the hands of the developer and how the developer selected to use the available client interfaces to interface with the SQL cursor in the SQL engine.
    Pros
    Code changes for modifying select query in PL/SQL much easier than in JavaThis is not a pro merely for ref cursors, but using PL/SQL as the abstraction layer for the data model implemented, and having it provide a "business function" interface to clients, instead of having the clients dealing with the complexities of the data model and SQL.
    I would seriously consider ref cursors in your environment. With PL/SQL servicing as the interface, there is a single place to tune SQL, and a single place to update SQL. It allows one to make data model changes without changing or even recompiling the client. It allows one to add new business logical and processing rules, again without having to touch the client.

  • Looking for an SQL query to retreive callvariables + ECC from a RUN SCRIPT RESULT (Translation to VRU)

    Hi Team,
    I am looking for an SQL query to check the data (ECC + CallVariable) received following a RUN SCRIPT RESULT when requesting an external VRU with a Translation Route to VRU with a "Run External Script".
    I believe the data are parsed between the Termination Call Detail + Termination Call Variable .
    If you already have such an SQL query I would very much appreciate to have it.
    Thank you and Regards
    Nick

    Omar,
    with all due respect, shortening a one day's interval might not be an option for a historical report ;-)
    I would recommend to take a look the following SQL query:
    DECLARE @dateFrom DATETIME, @dateTo DATETIME
    SET @dateFrom = '2014-01-24 00:00:00'
    SET @dateTo   = '2014-01-25 00:00:00'
    SELECT
    tcv.DateTime,
    tcd.RecoveryKey,
    tcd.RouterCallKeyDay,
    tcd.RouterCallKey,
    ecv.EnterpriseName AS [ECVEnterpriseName],
    tcv.ArrayIndex,
    tcv.ECCValue
    FROM Termination_Call_Variable tcv
    JOIN
    (SELECT RouterCallKeyDay,RouterCallKey,RecoveryKey FROM Termination_Call_Detail WHERE DateTime > @dateFrom AND DateTime < @dateTo) tcd
    ON tcv.TCDRecoveryKey = tcd.RecoveryKey
    LEFT OUTER JOIN Expanded_Call_Variable ecv ON tcv.ExpandedCallVariableID = ecv.ExpandedCallVariableID
    WHERE tcv.DateTime > @dateFrom AND tcv.DateTime < @dateTo
    With variables, you can parametrize your code (for instance, you could write SET @dateFrom = ? and let the calling application fill in the datetime value in for you).
    Plus joining two large tables with all rows like you did (TCD-TCV) is never a good option.
    Another aspect to consider: all ECC's are actually arrays (always), so it's not good to leave out the index value (tcv.ArrayIndex).
    G.

  • Java.io.IOException: Server returned HTTP response code: 500 for URL:

    Hi,
    I am using java.net.URLConnection to invoke servlet which uses oracle.xml.sql.dml.OracleXMLSave for dml operations.
    I am facing below exception.
    09/05/26 17:47:50 java.io.IOException: Server returned HTTP response code: 500 for URL: http://xxx.com/servlets/com.xxx.qu.XMLDocPostOracleInsert
    09/05/26 17:47:50 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpConnection.java:)
    09/05/26 17:47:50 at com.xxx.util.http.HTTPRequester.makePostRequest(HTTPRequester.java:)
    09/05/26 17:47:50 at com.xxx.qu.PostReceiver.doPost(PostReceiver.java:145)
    09/05/26 17:47:50 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    09/05/26 17:47:50 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    09/05/26 17:47:50 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
    09/05/26 17:47:50 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
    09/05/26 17:47:50 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
    09/05/26 17:47:50 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
    09/05/26 17:47:50 at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
    09/05/26 17:47:50 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
    09/05/26 17:47:50 at java.lang.Thread.run(Thread.java:534)
    The oraclexmlsave operations are with in try-catch block as shown below, but its not getting caught there(Donnno Whyy????).Instead its giving
    exception at HttpURLConnection.getInputStream
    try{
    System.out.println("entered try :1");
    String Query="SELECT * from global_name";
    Statement CntStmt=con.createStatement();
    ResultSet rsEmailAlertQuery=CntStmt.executeQuery(Query);
    while(rsEmailAlertQuery.next()){
    System.out.println(rsEmailAlertQuery.getString(1));
    OracleXMLSave oxs = new OracleXMLSave(con,insertObject);
    System.out.println("MI B: ");
    oxs.setRowTag("row");
    oxs.setIgnoreCase(true);
    int rowsInserted = oxs.insertXML(xd);
    System.out.println("MI C: ");
    out.println("<success>TRUE</success>");
    con.commit();
    System.out.println("MI D: ");
    catch(OracleXMLSQLException e){
    System.out.println("OracleXMLSQLException");
    e.printStackTrace();
    catch(SQLException e){
    System.out.println("SQLException");
    e.printStackTrace();
    catch(Exception e){
    System.out.println("Exception");
    e.printStackTrace();
    Normal jdbc queries(rsEmailAlertQuery) are working properly.The problem is only with OracleXMLSave.
    Any help would be greatfull.
    Edited by: suryaraj on 29-May-2009 06:45

    Hi,
    May be you can get the description of the error on the server log of the server running on ip:url
    -Priyanka

Maybe you are looking for

  • Bluetooth on T500 and Win7-64bits... How hard can it be??!!

    Hello, I've read several posts about this, but none of them solved my problem. I have a T500 2055-RH2, with windows 7 64bits. I just bought a bluetooth mouse online and imagine how I feel after 3 hours of useless debugging to install a mouse. Actuall

  • "No Signal Input" on external VGA monitor

    About a year ago my 4 yr emac that I gave my dad starting having the video on the built in display go out periodically. When it started happening more and more, rather than get a whole new computer, we purchased a 22 widescreen VGA monitor and hooked

  • T-code F.27 or F.61 send raw data (tab delimited) to customers statements

    To enable intercompany customers to reconcile their accounts with ease we want to give them an excel file of all open items. Our thoughts are to use T-code F.27 (standard transaction for generating account statements) or F.61 and instead of sending a

  • Pages is inserting 2011 instead of 2012.

    I JUST noticed this but when I tell Pages to insert the date it inserts the correct day, month, and time but the wrong year!  2011 instead of 2012. I have it set up in services (I forgot how I did it as it was a while ago) and I usually hit Command-S

  • Nokia 5800 XM failed firmware update/GPS issues

    Hello. I'm currently having issues with my Nokia 5800. Firstly whenever attempting to update the firmware through the Nokia Ovi Suite, it fails with an "Error in the software update package configuration" error. I've read around on the forums, and I'