Possible to generate DDL from outside of JDeveloper?

Hi:
I was wondering if it is possible to have a build script somehow generate the DDL for a database from the model files that JDeveloper creates (in the same way one would run a SQL Plus script from the command line passing a .sql file for it). This is desirable because my project wants to keep a database schema under CM but not multiple files that have to be kept in sync (like the model files AND the DDL).
Thanks.

Got it! I was able to extend the "New Presentation" sample to allow users to save their newly-created presentations back to the BI catalog. Here's how:
1) add a menu item for "Save"; add a listener for it
m_mnuSave = new JMenuItem("Save...");
m_mnuSave.setMnemonic('S');
fileMenu.add(m_mnuSave, 4);
m_mnuSave.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
mnuSave_ActionPerformed(e);
2) in mnuNew_ActionPerformed, add code to save the presentation to a module-level variable
Dataview dv = npw.getDataview();
m_objPresentation = npw.getDataview(); // new code
3) write the Save action handler
void mnuSave_ActionPerformed(ActionEvent e) {
String sName = "";
int result = 0;
if (m_objPresentation == null)
JOptionPane.showMessageDialog(null, "No presentation to be saved");
return;
/* Create InitialPersistenceManager */
InitialPersistenceManager pmRoot = (InitialPersistenceManager)getPersistenceManager();
/* Create PersistenceObjectChooser */
PersistenceObjectChooser dialog = new PersistenceObjectChooser(pmRoot);
JFrame frame = new JFrame();
result = dialog.showSaveDialog(frame);
if (result == PersistenceObjectChooser.OK_OPTION)
PersistenceManager pmCurrent = (PersistenceManager)dialog.getCurrentDirectory();
sName = dialog.getSelectedObjectName();
if (sName != null)
try
//if name is not bound, then rebind will bind it
pmCurrent.rebind(sName, m_objPresentation);
catch (Exception ex) {
showExceptionDialog(this, ex);
} // if sName != null
}// if result == OK_OPTION  

