compressing all the tables in my diagram

How to compress all my tables in my schema, if already compress, ignore?

Oracle 10G

Thank you!

SQL or PL/SQL

Kodiak_Seattle wrote:
OK, what about this?

DECLARE
table-name user_tables.table_name%TYPE;

CURSOR cursor1 IS SELECT table_name FROM user_tables where compression = "DISABLED";

BEGIN
Cursor1 OPEN;

LOOP
Fetch cursor1 INTO table-name; -pick up the names of Tables that are not compressed
OUTPUT WHEN cursor1% NOTFOUND;
ALTER table table_name move compress
END LOOP;

NARROW Cursor1;
END;

begin
for t in (SELECT table_name FROM user_tables where compression='DISABLED') loop
  execute immediate 'alter table ' || t.table_name || ' move compress';
end loop;
end;

Tags: Database

Similar Questions

  • Grant select on all the table schema in the role

    Hi, it is possible to grant is selected on all the table on a diagram to a role?

    Yes.

    SELECT 'GRANT ALL ON' ||TABLE_NAME || ' to ROLE_NAME;' from dba_tables where owner='SCHEMA';
    
  • Compress all the existing table ain dat

    Hello

    We use oracle 11.2.0.3 and wish to evaluate the performance of compression in terms of reduction of time takes to reports aganis the tables run.

    Had a quick serach and can see alter table compress but speaks only of data inserted/updated updated after the operationexecute of compress is compressed.

    Do not want to have to create a separate, compressed table and replace other table with that.

    Is it possible to compress all the existing dat aof existing table?

    Also could what kind of performance gain magntitudes we expect performance report using the compression compared to identical but uncompressed tabel?

    Also it is a data warehouse and the large fact table already has the default compressed index bitmpa.

    Tlamking on the compression of the table here.

    Thank you

    Published by: user5716448 on March 5, 2013 05:57

    Depending on your hardware, you can use alter table move and change the index on a table of size fairly decent rebuild in less than 10 minutes, but if you really make the look works online in the dbms_redefinition package. See the manual of the PL/SQL Package and Types, then look at the note support for Oracle at the following address:

    Master note: an overview of redefining online tables (DBMS_REDEFINITION) [ID 1357825.1]

    HTH - Mark D Powell.

  • Privilege for the creation and deletion of the indexes on all the tables/diagrams

    Hello

    I have a database running on the HPUnix bit ia64 platform. The version of the db is 10.2.0.3
    I have a schema named DPYBATCH.

    I need grant creation/deleting indexes on all the tables/diagrams.
    I know create a clue will solve the purpose of the creation. But I am confused with deleting indexes.

    If I give-> GRANT CREATE ANY INDEX OF DPYBATCH, it will not solve the purpose. He will have the privilege to be able to delete/move the index as well?
    If this is not the case, what is the privilege to grant to delete/move the index. Please let me know!

    Thank you!

    You must use DROP ALL INDEX: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_8015.htm#i2066885.

  • Interruption of the compression of the table

    Hi all

    Could someone describe to me what happens if I interrupt the compression of the table on a halfway?

    Everything will be compressed a half table or all previos actions will be supported roller?

    It doesn't work that way you. This,

    orclz >

    orclz > alter table emp store compress line advanced;

    Modified table.

    orclz >

    is just a DOF, instant and does not compress anything. You must reorganize the table to achieve any compression.

  • How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Hello

    How can I use statistics for all the tables in a schema in SQL Developer? and how long will it take on average?

    Thank you

    Jay.

    Select the connection and right-click on it and select schema statistics collection

  • How to find all the table names in all modules in EBS R12?

    How to find all the table names of all the modules in EBS R12?

    In addition, you can go to http://etrm.oracle.com, you select the version of the EBS, select "FND Data" or "S/n data", select the Type of the object TABLE and you will get all the tables of EBS in module.

  • Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside

    Hi, I'm developing a simple mobile app in DW CC 2015 using JQuery Mobile. LIKE I need the list view with description of the product, functionality and image, I would like to connect with database instead of "writing" all the tables in the bearings inside the Jquery page. In the future I would also be able to add, to remove the DB records. Any help, tutorial... Thanks TG

    I would like to connect with the database instead of "writing" all the tables in the bearings inside the Jquery page

    This is usually done with a CMS (content management system). There are commercial products CMS like WordPress, Joomla and perch. You create one or several layouts and then create pages of these page layouts using the CMS. In this way, it is possible to have hundreds of pages, each with unique content, but a page layout that can be managed in a place of sharing.

    CMSs on shelf don't require programming skills. Otherwise, some of us write our own CMS with custom functions, but this requires back-end, as with PHP programming.

  • OGG-01028 object with the number of the object 80673 is compressed. Compression of the table is not supported.

    (1) I received an email like this:

    Event_alert

    2013-09-17 22:00:16 ERROR OGG - 01028 Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 80673 is compressed. Compression of the table is not supported.

    2013-09-17 22:00:16 ERROR OGG - 01668 Oracle GoldenGate Capture for Oracle, ext_1.prm: PROCESS ABENDING.

    (2) I have not found the OBJ

    SQL > select OBJECT_ID, OBJECT_NAME from dba_objects where object_id = 80673;

    no selected line

    (3) change a few times the process EXT recover;

    (4) my excerpt settings

    Cat ext_1.prm

    EXTRACT ext_1

    Ogg, ogg PASSWORD USERID

    TRANLOGOPTIONS EXCLUDEUSER ogg

    SETENV (NLS_LANG = AMERICAN_AMERICA. ZHS16GBK)

    -SETENV (NLS_LANG = AMERICAN_AMERICA. AL32UTF8)

    EXTTRAIL ./dirdat/t1

    DYNAMICRESOLUTION

    TABLE YBK.*;

    This is a bug that has been fixed

    Excerpt from abending with Table of Compression is not supported, even if the database has no tables compressed. (Doc ID 1510691.1)

    event text: Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 86173 is compressed. Compression of the table is not supported.

    tableexclude *. DBMS_TABCOMP_TEMP *.

  • How can I get the script all the tables and the reference system?

    Hello

    I'm trying to get the scripts of all the tables in my exquema MADE. Please can someone help me?

    Try this - the first script creates a 'tab_ddls' table to hold the table DDLS and second script generates the DDL and stores in this "table"tab_ddls ":

    {code}
    create the table tab_ddls (table_name, varchar2 (50))
    table_ddl clob)
    /

    declare
    cursor tab_cur is
    Select table_name
    from all_tables
    where owner = "MADE";
    CLOB table_ddl;
    Start
    for rec in tab_cur
    loop
    Select dbms_metadata.get_ddl ('TABLE', rec.table_name, 'MADE')
    in table_ddl
    Double;
    insert into tab_ddls (rec.table_name, table_ddl) values;
    end loop;
    dbms_output.put_line ('done');
    commit;
    end;
    /

    Select * from tab_ddls
    /

    {code}

    Please modify the script to fit your needs.

    HTH

    Published by: user130038 on August 2, 2011 11:08

  • Get all the tables on a page

    I need to get all of the tables on a particular page. The document consists of a bunch of unrelated text blocks. I use this to retrieve the tables:

    var doc = app.activeDocument;
    page var doc.pages = [54];

    var tables = page.textFrames.everyItem ().tables.everyItem () .getElements ();
    Alert (tables. Length);

    This page (page 55) has 3 tables on it, but my code returns only 2 tables. A table can be placed directly on a page and not be in a block of text? If Yes, what is the best way to get all the tables in a page? Thank you very much.

    Rick Quatro

    Ah, I don't know who. "Tables" is a collection, not a simple table and a reckless experimentation of shows that you can't simply use .concat glue them together.

    I'm sure I've seen a couple of workarounds for a situation like this. Maybe it's time to read "[CS3] [JS] everyItem() and getElements()"-i.e. of Marc Autret posts on this subject, at the end of this thread.

    In other words, if you stick to use everyItem()! It is perhaps easier to build a table "the old-fashioned way". Copy the following code is based on my earlier assumption you officials texts bound in management of related texts, but you can rewrite it to accommodate groups, thus:

    t = app.layoutWindows[0].activePage.textFrames.everyItem().tables;
    tableList = [];
    for (i=0; i		   
  • To get all the Table names

    Hi all

    I have almost 70 procedures in my database.
    I want to get all the names of the different tables used in the procedures of 70.
    Is this possible?

    Note:
    All the table names are prefixed by the name of schema as DEVSRC.table_name.


    Please advice

    Thank you
    JO

    Johney says:
    Hi, VT

    A doubt.

    This query will give the names of the tables to only select stmt used in the procedure

    or

    List of table names that accompany in all DML operations inside the procedure?

    Thank you
    JO

    It will give all the table to be used in select or any DML...

    You can also view by creating a temp proc

    SQL> drop procedure proc_test;
    
    Procedure dropped.
    
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    
    no rows selected
    
    SQL> create or replace
      2  PROCEDURE proc_test
      3  IS
      4  v_ID    number;
      5  v_PRID  number;
      6  v_PRLID number;
      7  v_DATERECEIVED date;
      8  Cursor C1 is
      9  select * from table_c;
     10   BEGIN
     11   open c1;
     12     LOOP
     13      FETCH c1 INTO v_ID,v_PRID,v_PRLID,v_DATERECEIVED;
     14      EXIT WHEN c1%NOTFOUND;
     15      insert into table_b values(v_ID,v_PRID,v_PRLID,v_DATERECEIVED);
     16      Commit;
     17     END LOOP;
     18   CLOSE C1;
     19   END;
     20  /
    
    Procedure created.
    
    SQL> select name, referenced_name, dependency_type from user_dependencies
      2  where type = 'PROCEDURE' and referenced_type = 'TABLE' and name='PROC_TEST';
    
    NAME
    ------------------------------
    REFERENCED_NAME                                                  DEPE
    ---------------------------------------------------------------- ----
    PROC_TEST
    TABLE_B                                                          HARD
    
    PROC_TEST
    TABLE_C                                                          HARD
    
    SQL> 
    

    Concerning

    Umesh

  • How to list all the tables that have no data

    Hi all


    I want to list all the tables that have no data. (registration number is 0)

    Someone help me.

    Thank you
    Thiensu2810

    Select owner, table_name from dba_tables where num_rows = 0;

    This assumes that the table statistics are COMMON.

  • Why ALIAS all the tables in the physical layer?

    I build a RPD and keep see message (s) where it is suggested to Alias all the tables in the physical layer.

    No reason?

    Y at - it a PDF file / site that lists best practices for the construction of an RPD?

    Thank you

    Published by: user10679130 on August 26, 2009 10:31

    In general, you may need to use more than 1 copy of a particular physical table. This means that you must use names of borrowing, even as you would in SQL. The advantage of using the alias is that when the physical table alias exchange all alias tables are changed automatically to change things in one place as if you created "copies" of the same physical table, you need to modify them one by one. We also use a naming convention names for each alias where the Dimensions get named Dim_ *, Fact_ * facts and bridge Tables Bridge_ * there has well listed more logically (in the way that you would use in the MDB layer).

  • Where all the tables, I consulted and updated?

    Hi all
    I'll try to find is possible where oracle provides a few tables where will be stored all the tables I have consulted and updated.

    As I don't have access to the Oracle log files I want to know if oracle provides information in tables.

    I select any table privilege.

    Very much appreciate your help.
    Thank you
    Madhu K.

    Queryng the dba_audit_trail can help you. Just an example:

    SELECT user name,
    To_char (timestamp, 'DD-MON-YY HH24:MI:SS'),
    action_name,
    obj_name,
    owner,
    action
    OF dba_audit_trail
    where ACTION_NAME in ('UPDATE', 'SELECT', 'INSERT')
    TIMESTAMP desc order);

    Kind regards.

Maybe you are looking for