Output cut off from dbms_metadata.get_ddl

When I execute DBMS_METADATA.GET_DDL('TABLE','table_name','schema_name'), the output for some tables is cut off. When I run it from SQL Plus or Toad, it works fine. Is there a setting that I am missing.
Thanks

[email protected] wrote:
When I execute DBMS_METADATA.GET_DDL('TABLE','table_name','schema_name'), the output for some tables is cut off. When I run it from SQL Plus or Toad, it works fine. Is there a setting that I am missing.You did not tell where are you running the dbms_metadata package.
If you can set long 10000 on the client utility try this then.
Otherwise SQLPLUS is the best way to extract metadata and spool it to the file.
HTH
SS

Similar Messages

  • IMessages to an iPhone occasionally appears with words cut off from end

    When sending texts from iMessages to an iPhone, the text occasionally appears on their iPhone with a couple words cut off from the end.  It appears fine in the iMessages display/history.   Here's a few things I've noticed:
    - It's repeatable.  For example, the following message always causes the issue:  "man, why are you here?  Two are in testing places".  On the iPhone it appears as "man, why are you here?  Two are in testing".
    - It's a problem with iMessages.  If I send the exact same text from the iPhone, it goes through just fine.  The message has to originate from MacOS iMessages.  (I'm using the latest Mountain Lion and all updates as of 12/21/12)
    - The full message is actually being successfully transferred to the phone;  it just does not display correctly.  There are two pieces of evidence for this.  If on the iPhone, the user copies the truncated message and pastes it somewhere else, the full message is pasted!  Moreover,  on the top level the messages app (where you see the last message from all the recent people you texted with), the full message displays.
    - It can happen with both short and longer messages.   Here's another longer message I noticed got cut off: "That's funny that you though I was joking when I said I was debugging.  Why is that so weird?"
    - It has something to do with the length of the message or how it is being wrapped.  I can create modifications of those texts with the same length, and they will cut off. (That said, some modifications will not cause the problem, so it's more than just length.  Maybe it has something to do with how it wraps the words?)  Usually adding a few words to the message will allow it to go through.
    - It always cuts off at a space.  In other words, it will not truncate something in the middle of a word.
    - I have only seen it cut off one or two words before.
    Apple really needs to make this a high priority fix.  Unreliable messaging of this sort is a deal-breaker for iMessages, IMO.  My guess is that they haven't had more reports for this because people simply don't notice unless the last word or two totally ruins the meaning of a text and the other person points it out. 
    Can people try to recreate this on their machines?  If so, please do so and file a bug report (http://www.apple.com/feedback/macosx.html).  All you have to do is get on your iMessage app and text one of those two messages to your phone.  If it appears truncated on your phone, you've confirmed it.  You're welcome to use any of my post in any bug report.

    Hi,
    some entries had    (tabs probably)
    I had seen these in Quicklook at the point where the Message appeared to show double spaces after a Full Stop or Question Mark.
    You are right that it have not dawned on me that I had not seen them between words.
    It was TextEdit as well (Not sure why I said QuickLook)
    29723AE1-6D8B-4932-8353-875164302786man, why are you here?¬†¬†Two are in testing placesn  streamtypedÅË Ñ @ÑÑÑ NSMutableAttributedStringÑÑ NSAttributedStringÑÑ NSObjectÖíÑÑÑ NSMutableString ÑÑ NSString ïÑ +3man, why are you here?¬†¬†Two are in testing placesÜÑ iI 1íÑÑÑ
    Part of this means the iMessages sent out.
    The "repeat" is the sync back from the the ID  the iPhone is using.
    I am presuming the leading numbers are the iMessage identifier that iMessages uses to tell whether it has been Synced
    Messages on the Mac is trying to enclose this in Coloured Balloon (or other style) and lists a Font and it's colour
    NSDictionaryïÑ i íÑòò __kIMBoldAttributeNameÜíÑÑÑ NSNumberÑÑ NSValueïÑ *ÑÑ cü ÜíÑòò __kIMFontSizeAttributeNameÜíÑùûÑÑ q† ÜíÑòò __kIMFontFamilyAttributeNameÜíÑòò Arial BlackÜíÑòò&__kIMBaseWritingDirectionAttributeNameÜíÑùû
    The sync from the iOS device lists
    ¢†ˇÜíÑòò(__kIMMessageForegroundColorAttributeNameÜíÑòò #000000ÜíÑòò(__kIMMessageBackgroundColorAttributeNameÜíÑòò #2ba92dÜíÑòò __kIMMessagePartAttributeNameÜíÑùû¢†ÜÜÜ
    ( A less complicated "Balloon")
    It is unlikely to be the Tab key as this changes Fields in Messages  (From Text Entry spot, to Search spot, to the "To" spot.)
    8:43 PM      Tuesday; December 25, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Cut off from server cant send emails please help

    using thunderbird I cannot se.d emails .I keep getting asked for a new password ,to no avail .Iam told Iam cut
    off from the server.How to retrieve the situation is the question

    To diagnose problems with Thunderbird, try one of the following:
    *Restart Thunderbird with add-ons disabled (Thunderbird Safe Mode). On the Help menu, click on "Restart with Add-ons Disabled". If Thunderbird works like normal, there is an Add-on or Theme interfering with normal operations. You will need to re-enable add-ons one at a time until you locate the offender.
    *Restart the operating system in '''[http://en.wikipedia.org/wiki/Safe_mode safe mode with Networking]'''. This loads only the very basics needed to start your computer while enabling an Internet connection. Click on your operating system for instructions on how to start in safe mode: [http://windows.microsoft.com/en-us/windows-8/windows-startup-settings-including-safe-mode Windows 8], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-7 Windows 7], [http://windows.microsoft.com/en-us/windows/start-computer-safe-mode#start-computer-safe-mode=windows-vista Windows Vista], [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/boot_failsafe.mspx?mfr=true" Windows XP], [http://support.apple.com/kb/ht1564 OSX]
    ; If safe mode for the operating system fixes the issue, there's other software in your computer that's causing problems. Possibilities include but not limited to: AV scanning, virus/malware, background downloads such as program updates.

  • Cut off from the world and spun a pack of lies - A...

    Hi people I've signed up to this forum in pure desperation, maybe, just maybe there is somebody from BT listening who can be bothered to listen to my cries and put me out of my misery.
    My partner and I decided to set up a BT phone and internet package shortly before we moved into a new property in October.
    All was fine our phone and internet was activated on time and we were using it quite happily up until the dreadful day (November 25th) when it inexplicably got cut off...
    Various phone calls ensued between ourselves and various chaps (at current count about 9) in BT's Indian call centres during which we were spin a whole range of lies. To give you a flavour:
    - The exchange is being upgraded to give you faster internet,
    - The phone line is down and being fixed tomorrow,
    - Your account was never set up,
    - You've never had an account with us,
    - Are you a business???
    Now, I’m not an angry man but all this deception did rather hack me off. But I was about to get angrier still.
    Finally we got through to somebody from the order management team. A Scott if I recall, unfortunately I forget his last name, but he is based in Dundee. So Scott proceeds to tell me that our line was installed by openreach but the order was never closed out, if that happens something times out after 2 weeks and the line gets cut off. This is our situation. So, Scott tells me that he would expedite our reconnection within a week and would call us back in a couple of days.
    A couple of days pass, no call, no phone, no internet...  Five days pass, no call, no phone, no internet.
    So finally I decide to call back. Learning my mistakes from last time I instantly bypass the Indian chaps and ask for the order management team. This time I get through to Laura. I explain the situation and she offers to pass me onto Scott (as he is dealing with the issue), great I think. I hold and hold until Laura comes back on the line, Scott is on his annual leave, he will not be back into the office for two weeks. Time to hit the wall!
    So to cut a long story short I finally was passed to the elusive William. Suffice to say I was spun a similar story by William and he promised to call back, but no call, no phone, no internet. Just a pack of lies and broken promises.
    It’s now two weeks since we were cut off and I cannot for the life of me get back in touch with the order management team in the UK, the people who should be able to actually do something. It’s an absolute disgrace that BT cannot resolve this problem in a timely fashion, I mean it’s not our fault, it’s theirs. My Partner is supposed to be working from home and she can’t. This is causing me a massive amount of stress, I just want it fixed!
    Anyhow, maybe somebody is listening, probably not. But it makes me feel better to have a little rant. 
    HOW HARD CAN IT BE BT? YOU ARE A DISGRACE TO THE UK!
    Rant Finished  
    P.S. No I don't want to email you back and explain my problem to yet another incompetent BT minion. I want somebody to call me personally on my number (it’s on your file) and sort the stupid thing out now! And Yes I will be reporting the issue to the regulator.

    Hi Ernie_Wise,
    Thanks for the post and welcome to the forum.  I am sorry for the problems that you have had.  I can help.
    Please drop me an email to the email address in my profile, include your BT account details and the link to this thread.  I will look into this to see what is going on.
    Cheers
    Sean
    BTCare Community Manager
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • My photos are OK in the organizer, but the portrait photos are cut off from the top or bottom when u

    My photos are OK in the Organizer, but the portrait photos are cut off at the top or bottom when used in a slide show.  I have checked the "Crop to Fit" portrait selection but it makes no difference.  I have Version 9 of Elements.

    Hi,
    I suggest that you try unchecking both of the crop options - landscape & portrait.
    To re-create your situation, I had to check the crop for landscape pictures option.
    I prefer to have control over any cropping so I tend to crop each image first before creating the slide show.
    Brian

  • I continually get error messages that cut me off from Yahoo Mail because someone else has logged into Yahoo Messenger. I've never signed up for Messenger so why do I keep getting cut off from Mail?

    I get the error message 4 to 6 times a day. Since I don't ever remember signing up for Messenger, I'm puzzled by the message. I can't find Messenger in my applications file (or anywhere else) so I can't delete or un-install the program.
    At first it was just an annoyance, but not it's starting to get to me!
    What should I do?
    Help!

    Try first to Clear your cache from : Tools > Options > Advanced > Network, Clear Now button.
    if the above is not helpful, [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles create a new profile] and check it again.
    if you create the new profile see: [https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles#w_recovering-information-from-an-old-profile Recovering information from an old profile]
    thank you

  • I was cut off from the support chat and can't get back on re:  re-installing PS after uninstalling

    I'm using a MacBook Pro (Retina, 15-inch, Mid 2014) and CS 6 from a dvd
    Keyboard shortcuts suddenly disappeared and I was unable to reset them.
    I held down cmd-opt-shift and started Photoshop. Saw "Delete Photoshop Settings file", released the keys, clicked Yes, and let Photoshop finish loading.  Rebooted computer. Still nothing.
    I uninstalled PS, tried to to install from dvd and gave me "The serial number you entered is invalid."
    Contacted Adobe support chat and Naveen gave me a download link.  Still gave me: "The serial number you entered is invalid."
    Then firefox crashed.  Tried to get back on chat and could not and now my only "recommended option" is Forums.  So here I am.  Don't think that there's much anyone can do to help as I have uninstalled PS, but hoping to hear from Adobe support...

    Got back onto chat but have to contact tech support during their PST hours
    to deal with keyboard shortcuts problem.
    On Mon, Mar 9, 2015 at 6:40 PM, Kartikay_Sharma <[email protected]>

  • Why does my video get cut off from all angles in the Program: Sequence?

    I just made a video, and after exporting it I noticed my whole video was basically trimmed down.
    It was trimmed from the top, bottom, left, and right.
    Anyone know how to fix this??
    It is also trimmed in the Program: Sequence

    What do you mean source material?
    I took some footage of me playing a video game, and I captured it using a screen-capture software (Fraps).
    The imported material was .avi clips
    I still can't get it to work guys, ill try and explain everything I did.
    1) Open Adobe Premiere Pro CS3.
    2)Click new project DV-NTSC Standard 48kHz
    3)Import a .avi Movie I captured using Fraps screen recorder
    4) Use the Set In point and Set Out point to get what material I want from my movie
    5)Drag it onto the timeline
    6) Look at my program: sequence 1, and my movie seems to be trimmed from all angles, meaning if you've ever played a first person shooter game, you cannot see the gun I am holding, but in the movie clip that I recorded earlier, you can a see the gun I am holding.
    Does this make any sense?

  • TS1363 i phone 4s in recovery mode not working cut off from the planet

    does anyone out there know how to resart when the i phone constantly asks to be plugged into i player and i player asks for you to get out of recovery mode?

    Hello agardner37701,
    I found some steps you can take when your iPhone is not recognized by iTunes when in Recovery Mode.  I recommend reviewing the steps in the section titled "If the device is not recognized while in Recovery Mode" under step 5 in the following article:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I was in the process of signing up and was cut off from the internet.  Now I can't get anyone to respond to me

    If this is a sign of their customer service, perhaps I might want to reconsider joining this adobe community.  Maybe I should just give the 30 day trial a chance and rescind my paid membership.

    This is an open forum with a mix of other users and Adobe staff, not Adobe support... you need Adobe support
    Adobe contact information - http://helpx.adobe.com/contact.html may help
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • Cut off from a session of help

    How do I get re-connected with the technician?

    HI David,
    Specifically, only Internet Explorer 6 (or higher) and Mozilla Firefox browsers are supported;
    Might be some help here. http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/140sp/140sp566.pdf The file is dated 2005 / Java but might offer some insight.
    Interesting because Safari is a much more secure browser then IE by far and Firefox also.
    There isn't any reason you can't use Firefox on your Mac. Download and install it here.
    http://www.apple.com/downloads/macosx/internet_utilities/mozillafirefox.html
    You can Import your Safari Bookmarks into Firefox also.
    Carolyn

  • TA26486 i am facing a issue : video in quik time palyer is zooming and it cut off from sides

    Code is
    var qtobj = "<object id='contentPlayer' style='position:relative;top:0;left:0;'  width='100%' height='100%'";
                            qtobj += " >";
                            qtobj += "<embed name='contentPlayer' id='contentPlayer' style='position:relative;top:0;left:0' width='480px' height='250px'";
                            qtobj += " src='' ";
                            qtobj += " type='video/quicktime' target='QuickTimePlayer'";
                            qtobj += " qtsrc='" + url + "'";
                            qtobj += " scale='ASPECT' autoplay='true' bgcolor='#000000'";
                            qtobj += " enablejavascript='true'";
                            // IF CLIP
                            if (IsClipPage) {
                                qtobj += " starttime='" + seekTime + ":00'";
                            else {
                                qtobj += " starttime='00:00:" + seekTime + ":00'";
                            //qtobj += " starttime='00:00:" + seekTime + ":00'";
                            qtobj += " controller='false'";
                            qtobj += " showlogo='false'";
                            qtobj += " wmode='transparent'";
                            //qtobj += " href='javascript:function(){}'";
                            qtobj += " /> </object>";
    I use scle property but it not working

    I have used scale ='TOFIT '  and ASPECT ,Infact all scale values but its not woking

  • Playing slideshow on tv from ipad cutting off picture

    I am connecting my ipad 2 to my TV with a RocketFish Composite adapter and trying to play a video slideshow on my TV.  I am able to play the video/slideshow just fine, however both the top and bottom of the videos (and pictures) are being cut off by several inches.  When played directly on my iPad the size is fine ( no cut offs).  The videos were converted to Ipad compatable (.m4v) using Aimersoft Video Converter and the iPad presets.  The resolutions of the videos are 720 x 480.  The TV I am connecting to is 1080P LED TV.  I have tried different aspect ratios in the TV's settings but there are not much to choose from and each setting changes the size of the video a little, but the amount being cut off from the top and bottom is consistent.  What can i do to correct this problem.  Also, I need this slideshow for a trade show I am in tomorrow afternoon, so a quick response would help a lot. 
    Another thing...  In my research so far, I found that iPad 2 can mirror its display (meaning what you see on the iPad you see on the TV) onto the TV.  But I cannot seem to get that to work either.  I can only play videos and slideshows from the apps that allow you to.  How do I go about mirroring my display to my TV?  Does it only work with a HDMI connection? 

    Cmart1019-
    What adapter are you using?  I have the Digital AV Adapter that connects to the HDMI input of a small Vizio HDTV.  It seems to work OK, and has stereo sound.  My only problem has been the weight of the HDMI cable pulling the adapter out of the iPad.
    Apple also sells VGA, Component and Composite adapters.  I also have the VGA adapter which works on the HDTV and one LCD monitor.  However it doesn't work on a couple of older monitors I tried.  Also VGA is video only.  You would need to run a separate cable for sound on the TV.
    Fred

  • DBMS_METADATA.GET_DDL inside the pl/sql procedure

    We have a requirement to drop certain materialized view and need to recreate based on certain condition inside the
    pl/sql procedure.i am using the dbms_metadata to get the Mv ddls.
    var1 := 'SELECT DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW,'MV_NAME','OWNER')'|| 'from dual' || ';' ;
    dbms_output.put_line(var1);
    But i am unable to get the create ddl syntax in var1.
    Can anyone help me on this

    Hi Deepu,
    you are not helping us too much. You information are coming drop by drop.
    Anyway, I don't have a materialized view but I have tried with a table.
    Here is my test and output (what I expect you too show us too):
    First test using normal SELECT FROM DUAL:
    SET LONG 2000000
    SET HEAD OFF
    SET ECHO ON
    SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
    Output:
    SQL>
    SQL> SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
      CREATE TABLE "SYS"."ALERT_QT"
       (    "Q_NAME" VARCHAR2(30),
            "MSGID" RAW(16),
            "CORRID" VARCHAR2(128),
            "PRIORITY" NUMBER,
            "STATE" NUMBER,
            "DELAY" TIMESTAMP (6),
            "EXPIRATION" NUMBER,
            "TIME_MANAGER_INFO" TIMESTAMP (6),
            "LOCAL_ORDER_NO" NUMBER,
            "CHAIN_NO" NUMBER,
            "CSCN" NUMBER,
            "DSCN" NUMBER,
            "ENQ_TIME" TIMESTAMP (6),
            "ENQ_UID" VARCHAR2(30),
            "ENQ_TID" VARCHAR2(30),
            "DEQ_TIME" TIMESTAMP (6),
            "DEQ_UID" VARCHAR2(30),
            "DEQ_TID" VARCHAR2(30),
            "RETRY_COUNT" NUMBER,
            "EXCEPTION_QSCHEMA" VARCHAR2(30),
            "EXCEPTION_QUEUE" VARCHAR2(30),
            "STEP_NO" NUMBER,
            "RECIPIENT_KEY" NUMBER,
            "DEQUEUE_MSGID" RAW(16),
            "SENDER_NAME" VARCHAR2(30),
            "SENDER_ADDRESS" VARCHAR2(1024),
            "SENDER_PROTOCOL" NUMBER,
            "USER_DATA" "SYS"."ALERT_TYPE" ,
            "USER_PROP" "SYS"."ANYDATA" ,
             PRIMARY KEY ("MSGID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"  ENABLE
       ) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGIN
    G
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"
    OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    {code}
    Now with the procedure storing in CLOB variable
    {code:sql}
    SET SERVEROUTPUT ON SIZE UNLIMITED
    SET LIN 5000
    SET LONG 20000000
    SET ECHO ON
    DECLARE
       l_clob         CLOB;
    BEGIN
       l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
       DBMS_OUTPUT.put_line (l_clob);
    END;
    Output:
    SQL>
    SQL> DECLARE
      2     l_clob         CLOB;
      3  BEGIN
      4     l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
      5     DBMS_OUTPUT.put_line (l_clob);
      6  END;
      7  /
      CREATE TABLE "SYS"."ALERT_QT"
       (    "Q_NAME" VARCHAR2(30),
            "MSGID" RAW(16),
            "CORRID" VARCHAR2(128),
            "PRIORITY" NUMBER,
            "STATE" NUMBER,
            "DELAY" TIMESTAMP (6),
            "EXPIRATION" NUMBER,
            "TIME_MANAGER_INFO" TIMESTAMP (6),
            "LOCAL_ORDER_NO" NUMBER,
            "CHAIN_NO" NUMBER,
            "CSCN" NUMBER,
            "DSCN" NUMBER,
            "ENQ_TIME" TIMESTAMP (6),
            "ENQ_UID" VARCHAR2(30),
            "ENQ_TID" VARCHAR2(30),
            "DEQ_TIME" TIMESTAMP (6),
            "DEQ_UID" VARCHAR2(30),
            "DEQ_TID" VARCHAR2(30),
            "RETRY_COUNT" NUMBER,
            "EXCEPTION_QSCHEMA" VARCHAR2(30),
            "EXCEPTION_QUEUE" VARCHAR2(30),
            "STEP_NO" NUMBER,
            "RECIPIENT_KEY" NUMBER,
            "DEQUEUE_MSGID" RAW(16),
            "SENDER_NAME" VARCHAR2(30),
            "SENDER_ADDRESS" VARCHAR2(1024),
            "SENDER_PROTOCOL" NUMBER,
            "USER_DATA" "SYS"."ALERT_TYPE" ,
            "USER_PROP" "SYS"."ANYDATA" ,
             PRIMARY KEY ("MSGID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"  ENABLE
       ) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"
    OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    {code}
    It should be nice if you could post your tests too if they are not working.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • CTAS using dbms_metadata.get_ddl for Partitioned table

    Hi,
    I would like to create a temporary table from a partitioned table using CTAS. I plan to use the following steps in a PL/SQL procedure:
    1. Use dbms_metadata.get_ddl to get the script
    2. Use raplace function to change the tablename to temptable
    3. execute the script to get the temp table created.
    SQL> create or replace procedure p1 as
    2 l_clob clob;
    3 str long;
    4 begin
    5 SELECT dbms_metadata.get_ddl('TABLE', 'FACT_TABLE','USER1') into l_clob FROM DUAL;
    6 dbms_output.put_line('CLOB Length:'||dbms_lob.getlength(l_clob));
    7 str:=dbms_lob.substr(l_clob,dbms_lob.getlength(l_clob),1);
    8 dbms_output.put_line('DDL:'||str);
    9 end;
    12 /
    Procedure created.
    SQL> exec p1;
    CLOB Length:73376
    DDL:
    PL/SQL procedure successfully completed.
    I cannot see the DDL at all. Please help.

    Thanks Adam. The following piece of code is supposed to do that. But, its failing because the dbms_lob.substr(l_clob,4000,4000*v_intIdx +1); is putting newline and therefore dbms_sql.parse
    is failing.
    Please advice.
    create table my_metadata(stmt_no number, ddl_stmt clob);
    CREATE OR REPLACE package USER1.genTempTable is
    procedure getDDL;
    procedure createTempTab;
    end;
    CREATE OR REPLACE package body USER1.genTempTable is
    procedure getDDL as
    Description: get a DDL from a partitioned table and change the table name
    Reference: Q: How Could I Format The Output From Dbms_metadata.Get_ddl Utility? [ID 394143.1]
    l_clob clob := empty_clob();
    str long;
    l_dummy varchar2(25);
    dbms_lob does not have any replace function; the following function is a trick to do that
    procedure lob_replace( p_lob in out clob, p_what in varchar2, p_with in varchar2 )as
    n number;
    begin
    n := dbms_lob.instr( p_lob, p_what );
    if ( nvl(n,0) > 0 )
    then
    dbms_lob.copy( p_lob,
    p_lob,
    dbms_lob.getlength(p_lob),
    n+length(p_with),
    n+length(p_what) );
    dbms_lob.write( p_lob, length(p_with), n, p_with );
    if ( length(p_what) > length(p_with) )
    then
    dbms_lob.trim( p_lob,
    dbms_lob.getlength(p_lob)-(length(p_what)-length(p_with)) );
    end if;
    end if;
    end lob_replace;
    begin
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'STORAGE',false);
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES',false);
    DBMS_METADATA.SET_TRANSFORM_PARAM (DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',true);
    DBMS_METADATA.SET_TRANSFORM_PARAM (DBMS_METADATA.SESSION_TRANSFORM,'SEGMENT_ATTRIBUTES',false);
    execute immediate 'truncate table my_metadata';
    -- Get DDL
    SELECT dbms_metadata.get_ddl('TABLE', 'FACT','USER1') into l_clob FROM DUAL;
    -- Insert the DDL into the metadata table
    insert into my_metadata values(1,l_clob);
    commit;
    -- Change the table name into a temporary table
    select ddl_stmt into l_clob from my_metadata where stmt_no =1 for update;
    lob_replace(l_clob,'"FACT"','"FACT_T"');
    insert into my_metadata values(2,l_clob);
    commit;
    -- execute immediate l_clob; <---- Cannot be executed in 10.2.0.5; supported in 11gR2
    DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'DEFAULT');
    end getDDL;
    Procedure to create temporary table
    procedure createTempTab as
    v_intCur pls_integer;
    v_intIdx pls_integer;
    v_intNumRows pls_integer;
    v_vcStmt dbms_sql.varchar2a;
    l_clob clob := empty_clob();
    l_str varchar2(4000);
    l_length number;
    l_loops number;
    begin
    select ddl_stmt into l_clob from my_metadata where stmt_no=2;
    l_length := dbms_lob.getlength(l_clob);
    l_loops := ceil(l_length/4000);
    for v_intIdx in 0..l_loops loop
    l_str:=dbms_lob.substr(l_clob,4000,4000*v_intIdx +1);
    l_str := replace(l_str,chr(10),'');
    l_str := replace(l_str,chr(13),'');
    l_str := replace(l_str,chr(9),'');
    v_vcStmt(v_intIdx) := l_str;
    end loop;
    for v_intIdx in 0..l_loops loop
    dbms_output.put_line(v_vcStmt(v_intIdx));
    end loop;
    v_intCur := dbms_sql.open_cursor;
    dbms_sql.parse(
    c => v_intCur,
    statement => v_vcStmt,
    lb => 0,
    --ub => v_intIdx,
    ub => l_loops,
    lfflg => true,
    language_flag => dbms_sql.native);
    v_intNumRows := dbms_sql.execute(v_intCur);
    dbms_sql.close_cursor(v_intCur);
    end createTempTab;
    end;
    /

Maybe you are looking for

  • How do I use JPanel as a leaf in JTree ?

    Hi All, I am a bit of a newbie and I've been trying to change the behavior of my application. I have a JTree that I now want to change the rendering of a leaf to be a JPanel. The JPanel will have a couple of JButtons and some text and the user can in

  • Backlight doesn't work on v 1.1

    Hello there How I can temporarily turn on v 1.1 backlight, while it is set off. Because on v 1.0 it was possible to turn on/off by holding MENU for app. 2 sec. But in v 1.1 I can't do this. Am I doing something wrong or it is disabled? Thanks for any

  • Satellite A505D Randomly Shuts off...help please

    hi, i recently baught a Toshiba satellite A505D....recently it has started shutting off randomly...the screen will go black and briefly display a blue screen that says that it is shutting off to protect something in the computer...does anyone know wh

  • IPhone not trusting a go daddy

                      I am running Cisco ISe 1.1.2.  I have many iPhone users that connect to wireless.  I have installed a Godaddy cert on my ISE administration server.  I can not get the iPhones to trust the cert.  My Androids accept it.  Any ideas?

  • Application windows don't always remember which display to open on

    I have a iMac (27-inch, Late 2013) with OS X Yosemite 10.10 connected to two external monitors (iMac + external screen). when you have that safari open in the external screen for default (Ctrl+click in safari Dock-icon, options...) open in the extern