How to remove (manually or automatically) created EXTENDED stats

Hello


On the basis of data Oracle Enterprise Edition Release 12.1.0.1.0 12 c - 64 bit (probably on 11 GR 2 too) I can't rename column when extended stats are calculated manually or auto-magiquement in db Oracle itself (in case the primary key or view materialized, etc. is (or was) there).

See a simple demonstration below. Even if the extended stat is reported as DROPPABLE I can't find the syntax how DROP/Delete that stretched his stats so I can rename column later.


> COLUMN FORMAT A12 TABLE_NAME

> COLUMN COLUMN_NAME FORMAT A32

> COLUMN DATA_DEFAULT FORMAT A40

> COLUMN EXTENSION A32

> COLUMN nom_extension A32

> REM == Create table

> create table (number of APPLE, ORANGE) FRUIT

Table created FRUIT.

> command prompt

> REM == see CLO

> select table_name, column_name, data_default, VIRTUAL_COLUMN, HIDDEN_COLUMN

from user_tab_cols where table_name = 'FRUIT '.

TABLE_NAME COLUMN_NAME DATA_DEFAULT VIRTUAL_COLUMN HIDDEN_COLUMN

------------ -------------------------------- ---------------------------------------- -------------- -------------

FRUITS       APPLE                                                                     NO             NO

FRUITS       ORANGE                                                                    NO             NO

> command prompt

> REM == calculate EXTENDED stats (if the primary key, view etc. defined server Oracle does himself sometimes!)

> exec DBMS_STATS. GATHER_TABLE_STATS (ownname = > null, tabname = > 'FRUIT', method_opt = > 'For the COLUMNS (APPLE, ORANGE) SIZE AUTO')

anonymous block filled

> command prompt

> REM == see new hidden column from the extended statistics

> select table_name, column_name, data_default, VIRTUAL_COLUMN, HIDDEN_COLUMN

from user_tab_cols where table_name = 'FRUIT '.

TABLE_NAME COLUMN_NAME DATA_DEFAULT VIRTUAL_COLUMN HIDDEN_COLUMN

------------ -------------------------------- ---------------------------------------- -------------- -------------

FRUITS       APPLE                                                                     NO             NO

FRUITS       ORANGE                                                                    NO             NO

FRUIT SYS_STUL_A8_XOJI866YW$ FOZG #Y95 SYS_OP_COMBINED_HASH("APPLE","ORANGE") YES

> command prompt

> REM == see stats for new hidden column reference

> SELECT TABLE_NAME, DROPPABLE, SUBSTR(EXTENSION_NAME,1,35) nom_extension, SUBSTR(EXTENSION,1,35) EXTENSION

FROM dba_stat_extensions WHERE table_name = 'FRUIT '.

Table_name DROPPABLE nom_extension EXTENSION

------------ --------- ----------------------------------- --------------------------------------------------------------------------------

FRUIT YES SYS_STUL_A8_XOJI866YW$ FOZG #Y95 ('APPLE', 'ORANGE')

> SELECT table_name, COLUMN_NAME from user_tab_col_statistics WHERE table_name = 'FRUIT '.

TABLE_NAME COLUMN_NAME

------------ --------------------------------

FRUIT SYS_STUL_A8_XOJI866YW$ FOZG #Y95

> command prompt

> REM == try to get rid of its stats and stats hidden column

> exec DBMS_STATS.delete_column_stats (ownname = > null, tabname = > 'FRUIT', column name = > "SYS_STUL_A8_XOJI866YW$ FOZG #Y95")

anonymous block filled

> SELECT table_name, COLUMN_NAME from user_tab_col_statistics WHERE table_name = 'FRUIT'

no selected line

> exec DBMS_STATS. DELETE_TABLE_STATS (ownname = > null, tabname = > 'FRUIT')

anonymous block filled

> SELECT TABLE_NAME, DROPPABLE, SUBSTR(EXTENSION_NAME,1,35) nom_extension, SUBSTR(EXTENSION,1,35) EXTENSION

FROM dba_stat_extensions WHERE table_name = 'FRUIT '.

Table_name DROPPABLE nom_extension EXTENSION

------------ --------- ----------------------------------- --------------------------------------------------------------------------------

FRUIT YES SYS_STUL_A8_XOJI866YW$ FOZG #Y95 ('APPLE', 'ORANGE')

> exec DBMS_STATS. DROP_EXTENDED_STATS (ownname = > null, tabname = > 'FRUIT', expresion = '(APPLE, ORANGE)')

Error at startup on line: 34 in the command.

exec DBMS_STATS. DROP_EXTENDED_STATS (ownname = > null, tabname = > 'FRUIT', expresion = '(APPLE, ORANGE)')

Error report-

ORA-06550: line 1, column 73:

