Need to remove the name clause and the storage of schema DDL script.

Try to remove the clause name and storage schema of the DDL script.


Example:

"
CREATE TABLE 'CPDFP '. "" PS_PT_LN_TA_SRVC_BRANCH_DTLS ".
(ACTIVATE THE "SL_NO" NUMBER NOT NULL,)
ACTIVATE THE "SESSION_ID" NUMBER NOT NULL,
ACTIVATE THE "COMPANY_CODE" VARCHAR2 (15) NOT NULL,
ACTIVATE THE "SRVC_BRANCH_CODE" VARCHAR2 (6) NOT NULL,
ENABLE 'DEALER_CODE' VARCHAR2 (15) NOT NULL
) CREATION OF IMMEDIATE SEGMENT
PCTFREE, PCTUSED, INITRANS 40 10 1 MAXTRANS 255
REGISTRATION OF NOCOMPRESS
STORAGE (INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645)
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
USER_TABLES FLASH_CACHE, CELL_FLASH_CACHE DEFAULT DEFAULT)
"TABLESPACE"CPDFP"


On top of the query, I have to delete the name and storage schema clause...


Can anyone suggest pls as how to do it...

I used script below to get the ddl of the tables and I have to remove the schema name and terms of storage so pls help...

SELECT DBMS_METADATA. GET_DDL ('TABLE', u.table_name)
FROM USER_TABLES;


Rgds,
Nitesh.
DROP TABLE t;
create table t as select * from all_objects where 1=0;

begin
dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SEGMENT_ATTRIBUTES', false );
dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE );
end;
/

SELECT REPLACE(
  DBMS_METADATA.GET_DDL( 'TABLE', 'T'),
  '"'||USER||'".',
  ''
)
from dual;

 CREATE TABLE "T"
   (     "OWNER" VARCHAR2(30) NOT NULL ENABLE,
     "OBJECT_NAME" VARCHAR2(30) NOT NULL ENABLE,
     "SUBOBJECT_NAME" VARCHAR2(30),
     "OBJECT_ID" NUMBER NOT NULL ENABLE,
     "DATA_OBJECT_ID" NUMBER,
     "OBJECT_TYPE" VARCHAR2(19),
     "CREATED" DATE NOT NULL ENABLE,
     "LAST_DDL_TIME" DATE NOT NULL ENABLE,
     "TIMESTAMP" VARCHAR2(19),
     "STATUS" VARCHAR2(7),
     "TEMPORARY" VARCHAR2(1),
     "GENERATED" VARCHAR2(1),
     "SECONDARY" VARCHAR2(1),
     "NAMESPACE" NUMBER NOT NULL ENABLE,
     "EDITION_NAME" VARCHAR2(30)
   ) ;

For instructions CREATE TABLE for all the tables in your schema:

