View DDL (SQL tab)

If this has been posted before, sorry but I couldn't find a past thread discussing this.
I'm connected to a 9.2.0.5 database and using the object tree I click a view. On the right pane I select SQL and a popup "generating DDL..." appears. Once this popup is gone, the content of the SQL tab remains empty. So, in order to take a look at the DDL of a view I have to right click the view and select "Edit...".
MHE

The SQL tab for all objects is empty for me. DBMS_METADATA is properly installed. (I use it to get code, and I ran the SQL statement you provided above.)
java.sql.SQLException: ORA-00923: FROM keyword not found where expected
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:799)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:839)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3361)
at oracle.dbtools.raptor.metadata.MetaData.printDDL(MetaData.java:181)
at oracle.dbtools.raptor.metadata.MetaData.getDDL(MetaData.java:215)
at oracle.dbtools.raptor.utils.MetaDataDDLGenerator.getDDL(MetaDataDDLGenerator.java:59)
at oracle.dbdev.oviewer.table.DDLViewer$2.doWork(DDLViewer.java:97)
at oracle.ide.dialogs.ProgressRunnable.run(ProgressRunnable.java:159)
at oracle.ide.dialogs.ProgressBar.run(ProgressBar.java:553)
at java.lang.Thread.run(Thread.java:595)
I believe that's the error causing the problem. Will be happy to get you any other information I can.

