How to get ddls from sqlplus like that of TOAD

Hi,
I have to work on a terminal machine for a client where the TOAD is not installed. For my regular DBA activities I need to take the DDL many times.
I am very much used to the style of DDL scripts which TOAD 9.6.x.x gives for any object in a schema.
Can someone suggest how I can I get exactly TOAD-like scripts (which provide not just the create statements)
For e.g.
*1.From sqlplus when I do*
select dbms_metadata.get_ddl('TABLE','APE1_ACCUMULATORS') from dual;
I get only the below
CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
*2.But from TOAD 9.6.x.x when i click on "create scripts" I will get*
DROP TABLE XLTDBO92.APE1_ACCUMULATORS CASCADE CONSTRAINTS;
CREATE TABLE XLTDBO92.APE1_ACCUMULATORS
CYCLE_CODE NUMBER(4) CONSTRAINT APE1ACCU_CYCLE_CODE_NN NOT NULL,
CYCLE_INSTANCE NUMBER(2) CONSTRAINT APE1ACCU_CYCLE_INSTANCE_NN NOT NULL,
CUSTOMER_SEGMENT NUMBER(4) CONSTRAINT APE1ACCU_CUSTOMER_SEGMENT_NN NOT NULL,
CUSTOMER_ID NUMBER(9) CONSTRAINT APE1ACCU_CUSTOMER_ID_NN NOT NULL,
ACCUM_TYPE_ID NUMBER(9) CONSTRAINT APE1ACCU_ACCUM_TYPE_ID_NN NOT NULL,
OWNER_ID
DROP SYNONYM XLTDB92.APE1_ACCUMULATORS;
CREATE SYNONYM XLTDB92.APE1_ACCUMULATORS FOR XLTDBO92.APE1_ACCUMULATORS;
GRANT DELETE, INSERT, SELECT, UPDATE ON XLTDBO92.APE1_ACCUMULATORS TO XLTDBO92_ALL;
So my question is:
How to such scripts from sqlplus as well ,irrespective of the type of the object?_
Note:I am posting a new thread because my previous question was answered even though i was not able to type in completely. My mistake as it was posted in before i could finish the question.
Regds,
Kunwar

If the DDL returned by dbms_metadata is not to your liking then write your own scrips to generate DDL or cover scripts to generate all related items that you want.
In the case of synonyms and grants this is very easy using rdbms dictionary views, but if you generate a table's DDL you may also want and need the PK, UK, FK, secondary indexes, comments, and policies on the table as well as synonyms and grants. Everything that if you drop the tables goes away.
There is a dbms_metaddata procedure get_dependent_ddl to generate dependend objects on a table that may be of interest.
HTH -- Mark D Powell --

