Generate "Drop-Statements" for DB-Objects

Hi,
is it possible to generate drop statements for the different DB-Objects?
Most of the time when I generate DDL - Statements for Tables and Sequences I need a drop statement for this object to recreate.
And is it possible to supress the schema-name?
CREATE TABLE "SCHEMA"."TABLE"
Regards, Juergen
Message was edited by:
Juergen.Schuster
Message was edited by:
Juergen.Schuster

I apologize. I had interpreted the first posting in the thread differently than you. I had read "Most of the time when I generate DDL - Statements for Tables and Sequences I need a drop statement for this object to recreate" to mean that when the user generates the DDL for a table or sequence include a DROP statement prior to the CREATE statement. If these were automatically generated and the user accidentally ran the script, they may lose data in the table or the value of the sequence. That is why I was suggesting that the DROP statement generation be configurable when DDL for a table is generated.
My mistake,
Mike

Similar Messages

  • TopLink does not generate SQL statements for inserting new objects

    TopLink does not generate SQL statements for inserting new objects. Why?
    Thanks in advance...

    Please see the response in
    Why does not unitofwork.commit write data to the database?
    Regards,
    Chris

  • How to Generate DDL Statement for PSAPROLL Tablespace on Oracle9i-HP_UX

    Hi,
    I am having SAP R3 46C installed with Oracle 9i on HP_UX 11i system.
    I want to generate required DDL statements for PSAPROLL Tablespace/Rollback Segments as Backup/recovery purpose, before converting it into PSAPUNDO.
    Its easy to find & store required DDL statements using OEM. But, I am not able to locate oemapp  (under $ORACLE_HOME/bin directory) application in the installation.
    The current patch level of installed oracle is
    I want to start OEM in HP_UX system, if it is possible.
    otherwise,
    I want to know the other alternatives to generate the required DDL statements.
    Thanks in advance.
    Regards,
    Bhavik G. Shroff

    Hi Stefan,
    On windows Platform it is very easy to get DDL info for any object of database.
    But, I was not able to start OEM in HP_UX system.
    I have done my job complete using this good package of Oracle9i, in this way.
    SQL> SET heading off
    SQL> SET long 10000
    SQL> SET pages 100
    SQL> SELECT dbms_metadata.get_ddl(u2019TABLESPACEu2019,'PSAPROLLu2019)
    FROM DBA_TABLESPACES;
    O/P:
    CREATE TABLESPACE "PSAPROLL" DATAFILE
    '/oracle/RQ1/sapdata1/roll_1/roll.data1' SIZE 681574400 REUSE ,
    '/oracle/RQ1/sapdata1/roll_2/roll.data2' SIZE 3145719808 REUSE
    LOGGING ONLINE PERMANENT BLOCKSIZE 8192
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576 SEGMENT SPACE MANAGEMENT MANUAL
    SQL> SELECT dbms_metadata.get_ddl(u2019ROLLBACK_SEGMENTu2019,'PRS_0u2019)
    FROM DBA_SEGMENTS;
    CREATE ROLLBACK SEGMENT "PRS_0" TABLESPACE "PSAPROLL"
    STORAGE(INITIAL 10485760 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 32765
    Also follow this useful links:
    [DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen2.shtml]
    [DDL Generation--Oracle's Answer to Save You Time and Money|http://www.dbasupport.com/oracle/ora9i/DDLgen3.shtml]
    Good.
    Thanks a lot.

  • Drop shadow for invisible object

    Just an idle thought...
    If an object has neither stroke nor fill, is it possible to trick Illustrator
    into generating a drop shadow for it?
    Michael
    mhphillips at gmail dot com

    Nope.
    The object must have either a fill or a stroke to apply the Drop Shadow effect. You
    can try simply setting a fill color to the same as your background color, or white.

  • Is it possible to generate receivable statement for a party in the hierarch

    Our TCA data model is setup like this:
    For a party "A" we have two created two subsidary party "A1" and "A2". Both A1 and A2 are related to A with a relationship in TCA. Each A1 and A2 are linked to seperate accounts and both A1 and A2 have seperate but same bill-to and ship-to address. So A1 and A2 are not really two seperate logical entity or operating unit of party A.
    My question is: When we generate the statement is it possible it for party A so that it rollsup both A1 and A2?
    Any help is appreciated.
    Thanks,
    Achal

    Hi Neha,
    These forums have information on both, seq.no and and timestamp
    [Timestamp|Dynamic Filename with TimeStamp;
    [Seq.no|Complex Scenario on file sequencing;
    Hope it helps..
    Regards,
    Lavita

  • F.27 Generate one statement for items posted in several company codes

    Have a customer extended to several company codes. This customer has open AR line items in several company codes. Client wants to generate a statement that includes all AR line items. (Cross company code Statement) I found a place in config for defining correspondence types where there is a setting for "Cross comp. code. I choose this setting for several standard correspondence types but the system still generates a separate account statement/open item list for each company code where the customer has postings. Can the system generate a cross company code statement using standard config?

    Hi Russ
    In the IMG task ASSING PROGRAMS FOR CORRESPONDENCE TYPE dont specify the company code for your correspondence type and then you should be able to get all the open items across the company code.
    Also you need to select the cross company code in the Correspondence type config.
    Thanks
    Ashok

  • Generating .sql script for all objects of a User/Schema

    Hi All,
    What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
    We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
    Thanks
    -AKJ

    But the easiest way to do this would be to do an export with rows=N and then an import.
    You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
    Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies.

  • Gather shema stats for all objects in DB taking too much time

    Dear ,
    we schedule concurrent request " Gather Schema Statistics" to gather ALL schema on DB weekly . it takes on Test 4.5 hours to complete and 5 hours on Production system . we have only HR in Production and very soon it will start supply chain and Financial so I'm afraid from this time to increase in the near future . how could we reduce this time ? i tried to gather stats only with changed objects using " GATHER AUTO " option instead of " GATHER " but it gave me the following error
    Cause: FDPSTP failed due to ORA-20001: NEW TABLE is an invalid identifier
    ORA-06512: at "APPS.FND_STATS", line 799
    ORA-06512: at line 1
    The SQL statement being executed at the time of the error was: SELECT R.Conc_Login_Id,
    Start of log messages from FND_FILE
    In GATHER_SCHEMA_STATS , schema_name= ALL percent= 10 degree = 8 internal_flag= NOBACKUP
    ORA-20001: NEW TABLE is an invalid identifier
    End of log messages from FND_FILE
    please if anyone knows how to reduce time for Gather stats or know how to solve this error he'll be much appreciated

    Hi,
    i tried to gather stats only with changed objects using " GATHER AUTO " option instead of " GATHERYoudo not have to change this parameter, just schedule the concurrent program for HR (as suggested above), and you can schedule it for other schemas on regular basis (at the weeke ends) when there is no activity on the system -- Please see (Note: 168136.1 - How Often Should Gather Schema Statistics Program be Run?).
    Regards,
    Hussein

  • Using insert statements for creating objects..pls help

    Hello all,
    I have 2 databases DB1 (which is running on 8i) and DB2( Running on 10G).
    How can I copy all the objects of a particular schema (user1) from DB1 to DB2, only by using INSERT statements. I do not want to use import/export since it is taking huge time for the operation.
    Could anybody help me on this?
    Regards,
    chotu

    Since I have allready imported indexes,procedures etc , now I need only to copy tables from DB1 to DB2.
    I have truncated all the tables of user1 in DB2
    Now I am using,
    insert into my_tab as select * from user1.my_tab@DB2_db_link;
    Thanks for the help...
    chotu.

  • Need help generating variable name for timeout object

    Below is a function I am using to scale an object down and
    then hide it. It works fine on just one object, but if I try to run
    it on multiple objects at the same time, only the last object gets
    scaled down. I believe this is because the timeout list only ever
    has a single item in it, “ShrinkTimeOut”.
    Does each entity in the timeout list need a distinct name?
    And if so, how would I dynamically generate a name and save it so I
    can kill the timeout object once the object has scaled down fully?

    > Does it look like I am getting rid of the timeout object
    properly in my code?
    Now that you mention it, and I have a look, no - it doesn't:
    //not sure of the order of parameters here:
    function fShrinkLoop(mModel, aTimeout) {
    //Creates a variable that contains the vector value of the
    model's
    scale (vector( 1.0000, 1.0000, 1.0000 )).
    nScaleVector = mModel.getPropRef("transform").scale;
    //Checks to see if the model is 1% or less than its original
    size.
    if (nScaleVector[1]<=0.01) {
    //Makes the model invisible.
    mModel.visibility = symbol("none");
    //Kills the timeout object.
    aTimeout.forget();
    } else {
    //If it is not, we scale the model down further and allow
    the loop to
    repeat.
    mModel.scale(0.9);

  • How to put drop statement into DDL-Export?

    I found it in a feature list but can't find how to let the DDL-Export create drop statements for the objects...
    Thanks, Juergen

    Which list would that be? All current options are configured under Preferences - Database - ObjectViewer Parameters .
    If it's not requested already, you can do so at the SQL Developer Exchange, so others can vote to add weight for future implementation.
    Have fun,
    K.

  • Generating Java wrappers for PL/SQL Packages in JDeveloper 3.1

    I have not been successful in using JD3.1 to generate java classes for use in calling PL/SQL packages from a Java Servlet I am developing. I have followed the directions under the 'Generating Java Code for Oracle Objects and PL/SQL Packages' help topic: I display the package in the database browser window, right click on the package, select 'Generate Java', and click 'OK' on the pop-up JPublisher window that appears. The wizard clocks out for a few moments, then the JPublisher window disappears, but the java class is not added to JDeveloper's Navigation pane for the Project and Package I specified in the wizard.
    Any idea where the generated class is going to?

    should be, but isn't... JDeveloper3.1
    (build 681) default install... Is it in
    a custom package I didn't install? Or
    am I just a dumb nut?Hmm.. I thought it was in there.. JPub is a java based tool. You can invoke it as such.
    1st, use setvars.bat from your jdeveloper/bin directory.
    2nd, run java oracle.jpub.java.Main (pass it the same arguments as you would the jpub.exe)
    Here's the output from my machine here:
    D:\JDeveloper31\bin>setvars D:\JDeveloper31
    Setting JDeveloper 1.2 runtime environment to "D:\JDeveloper31"
    Setting JDK version 1.2 in "D:\JDeveloper31\java1.2"
    D:\JDeveloper31\bin>java oracle.jpub.java.Main
    JPub: Java Object Type Publisher, version 8.1.6.0.0 Production
    (and the rest of the help)
    Take Care,
    Rob
    null

  • Why does OWB generate merge statement when target type = Update

    Hi there
    getting problem message cannot generate merge. I don't undretand why even trying to ctreate a merge when should be an update and then sql would be fine.
    trying to update a table whose expiry date = '31-DEC-4000' (via raget filter for update
    and also put value from src into this field.
    This would be ok in sql
    update table
    set col = new_value
    where col = 31-dec-4000'
    Any thoughts - it seems strange why OWB generate a merge when set target type to Update since other target types of Update/Insert and Insert/Update available to generate merge.
    Many Thanks

    I understand what you are trying to say...
    One simple workaround for this is: In the mapping, add one more column in the target table eg: match_val. Set the bound name to match column eg: col.
    Set the one match_val attribute properties to "match column when updating" & actual column eg: col attribute properties to "Load column when updating".
    This will generate merge statement for your requirements. This will help u.

  • 3750 - show platform - stats for stack member and ring ?

    From the sh platform port-asic stats drop command, we are able to see the drop stats for the master switch.
    Question 1: how can we see the same stats for the stack member ^
    Question 2: Is that possible also to consult the drop stats for the 2 x ring. If yes - what the command ?
    Thanks

    You manage the switch stack and the stack member interfaces through the stack master. You cannot manage stack members on an individual switch basis. You can connect to the stack master through the console port of one or more stack members. Be careful with using multiple CLI sessions to the stack master. Commands you enter in one session are not displayed in the other sessions. Therefore, it is possible to lose track of the session from which you entered commands.
    This URLs should help you:
    http://www.cisco.com/en/US/products/hw/switches/ps5023/products_command_reference_chapter09186a0080395b55.html
    http://www.cisco.com/en/US/products/hw/switches/ps5023/products_command_reference_chapter09186a008017f8b8.html

  • Generate Employee Statements

    Hello,
    In CWB, when I try to generate employee statement for an employee, i got this error msg
    "You have insufficient privileges for the current operation. Please contact your System Administrator."
    I have already created and registered the Statement document and attached it to the plan.
    Thanks.

    Hello user
    Save ths as file and what's your version?
    filename=employee.sql
    set echo off;
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -
    HEAD "<TITLE>Employee Report</TITLE> -
    <STYLE type='text/css'> -
    <!-- BODY {background: #FFFFC6} --> -
    </STYLE>" -
    BODY "TEXT='#FF00Ff'" -
    TABLE "WIDTH='50%' BORDER='5'"
    COLUMN ID HEADING 'ID' ENTMAP OFF
    COLUMN NAME HEADING 'Name'
    COLUMN HIRE_DATE HEADING 'Hire Date' ENTMAP OFF
    COLUMN START_DATE HEADING 'Start Date'
    COLUMN JOB HEADING 'Job Description' ENTMAP OFF
    SPOOL report.html
    SELECT *
    FROM emp;
    SPOOL OFF;
    exit;Then from sqlplus
    SQL>@employee.sql
    Let me know if it works for you.
    Regards
    Edited by: OrionNet on Dec 31, 2008 12:34 AM
    Edited by: OrionNet on Dec 31, 2008 12:41 AM

Maybe you are looking for

  • How to migrate DB from Access 97 to Oracle 8.1

    The actual release of the Oracle Migration Workbench supports only Oracle 9i DB's. Is there any way to do this, without updating to Oracle 9i?

  • Skype for Business Services

    Hi Guys and Girls. I have a 2012 hyper V Environment, I have a Lync front end and an Edge server. today the SAN Dropped and all the VM'S dropped with it. since they have all come back up my Skype front end service will not start RTCSRV is the culprit

  • Create recovery cds for HP Pavilion a410n

    I had to reload PC from startup with f12 key. it reloaded the drive like new. I was going to make pc recovery cds in case HD crashed. CD Creator said there had already been a set made. I have not made a set since reloading HD. My daughter may have ma

  • Powerbook G4 Running SLOW after 10.4.4 upgrade

    I am new to Mac and just set up a new PBG4. I installed all of the updates as soon as I set-up OSX for the first time. Now, everything runs slow, especially Safari. Anyone else experiencing this? Any suggestions?

  • Re: Mac OS 10.5.8 (branched off from Reader topic)

    hi I got adobe flash player I think my mac hates the one I got how do I update it or get a better one for 10.5.8 Mac OS X thanks