Similar Messages

  • SQL Tab & Export DDL Crapped Out in Version 1.1.3

    SO now the SQL tab for a table and the Export DDL option under the Tools menu are not working. The Export DDL option does nothing short of error our when trying to select individual options. (Getting a table or view does not exist error) The SQL tab for tables now no longer shows the associated constraints and in some cases no indexes either. The previous version didn't seem to have these problems. I really think the things that were working need to be verified to not be broken before releasing a new version. As an end user it's pretty frustrating to lose functionality when you think you are gaining new features.
    OS Version: Windows XP SP2
    Oracle DB: 10.1.5

    tnolte,
    I'm going to stick to this thread to respond to your queries.
    I see from (Re: [1.1.3.27.66] create ddl statement that you are running into the ora-942 errors. No-one in that thread mentions that they have switched to the latest release of SQL Developer, i.e. 1.2. Though both you and MRM posted after we released 1.2., so I assume you are. If not, that's a good place to start.
    Please can you confirm, that you are on 1.2 and that you are still running into this error? As mentioned we did have logged and now fixed, the ora-942 errors you mention, so I'd like to track down your specifics. It looks like a permissions issue.
    In terms of the new Export DDL:
    1. We had a request for a 1 button click to export everything for a single schema. To do this, after you have specified the files name and schema, all you need to do is click Apply and all objects, with all the data will be exported.
    So this is: Set file name, select schema, Apply.
    2. To export a specific category, I start by unchecking "Export Object Types", this unchecks all and I can then check only those I require, say tables and sequences. Now if I select Apply, ALL Tables and ALL sequences for that schema are exported.
    So this is: Set file name, select schema, uncheck Export Object Types, Check specific object type categories, Apply.
    3. Now, if you want to only export certain, say Tables or Sequences then use the filter tabs. The first is Filter Objects.
    If my Connection is for HR and I want to export HR objects, then there is no privilege issue:
    After you have taken the steps in #2 above, go to the Filter Objects tab, make sure that the user is HR at the top of the left hand panel and then click GO. (You can use the Object Type drop list on the right to filter for object types.)
    Shuttle the objects you want to the right and repeat for the next object type.
    If, your connection is HR, but you want to export[i] OE objects, and you have read/select access, then only those objects you have access to will display.
    If your access is HR, but you want to export object you have no access to, no objects are displayed.
    Is the ora-942 displayed for all your connections? Can you try another connection? Of all my connections, one displays the 942 and I will have a developer look into that. There does not appear to be a permissions issue.
    One last thing. If you just want to export the DDL of a selection of tables, expand the Tables node, ctrl select the tables you want the DDL for and use the context menu. There is a new Export option that allows you to export the tables to file, clipboard or the worksheet.
    Hope this helps.
    I will be doing a blog entry on this, this evening.
    Sue

  • SQL tab shows no DDL (is blank) - on IBM z/OS

    Sdev build 12.15
    oracle 9.2.0.4
    Server IBM Mainframe running z/OS
    If the SQL tab is selected for a table Generating DDL appears to run (slowly) before displaying a blank page. The same function works fine when connected to databases on a Sun Solaris server.

    Can you try using dbms_metadata directly with something like this:
    select dbms_metadata.get_ddl('TABLE','SOME_TABLE_NAME','OWNER') from dual
    -kris

  • Exported DDL different than the SQL tab

    Hi,
    I found that the DDL generated by performing Tools->export is different than what is shown in the SQL tab on RHS window for any table.
    Is there any reason, since the SQL tab's display is not useful to recreate the table, as the sequence of constraints/indexes is incorrect.
    The tools->export generates DDL properly.
    Can someone fix this issue?

    The Tools - Export reads DBMS Metadata, the SQL Tab does not. This is intentional. However I have logged a bug about the sequence of the constraints/indexes to track that issue.
    Regards
    Sue

  • Problem viewing code from the SQL tab.

    I keep getting Oracle error messages ORA-31603 and ORA-06512 in the Logging Page when I try to view the SQL code of a view or stored procedure. The tables are there along with the data. I can write SQL code and pull/update/insert/delete from my tables so my connection appears to be good. Is there any settings I might be missing on SQL Developer properties? ANy and all help would greatly be appreciated. Also, I use to be able to see SQL code in an earlier version of SQL Developer.

    Burleson know:
    http://www.dba-oracle.com/sf_ora_31603_object_string_of_type_string_not_found_in_schema_string_bc1.htm

  • SQL tab not working in V2.1 EA1 for non-DBA users -- how to fix?

    In v2.1 EA 1 the tab to show the SQL script (DDL) in the object browser is not working for non-DBA users. In the prior version, these users would see a message about DBMS_METADATA and then the message would indicate that an "internal generator" would be used to generate the DDL script. After that brief message the DDL would show up as expected. This doesn't seem to be the case in the newest version.
    I issued the following two grants to a particular user which worked, but I am reluctant to issue the grants to "PUBLIC".
    SQL> grant execute on DBMS_METADATA to XXXXX;
    SQL> grant select_catalog_role to XXXXX;
    So, my questions are:
    1) Will the old functionality (that didn't require these privileges) be added to V2 at some point?
    2) What security implications are there for issueing the above grants to PUBLIC?
    NOTE: After granting execute on the DBMS_METADATA package, it still didn't work. I left that grant in place and granted SELECT_CATAOG_ROLE, so I can't say for sure that the 1st grant was required.
    Edited by: user615070 on Nov 19, 2009 9:30 AM
    Edited by: user615070 on Nov 19, 2009 10:06 AM

    An OEM account is separate from the database account. You need to use OEM UI to create an OEM account, however, for certain tasks to be done in the databases which OEM is monitoring they will also require separate database accounts within those databases. For example, to view the performance tab in OEM UI, a database account is required.
    OEM only has two types of users, i.e. Super Administrator and Administrator, but don't go by the names. You can grant an OEM 'Administrator' account access to specific targets and what they can do within OEM, such as only viewing reports, targets, and so on. For access within a database, the user created need not be a DBA either.
    I hope you understand.

  • SQL Developer 3.0.03 table sql tab errors

    In SQL Developer 3.0.03 EA3, when you visit the SQL tab for a table the result is not formatted to be readable or usable fashion.
    The generated statements do not have terminating semi-colons or separating slashes, nor is there a line terminator after the end of each statement.
    For tables with column comments, all the comment statements are generated in a single line. This is very difficult to read.
    In order to make a usable or even readable script from this display, every statement has to be edited to add a statement terminator or separator and to start the next statement on a new line.
    The same request, against the same database, using SQL Developer 2.1 displays the expected results.
    Edited by: djhenderson on Jan 26, 2011 7:55 PM

    You should be able to tweak this in Preferences - Database - Unload/View DDL Options.
    Be sure to have the Options checked, along with Pretty Print and Terminator.
    For the format, tweak Preferences - Database - SQL Formatter - Oracle.
    Hope that helps,
    K.

  • How to get the script of a table or view in SQL Developer?

    Dear friends/expert,
    Could you tell me how to get the script for a view or a table easily in SQL Developer like pressing F4 in TOAD?
    I found that I can press SHIFT+F4 for a view in SQL Developer and get the script of the view in Details Tab. But how to move the script to SQL worksheet to edit? It is very easy to do in TOAD.
    And I didn't find a way to get the script for a table till now. Is there any way to do that?
    Thanks in advance.
    Best regards,
    Ning

    1. Although the team might put a lot of effort in keeping track on the forum, a lot of posts still go by without answer.
    2. If you have an enhancement request, log it at the announced SQL Developer Exchange, so others can vote to add weight on the issue. Be clear and detailed in the explanation.
    3. Given the structure of the application, I guess it won't be easy (maybe impossible) to add the functionality you are asking. Do you have a suggestion on how to access the info?
    4. If your request gets accepted, still another year or two may go by until the functionality gets added. For sure you'll be better off writing a user defined extension or report (querying DBMS_METADATA.GET_DDL).
    Hope that helps,
    K.
    Edited by: -K- on 12/01/2009 09:37

  • Error ORA-01785, while viewing Application Express views in Utilities tab.

    Hi,
    I am unable to see data in Application Express Views in Utilities tab. I am using APEX 3.1.2.
    I am getting the following error,
    failed to parse SQL query:
    ORA-01785: ORDER BY item must be the number of a SELECT-list expression.
    There is no sort by in the SQL query. select WORKSPACE, APPLICATION_ID, APPLICATION_NAME
    from APEX_APPLICATION_BC_ENTRIES .
    Can anyone throw some light on this?
    Thanks
    Nimmi

    No, It is not that view I get the same error whenever I am in the Utilities Tab of APEX and trying to query Application Express views.
    Thanks

  • ORA-06502 error on SQL tab

    I have just installed the latest version of SQL Developer (1.2.1.3213) and am running an Oracle 9i database (version 9.2.0.7).
    When I click on the SQL tab when looking at a table I get an ORA-06502 error and the DDL generated has "-- Unable to Render DDL with DBMS_METADATA using internal generator." at the top.
    I then get a whole host of other errors when using other parts of the program until I disconnect and reconnect.
    This error also occurs when I run the following query:
    select dbms_metadata.get_ddl('TABLE',table_name , user ) from user_tables;
    Any ideas?
    Incidentally prior to this release I had an early version 1 release of SQL Developer and the SQL tab here showed nothing at all.
    Any comments would be most appreciated.

    I am currently using v2.1.1.64, Build MAIN-64.45 and have the same or a similar problem. SQL developer will not generate the SQL code, but fails with the following error:
    ORA-06502: PL/SQL: numeric or value error
    LPX-00210: expected '<' instead of 'n'
    ORA-06512: at "SYS.UTL_XML", line 0
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 3688
    ORA-06512: at "SYS.DBMS_METADATA_INT", line 4544
    ORA-06512: at "SYS.DBMS_METADATA", line 466
    ORA-06512: at "SYS.DBMS_METADATA", line 640
    ORA-06512: at "SYS.DBMS_METADATA", line 1260
    ORA-06512: at line 1
    This installation doesn't have the same directory structure as in the previous reply, so I can't run the catmeta.sql script which doesn't exist in this release.
    Mike

  • Export view ddl script

    Has anyone here written or come across a script I can run in sql plus (or otherwise) that will export the ddl for all views in a schema?
    SQL Developer allows you to copy a views ddl to a file or clipboard but only one at a time. I would like to be able to do this in bulk somehow.
    Thanks.

    Ok. Got it. Here is the sample --
    satyaki>select DBMS_METADATA.GET_DDL('VIEW',view_name,'SCOTT') res
      2  from user_views;
      CREATE OR REPLACE FORCE VIEW "SCOTT"."VIEW_NAME" ("DEPARTMENT", "COUNT") AS
      SELECT deptno Department, COUNT(*) COUNT
    FROM EMP
    GROUP BY deptno
    HAVING COUNT(*) > 4
      CREATE OR REPLACE FORCE VIEW "SCOTT"."TESTVIEW" ("DEPARTMENT", "COUNT") AS
      SELECT deptno Department, count(*) COUNT
    FROM emp
    group by deptno
    having count(*) > 4
      CREATE OR REPLACE FORCE VIEW "SCOTT"."TESTVIEW1" ("DEPARTMENT", "COUNT") AS
      SELECT deptno Department, count(*) COUNT
    FROM emp
    group by deptno
    having count(*) = 1
      CREATE OR REPLACE FORCE VIEW "SCOTT"."TESTV1" ("EMPNO", "ENAME", "JOB", "MGR",
    "HIREDATE", "SAL", "COMM", "DEPTNO", "CODE") AS
      select "EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO","CODE" fro
    m emp
      CREATE OR REPLACE FORCE VIEW "SCOTT"."TEST_EMP_V" ("EMPNO", "ENAME", "DEPTNO")
    AS
      select empno,ename,deptno
      from emp
      CREATE OR REPLACE FORCE VIEW "SCOTT"."EMP_SAT_DET" ("EMPNO", "MGR", "LOC", "PH
    ONE") AS
      select empno,mgr,loc,phone
      from emp,dept
      where emp.deptno = dept.deptno
      CREATE OR REPLACE FORCE VIEW "SCOTT"."BDET" ("A", "B", "C",
             PRIMARY KEY ("A") DISABLE) AS
      select "A","B","C" from d1
      CREATE OR REPLACE FORCE VIEW "SCOTT"."V_EMP" ("EMPNO", "ENAME", "JOB", "MGR",
    "HIREDATE", "SAL", "COMM", "DEPTNO", "CODE", "PHONE") AS
      WITH e AS (
              SELECT *
              FROM   emp)
           SELECT "EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO","CODE
    ","PHONE"
           FROM   e
      CREATE OR REPLACE FORCE VIEW "SCOTT"."V1" ("SOME_ID", "SOME_VALUE", "GID") AS
      select "SOME_ID","SOME_VALUE","GID"
       from (
          select some_id, some_value,
             grouping_id (some_id, some_value) gid
          from t1p
          group by rollup (some_id, some_value)
          union all
          select some_id, some_value,
             grouping_id (some_id, some_value) gid
          from t2p
          group by rollup (some_id, some_value))
      CREATE OR REPLACE FORCE VIEW "SCOTT"."VV1" ("EMPNO", "ENAME", "WORK_DAYS") AS
      select empno,ename,sysdate-hiredate work_days
      from emp
      CREATE OR REPLACE FORCE VIEW "SCOTT"."EMPV" ("EMPNO", "ENAME", "JOB", "MGR", "
    HIREDATE", "SAL", "COMM", "DEPTNO", "CODE", "PHONE") AS
      select "EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO","CODE","PH
    ONE" from emp
      CREATE OR REPLACE FORCE VIEW "SCOTT"."UPD_VIEW" ("PERSON_ID", "FIRST_NAME", "L
    AST_NAME") AS
      SELECT "PERSON_ID","FIRST_NAME","LAST_NAME" FROM demo_tab
    12 rows selected.Regards.
    Satyaki De.

  • How to view the sql query?

    hi,
      how to view the sql query formed from the xml structure in the receiver jdbc?

    You can view SAP Note at
    http://service.sap.com/notes
    But you require SMP login ID for this which you should get from your company. The content of the notes are as follows:
    Reason and Prerequisites
    You are looking for additional parameter settings. There are two possible reasons why a feature is available via the "additional parameters" table in the "advanced mode" section of the configuration, but not as documented parameter in the configuration UI itself:
    Category 1: The parameter has been introduced for a patch or a SP upgrade where no UI upgrade and/or documentation upgrade was possible. In this case, the parameter will be moved to the UI and the documentation as soon as possible. The parameter in the "additional parameters" table will be deprecated after this move, but still be working. The parameter belongs to the supported adapter functionality and can be used in all, also productive, scenarios.
    Category 2. The parameter has been introduced for testing purposes, proof-of-concept scenarios, as workaround or as pre-released functionality. In this case, the parameter may or may not be moved to the UI and documentation, and the functionality may be changed, replaced or removed. For this parameter category there is no guaranteed support and usage in productive scenarios is not supported.
    When you want to use a parameter documented here, please be aware to which category it belongs!
    Solution
    The following list shows all available parameters of category 1 or 2. Please note:
    Parameter names are always case-sensitive! Parameter values may be case-sensitive, this is documented for each parameter.
    Parameter names and values as documented below must be used always without quotaton marks ("), if not explicitly stated otherwise.
    The default value of a parameter is always chosen that it does not change the standard functionality
    JDBC Receiver Adapter Parameters
    1. Parameter name: "logSQLStatement"
                  Parameter type: boolean
                  Parameter value: true for any string value, false only for empty string
                  Parameter value default: false (empty String)
                  Available with: SP9
                  Category: 2
                  Description:
                  When implementing a scenario with the JDBC receiver adapter, it may be helpful to see which SQL statement is generated by the JDBC adapter from the XI message content for error analysis. Before SP9, this can only be found in the trace of the JDBC adapter if trace level DEBUG is activated. With SP9, the generated SQL statement will be shown in the details page (audit protocol) of the message monitor for each message directly.
                  This should be used only during the test phase and not in productive scenarios.
    Regards,
    Prateek

  • How can I add a new column to Grid view under Tests tab

    I understand in "ORACLE Test manager for web Applications", the Grid view under Tests tab should be customised.
    How can I add a new column to Grid view under Tests tab? Thanks Katherine

    I don't think this is possible.
    Regards,
    Jamie

  • How do I create a view in SQL Server in Visual Studio Express 2013 for Desktop?

    Hi
    I've got a SQL Server database set up using the internal SQL Server in Visual Studio Express 2013 for Desktop. I want to create a view (using tables with one to many relationships) but I don't
    know how to do it.
    Where can I find a good tutorial on creating views in SQL Server in Visual Studio Express 2013 for Desktop? I think Visual Studio Express 2013 for Desktop doesn't have some view designer that
    exists in the non-express version of Visual Studio (if I'm not mistaken). So I think I'd need a tutorial on how to do the actual SQL, unless there is some tool I don't know about.
    Thanks

    Hi ,
    According to your description, if you install SQL Server SQL Server 2014 Express and SQL Server Manager Studio tools (SSMS), if you want to create a view, you can use SSMS. Then if you want to connect to and Diagram your SQL Express Database in Visual Studio
    2013, you can attach the database file by using the .NET Framework Data Provider for SQL Server in Visual Studio, and create a database diagram via expanding the “Database Diagrams” node.
     For more information, there is similar issue about how to connect to and Diagram your SQL Express Database in Visual Studio 2012 , you can review the following article,
    http://blogs.msdn.com/b/bethmassi/archive/2011/10/27/how-to-connect-to-and-diagram-your-sql-express-database-in-visual-studio-lightswitch.aspx.
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • How to create a view in sql workshop depending on an application item value

    Hello,
    How coud I create a view in SQL worshop based on an application item value? For example select id, name
    from gg_provider
    where user = ' || :USER
    So basically each user would have it's own view. But it does not work like that. I think when I use :USER then the database takes database user not the user logged in to apex application. How would be possible to use application user to create the view?
    Thank you very much.

    Instead of
    :APP_USER
    use
    v('APP_USER')
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for