Similar Messages

  • Generating DDL from Server Model

    I would like to generate DDL that matches ERDs from the server model in Designer. However, when selecting an application folder, and expanding Relational Tables, I see a lot of tables I don't recognize - they aren't entities in the ERD. I don't know where they came from, and some of the ERD entities aren't showing up in the server model. I just want to generate DDL that creates only the tables shown in the ERD. Any way to do this?

    About your question for more complex constraints. That is not possible in Designer.
    If you are using Headstart, you can achieve this by using CDM RuleFrame. This is a way to record all types of (complex) constraints (business rules).
    see http://www.oracle.com/technology/products/headstart/index.html for more information.

  • Possible to create presentation objects outside of JDeveloper?

    Is it possible to create BI presentation objects (graphs, tables, crosstabs) outside of JDeveloper? I have been searching OTN forums, BI Beans javadoc and the OLAP API guide and have not found whether this is possible. I have seen where you can programatically create BI OLAP objects like queries and calculations, but not if/how you can create presentation objects.
    Regards,
    Steve Locke

    Got it! I was able to extend the "New Presentation" sample to allow users to save their newly-created presentations back to the BI catalog. Here's how:
    1) add a menu item for "Save"; add a listener for it
    m_mnuSave = new JMenuItem("Save...");
    m_mnuSave.setMnemonic('S');
    fileMenu.add(m_mnuSave, 4);
    m_mnuSave.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    mnuSave_ActionPerformed(e);
    2) in mnuNew_ActionPerformed, add code to save the presentation to a module-level variable
    Dataview dv = npw.getDataview();
    m_objPresentation = npw.getDataview(); // new code
    3) write the Save action handler
    void mnuSave_ActionPerformed(ActionEvent e) {
    String sName = "";
    int result = 0;
    if (m_objPresentation == null)
    JOptionPane.showMessageDialog(null, "No presentation to be saved");
    return;
    /* Create InitialPersistenceManager */
    InitialPersistenceManager pmRoot = (InitialPersistenceManager)getPersistenceManager();
    /* Create PersistenceObjectChooser */
    PersistenceObjectChooser dialog = new PersistenceObjectChooser(pmRoot);
    JFrame frame = new JFrame();
    result = dialog.showSaveDialog(frame);
    if (result == PersistenceObjectChooser.OK_OPTION)
    PersistenceManager pmCurrent = (PersistenceManager)dialog.getCurrentDirectory();
    sName = dialog.getSelectedObjectName();
    if (sName != null)
    try
    //if name is not bound, then rebind will bind it
    pmCurrent.rebind(sName, m_objPresentation);
    catch (Exception ex) {
    showExceptionDialog(this, ex);
    } // if sName != null
    }// if result == OK_OPTION  

  • Generating DDL from ResultSetMetaData

    Hi, I'm new to this forum although you can occasionally spot me on some of the other forums at java.sun.com. So if this is not the correct place for my question, I would appreciate a pointer to a more appropriate location.. -- Thanks
    I was wondering if anyone knew of a utility to create a DDL from a ResultSetMetaData. I'm sure I could develop one with some time, but it's for a one-off project. There is a huge Stored Procedure that someone else is going to analyze for performance. But it's speed is slowing down my testing, and I would like to create a temporary table with the results from that SP, but I don't want to manually format the hundreds of columns involved. The information needed to create the table is clearly stored in the ResultSetMetaData associated with a call to the StoredProcedure, but I don't know any way to convert that into some sort of script.
    Any suggestions?
    This is on SQL Server, and I'm not particularly familiar with it, so if anyone knows a native trick for this DBMS, that would be appreciated too.
    Thanks,
    -- Scott

    Never mind. I got it. When I came back to this after lunch, I realized both that this would likely not be a one-off, and that it shouldn't be too hard for my limited needs. The code I used is below. This is specific to SQL Server, and only to a limited number of data types, but it would be easy to extend to other's simple needs. I'm sure there are robust versions easily available, but I didn't find them. In the following code, rs is a ResultSet:
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            System.out.println("IF EXISTS (SELECT * FROM dbo.sysobjects WHERE" +
                    " id = object_id(N'[dbo].["
                + tableName + "]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)");
            System.out.println("DROP TABLE [dbo].[" + tableName + "]");
            System.out.println("GO");
            System.out.println();
            System.out.println("CREATE TABLE [dbo].[" + tableName + "] (");
            for(int i = 1; i <= colCount; i++) {
                String type = rsmd.getColumnTypeName(i);
                System.out.print("\t" + ((i > 1) ? "[" : ""));
                System.out.print(rsmd.getColumnName(i) + ((i > 1) ? "]  [" : "  "));
                System.out.print(type + ((i > 1) ? "] " : " "));
                if (type.equals("varchar") || type.equals("char")) {
                    System.out.print("(" + rsmd.getPrecision(i) + ") ");
                } else if (type.equals("decimal")) {
                    System.out.print("(" + rsmd.getPrecision(i) + ", " + rsmd.getScale(i) + ") ");
                } else if (!(type.equals("uniqueidentifier")
                            || type.equals("datetime") || type.equals("int"))) {
                    throw new IllegalArgumentException(
                            "stupid DDL generator can't handle type \"" + type + "\".");
                int nullableInt = rsmd.isNullable(i);
                if (nullableInt == ResultSetMetaData.columnNoNulls) {
                    System.out.print("NOT NULL");
                } else if (nullableInt == ResultSetMetaData.columnNullable) {
                    System.out.print("NULL");
                if (i < colCount) {
                    System.out.print(" ,");
                System.out.println();
            System.out.println(")");
            System.out.println("GO");
            System.out.println();
            while(rs.next()) {
                System.out.print("INSERT INTO " + tableName + " VALUES (");
                for(int i = 1; i <= colCount; i++) {
                    String type = rsmd.getColumnTypeName(i);
                    boolean quoted = (type.equals("char") || type.equals("varchar") ||
                             type.equals("uniqueidentifier") || type.equals("datetime"));
                    if (i > 1) System.out.print(",");
                    Object temp = rs.getObject(i);
                    String value = (temp == null) ? "NULL" : temp.toString();
                    if (quoted && temp != null) {
                        System.out.print("'");
                    System.out.print(value);
                    if (quoted && temp != null) {
                        System.out.print("'");
                System.out.println(");");
            }I know this is far from elegant, and too specific to my small problem, but anyone who needs something similar should be able to modify it rather easily.
    -- Scott

  • Generating DDL from SQL Workshop

    I'm using the Database Cloud Service and am trying to see how I can generate DDL for my tables.
    I looked into the online help, which led me to this:
    http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35128/sql_utl.htm#AEUTL256
    Says to click SQL Workshop -> Utilities -> Generate DDL, but there is no Generate DDL option.  Has the option moved or the name changed?
    Thanks,
    Rick

    Hello Rick -
    The easiest way to get DDL for the tables in your Database Cloud Service is to go to the Cloud Management UI for your Service and click on the Data  Export tab. Click on the Export Data button and just do not check the box for exporting data.  This will give you DDL for your Service.
    Hope this helps.
    - Rick Greenwald

  • Generating DDL From Designer In a Set Order

    Hi,
    Designer Version is 10.1.2.0.2.
    Whenever I generate the schema/ddl creation scripts after making minor
    changes, I like to compare the new scripts against the last set just to
    make sure the changes are as I expect. The trouble is each time I
    regenerate, the order of the items is different each time, making
    comparisons difficult.
    I've tried looking for a setting in the preference sets but there isn't
    anything obvious . Anyone know how to tell it to set the order of the
    tables during generation?
    Regards
    Sandeep

    What has "Designer" got to do with SQL and PL/SQL? Please ask your question in the correct forum.

  • Using a local catalog outside of JDeveloper?

    Is it possible to establish a local catalog connection from outside of JDeveloper; that is as part of a deployed application?
    I have tried including the catalog XML files in my JAR file and specifying the relative path to the files in the BI configuration file (i.e., PersistenceType="FILE" RootFolder="bidefs/BIDesigner/"). However, it seems that whatever combination of file location and configuration setting that I try I receive a catalog root cannot be found error.
    Does anyone know if this is possible, and if so can you point me to an example?
    (Note: I realize that in an actual production application that it is much better to use the database catalog, however, currently I’m simply working on a proof of concept and may not be able to create the catalog schema on my target database instance.)
    Best Regards,
    Matt
    BI Beans Diagnostics(v1.0.2.0) 2/23/05
    ===============================================================================
    JDEV_ORACLE_HOME .......................... = C:\oracle\ora92Dev
    JAVA_HOME ................................. = C:\bea\jdk141_05
    JDeveloper version ........................ = 9.0.4.0.1407
    BI Beans release description .............. = BI Beans 9.0.4 Production Release
    BI Beans component number ................. = 9.0.4.22.0
    BI Beans internal version ................. = 2.7.5.31
    Connect to database ....................... = Successful
    JDBC driver version ....................... = 9.2.0.4.0
    JDBC JAR file location .................... = C:\oracle\ora92Dev\jdev\lib\patche
    s
    Database version .......................... = 9.2.0.4.0
    OLAP Catalog version ...................... = 9.2.0.4.1
    OLAP AW Engine version .................... = 9.2.0.4.1
    OLAP API Server version ................... = 9.2.0.4.1
    BI Beans Catalog version .................. = 2.7.5.31
    OLAP API JAR file version ................. = 9.2
    OLAP API JAR file location ................ = C:\oracle\ora92Dev\jdev\lib\ext
    Load OLAP API metadata .................... = Successful
    Number of metadata folders ................ = 3
    Number of metadata measures ............... = 0
    Number of metadata dimensions ............. = 0
    Metadata output location .................. = C:\oracle\ora92Dev\bibeans\bi_chec
    kconfig\bi_metadata.txt

    If you download the latest BI Beans 10g samples from the BI Beans section on OTN there is a sample called Analyzer. This sample uses a local filestore to save and retrieve all reports, calcs, saved selections etc created by the user during a session.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Open Directory access from outside of network / internet

    Hello all,
    Got a question I'd love to get some help on, I have some users who are outside of my network and I'd like them to connect into the open directory on our leopard server so they can use the Shared iCal calendars, addresses, etc.
    So my questions are A) Is it possible to connect in from outside the network and get access to the directory without having to have a seperate user account and use our VPN every time you want to connect? - if not is this the only way to do it (would you have to connect via the Mac VPN and then connect to the directory?)
    B) is it possible to do this "seamlessly" so that you don't have to change any settings, login details each time you switch between your local user from outside the network and your directory access. (so basically if you are in iCal if you have internet access it will connect you to the directory, without you doing anything extra?)
    Hope that makes sense, I can't seem to find the answers I need in the manuals, if I knew how this was meant to work I could probably have a fair go at figuring out how to actually do it (firewall changes etc)
    Thanks in advance for the help
    Martin

    So my questions are A) Is it possible to connect in from outside the network and get access to the directory without having to have a seperate user account and use our VPN every time you want to connect? - if not is this the only way to do it (would you have to connect via the Mac VPN and then connect to the directory?)
    If your OD server is visible from the internet -- i.e., it has a public address -- then you can do this without the VPN. However, it's not advisable to have a server exposed in that fashion.
    You would be better off doing this through the VPN:
    - Remote user connects to internet at hotel, for example.
    - Remote user initiates VPN connection.
    - Remote user now has access to iCal server and directory information.
    Explain to the users that this information is private to the company, and private company resources are only available through the VPN. Allowing access without the VPN would be similar to the company posting its Employee roster and meeting calendars on the face of the building where any person (or competitor) could see them.
    B) is it possible to do this "seamlessly" so that you don't have to change any settings, login details each time you switch between your local user from outside the network and your directory access. (so basically if you are in iCal if you have internet access it will connect you to the directory, without you doing anything extra?)
    It's just one extra step: Connect to VPN. You're still the same local user on the computer.
    If you're talking about laptop users needing directory access to authenticate when logging into their computers, well...That sounds like a whole other situation.
    Hopefully this helps.
    Bryan Vines

  • SQL*Developer 2.1 - Not Generating DDL for Different Users

    Using SQL*Developer Version 2.1.0.63 I get an error trying to generate DDL from another user, that has access to many other schemas. It looks to me like Sql Developer is calling the DBMS_METADATA package from within other PL/SQL.
    I am receiving the following error:
    ORA-31603: object "ACCOUNT_TYPE_LKP" of type TABLE not found in schema "POR_OWN"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 105
    ORA-06512: at "SYS.DBMS_METADATA", line 3241
    ORA-06512: at "SYS.DBMS_METADATA", line 4812
    ORA-06512: at line 1
    I would receive these same errors in SQL Developer 1.5, but the DDL would still generated. It was picking something up, even though it had an error.
    Our DBA has not been able to provided a work around. He says you have to login directly as the owner of the objects to use dbms_metdata in this fashion.
    Is there any work around for this? I really need to be able to get DDL and I do not want to go back to 1.5 (I like the other new features of 2.1).
    Thanks,
    Tom

    We have several users currently using SQL Navigator and/or TOAD. We would like them to switch to SQL developer, but part of their job is to view the source of views in another schema. They have select privileges on the underlying tables and are able to see the source using other tools. Using SQL Developer, they receive on ORA-31603 because it's calling dbms_meta. Note ID 1185443.1 describes the issue and suggests granting the users the SELECT_CATALOG_ROLE.
    We are hesitant about granting this role to these users which allows access to ever 1,700 objects, plus execute privileges to 4 objects.
    Support indicated that Enhancement Request 8498115 addresses this issue.
    Is this something that may be addressed in the next release?
    Thanks,
    Paul

  • Generate report from flex

    If its possible to generate report from flex.Please help me

    Hi,
    thanks for your reply. I tried with alive pdf, but source
    code only AIR files. can we use this in web based flex?. How we can
    format the report like html code? I just see in alivepdf, its only
    linebyline display, not multiple columns? pls advise.
    thanks alot
    Subhash

  • Generate logs from user report options

    Hi all !
    I would like to know if there is a possibility to generate logs from report user selection:
    E.g: users can fill execution options to delimit the scope of the report execution and the output, company code, date ranges, account numbers, cost.
    - Is there a way to generate logs containing these report options that  were typed / filled by the user for every transaction executed?
    - If Yes could you please assist?
    Thanks in advance for the cooperation!
    Regards,

    There is a way of doing this using the object history, but the user can control this themselves and turn it off if they want to.
    Read the SAP notes on term "RSSGOSHIRE".
    Another way is to use parameter transactions or variant transactions, which the user cannot change or only change selected parameters for which you don't care about.
    Cheers,
    Julius

  • Generate PUBLISH from other evenement than SIP message

    hello,
    In the SIP Servlet, is it possible to generate PUBLISH from other evenement than SIP message?
    I mean for example i get connected to a page web, and i generate a message SIP PUBLISH while there is a update.
    How can i do with this situation? Can anyone give me some guidance?
    Thanks,
    li

    At some point in developing iOS apps you would need to use a Mac to upload the app to the App Store. If you have access to a Mac to do that you could also use the same Mac to download your certificate from the iOS developer portal. That certificate can be added to Keychain Access, where it’s very easy to export a P12 file.
    If you’re doing the development for a client, have them download the certificate and export the P12 to send to you.

  • Generate text from the effect controls

    Is it possible to generate text from a textfield (or something similar) from the effect controls?
    I have an Adjustment Layer with a custom effect on it with a Slider, two Color pickers and four Checkboxes.
    Can I somehow add a textfield that the user can input text in, and then link this to a text layer in the composition?
    The reason I want this, is because the user can add all the information in one effect, instead of having multiple text layers to edit.
    I don't think there is a textbox for this, but is there anpther way? Let's say I add an effect that has a dynamic name, that I can link up to the source text of my textlayers in the composition.
    Any help would be much appreciated
    Eirik

    Thank you for fast reply!:)
    Ok, then I guess it can't be done, not the way I hoped anyway.
    This is the effect I have made. I have linked the properties to other layers.
    What I wanted was an input field where the user inputs for example "My Title". The source text of my text field in the composition would then update to "My Title".
    I know I could probably do this by code, but then the original point kinda disappears. It should be easy for the user to adjust the settings under one effect, instead of having to adjust it multiple places.
    I guess the user have to edit the textfield in the comp by actually going into the layer (doubleclick it/highlight it with the text tool etc.) unless you have a genius workaround? (Please say you do:P)
    Eirik

  • Generating Activities from Campaigns

    Is it possible to generate Activities from Campaigns or otherwise progress a Campaign?
    For example, you can send campaigns to a list of contact prospects etc. Is there any way to genereate an Activity within Web Tools to be used as a follow-up?
    I presume that you could use the DTW to create Activities directly within B1, but what about working in Web Tools only?
    More generally, what are you expected to do with a Campaign once you have sent emails to the contacts? There seems to be no way to progress a Campaign other than to make it inactive.
    Regards,
    Douglas

    Hi Douglas
    You can write a report to track people who clicked a link to a product in the campaign email, went to the site, viewed the item and checked out. There is a URL variable, campaignid= that is appended on the end of the url and stored on the ordermaster table for that order if present.
    How to progress a campaign forward is up to the sender of the campaign.
    You can view if a prospect or user has been sent a campaign on the user or prospect details as well.

  • How-to Generate Script from the export dump file

    Hi all,
    Software : Oracle 10gR2/Windows 2003
    =============================
    Has anyone generated a Script from a export dump file ( exported via data pump export). I know it is possible to generate script from the regular export.
    I want to know how to generate the script for various objects or is it possible to get the counts of types of objects in the dump file and / or generate the script from the export dump file exported via data pump utility on Oracle 10g.
    Thanks,
    SS

    I want to know how to generate the script for various objects.what do you mean by scripts? Assuming the metadata definitions of various objects.
    First of all, you can generate the metadata definitions using import.
    Use, Impdp with SQLFILE parameter to generate the SQL file for the metadata definitions.
    Refer to
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14215/dp_overview.htm

Maybe you are looking for

  • Ypinit fails in Solaris 10

    I am trying to set up a NIS client Solaris 10 for the first time. Ypinit fails with the errors: svcadm: Pattern 'network/nis/server:default' doesn't match any instances svcadm: Pattern 'network/nis/xfr:default' doesn't match any instances svcadm: Pat

  • Setting password field in JOptionPane

    Is it possible for me to set password field in JOptionPane's input field. If possible please help me. It would be very nice if u could email me at the following address [email protected]

  • IPad log on does not work

    Password and password reset do not work on iPad.  Can reset at website but not from Reader App

  • Blending an image with a gradient

    Hi I am putting together a flyer which will have a rectangular bar across the top of and A4 sheet of paper with a gradient applied left to right dark to light. On the the right hand side of the rectangle i have placed an image on top of the gradient.

  • Dialin and meet showing up as blank page externally but works internally just fine

    if i go to dialin.domain.com and meet.domain.com externally, then i get a blank white page no matter what browser i use. i can see the cert in the browser just fine. internally, dialin and meet work fine. i'm using IIS ARR for the reverse proxy. i ca