Similar Messages

  • How to get items from a list that has more items than the List View Threshold?

    I'm using SharePoints object model and I'm trying to get all or a subset of the items from a SharePoint 2010 list which has many more items than the list view threshold (20,000+) using the SPList.GetItems() method. However no matter what I do the SPQueryThrottledException
    always seems to be thrown and I get no items back.
    I'm sorting based on the ID field, so it is indexed. I've tried setting the RowLimit property on the SPQuery object(had no effect). I tried specifying the RowLimit in the SPQuerys ViewXml property, but that still throws a throttle exception. I tried using the
    ContentIterator as defined here:http://msdn.microsoft.com/en-us/library/microsoft.office.server.utilities.contentiterator.aspx,
    but that still throws the query throttle exception. I tried specifying the RowLimit parameter in the ProcessListItems functions, as suggested by the first comment here:http://tomvangaever.be/blogv2/2011/05/contentiterator-very-large-lists/,
    but it still throws the query throttle exception. I tried using GetDataTable instead, still throws query throttle exception. I can't run this as admin, I can't raise the threshold limit, I can't raise the threshold limit temporarily, I can't override the lists
    throttling(i.e. list.EnableThrottling = false;), and I can't override the SPQuery(query.QueryThrottleMode = SPQueryThrottleOption.Override;). Does anyone know how to get items back in this situation or has anyone succesfully beaten the query throttle exception?
    Thanks.
    My Query:
    <OrderBy>
        <FieldRef Name='ID' Ascending='TRUE' />
    </OrderBy>
    <Where>
        <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
    </Where>
    My ViewXml:
    <View>
        <Query>
            <OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy>
            <Where>
                <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
            </Where>
        </Query>
        <RowLimit>2000</RowLimit>
    </View>
    Thanks again.

    I was using code below to work with 700000+ items in the list.
    SPWeb oWebsite = SPContext.Current.Web;
    SPList oList = oWebsite.Lists["MyList"];
    SPQuery oQuery = new SPQuery();
    oQuery.RowLimit = 2000;
    int intIndex = 1;
    do
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    foreach (SPListItem oListItem in collListItems)
    //do something oListItem["Title"].ToString()
    oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;
    intIndex++;
    } while (oQuery.ListItemCollectionPosition != null);
    Oleg
    Hi Oleg, thanks for replying.
    The problem with the code you have is that your SPQuery object's QueryThrottleMode is set to default. If you run that code as a local admin no throttle limits will be applied, but if you're not admin you will still have the normal throttle limits. In my
    situation it won't be run as a local admin so the code you provided won't work. You can simulate my dilemma by setting the QuerryThrottleMode  property to SPQueryThrottleOption.Strict, and I'm sure you'll start to get SPQueryThrottledException's
    as well on that list of 700000+ items.
    Thanks anyway though

  • I just purchase an IPhone5C to upgrade from my IPhone4, but I do not know how to get all of my photos that were on ICloud on my Photo Stream (875 photos), on to my new phone. I thought that since my 5C can see Icloud that all photos would be there...

    I just purchase an IPhone5C to upgrade from my IPhone4, but I do not know how to get all of my photos that were on ICloud on my Photo Stream (875 photos), on to my new phone. I thought that since my 5C can see Icloud that all photos would be there... Can someone help me get the pics from my Iphone4 to the 5C?

    Photostream in the cloud only keeps photos from the last 30 days (subject to a 1,000 photo limit). When photostream syncs the photos to your device they will stay there (subject to a 1,000 photo limit) until deleted, which means you may well have more photos in your photostream album on your device than there are in photostream in the cloud.
    The consequence of this is that if you turn photostream off and on again on your device (or enable it for the first time), it will only be populated with photos from the last 30 days, which may not be all the photos that were previously in the photostream album on that device.

  • How do I get files from multiple DVDs that are using thesame file names?

    How do I get files from multiple DVDs that are using thesame file names? Message says "file already exists in catalog"
    Message was edited by: marcr56

    marcr56
    I am viewing your question from different perspective, that is, the issue that you face when you are ripping VOBs from a second DVD-VIDEO on DVD disc using Premiere Elements,
    It is best to give the Premiere Elements version and computer operating system that it is running on. In the absence of that, I will generalize.
    Assuming that you are using
    Premiere Elements 12
    Add Media
    "DVD Camera or Computer Drive"
    Video Importer
    Typically the Video Importer Save In: is C:\Users\Owner\Videos
    Each of your DVD discs is going to have the same names for the ripped VOBs (VTS_01_1.VOB and so on depending on the duration of the movie). Consequently, after the ripping of the first DVD's VOBs and their save to Videos, you will end up with that "files already existing..." block for the ripping of the VOBs from the second DVD.
    The answer is, for each DVD disc VOB ripping, to plan ahead and create and set for different folders in Videos in the Save In field of the Video Importer.
    Please review and then let us know if that works for you. Please do not hesitate to ask if you need clarification on anything that I have written.
    Thank you.
    ATR.

  • My sister has the latest iphone 4 update and so do I. She has this feature that is like a shortcut on her screen at all times and I was wondering how I get it? Its like a square thats faded with a white circle around it?

    My sister has the latest iphone 4 update and so do I. She has this feature that is like a shortcut on her screen at all times and I was wondering how I get it? Its like a square thats faded with a white circle around it?

    Whereabouts on her screen at all times? What does it do?

  • How do i get music from my ipod that is not im my itunes library onto my iPhone?

    how do i get music from my ipod that is not im my itunes library onto my iPhone?

    blossomsoif wrote:
    i bought music with an apple idea and put that music on my ipod. than i forgot the apple id
    Go here  -> https://iforgot.apple.com
    If you forgot your AppleID, you will not be able to get that music into iTunes or onto another iPod.

  • How do I get music from my PC, that was originally from CDs, to the iPod touch?  I think you have to get them on iTunes 1st, then sync them over to the iPod?  How do you do this whole process?  Thanks, I'm very NEW at this.

    How do I get music from my PC, that was originally from CDs, to the iPod touch?  I think you have to get them on iTunes 1st, then sync them over to the iPod?  How do you do this whole process?  Thanks, I'm very NEW at this.

    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    The sync the music to your iPod by:
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad
    Message was edited by: lllaass, I first thought she wanted iPod to computer.

  • How to get data from PDF form?

    PDF forms can send data in url like GET or POST method. Is it possible to get data from url, like in PHP http://sever/file.php?item1=value1&item2=value2&item3=value3
    In APEX url have specific construction and I don't know how to get value of items (1...3)
    Please let me help to find simple method of geting data from URL.
    Best Regards,
    Mark

    The APEX URL syntax is detailed here
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#BCEDJBEH
    How to get it from PDF is another matter...
    I'm working on an app that downloads PDFs with a Large amount of data as a blob, takes that blob and changes it to XML, then goes through the xml to validate each section of data and then add it into the schema that my apex app is referencing....
    I didn't write the original code but I do know that it isn't a quick thing to implement and includes using some uploading some java jar files to your schema and writing some custom java code.
    Someone else may be able to help with grabbing PDF data into the URL for the amounts of data you want to pass to apex.
    Gus..
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!
    Edited by: Gussay on Sep 21, 2009 5:52 PM

  • How to get resultset from oracle procedure use ejb3

    how to get resultset from oracle procedure use ejb3
    i know oracle procedure should like this
    Create or replace PROCEDURE resultset_test(
    aaa IN NUMBER,
    bbb OUT sys_refcursor) ....
    but what s the ejb3 scripts looks like? please give me an example or link~
    ths

    - there are no EJB3 scripts, only compiled application code
    - the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
    Now you should know what to Google to get your "example script": "java jdbc oracle procedure"

  • How to get day from Week Number

    Hi all,
    how to get date from the week number when the day is MONDAY.
    like : week num =33
    how get the date of the day MONDAY from this..

    SQL> select
      to_char(d,'YYYY') y,
      w,
      trunc((trunc(d,'Y')+w*7-date '1000-01-01')/7)*7+date '1000-01-01' monday
    from
    (select sysdate d, 33 w from dual);
    Y             W MONDAY
    2005         33 15.08.2005Message was edited by:
    Laurent Schneider
    I wrote an article which may help you to get out of the mess with weeks that start on friday, saturday, sunday, monday
    http://laurentschneider.blogspot.com/2005/07/tochar-d.html

  • How to get photos from pc to iphone ?

    how to get photos from pc to iphone?

    1. Connect your iDevice to your computer with the USB connector. Open iTunes and select your device from the left sidebar. Then, select the photos tab from the top menu.
    2. Organize and sync.
    First choose where you’d like to sync your photos from. I use iPhoto, but you can use any photo management system.
    Check the box next to each album &/or event you’d like to sync.
    Alternatively, you could put all the photos you want to transfer into a separate folder on your computer, and choose to sync just that folder from the drop down menu.
    Notice that I’ve checked the box “Include videos” so any included videos will also sync.
    When your selections are made, click “Apply” and the photos will sync to the photo library on your device.

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

  • How to get value from list item

    Hi all,
    How to get value from list item?
    I have a problem with the List Item object
    in the Oracle forms.
    How can I retrieve the selected item from
    a list ?
    I didn't find any function like 'list.GET_
    SELECTED_ITEM()'...
    thanks
    Bala

    Hello,
    You get the value as for any other Forms item:
    :value := :block.list_tem ;Francois

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • How to get videos from touch, in full resolution?

    How to get videos from touch, in full resolution?
    I tried email, but that compresses them.

    Import them as you would from any digital camera.
    http://manuals.info.apple.com/enUS/iPod_touch_iOS4.1_UserGuide.pdf

Maybe you are looking for

  • Error while sending message to SOAP receiver

    Hi ALL, when i send message from the Service Regestry my interface is working,but when i coppy the same WSDL file in the Service registry in desktop and send message using AltovaSPY  i am getting this error. com.sap.aii.af.service.cpa.CPAException: c

  • TbbMeter checks usage from MULTIPLE computers

    I just found that tbbMeter from Think Broadband can now run on multiple computers and amalgamate the usage into a single figure to check you quotae. It has predefined settings for BT Broadband as well. http://www.thinkbroadband.com/tbbmeter.html

  • Without giving the path - file is transfereed using gui download

    i use GUI download to download the internal table data in the path specified by the user. But there is a strange behavoir in this. i havent given the file path to download. But i have given only the file name (notthedrive say In the file output path

  • IPhone playing songs other than what I click on

    I edited a playlist on itunes and synched it. All the new songs are there. But...when I click on one to play it the song it flashes on the screen for a second then it plays another song. Specifically - it decides to play the song that's 2 above it on

  • Typedef array does not auto-update

    Hello, I'm trying to create a strict typedef array that contains an ENUM control. I notice that if I add or delete items from the ENUM, then the control and control constants will update accordingly. However, if I increase the size of the array (inse