begin
dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SEGMENT_ATTRIBUTES', false );
dbms_metadata.set_transform_param( DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR', TRUE );
end;
/
SELECT REPLACE(
  EXTRACTVALUE(
    XMLTYPE(
      DBMS_XMLGEN.GETXML(
        'SELECT DBMS_METADATA.GET_DDL( ''TABLE'', '''||TABLE_NAME||''' ) SCR FROM DUAL'
      )
    )
    , '/ROWSET/ROW/SCR'
  ),
  '"'||USER||'".',
  ''
)
OBJECT_SCRIPT
FROM USER_TABLES;

I post out ;)

Published by: Ashton stew on March 7, 2013 11:47

Tags: Database

Similar Questions

  • I need to remove the uneeded files: Purenetworks and PCFix. But I get: not deletenmrsrc.dll: access denied make sure the disk is not full or write protected and that the file is not in use.

    Original title: remove unnecessary files

    I need to remove the uneeded files: Purenetworks and PCFix. But I get: not deletenmrsrc.dll: access denied make sure the disk is not full or write protected and that the file is not in use.

    Ditto for PCFIX.exe.

    How can I remove these and clean unnecessary files? Thank you.

    Hello

    1. how exactly you are trying to remove it?
    2 have you connected the administrator account?

    Step 1: Check if the problem persists in the clean boot state.

    From your computer by using a minimal set of drivers and startup programs so that you can determine if a background program is interfering with your game or program. This type of boot is known as a "clean boot".

    Reference:

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    When you are finished troubleshooting, follow these steps to reset the computer to start as usual:

    1. click on start and then click Run.

    2. type msconfig and click OK.

    The System Configuration Utility dialog box appears.

    3. click on the tab general, click Normal Startup - load all services and device drivers and then click OK.

    4. When prompted, click on restart to restart the computer.

    Step 2: Take possession of these program at the following location folder, and then check the issue. C:\Program Files\ 

    Reference: How is ownership of a file or a folder in Windows XP

  • I need to remove the old version of windows easy transfer to install a new... How can I do this

    I recently got a new laptop and I need to transfer my files to my computer windows vista to windows 7, but I need to remove the transfer windows easy off vista to install the new Windows 7... How can I do this. its driving me crazy

    You cannot remove the Windows program like that... Windows 7 easy transfer to restore.

  • I need to remove the program files o to send to:

    original title:?

    I need to remove the program files o to send to:

    I need to remove the program files o to send to:

    You want to remove entries from the right-click send to menu?

    If so, click on the round of Windows (start), type shell: sendto and hit enter. To remove a shortcut, right-click and choose Remove.

  • account users: I need to remove the old user accounts

    I need to remove the old user accounts

    http://www.Vistax64.com/tutorials/93026-user-account-delete.html

    Read the tutorial above.

    http://www.tech-recipes.com/Rx/2054/vista_how_to_delete_user_account/

    And meanings, too.

    The information above should solve the problem for you.

    See you soon.

    Mick Murphy - Microsoft partner

  • you need to remove the license from computer to move to another PC.

    you need to remove the license from computer to move to another PC.

    It is all the information that I have and you can get on the product. I don't know when and who has been sold, or whose key is. Asked me to pass the software of an older laptop to a new laptop.

    Good luck with that.  Without a legitimate serial number, you're stuck.

    Download the Pro or Standard of X, XI or Acrobat DC versions

    Nancy O.

  • I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    I have a text field. I need to remove the first 8 characters of the field, leaving the remaining characters. Help?

    Example:

    Text Example.JPG

    I need to remove these numbers PXXXXXX. Leaving the other characters.

    Thank you

    Bob

    A normal 'substring' is what you're looking for.

    For a formula of the column in the response criteria tab:

    SUBSTRING ("YourPresTable". "YourPresColumn" OF 9)

    To make the RPD and the workload of shipping off the coast to the database rather than forcing the work on the server of the OBI or presentation:

    Substring ("01 - Sample App Data (ORCL)" ".." ") "" "BISAMPLE '." " D10 product (dynamic table)". ("' Prod_Dsc ' 9)

  • PowerCLI Remove-NetworkAdapter questions - need to remove the single card

    I need to remove a single adapter via PowerCLI:

    "Get-NetworkAdapter - VM myvm" returns:

    Name Type NetworkName MacAddress WakeOnLan
    Activated
    ----                 ----       -----------  ----------         ---------
    Network adapter 1 e1000 VM Network 00:50:56:09:09:09 False
    Network adapter 2 e1000 VM Network 00:50:56:01:08:07 False

    I want to only remove the NIC 2, so I tried:

    "Remove-NetworkAdapter - networkadapter"Network adapter 2"which returns:

    Remove-NetworkAdapter: cannot bind parameter "NetworkAdapter". Could not be converted
    the value of 'Network adapter 2' to type 'System.String' to type 'VMware.VimAutoma '.
    tion.ViCore.Types.V1.VirtualDevice.NetworkAdapter ".
    On line: 1 char: 38
    + delete-NIC - NIC < < < < '2 network adapter.
    + CategoryInfo: InvalidArgument: (:)) [delete-NetworkAdapter], Pa)
    rameterBindingException
    + FullyQualifiedErrorId: CannotConvertArgumentNoMessage, VMware.VimAutomat
    ion.ViCore.Cmdlets.Commands.RemoveNetworkAdapter

    So I tried:

    $network = get-networkadapter VM - myvm

    Remove-NIC - NIC $network

    Who wants to delete the two network adapters:

    Confirm
    Are you sure you want to perform this action?
    Operation 'Remove network adapter' target 'NIC 1,
    NIC 2 ".

    So I tried

    $network = get-networkadapter VM - myvm

    Remove-NetworkAdapter NetworkAdapter - $network.networkadapter [2]

    Which returns:

    Cannot perform indexing in a null table.
    At line: 1 char: 63
    + delete-networkadapter networkadapter - $network.networkadapter [< < < < 2]
    + CategoryInfo: InvalidOperation: (2:Int32)], RuntimeException
    + FullyQualifiedErrorId: NullArray

    So, what don't get me?  I need to remove the 2 network adapter only.

    Any help would be greatly appreciated.

    -stephen

    You can do

    Get-NetworkAdapter VM - myvm | where {$_.} Name - eq 'Network adapter 2'} | Remove-NIC

    Note that a table of PS starts indexing at 0.

    If your last attempt should be

    $network = get-networkadapter VM - myvm

    Remove-NetworkAdapter NetworkAdapter - $network.networkadapter [1]

  • Need to remove the spaces between each words

    Hi guys,.

    I need to remove the spaces between each word. I'm doing this because I want to compare a column with a value.

    For ex: named - description "Negotiate APR - current balance" should be replaced by "NegotiateAPR-currentbalance.

    All can help me out here to achieve. Your timely help is well appreciated.

    Thanks in advance.

    WITH t AS (SELECT '"Negotiate APR - current balance"' str FROM DUAL)
    SELECT REPLACE (str, ' ') str
      FROM t;
    

    gives: "NegotiateAPR-currentbalance.

    Is that what you want...? If this isn't the case, please give some examples.

    See you soon,.

    Manik.

  • Can I remove the storage (default) of a multi-member Equallogic array group Pool

    Current config:

    1 group, 3 members Equallogic arrays: Array01, Array02 and Array03.

    3 Array01 of Pools of storage (default), Array02, Array03

    I need to remove the Array01 member to remove the group. The default storage pool moves automatically to another Storage Pool? that is Array02?

    I've already migrated all volumes and snapshots off Array01.

    Config required

    1 group, 2 tables of Equallogic members: Array02 and Array03

    2 (default?) Storage Pools Array02, Array03

    Thanks in advance.

    The default storage pool cannot be deleted.  It will just sit there like a pool empty (without the members of the group are attributed to him) if it is not used.

    -joe

  • Need to remove the space between &lt; af:panelGrouplayout &gt; and &lt; af:panelBox &gt;

    Hi all

    I use JDeveloper 11.1.1.6.

    My scenario is I need to stretch some fields for all browsers, so I use Panel box inside the < f: facet center = name > panelStretchLayout.

    It works very well. But some scenarios need to display the header above the group box elements. Then I try to add panelGroupLayout in < f: facet = top name >. It is stretching very well, but is always to show space between < af:panelBox >.

    How can I remove the space between < af:panelGroupLayout > and < af:panelBox >?

    My Codes like this,

    < af:panelStretchLayout id = "PSL1" inlineStyle = "" margin-top: 30px; ">"

    < f: facet = 'top' name >

    < af:panelGroupLayout id = "pgl4" layout = "vertical".

    inlineStyle = "" background-color: red; ">"

    < af:panelGroupLayout layout = "horizontal" id = "pgl1" >

    < af:outputText value = 'Day' id = "ot1" / >

    < af:outputText value = "Week" id = "ot2" / >

    < af:outputText value = 'Months' id = "ot3" / >

    < af:outputText value = 'Year' id = "ot4" / >

    < / af:panelGroupLayout >

    < / af:panelGroupLayout >

    < / f: facet >

    < f: facet name = "center" >

    < columns af:panelDashboard = rowHeight '1' = "100%" id = "pd1" >

    < af:panelBox id = "pb1" showDisclosure = "false".

    showHeader = "never" > < / af:panelBox >

    < / af:panelDashboard >

    < / f: facet >

    < / af:panelStretchLayout >


    Thank you...

    Same answer as your other thread need to hide the space between &

    Use firebug to see if a style is the cause because it is not reproduced.

    Timo

  • FRUSTRRATED. you will need to remove the Yahoo toolbar, remove BING and switch back to Google, open new windows in windows separte NOT tabs. Help, please!

    1. I didn't want Yahoo toolbar, but I can't get rid of it!
    2 need to change the new opening of the tabs in a single window several glass separte windows.
    3. somehow, BING has become my default page. How to return to GOOGLE?

    I also use the 3.6.19 version and do NOT want to upgrade to the new version of terrible. Please help thanks 3.6

    In the search bar, click on the little arrow, scroll down and choose "Manage search engines".

    In the menu next, click on Bing , highlight it, and then click Remove.

    If this answers your question, please click the button solved next to this post after logging in to the forum. This will help others looking for a solution to the same thing.

    Thank you.

  • Need to remove the current uninstalled update download its corrupt and re-download a new

    I know I can probably roll a restore point just do need help, Thnx

    Windows XP

    Remove the temporary WU downloads folder: -.

    Stop the automatic updates service

    Click Start, choose run.
    In the run box, type services.msc.
    Click OK.
    Right-click the automatic updates service.
    Click on stop.
    Stopping the service will take a moment.

    Delete the content of the download folder
    Click Start. Choose run.
    In the run box, type %windir%\SoftwareDistribution
    Click OK.
    Open the download folder.
    Delete all the contents of the download folder.
    Close the window.

    Start the automatic updates service
    Click Start. Choose run.
    In the run box, type services.msc.
    Click OK.
    Right-click the automatic updates service.
    Click Start.
    Starting the service will take a moment.

    By removing the contents of the download folder - you have removed the downloaded updates.

    TaurArian [MVP] 2005-2010 - Update Services

  • Need to remove the old account from creating new a new Internet service provider. TB31.

    New VAC .the see my old address 'Reply', forward, & "write". -Usually very inconvenient. -You should be able to remove the old according to that ISP no longer exists.

    Do you need to delete the emails too?

    If you delete your account

    • Go to Edition-> properties, then select the account. Then click Action account at the left bottom of the active window and delete your account.

    If you remove the only shipping address, then delete the SMTP Protocol

    • Go to Edition-> properties and select the Server (SMTP) "outgoing" > choose one you need to remove.

    By default, you can't remove them, if you want to remove the default value, and then create new SMTP and make default and remove the old SMTP

  • need to remove the bar tabs total

    The toolbar of the tab continues to display everytime I open FF or if I open another Web site. This inconvenience does not occur. I tried all the settings and the proposals without success. A FF restarted several times and nothing removes the tab bar. Of course, you have a bug that you need to fix. Using FF 22 and Windows XP SP3 version.

    You can't eliminate the tab bar. Firefox will still open the tab bar if there are several tabs.

    You run Firefox in mode full screen (press F11 to toggle)?

    You can attach a screenshot?

    Use a type of compressed as PNG or JPG image to save the screenshot.

Maybe you are looking for

  • Nighthawk D7800 will not work with 1.0 Chromecast

    HelloTry to get to work with my new router Chromecast. No problem of installation, but when I try to stream from an app that is not able to set up a connection.When you use app chromecast I can do a factory reset and configure everything, but then ge

  • Video (movies/tv/iTunes store previews) in iTunes has stopped working after update 10/12/15

    After update 10 December 2015 for OS X version 10.10.5 - video not playing not in iTunes - no TV doesn't show (time at the bottom of the black screen counter remains at 0:00), movies (video meter at the bottom of the black screen ACCOUNT BEFORE, but

  • Real-time Application Installer

    I built two requests in real time; one for a PXI Chassi and the other for a compact field point. I wish I could send the customer updated versions of applications in real time and ask them to install them to the respective chassi/fieldpoint in the fi

  • I need product number for win 98

    Ive loaded win 98 on another Tower and I can't find the product number as it is absent, it will not work without that it is what it says on the front of the drive 0499 part numxo3-77962 win 98 cd 4000

  • BIOS update help stuck!

    Hi, I have a Pavilion dv6-3040us and when I turned on my laptop, he asked me if I wanted to do a bios update then I did and press ENTER.  Now its impasse on 'New BIOS Image Verification' block 34/512 for almost an hour now.  What can I do? Thank you