PLS-00201: identifier 'EXPRESSION' must be declared.

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

06550 00000 - "line %s, column % s:\n%s".

* Cause: Usually a PL/SQL compilation error.

* Action:

> exec DBMS_STATS. DROP_EXTENDED_STATS (ownname = > null, tabname = > 'FRUIT', expresion = '("APPLE", "ORANGE")')

Error from line: 35 at the controls.

exec DBMS_STATS. DROP_EXTENDED_STATS (ownname = > null, tabname = > 'FRUIT', expresion = '("APPLE", "ORANGE")')

Error report-

ORA-06550: line 1, column 73:

PLS-00201: identifier 'EXPRESSION' must be declared.

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

06550 00000 - "line %s, column % s:\n%s".

* Cause: Usually a PL/SQL compilation error.

* Action:

> command prompt

> REM == Stats column rest yet!

> SELECT TABLE_NAME, DROPPABLE, SUBSTR(EXTENSION_NAME,1,35) nom_extension, SUBSTR(EXTENSION,1,35) EXTENSION

FROM dba_stat_extensions WHERE table_name = 'FRUIT '.

Table_name DROPPABLE nom_extension EXTENSION

------------ --------- ----------------------------------- --------------------------------------------------------------------------------

FRUIT YES SYS_STUL_A8_XOJI866YW$ FOZG #Y95 ('APPLE', 'ORANGE')

> command prompt

