Tool for Syntax check

Hi,
exist a function or a tool that check if syntax in a script is correct?
Thanks a lot
Cristina

user5366366 wrote:
exist a function or a tool that check if syntax in a script is correct?Yes.. kind of. You can use DMBS_SQL to parse SQL or PL/SQL code only - without executing it. A successful parse means it passed syntax checking within that specific session environment.
A dirty method that can be used from any client is to add "+EXPLAIN PLAN+" to the SQL - and instead of asking Oracle to execute the SQL, request it to parse it and generate an execution plan for you. Again, a successful execution plan result means a successful parse - and again, for that specific session environment only.
Why is session environment important? There are NLS setting that can make an explicit string to date conversion of a literal work in one session and fail in another. The current scope of the session could point to a different schema. Etc.
So even though you may get a successful parse, it could be pretty meaningless as when it is executed the environment is different.
Which then begs the question why do you not parse it once up front, and then used the code in its "+parsed+" format? This is what stored procedure code does for you. And why it is a better option than to store the source code externally, outside Oracle, on another system.
There are also a host of other issues to consider such as security, maintenance, access control and so on, that makes stored code a significantly superior option all around than storing SQL and PL/SQL code in some external script somewhere.

Similar Messages

  • Suggestions about the best tool for quality check for an ADF application

    Hi All,
    I need a few suggestions about the best tool for quality check in our ADF applicaiton.
    ours is a small size WebCenter Portal application which neither uses any task flows nor consumes any portlets.
    It has many jspx pages that use ADF components like table etc, consume web services using web service clients, and has some java classes.
    We have come across below option to implement the code quality tools.
    1. Jdeveloper inbuilt Staus option in View tab
    2. PMD extension for Jdeveloper
    3. Red Samurai
    Few more suggestions or best practices would be really helpful.
    Thanks,
    Usha

    Some general ADF / Webcenter coding standards -
    http://umeshagarwal24.blogspot.com/2012/06/adf-coding-standards-check-points.html
    You can use JAudit as well as mentioned in the blog.

  • Extended Program Check Warning For Syntax Check

    Warning:
    Syntax Check Warning
    This Warning only Displayed in SLIN
    WHERE lgtyp IN S_LGTYP.
      Messages :
      In "SELECT SINGLE...", the where condition for the key field "LGTYP" does not test  for equality .
      There fore the single record yuor searching may not be unique.
    IF NOT S_LGTYP[] IS INITIAL.
        SELECT SINGLE * FROM T301
         WHERE lgtyp IN S_LGTYP.----
    >IT SHOWING THIS LINE
        IF SY-SUBRC NE 0.
          MESSAGE E005(Z01).
        ENDIF.
    ENDIF.

    Hi Raghu,
    When you are using SELECT SINGLE, it is always better to use EQ in the condition than IN.
    Instead of using select-options S_LGTYP, declare a parameter: P_LGTYP and if possible re-write the select query as below:
    SELECT SINGLE * FROM T301 into lv_variable
    WHERE lgtyp EQ  P_LGTYP .
    Regards
    Deepa.

  • Function Module for syntax check on the repository objects

    Hi Experts,
       Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,)
    Dr. Arif Shaik

    Hi,
    Can you please check following function modules? But I am not sure that you can get it all in one.
    EDITOR_SYNTAX_CHECK  (For any report)
    SSF_PREPARE_SYNTAX_CHECK (For any smarrt form)
    RS_SYNTAX_CHECK ( ABAP Syntax Check with Dialog and Navigation)
    CHECK_FORM_ITF_SYNTAX
    RS_DISPLAY_SYNTAX_DIAGRAM
    RS_CUA_INTERNAL_SYNTAX_CHECK
    SEO_CLASS_CHECK_INCLUDE_SYNTAX
    SEO_CLIF_GET_SYNTAX_INFO
    C195_TEST_SYNTAX_CHECK
    C1F0_PHRID_SYNTAX_CHECK
    Pls let me know if anything is unclear.
    Regards,
    Lokesh.
    Edited by: Lokesh Tarey on Apr 8, 2010 10:59 AM

  • Function for syntax check on the repository objects

    Hi Experts,
         Can anyone help me in finding out the function module used to do syntax check on Repository objects(PRograms/Smartforms/FUnction Modules...etc.,)
    Regards
    Arif Shaik

    >
    a.shaik wrote:
    > I hope I have sent the query on the ABAP forum itself
    You have posted the query on SAP PI/ XI forum....ABAP forum is different: ABAP Development
    Regards,
    Abhishek.

  • How to read a word in a abap program for syntax check

    program for finding keywords:
    into a given program name in selection screen.
    e.g Parameters Keyword in YXABC propgram.
    How to find a word in a abap program for syntax check

    Hi!
    Read table TNAPR for the program names.
    Then use the READ REPORT  statement for it and load the program into an internal table.
    Then loop at the table.
    Regards
    Tamá

  • Is there any tools or supported tools for codes check in/out?

    When a project is in a large scale, we usually will divide the system into several modules. Each one responsible for a module. Under such situation, when a programmer tries to modify his/her module code, the problem seems to have less impact. However, in case of development involving common files, I would like to have better control about program update to avoid the conflict of program versions (Just like the Visual SourceSafe supported by Visual Basic) Is there any tool like that?
    Thanks for any advise!

    Hi,
    JDeveloper supports three SCM systems out of the box which provide this kind of functionality:
    o Oracle Software Configuration Manager (SCM) is Oracle's own source control system. It's built on the Oracle database so is highly scalable and performs well. It also has a very high level of integration into JDeveloper and has been supported in the product since JDeveloper 3.2. More information here: http://otn.oracle.com/products/repository/content.html
    o CVS, probably one of the most commonly used SCM systems around because it's free, open source and very easy to use. There's a very high level of integration for CVS in the 9.0.3 version of JDeveloper. CVS doesn't scale very well to large teams, however. More information: http://www.cvshome.org.
    o ClearCase, a popular source control system from Rational Software.
    We don't currently support Visual SourceSafe, although we're investigating the best way to provide this in the near future.
    Thanks,
    Brian
    JDev Team (SCM)

  • SQL Developer 1.1.0.21: Issues with Data Grid and SQL syntax checking

    In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion.
    Is there any option to change this behavior?
    Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check.
    I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql.
    Manish

    "In this new release of SQL Dev, when I execute a SQL in the SQL Worksheet and click in the Data Grid in the Results tab and try to navigate within a record using arrow keys, the grid cell enters into edit mode by default and so I cannot use the Left or Right arrow keys to navigate the grid. I am forced to use tab key to navigate. This is counter intuitive in my opinion."
    In the "Results" tab, Click Ctrl & Tab keys (at the same time) or with mouse click on any cell other than the first column (a sequence or rownum), you will be able to navigate using the arrow keys.
    "Another issue that I have come across is with SQL syntax checking. In some cases, when I press F9 to execute a SQL, it shows the SQL as executed i.e. shows something like 0.0134 seconds in the toolbar and no results displayed. In reality, the SQL had some syntax error which were NOT reported. This can be frustrating since now I have to fall back to SQL*Plus or TOAD just for syntax check."
    The 0.0134 seconds could be the result of the most recently executed successful statement. Check the Script Output tab for errors. Use F5 (Run Script option) instead of F9.
    "I like the fact that SQLDev highlights the current SQL but it would be more useful if it just indicated the first line of the current sql instead of highlighting the whole sql."
    On the SQL statement (or code), Right Click -> Format SQL (or press Ctrl & B), proper formatting would help.
    I use version 1.0.0.15.57 and seems to be working allright.
    - Babu Rangasamy

  • Syntax check warning message related to exception

    Hello When I do extended  check to a  Z include inside  another Include SAPMV45A...
         Messages for Syntax check warnings(Error)
          Program:  SAPMV45A  Include:  ZV841INC  Row:    122  [Prio 1]
    Syntax check warning
    The exception CX_AI_SYSTEM_FAULT is neither caught nor is it declared in the
    RAISING clause of "USEREXIT_SAVE_DOCUMENT_PREPARE".
    Internal Message Code: MESSAGE G-Q
    (The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
    EXTENDED CHECK OFF/ON)
    <B>The  Piece of code is </b>
    CATCH cx_ai_system_fault .
            DATA fault TYPE REF TO cx_ai_system_fault .
            CREATE OBJECT fault. 
            WRITE :/ fault->errortext.
        ENDTRY. 
    Could you please suggest any solution

    Your code looks wrong. You don't use CREATE with an exception class inside the CATCH.  It should look something like this:
    DATA fault TYPE REF TO cx_ai_system_fault .
    TRY...
    CATCH cx_ai_system_fault INTO fault.
      WRITE :/ fault->errortext.
    ENDTRY.
    matt

  • Syntax Check for *.java files

    Hello erveryone,
    I'm wondering if anybody has an advice how to enable (if possible) syntax check in JDeveloper 10.1.2.
    For example:
    public String toString() {
    String result = "test";
    The missing return statement is not shown in the editor. It's only shown by the compiler.
    Thanks in advance
    Alex

    Thanks for your reply,
    I checked out the links you mentioned, but I think the informations about the code editor and the code assist are not very detailed.
    I checked out the tool you mentioned above (PMD) and it was quite fine unsing it for one class. But I tried to check about 300 classes at a time and it hangs after a few minutes.
    So I think it's a little improvement, but I will still look for a tool compareable to eclipse.

  • Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?

    Are there any good tool for checking security risks, Code review, memory leakages for SharePoint projects?
    I found one such tool "Fortify" in the below link. Are there any such kind of tools available which supports SharePoint?
    Reference: http://www.securityresearch.at/en/development/fortify/
    Amalaraja Fernando,
    SharePoint Architect
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you. This post is provided "AS IS" with no warrenties and confers no rights.

    Hi Amalaraja Fernando,
    I'm not sure that there is one more tool that combines all these features. But you may take a look at these solutions:
    SharePoint diagnostic manager
    SharePoint enterprise manager
    What is SPCop SharePoint Code Analysis?
    Dmitry
    Lightning Tools Check
    out our SharePoint tools and web parts |
    Lightning Tools Blog | Мой Блог

  • A year or so ago I had turned on a toolbar that sat at the top with the other toolbar, and had many tools for development and checking of websites. You could tu

    A year or so ago I had turned on a toolbar that sat at the top with the other toolbar, and had many tools for development and checking of websites. You could turn Java on/off, javascript on/off, turn on source view, and many other things. Now I cant find that toolbar. All that I can find now turns on a panel in the lower half of the window that probably does all the same stuff, but it takes up much more room. Where did that toolbar go? or was it an add-on or plug-in?

    It sounds like you may be referring to the Web Developer add-on.
    * https://addons.mozilla.org/firefox/addon/web-developer/

  • Syntax check for tables and function modules

    Hi,
    I am writing a program that perform syntax check on object such as executable programs , function modules and tables.
    Syntax check works fine for programs, but not for tables.
    How can I perform syntax check on my tables or structures?
    I get my data from the table TADIR. But I don't get my function modules from there. What is the table for this.
    Thanks 4 ur replies.
    Parvez

    hi
    good
    generally in sap while creating a table or structure we get the error and we solved them,but like reports during runtime it is not possible to check the syntax of a table or structure.
    thanks
    mrutyun^

  • Syntax check for a software component

    Hi all,
    is there a way to run a syntax check for all objects of a software component?
    Means triggering the check at software component level.
    Thanks and regards!
    Kerstin

    Hi Kerstin
    I think basis guy should know this, it`s on software component level.
    i know a tcode 'SGEN', but this is used to define a background job then compiling the software component. I`m not sure the background job log whether have this kind of error message if there are SYNTAX error.
    regards,
    Archer

  • How to Disable Syntax Checker for DDL Generation

    Would like to include shell script commands before a create table statement. Modified the .xdb but PowerDesigner does not recognize this code as it is not native to the database. Is there a way to disable the syntax check so that the create table script can include these statements rather than a number of errors? Running v15.2 of PowerDesigner. Any feedback would be appreciated!

    Hello. Yes. To be more specific, want to be able to run the create table DDL for Teradata from BTEQ. I added the following statements to a customized version of the Terada .xdb for the table BeforeCreate:
    .logon ${TD_SERVER}/${TD_USERNAME},${TD_PASSWORD}
    select 1
    from dbc.tables
    where DatabaseName =  [%QUALIFIER%]
    and TableName = '%TABLE%'
    .if errorcode > 0 then .goto error
    .if activitycount <> 1 then .goto create_tbl
    drop table %TABLE%;
    .if errorcode > 0 then .goto error
    .label create_tbl
    The DDL shows up with syntax errors as follows. So clearly, there is something that is attempting to validate the code:
    3 error(s), 0 warning(s)
    (1) (Table "DATE_DIM"):
       [syntax error] unknown macro: logon ${TD_SERVER}/${TD_USERNAME},${TD_PASSWORD}
    (8) (Table "DATE_DIM"):
       [syntax error] condition parsing error
    (16) (Table "DATE_DIM"):
       [syntax error] expecting .endif

Maybe you are looking for

  • Airport Express connection questions

    This is what I am trying to do. Can I share an internet connection to a computer that does not have a wireless connection through an Airport Express connected to the wireless router and an ethernet cable to the computer?

  • Question about Cloning

    I am using version 4.4 of LR.  Currently, the way cloning works is that you select a spot you want removed and click.  LR somehow determines an area to replace the selected area with.  Often, I have to move that area (update spot removal). Is there a

  • HT201210 how come i cant update my ipod. im trying to update it but it always says error. why?

    why cant i update my ipod? when i try to update it. it always says error. why does it say that?

  • Dynamic internal table operations

    Hi, I have an issue with dynamic internal table wherein I need to write  a  select statement with For All Entries on dynamic internal table and populating the record into another dynamic internal table. I am trying with the code below but its not wor

  • Windows Updates GPO and restarts

    Our environment consists of 15-20 Windows 2008 virtual servers, and ideally I would like for updates to download and install at a specified time. Getting that right seems easy enough via GPO, but what I am trying to avoid is the server auto-restartin