REORG several tables with DEC

Oracle 11.1.0.6 database
RHEL 5.3

Hi all

1.)

I want reorg several tables with the ETG. But because there are several tables with different indexes and column names I can not use the order by clause.

create the table reorg_HR_STAGE_EDW. SFHR_ORG_MAPPING_FILE
tablespace REORG
PCTFREE 10 pctused, initrans, maxtrans 1 255
storage)
initials pctincrease of 1 M following 0M 0
MINEXTENTS 1 maxextents unlimited
in select * from HR_STAGE_EDW. SFHR_ORG_MAPPING_FILE;

The table is going to get reorganized even without the orderby clause?

2.)
The steps I should follow are (please, correct me if I'm wrong):

-Create table with the new name in the new tablespace
-Remove the old tables
-Move converted tables to the original tablespace

Is it OK, what happens to the index?

Help, please

You can also copy dependent table with dbms_redfinition. The procedure is called COPY_TABLE_DEPENDENTS. See http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_redefi.htm

ALTER table move would also be possible, but doen't it locks the table all the time?

Kind regards

-wiZ

Tags: Database

Similar Questions

  • Removal of several tables with only loop FORALL

    I need to remove the data from several tables with unique FORALL. It seems that FORALL does not support. Please let me know the alternatives to achieve this goal.

    DB version: 11 GR 2

    Write switchis for all instructions, one for each deletion. There is no reason why it should not work.

    Compare:

    PLSQL 101 :

    Here are some things to know about FORALL:

    Each FORALL statement can contain only a single DML statement. If your loop contains two updates and a deletion, then you will need to write three statements FORALL

  • return Recordset from several tables with session variables

    First of all, let me start by appolgizing for the rawness of this question, but I'm really stuck...  I have two tables in a database, a table name, username, password and company (user logs on to a secure site using the UN and PW creating a session MM_username variable).  There are several users from different companies (IE 6 users of XYZ Corp., 20 ABC... etc.).  The second table has data that is specific to each company.  How to display the data in the second table so that it is specific to the user (ie: Robert of XYZ Corp. sees only specific data of XYZ Corp.)?

    Thank you very much

    What you would do, is to join the tables on the company name field in a query:

    SELECT * FROM tbl_name LEFT JOIN tbl1.company_name ON tbl2.company_name WHERE username = MM_username;

    If you need a more details or help database tables themselves you'll need post a few details anymore, but that's the gist of it.

    And just to add, is that if you try to add in the session.  Otherwise take your session for the company_name variable in table 1 and use it in a select query based on your session pages.

  • expdp + query option to export from several tables with the same condition

    Hello

    We want to export a subset of data only from databases to another. Both on AIX.

    Source/testdatabase 11.2.0.3 (non partitioned tables)
    Target productiion 11.2.0.3 database (separate tables)

    Tables of same names of columns but diffrenet structures a partitioning index and traget so only want to import content

    Each source datbaase hascolumn seq number table and want only to extract the last months of data.


    TABLES:table1,table2...
    DUMPFILE=dump_dir
    CONTENT=data_only
    QUERY= table1:"WHERE seq_num >100 "
    want to use expdp but not sure how to make sure that all tables have the seq_num WHERE > 100 condition, if let table1: go out and have just
    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."


    I'm assuming that can also use impdp CONTENT = data_only?

    Any ideas/thoughts?

    Thank you

    QUERY = "WHERE seq_num > 100"this condition would apply to all tables that we want."

    Yes, it will work for all tables, but ensure that all exported table must include this column.

    QUERY
    Default: no
    Goal
    Allows you to filter the data that is exported by specifying a clause of a SQL SELECT statement, which is applied to all tables in the work of export or a specific table.

    The query_clause is usually a WHERE clause for the selection of refined lines, but could be any SQL clause. For example, an ORDER BY clause can be used to accelerate a migration from a table in a heap in a table held in index. * If a [schema]. table_name is not provided, the query is applied to (and must be valid for) all tables in the export job.*

    http://docs.Oracle.com/CD/B19306_01/server.102/b14215/dp_export.htm

  • Several Tables with where there is no

    Hello
    Im trying to set up an insert statement and I would like to insert 3 record in the EMPLOYEE table. The three tables (USED, MEASURES, SALES) have constraints so it will check the tables on the fly to see whether the data exists already, if it does not then the insert. Is the place where there is no instruction wrighten as it should? Ive not been able to get this statement to work without error.

    (* ORA-00933: SQL not correctly completed command *)
    * 00933. 00000 - "not correctly completed SQL command * ')

    Any input will be appreciated, thanks!


    INSERT EMPLOYEES
    (
    EMPLOYEE_RATING,
    EMPLOYEE_VALUE,
    EMPLOYEE_REASON,
    )

    SELECT DISTINCT
    EMPLOYEE_RATING,
    EMPLOYEE_VALUE,
    EMPLOYEE_REASON
    MEASUREMENT, SALES
    WHERE THE MEASURES. EMPLOYEE_ID = SALES. EMPLOYEE_ID

    (WHERE there is no (select)
    MEASURE_RATING,
    MEASURE_VALUE,
    MEASURE_REASON
    the employee
    WHERE USED. EMPLOYEE_ID = SALES. SALES_ID);

    Try this Code is untested.

    INSERT INTO employee
    (
    employee_rating, employee_value, employee_reason
    )
    SELECT DISTINCT employee_rating, employee_value, employee_reason
    MEASURES, sales
    WHERE measures.employee_id = sales.employee_id
    AND NOT EXISTS (SELECT measure_rating, measure_value, measure_reason
    The EMPLOYEE
    WHERE employee.employee_id = sales.sales_id);

    Alen

  • Create table with several Collections of data control

    Hello

    I have a requirement about to display data in a table. It shows simple, but certain columns in the table are within a collection, and the others are in another collection. I read this chapter Creation of ADF Databound Tables - 11 g Release 1 (11.1.1.7.0), and she explains to create the table with a collection.

    I have no knowledge on the model, I know just as control data, so what should I do? :

    -Ask for the template designer to redraw the control of data to include a collection with all the data?

    -Try to work with the actual data control? If so, how can I create the table several Collections of data control?

    Plese let me know if there is another solution. I work with JDeveloper 11.1.1.7.

    Thank you!

    AAPDL

    Hello

    You can have a managed bean that e... g exposes an ArrayList of objects. This can then binds to the value property of the table. If the object sets the information of table row combination that you get multiple iterators (collections), then the table will display the joined data.

    Frank

  • Unique table with several columns or several tables split?

    What is the best.

    A table with multiple columns inside or divided into several tables. Why?
    How will the performance in the two scenarios?

    Hello

    user13024762 wrote:
    I have a table EMP that has column EMP_ID, EMP_NAME MGR_ID, MGR_NAME, SALARY, EXP_IN_MNTHS, EXP_IN_YRS... etc with multiple columns

    I have the following tables
    EMP-> EMP_ID, EMP_NAME

    Each row in the table emp thie represents a separate employee. I guess other columns in the emp table might be birth_date, social_security_number and status (by example, 'Active', 'Leave', 'complete'). Here's what an employee has (at least) one of. If there is a one-to-many relationship between an employee and an attribute, then you probably want another table for this attribute.

    BISHOP-> EMP_ID, MGR_ID, MGR_NAME

    There is a one-to-many relationship between employees and managers? In other words, an employee may have 2 or more managers? If Yes, then you need another table.
    If there is only a one-to-one relationship between employees and managers (in other words, if an employee is never more than 1 Manager) so why don't you just have a mgr_id column in the emp table?
    Managers are also used for? (This is often the case, as in scott.emp and hr.employees.) If so, do not store their names in the EME and tables of mgr. Store name (and date of birth and other information) in the table emp only and, if you need a table of Bishop, just the emp_id and mgr_id column.

    SAL-> EMP_ID, SALARY

    There is a one-to-many relationship between the employees and wages? In other words, an employee may have 2 or more treatments? If so, how will you use the values? Is a special treatments in some way, as it will be used more often than others? (In other words, you may have a current and past wages salary, but the last wages are rarely used.)
    If you never have more than 1 salary for a given employee, why not just have a sal column in the emp table?

    EXP-> EMP_ID, EXP_IN_MNTHS, EXP_IN_YRS

    There is a one-to-many relationship between the employees and what whether you store in this table?

    etc. with more tables

    What is the best based on

    (1) performance and data recovery
    (2) ease of use
    (3) maintainability

    A one-to-many relationship requires an additional table. If an employee can have up to 3 managers, don't have mgr1, mgr2 and mgr3 columns in the emp table. Use a separate table, with up to 3 lines for the same employee, instead.
    For 1-1 relationships, it is usually best to not have separate tables.

  • Unable to create cache with several tables group

    Hello

    I need to create a group of cache with several tables, which are referential to the other.

    There are 2 related tables and table 1 child...
    While trying this thing, it gives me an error:

    8222: multiple parent tables found

    It is not possible to use several tables of root in a single cache group? Is there another way to use it?

    Script, I used is:

    create a cache group asynchronous writethrough TEST. CG1
    of the TEST. ROOT1)
    KEY PRIMARY ID VARCHAR2 (8 BYTES),
    NAME VARCHAR2 (50 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE),
    POLICYTYPEID VARCHAR2 (7-BYTE)),

    TEST. ROOT2)
    PARAMTYPEID VARCHAR2 (5 BYTES) PRIMARY KEY,
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    NAME VARCHAR2 (25 BYTE),
    DESCRIPTION VARCHAR2 (255 BYTE)),

    TEST. CHILD1)
    PARAMDETAILID NUMBER (20) PRIMARY KEY,.
    ID VARCHAR2 (8 BYTE),
    PARAMETERUSAGE VARCHAR2 (1 BYTE),
    DISPLAYVALUE VARCHAR2 (255 BYTE),
    OPERATORID VARCHAR2 (5 BYTE),
    VENDORID NUMBER (20).
    FOREIGN KEY REFERENCES TEST. ROOT1 (ID),
    TEST KEY (PARAMETERUSAGE) REFERENCES STRANGERS. ROOT2 (PARAMETERUSAGE));

    You can't have multiple root within a group of cache tables. The requirements for tables in the group a cache are very strict; There must be only one top-level (root table) table and there may possibly be several children tables. Tables of the child should be linked through foreign keys to the root table or a child table above in the hierarchy.

    The solution for your case is among the tables of root and the other root table in a separate cache group and the child table in a cache group. If you do this, you must take care of a few things:

    1. you cannot define foreign keys between the tables of groups of different cache in TimesTen (keys may exist in Oracle) so the application must enforce referential integrity itself for these cases.

    2. If you load data in a cache group (using LOAD the GROUP CACHE or "load we demand") and Timesten will not automatically load the corresponding data in the other group of cache (since he doesn't know the relationship). The application must load the data into the other group of cache explicitly.

    There is no problem with transactional consistency when changes are pushed to Oracle. TimesTen maintains and reinforces the coherence transactional regardless of how the tables are arranged in groups cache correctly.

    Chris

  • Update a field with different values of several tables

    Hello

    I have a table named AAA with 2 fields id and structure.
    And then I have other 3 tables with 2 fields id1 and structure1 id2, table1 and table2, id3 and structure3 to table3 organized.2.

    The number of AAA id is equal to the sum of the IDS of table1, table2, table3: #id = #id1 + id2 # + #id3).

    I want to update the structure of AAA table with values as well as field:
    where AAA.id = table1.id1-> AAA.structure = table1.structure1
    where AAA.id = table2.id2-> AAA.structure = table2.structure2
    where AAA.id = table3.id3-> AAA.structure = table3.structure3

    Can someone help me?

    I have Oracle11gR2.

    Thank you in advance.

    Oops...

    update  AAA
    set structure = (select structure1 from table1 where aaa.id = table1.id1)
    where aaa.id in (select id1 from table1)
    
  • Table with several columns

    I have a table advanced with more or less 60 columns and the table is larger than the header image. How can I align the table with the advanced table?
    Thank you.

    Published by: Vieira on 1.01 giu-3-2010

    I don't think that this is possible.

    what you can do, is that you can fix the scroll bar horizontal to your table, this way that your condition is possible. Please visit the Blog of Mukul to fix scrollbars at the table.

    Kind regards
    Out Sharma

  • Manipulation of the table with the recurrence

    I have a 2D chart which is similar to an adjacency matrix.  The table contains information that I need to analyze following a set of simple rules, but I'm unable to implement them.  Here is a simple example of the table (I would like to get the simple example job, and then expand as needed to work with the greatest examples).  The table is a table of 6 x 6 and the columns contain information about a procedure of transition between nodes in a map.  There is a root column (column we will begin by) and there are sheet columns, columns, we strive to achieve by browsing through other nodes in the graph (other columns in the table).  In the example below there is that a single root and a leaf, root is column zero and the leaf column 6 (I chose the marking of the nodes so that the zero column would be the root and column 6 would be the leaf but it doesn't have to be the case and I'm writing the software so that it is not dependent on the labelling of the map).  Outside the entrance to 2D table, there will be an array of column headers that maps the label of node to the right column of the table, a table of leaves and a digital control for the root.  That's what I try to do, refer to the image below.

    I look at the root and see that this is node 1, the column header looking I see that node 1 is column zero of my table.  I start with the line 0 in column 0 (the root column) and work my way down looking for integers not dummies.  I'm a rank, then see the integer 2, that tells me that I need to move the column 1 of the table (because the column 2 header) and store the integer 2.   I start with row 0 column and work my way down looking for integers not dummies.  I just rank 2 and see integer 3, that tells me that I have to move to column 2 of the table (column 2 header 3) and store the integer 3 (while I now [1,2,3] as my path I'll build).  I start at line 0 in column 2 and work my way down looking for integers no dummies and come in the 4th row is Integer 5, it tells me that I have to move to column 4 of the table (because the column 4 has 5 header) and store the integer while I [1,2,3,5] as my way.  I start at line 0 in column four and work my way down looking for an integer not null and come 5th see 6, because integer integer 6 is my current journal (only sheet for this example) I stop and have a path from node 1 to node 6 [1,2,3,5,6].  I didn't even though (and this is the part that gives me bad) because the column 1 (node 2 header) had another line nonzero, rank 3, which contains integer 4.  I need to repeat the process from here, give me a second track of [1,2,4,5,6].

    You can see how this will get very complex when I have several columns with several lines non-zero.  This seems to be a good case for use recursion, but I can't write the code to do this.  In the end, I need to find all the ways to get from the root to the leaf, as I said that there is more than one sheet in most of the cases.  Having many Leafs should not be a problem because I can repeat the same process for each leaf.  I have attaced a VI in 8.0 which has berries that I work with, according to the picture above.  I would like ideas on how to achieve this, as I refuse to do it by hand for great examples when I should be able to easily automate this process.

    Concerning

    This version fixes two problems I mentioned - one was caused by the queues the starting point outside the loop (a legacy of my original idea), the other to not deal with the final loop iteration when there is nothing in the queue (fixed with an additional business structure).  You need is a graph (that is to say, have links back and forward)?  Otherwise you could do a little more efficient with a directed graph, by removing the link from 2 to 1, 3 and 4 to 2, etc.

  • CRUD for tables with large number of columns

    Hello

    I work for a government agency in Colombia, and we do a poll with about 1200 variables. Our database model has few paintings, but they have a large number of columns. Our Oracle 11 g database is, and we do not use Oracle APEX. I've read about APEX and it seems to be useful to generate quick forms and reports. However, I would like to know if it is possible to generate CRUD for tables with many columns, and that would be the best way to do it.

    Thanks in advance.

    Carlos.

    With the help of 250 point on a single page is actually really bad for the user experience. I would probably be it cut into pieces and using several pages to guide the customer through it as a workflow.

    You could also add some pop-up windows which includes some elements of your table, just saved on other pages. But I probably don't like that.

    Tobias

  • Join several Tables versioned

    Hello

    We are working on a data warehousing project and wonder how do to join several tables that each are versioned separately (type SCD 2 with a valid and valid to date).

    Because for example, we get our client from a single source of information (id customer, name, etc.) and the information on the rate of customer from another source.  The sources are different, we have the separate tables for them and each of them gets versioned independently.

    Here's my customer table (with its own valid and valuable to the columns).

    IDName of the customerValid fromValid until the
    1CitiBank1 JANUARY 14JANUARY 1, 15
    1New CitiBank2 JANUARY 15FEBRUARY 1, 15
    1Latest CitiBank2 FEBRUARY 15APRIL 1, 15

    And similarly the Client side ID and rating information.

    IDNoteValid fromValid until the
    1Platinum1 JANUARY 14FEBRUARY 1, 14
    1PremiumFEBRUARY 1, 141ST MARCH 15

    I want to merge the two tables above and present information at a glance.  I have some difficulty to determine validates the valid columns.

    IDName of the customerNoteValid from (Calculated)Valid until the (calculated)
    1CitiBankPlatinum1 JANUARY 14FEBRUARY 1, 14
    1CitiBankPremiumFEBRUARY 1, 14JANUARY 1, 15
    1New CitiBankPremium2 JANUARY 15FEBRUARY 1, 15
    1Latest CitiBankPremium2 FEBRUARY 151ST MARCH 15

    And it's the query I used to get the above result:

    SELECT client. id ,

           customer . name ,

           CRM . level ,

           Greatest (client. vld_fm , crm. vld_fm ),

           Least (client. vld_to , crm. vld_to )

    DE    client client,

           client_rating crm

      client. id = crm. id

           AND ( client. vld_fm <= crm. vld_fm

                 AND client. vld_fm <= crm. vld_to

                 AND client. vld_fm >= crm. vld_fm

                 AND client. vld_fm >= crm. vld_to )

            OR ( client. vld_fm BETWEEN crm. vld_fm AND crm. vld_to )

            OR ( client. vld_to BETWEEN crm. vld_fm AND crm. vld_to );



    The problem is we have several data sources (and each with its own versions) and joins become so very very complex.  Is there a better way to write the query?

    Or maybe a better way to design our tables?

    Thanks for your help.

    Anand

    Hello

    you only need ranges that overlap to join.

    Re: How do to sql query in a loop

    Is a simpler way to test if the x_start to x_stop range comes into conflict with the range of y_start to y_stop

    WHERE     x_start <= y_stop AND     y_start <= x_stop
    

    In other words, two overlapping if and only if everyone will start before the other ends one. If this is not obvious (and it was certainly not clear to me when I heard it), then look at it this way: two ranges are not overlapping if and only if one of them starts after the end of the other.

    Concerning

    Marcus

  • Remove a line of table with a button in Livecycle Designer SS3

    I have a table in Livecycle which includes 16 static lines. Several lines can be added or removed dynamically at the end of the table.

    I want the user to be able to remove one of the static lines if they want to however I can't get the script to work.

    I have a button at the end of the line with the script:

    driverTable._Row2.removeInstance (true);

    I tried various forms of this script such as do not use the abbreviation for 'instanceManager', leaving 'real' outside, etc. Where it says 'Row2' I would like to use this script for the following lines, Row3, etc. Row4.

    I tried with the initial counter value of 1 and tried to zero. The table is in a fluid subform.

    Can anyone help?

    Hello

    A line cannot be set to 0 cases, if you want to remove a line, you need to hide by using its property of presence...

    But if you use 1 table for 16 different ranks, why don't you set the table with dynamic lines and have an initial 16 meter, then you can delete the lines you want with the removeInstance method

  • The script generation is not supported for Table with XML or UDT column Types

    I get this message trying to generate a script to create a table with an XMLTYPE column.  We use the Oracle Developer Tools for Visual Studio to generate scripts as SQLDeveloper does still not support TFS integration.  He was always pretty easy to generate scripts and maintain control of source code in this way (with the exception of materialized views).  It was great, just right click and generate a script for the project and check it in.  Unfortunately as the adoption of XML grows, we find passage to the SQL Developer more often to perform tasks not supported and then return to the VS IDE to manage source code control.  Free of any chance that it will be supported in the future?

    Yes, our plan is to support several types as time goes by.

    You possibly can speed things along by voting or by filing a request for new feature here:

    http://Apex.Oracle.com/pls/Apex/f?p=18357:46

Maybe you are looking for