> REM == Hidden columns prevents various operations on table however :(

> alter table FRUIT rename column ORANGE lemon

Error at startup to the line: 42 in the command.

ALTER table FRUIT rename column ORANGE lemon

Error report-

SQL error: ORA-54032: Rename column is used in a virtual column expression

There is a solution to 'dirty' to rename system generated column SYS_STUL_A8_XOJI866YW$ FOZG #Y95 to "MANGO" for example and then drop this MANGO column, which allows me to rename the column ORANGE, but I find as not recommended approach.

So the question remains how to remove regularly extended statistics in the above example with Oracle DML/DDL commands?


exec DBMS_STATS. DROP_EXTENDED_STATS (-online null ownname, tabname => "FRUITS", extension => '(APPLE, ORANGE)')


The parameter name is "extension" not "expression".


Concerning

Jonathan Lewis


Tags: Database

Similar Questions

  • My Defender does not start after the Norton removal, manual or automatic, code of error 0x800106ba

    I get error 0x800106ba when you try to start Defender, I tried to start it manually and that flags upward. I just uninstalled Norton product and not forget to check and see if my security essential work and they are, but Defender does not start? I have tried manually and automatic, have restarted the computer and searched forums and does not start again.

    Thank you

    Try the Norton Removal Tool: https://www-secure.symantec.com/norton-support/jsp/help-solutions.jsp?lg=english&ct=united+states&docid=20080710133834EN&product=home&version=1&pvid=f-home

    You still have remnants of Norton that interfere with the Defender (Norton disabled Windows Defender when you installed since Norton protects against the many forms of malware and Norton and the Defender provide real-time protection;) MSE and several other programs also cannot run at the same time as Windows Defender AV).

    You mentioned Security Essentials?  Do you have also installed Microsoft Security Essentials?

    You should never have more than one security product installed on the PC, providing active protection / scan. This can cause performance problems, system instability and conflicts between programs and can affect all installed antivirus product efficiency.

    You will still need another program AV because Windows Defender offers protection against spyware.  Avast, AVG, Avira, and MSE are the "big four" that provide no protection, and there are several very good '' for' anti-malware programs.  You can find the following links to be interesting to read:

    http://www.avast.com/index

    http://free.Avg.com/us-en/homepage

    http://www.Avira.com/en/Avira-free-antivirus

    http://www.Microsoft.com/en-us/security_essentials/default.aspx

    MSE and Windows Defender

    http://www.AV-Comparatives.org/

    http://www.dslreports.com/Forum/r25776413-2011-anti-virus-poll

    Kind regards...

  • How to remove objects that are created with the new

    Hello

    I'm having a problem create a behavior or a script to remove the new sprites created in the channels. I have a behavior script that creates new sprites using the following (Simplified) script:

    First of all, a Beginsprite creates a gChannel_list and assigns a value of gChannel from the beginning. pSprite is used to set the sprite that is clickon in the mousedown .

    on Beginsprite me
    gChannel_List =]
    gChannel = 70
    pSprite = sprite (Spritenum)
    end


    In the mousedown gChannel is incremented and the newly created channel is added to the gChannel_list.

    on Mousedown me

    gChannel = gChannel + 1
    theChannel = addat (gChannel_List, gChannel)
    Members = pSprite.member

    ........

    (gChannel) channel .makeScriptedSprite (Member, point (80,160))
    Sprite (gChannel) .width = thememberW
    Sprite (gChannel) .height = thememberH
    Sprite (gChannel) .rotation = theMemberR
    Sprite (gChannel) .moveablesprite = 1
    Sprite (gChannel) .encre = 36
    ........

    etc.

    After the creation of several sprites based on the gChannel, globals include, for example, are returned.

    -Global Variables-
    gChannel_List = [71,72,73,74]
    gChannel = 74


    My problem is that I cannot delete these created gchannel sprites with a command of jargon. Remove them from the list, for example, using deletat(gChannel,1), does nothing to remove them from the scene (they disappear from the list). And while I can view their attributes such as width [n = getat (gChannel_list, x); put .width sprite (n)], nothing seems to relate to the removal of these gchannel sprites.

    How do we?

    Hope this is enough information. If this isn't the case, please let me know. I can give you everything that you could possibly need. Help, please.

    Stem




    You used "makeScriptedSprite()" to add a sprite channel. Try to use the reverse: "removeScriptedSprite()."

  • How to remove a title you created, which shows the wrong clip? __

    I conclude Edition and I've added my overlay clip title initially came out great... that is the problem. I tried to add a little poem on a clip of overlay at the end of my slide show and it came on the second clip at the beginning of the slide show... not the last clip at the end.  Cannot find where to remove it.   How can I place it at the end?

    I shot help in Movie Maker and it told me to do the same thing as you but it was easier because he had pictures lol. Worked well all ok but I need to shorten the duration of the title.

    fact what got me help and it worked, but trim handle will not stay. I go back to reading the script and is the same as before... go back to the timeline and its movement.

    I still did once and right click on it this time to save... but still not good.

    Sorry to bother you again

    ===========================================
    Here again... the problem of deleting and creating new can be the solution.

    With regard to a trim handle... If you place your pointer over the edge of the title
    in question and move around until you see a double arrow... you should
    be able to change the duration by dragging... in fact, you should see
    a ToolTip that shows the change as you do.

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • In WMC, how to remove manual: name of the program to save

    In Windows Media Center, in the Guide, there is an interval of time that says ' Manual: "and then the show she'll save.  This is for all the days of the week.  I know not even how he put, and I can't remove it.  He poses problem trying to save something in the same time slot, even if I solved the conflict.  How can I get rid of this parameter.  Thank you.

    Hi pacmath,

    You can select the Manual download option if Windows Media Center cannot connect to the Internet and download the Guide. If you choose this option, it is recommended that you download the updated lists regularly to make sure you get to the last minute schedule changes.

    If you don't want this option to be selected you will need to change the method to download the guide in the media to download when connected, lists when you select this option

     

    Download updated listings in the Guide in Windows Media Center

    http://Windows.Microsoft.com/en-us/Windows-Vista/download-updated-Guide-listings-in-Windows-Media-Center

    Troubleshoot Guide downloading problems in Windows Media Center

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-guide-downloading-problems-in-Windows-Media-Center

    I hope this helps!

    Halima S - Microsoft technical support.

    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • How to remove the pdf files created on the server using cfdocument pdf?

    I use < cfdocument format = "pdf"...

    to create a .pdf file dynamically generated and named and it works pretty well. Marine managers can easily send the pdf to ships in the fleets and planning forces in the shipyards. (Planning data changes almost every day). However I noticed that the pdf file remains on the server. Over time, this could become a problem with numbers. is there something I'm missing to remove these PDF files over time. Other that a manual check and delete. This Government server requires 4 connections and your right arm to put self to day, so something is needed.

    Using a task for this problem is something easy (and I think than a common to solve such problems).

    Just to give you an idea (or probably the whole solution, but it is not tested):


    <>
    Directory = "" #variables.strDirPath # ""
    name = "qDir.
    action = "LIST".
    Filter = "*.pdf" / >


       
           
       

    Post edited by: RichinternetFrank
    Reason: change filter attribute in pdf format

  • How to remove the report that created the vCops?

    Hi expert,

    I have a question about vCops report.

    Do you know how to delete/remove generated report?

    See the image. He looks as stored on right vCops?

    Screen Capture reported.png

    Thank you very much

    They are stored on the virtual machine to the user interface. It keeps the old reports of ~ 5 and deploys the oldest report as the newcomer in... If a FIFO stock model where he keeps the most recent 5.

    There is no way to withdraw formally, and the only way would be to hack around it and remove it from the database.

  • How to remove a "Razor Cut" created from Multi Cam Monitor

    I have 3 cameras I do a multi cam edit.  Use the monitor multi-cam, I made my changes of camara, but in the end I spend 1 Camera2 camera and really don't want to.  I just want to stay on the camera 1 and melted.  How can I remove a "razor cut" so that the monitor of mult-cam placed there where I went from camera 2 camera angles?

    Thank you!

    Dan

    Means the faster is to remove the clip and drag the end of the first set to fill the void.

  • How to remove control data, you created?

    I'm relatively new to JDeveloper and ADF, so I hope that someone more experienced can help me in this simple task.

    I created a control to data from a web service and it is visible in my component data controls. How can I delete data control that I created?

    Thank you.

    Go to your Datacontrols.dcx

    and delete/comment AdapterDataControl

    Refresh your data commands tab and it should be gone now

  • How to remove the spaces in the select statement

    Hello
    I have a sql like
    select TRIM(column_name)
        from user_tab_columns
        where table_name = 'MTL_SYSTEM_ITEMS_VL' AND COLUMN_NAME   IN ('DESCRIPTION     ');
    
    no rows selected
    But if I remove spaces after "DESCRIPTION."
    select TRIM(column_name)
        from user_tab_columns
        where table_name = 'MTL_SYSTEM_ITEMS_VL' AND COLUMN_NAME   IN ('DESCRIPTION');
    
    One Row Selected 
    So, I have several lines.
    What other garnish speak no cosider spaces?

    Thank you

    I want to say several times that we generate our sql statement using the PL/SQL blocks
    or SqlQueries.

  • How to remove an accidentally created icon?

    Do you know how to remove an icon accidentally created on the desktop - the problem is the "office" and if I put it in trash/remove it, I will also remove the program "desktop", it seems.  Thank you.

    Hello

    Right-click on it - remove to put in the trash. To only delete the shortcut.
    If there is a problem, you can restore it from the Recycle Bin.

    Add or remove icons from the desktop
    http://Windows.Microsoft.com/en-us/Windows7/add-or-delete-desktop-icons

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to remove substitution please help its very urgent...

    Hello

    Please tell me how to remove the Substitution? I extended my seeded AM. I made the substitution, after that I ran jpxImport command. After you run this command, I couldn't able to open my standard page.

    Please tell me how to remove Substitution and tell me the command.


    Thank you
    Sandrine.

    Hi Raoul D,.

    When we create any Substitution, it will create a new document for this customization.

    You can see the customized document using the follwing sql statement
    exec jdr_utils. LISTCUSTOMIZATIONS('/Oracle/Apps/ICX/lov/Server/ReqSupplierAM')

    Suppose that if it is to have any document of substitution as * ' / oracle/apps/icx/lov/Server/customizations/site/0/ReqSupplierAM. "

    You can remove the document as

    exec jdr_utils. DELETEDOCUMENT('/Oracle/Apps/ICX/lov/Server/customizations/site/0/ReqSupplierAM')

    Now your override will be removed.

    I hope this will help you.

    Thank you...

  • How to remove the automatic password for my outlook accounts?

    Recently, I noticed that when I go to access my outlook email accounts password is already filled by something much more of my password (I only see points, as expected). I want those deleted, but don't know how to 'remove '. I can delete them manually and enter my password and it works very well. How to stop these passwords "automatic"?

    Hello Gladiatorlady, while you are on the login page, you can click somewhere on an empty spot & go see information page > Security > view saved passwords you can remove stored passwords.

  • How can I manually add a site to my new tab since suggestions does not automatically include it?

    How can I manually add a site to my new tab since suggestions does not automatically include it?

    Hi MichaelNicholas, you can add a site - pin in the new page by dragging out of your bookmarks or history...

  • How to remove the automatic locking of the IPad 2

    How to remove the automatic locking in the iPad 2

    Are you talking about the time it takes the device "go to sleep?

    Settings > general > auto lock > set to 'never '.

Maybe you are looking for

  • Google maps will not show the names of the streets to ariel.

    When Ariel google maps view will display all the labels streets. Was fine until the last update. works great when you use Chrome.

  • Install the version 4.3/uninstall 4.2.013

    HelloI use 20 Fedora 32-bit. I have Skype version 4.2.013 installed at the moment, and I wanted to try to update to 4.3. I downloaded the rpm on the site, he ran, and he says that he installed. When I open Skype but, it always says that it is 4.2.013

  • My Satellite L505D goes to a black screen after startup

    It seems to boot up properly and everything. It starts Windows 7 and goes to the user selection screen, but since there is only 1 user, it only says: Welcome to the loading circle. But when he tries to load the page office or home or whatever you cal

  • Windows server 2008 r2 file permissions

    Hi all I'm working on a project where I need to dynamically create files. As these files are created dynamically, these are 'owned' by user created. The same user that I can read, write these files. But if I try to access these files to other user ac

  • Scan from printer to computer

    When I scanner scanner my printer, try to save on my computer, I get a message on the printer that it cannot see the computer. I am able to use the scan of the computer without any problem. The printer is a HP 5520 and my computer is a Macbook pro wi