Type logic Partition of an existing table

Dear all,

My database is 10gr 2 and Linux is the operating system.

One of my table in the production database is huge and contains lots of data. Table is growing daily. There are many queries that users run on this table and the selection criteria is normally the date of entry of the registration, it's an Entrty_Date field with the date data type.

I want a partition logical on this table in such a way, the table name remains the same, and data are logically partitioned.

As if the Entry_Date is from 2005, a partition is made on criteria:


2005-2006
2006-2007
.
.
2011
. at the request of the user for records having entry date > 2011... the query is made only this piece of the table, which makes the fast query.

I hope that I am able to make you understand my problem. If its possible in Oracle please let me know the name of the method and I'll RND on this one. And I have to do it on an existing table that contains a lot of data.

Thank you
Imran

Hello

You can do this
http://www.Oracle-base.com/articles/Misc/PartitioningAnExistingTable.php
I suggest go fill through the myths of have from before backward Oracle documentation and to understand and then to proceed
http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a96612/d_redefi.htm

-Pavan Kumar N

Tags: Database

Similar Questions

  • Cannot add the partition to an existing table.

    Hello

    I don't add the partition to an existing table that is not partitioned, get the error as a type of data not valid, then I'm not find syntax errors.

    ALTER TABLE MESSAGEX_XCHANGE

    ADD THE PARTITION OF RANGE (LAST_MODIFY_TIMESTAMP)

    (

    PARTITION old_data VALUES LESS THAN (To_TIMESTAMP('27/02/2014','DD/MM/YYYY')),

    You see for VALUES LESS THAN (To_TIMESTAMP('28/02/2014','DD/MM/YYYY')) of the PARTITION

    );

    Error report:

    SQL error: ORA-00902: invalid data type

    1. 00000 - "invalid data type".

    * Cause:

    * Action:

    Thank you

    Manon...

    You get this error because your edit statement has an invalid syntax. In addition, you cannot partition a table that is not already configured for partitioning!

    You have to physically re-create the partitioned table in order to add new partitions to it.

  • How add us partition on an existing table?

    Hi gurus,

    What would be the best way to add a partition to an existing table?

    Is there a simple documentation for example?

    Thank you

    What would be the best way to add a partition to an existing table?

    Is there a simple documentation for example?

    Was it something you were ask in an interview?

    You cannot add a partition to a table unless this table is a partitioned table.

    The table is already partitioned? If so, after the DDL.

    The Oracle documentation has examples of adding partitions to a table that is already partitioned

    Partition management

    Adding Partitions

    This section explains how to manually add partitions of a partitioned table and explains why partitions can be added specifically for partitioned more indexes.

    Adding a Partition to a partitioned Table range

    Use of the ALTER TABLE ... ADD PARTITION statement to add a new partition at the end 'high' (the point after the last existing partition). To add a partition at the beginning or in the middle of a table, use the SPLIT PARTITION clause.

  • Partitioning of an existing Table using the EXCHANGE PARTITION

    Hi all

    I have one unpartitioned table I partitioned by Exchange, this table has several indexes and constraints (primary and foreign).

    ALTER TABLE notpart_table ADD (
        CONSTRAINT PK_KCESPITI PRIMARY KEY (K_CESP, TIPORD)
            USING INDEX TABLESPACE TBLS_CONTA,
        CONSTRAINT FK_KCONTO_CE FOREIGN KEY (K_CONTO) REFERENCES xxxx (K_CONTO));
    
    CREATE INDEX IX_NFATTURA_CE ON notpart_tab (ANNO_FATTURA, K_REGISTRO, K_REGFA, TIPORD)
        TABLESPACE TBLS_CONTA;
    
    
    
    
    

    after Create a partitioned Table Destination

    notpart_table2, I created the same constraints and indexes defined in notpart_table


    When I run


    ALTER TABLE notpart_table2
      EXCHANGE PARTITION PART_notpart_table2
      WITH TABLE notpart_table
      WITHOUT VALIDATION
      UPDATE GLOBAL INDEXES;
    
    
    
    

    I get: ora-02266

    Why?

    Thanks in advance for any help


    Post edited by: vigilant Rosario

    It is not exactly what you have. Very probably not partitioned table, you are partitioning is the parent to another table table:

    SQL > create table tbl1 (id number)
    2.

    Table created.

    SQL > alter table tbl1
    2 Add the constraint tbl1_pk
    3 primary key
    4.

    Modified table.

    SQL > create table tbl2 (id number)
    2.

    Table created.

    SQL > alter table tbl2
    2 Add the constraint tbl1_fk1
    3 foreign key
    4 references tbl1
    5.

    Modified table.

    SQL > insert into tbl1 values (1)
    2.

    1 line of creation.

    SQL > insert into tbl2 values (1)
    2.

    1 line of creation.

    SQL > create table tbl1_part (id number)
    2 partition by range (id)
    3 (partition p1 values less than (1000000))
    4.

    Table created.

    SQL >
    SQL > alter table tbl1_part
    Exchange 2 partition p1
    3 with table tbl1
    4 without validation
    5 update global indexes
    6.
    with table tbl1
    *
    ERROR at line 3:
    ORA-02266: permit to unique/primary keys in table referenced by foreign keys

    SQL >

    If so, of the foreign key and recreate it pointing to the partitioned table as parent after finished partitioning the table.

    SY.

  • Partitioning of an existing Table.

    Hi exports.

    We have a table that is not partitioned in our production DB. Now we have to this partition table. Please suggest a solution how can we partition this table as this table is the primary table in the application.

    Kind regards...

    ASIT K. reducing

    AsitK.Mohanty wrote:

    Hi exports.

    We have a table that is not partitioned in our production DB. Now we have to this partition table. Please suggest a solution how can we partition this table as this table is the primary table in the application.

    Kind regards...

    ASIT K. reducing

    The easiest way is to simply create a new table and INSERT the data into the it from the old table. You will need a window of failure for the operation. After the new table is filled you can rebuild the constraints and indexes, rename/move the original table and rename the new table to the old name.

    You can also export the table data and import it into a new partitioned table.

    The short answer is: ALL of the data needs to be moved to new segments. IF the existing data are old and ready to be archived then now is the time to do it. Simply move only the data in the new table.

  • Partition on existing Tables

    Hello

    I want to archive a database due to too much data into DB everymonth, so I have to delete the records from the previous month, which is about 4 million.

    Can someone give me idea to delete records as soon as possible. My opinion is to create the partition on the table and drop the partition once he becomes older.
    But if I want to introduce the partition then I have to create a partition in an existing table. So please give me the best way to introduce the partition of the existing table.

    It would really help that may suggest meanings.

    Thank you

    Spengler

    Here is an example

    CREATE TABLE my_table (
      id           NUMBER,
      description  VARCHAR2(50),
      create_date date
    )PARTITION BY RANGE (create_date)
    (PARTITION id_id0 VALUES LESS THAN (TO_DATE('26/08/2009', 'DD/MM/YYYY')) TABLESPACE users,
     PARTITION id_id1 VALUES LESS THAN (TO_DATE('27/08/2009', 'DD/MM/YYYY')) TABLESPACE users,
     PARTITION id_id2 VALUES LESS THAN (TO_DATE('28/08/2009', 'DD/MM/YYYY')) TABLESPACE users,
     PARTITION id_id3 VALUES LESS THAN (TO_DATE('29/08/2009', 'DD/MM/YYYY')) TABLESPACE users,
    PARTITION id_id4 VALUES LESS THAN (TO_DATE('30/08/2009', 'DD/MM/YYYY')) TABLESPACE users,
    PARTITION id_max  VALUES LESS THAN  (MAXVALUE) TABLESPACE users);
    

    -Insert the sample data

     INSERT INTO my_table  VALUES (0, 'ZERO',sysdate);
    INSERT INTO my_table  VALUES (1, 'One',sysdate+1);
    INSERT INTO my_table  VALUES (2, 'Two',sysdate+2);
    INSERT INTO my_table  VALUES (3, 'Three',sysdate+3);
    INSERT INTO my_table  VALUES (4, 'Four',sysdate+4);
    COMMIT;
    

    -You can run these queries to check the output.

    select * from my_table;
    select * from my_table partition(id_id0);
    select * from my_table partition(id_id1);
    select * from my_table partition(id_id2);
    select * from my_table partition(id_id3);
    select * from my_table partition(id_id4);
    select * from my_table partition(id_max);
    

    -Split partition

    ALTER TABLE my_table SPLIT PARTITION id_max AT (TO_DATE('01/09/2009', 'DD/MM/YYYY'))
    INTO (PARTITION id_id5 TABLESPACE users,PARTITION id_max TABLESPACE users);
    

    -Insert data into the new partition

    INSERT INTO my_table  VALUES (5, 'FIVE',sysdate+5);
    commit;
    

    -check

    select * from my_table partition(id_id5);
    
  • Need to create the Partition in the history table

    Hello

    I have an audit table that stores the data for the last 8 years in it and the customer wants to retain the data for the last 8 years. Now as adding data to this table is increasing, there is a delay in execution of report which are acquired by querying on this table.

    Basically, they go a from date and to date. Then these date are compared with two columns of dates in the table. The condition of the query will be as below

    TRUNC (NVL (DATE1, DATE2)) > = TRUNC (TO_DATE (?, ' dd/mm/yyyy ""))

    AND TRUNC (NVL (DATE1, DATE2)) < = TRUNC (TO_DATE (?, ' dd/mm/yyyy ""))

    Users can query for any date range.

    I am thinking of creating a Partition of the range on this table for each month during the 8 years of data. Please suggest on the question of whether I should use partition interval range to make it more effective. And would also create an Index on this partition for the above two day columns.

    12 (months) SO * 8 (years) = 98 would be created partitions. This will not overload the schema of database/Tablespace? Y at - it another effective way to set the table.

    Please suggest and let me know for any clarification.

    There are 2 approaches (but not limited to 2) to create the Partition on an existing table:

    Note: There is no ALTER TABLE statement to convert a heap table to a partitioned table.

    1. create a temporary Partitioned table with the same types of data in the column. Take a dump of the original table (HEAP) export and import the dump into the newly created partitioned intermediate table. After checking the data file the original and rename the interim even as the original table.

    2 using the package Oracle DBMS_REDEFINITION automates the steps above from said (not exactly the same steps, however) and its done online - which means there is no required downtime, the original table may undergo DML operations during this process of redefinition. View partitioning of a table online with DBMS_REDEFINITION | Oracle instructor

    According to my understanding if let us know as a partition interval then in April if there is an inserted record then it will create a new partition for the month of April will be of value less than 30 April 2014 "and all other documents created in April will pass under it"

    Yes, it's a feature of 11g, which Oracle manages adding partitions as needed. In earlier versions DBA can add partitions manually from time to time. Reference www.gavinsoorma.com/2009/09/11g-interval-partitioning/

    Here the reason for check the sent_out_datetime NVL will be NULL for few records, so in this case we want to get the records for dates of mapping them to received_datetime

    In addition, try to replace the NVL with COALESCE and test it. This would help improve performance.

  • Partitioning of an existing partitioned table

    Dear Experts,

    I have a problem with redefinition of partitioning of an existing partitioned table. I have a parent table separated by a virtual column by range:

    CREATE THE PARENT TABLE

    (

    PARENT_ID NUMBER NOT NULL,

    INSERT_TIMESTAMP TIMESTAMP (6) NOT NULL,

    CLOB PARENT_DATA NOT NULL,

    BATCH NUMBER,

    DATE of INSERT_DATE generated always as (TRUNC("INSERT_TIMESTAMP"))

    )

    LOB (PARENT_DATA) AS STORE NAVIGATION (ACTIVATE ONLINE STORAGE)

    PARTITION BY RANGE (INSERT_DATE)

    (

    P2015_11 PARTITION VALUES LESS THAN (TO_DATE (' 2015-12-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '))

    CRAFT STORE (PARENT_DATA) AS (SECUREFILE

    ACTIVATE THE ONLINE STORAGE),

    P2015_12 PARTITION VALUES LESS THAN (TO_DATE (' 2016-01-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '))

    CRAFT STORE (PARENT_DATA) AS (SECUREFILE

    ACTIVATE THE ONLINE STORAGE),

    P2016_01 PARTITION VALUES LESS THAN (TO_DATE (' 2016-02-01 00:00:00 ',' SYYYY-MM-DD HH24:MI:SS ',' NLS_CALENDAR = GREGORIAN '))

    CRAFT STORE (PARENT_DATA) AS (SECUREFILE

    ALLOW ONLINE STORAGE,

    PARTITION P_DEFAULT VALUES LESS THAN (MAXVALUE)

    CRAFT STORE (PARENT_DATA) AS (SECUREFILE

    ALLOW ONLINE STORAGE

    ))

    );

    and a child table partitioned by reference:

    CREATE ACCOUNTS FROM THE TABLE. CHILD

    (

    PARENT_ID NUMBER NOT NULL,

    DATAACC DATAACC_TBL,

    CREATION_DATE DATE,

    CONSTRAINT PARENT_D_E_PRT_FK

    FOREIGN KEY (PARENT_ID)

    (PARENT_ID) REFERENCES PARENT

    ENABLE VALIDATE

    )

    NESTED TABLE, STORE DATAACC AS DATAACC_NT

    PARTITION OF REFERENCE (PARENT_D_E_PRT_FK)

    (

    P2015_11 PARTITION,

    P2015_12 PARTITION,

    P2016_01 PARTITION,

    PARTITION P_DEFAULT);

    However, now in Oracle 12 c I am able to use the reference interval partitioning. How can I redefine the partitioning of the parent table so that there can be scope-level?

    Thank you for your help.

    Best regards, Atanas.

    To change range partition to partition interval, the table should not have MAXVALUE partition... Follow the steps below to convert to partition interval

    (1) check if all data of the MAXVALUE partition (p_default) using query below

    SELECT COUNT (*) FROM parent PARTITION (p_default).

    (2) if there is no trace in the p_default partition, drop the help below

    ALTER TABLE DROP PARTITION parent p_default;

    (3) use the clause SET INTERVAL to convert the range partition partition interval as below

    ALTER TABLE parent SET INTERVAL (NUMTOYMINTERVAL(1,'MONTH'));

    I guess, you have the range partition up to until, so there should not be any folder in p_default partition.

  • Creating a partitioned table to an existing table interval.

    Hello

    Is there a way I can create a partitioned table interval of an existing table using DEC? I know how to create a partitioned table in range.

    create the table range_partitioned_table

    partition by range (date_column)

    (

    partition p1 lower ((to_date (' 08/01/2012 ',' mm/dd/yyyy'))),

    lower partition p2 values (to_date (' 09/01/2012 ',' mm/dd/yyyy')),

    PN VALUES LESS THAN (MAXVALUE) PARTITION

    )

    AS SELECT * from existing_table;

    Is there a similar way to the Interval partition an existing table?

    create the table interval_partitioned_table

    partition by range (date_column)

    interval (provide the interval)

    (

    partition p1 lower ((to_date (' 08/01/2012 ',' mm/dd/yyyy'))),

    partition p2 values less (to_date (' 09/01/2012 ',' mm/dd/yyyy')),

    -PN SCORE VALUES LESS THAN (MAXVALUE)

    )

    AS SELECT * from existing_table;

    For example:

    SQL > create table interval_partitioned_table
    2 partition by range (hiredate)
    interval of 3 (numtoyminterval(1,'YEAR'))
    (4)
    5 score below p1 ((to_date (' 08/01/2012 ',' mm/dd/yyyy'))),
    6 partition p2 values less (to_date (' 09/01/2012 ',' mm/dd/yyyy')),
    7 - PARTITION pN VALUES LESS THAN (MAXVALUE)
    8)
    9 AS SELECT * FROM emp;

    Table created.

    SQL >

    SY.

  • modify an existing table to selectively the partition interval range

    I'm using Oracle 11.2.0.3.

    I have an existing table that has parition interval range.

    example:
     
    create table Log( ts date, level  varchar2(20), scr varchar2(2000))PARTITION BY RANGE (TS)
    INTERVAL( NUMTODSINTERVAL(1,'DAY'))
    Currently, we have the log of the table that is the partition of the range by day and we drop old parition to a week. However, we want to change this to persist the records in the table of WHICH = LEVEL "IMPORTANT."

    What is the best way to achieve this?

    >
    Is it possible to modify the existing interval partition table to add partition in the list?
    >
    Only using the DBMS_REDEFINITION to do online. And that always involves the creation of a "provisional" table

    If you have a window of failure just to create a new partitioned table the way you want to and INSERT the data into it. You should be able to use a DEC to do if you want. You may not use swap partition since all data must be physically moved.
    >
    Can we do list-interval partition table i.e. (with partition interval as partition sup)?
    >
    No - subpartitioning of interval is not currently supported.

    Here is the code example of a partitioned table by using the RANGE-interval LIST. It uses a VIRTUAL column, but you can ignore it for your use case

    DROP TABLE mytable;
    
    CREATE TABLE mytable
    (
    CREATION_DATE TIMESTAMP(6),
    LAST_MODIFIED_DATE TIMESTAMP(6),
    CREATION_DAY NUMBER(2) GENERATED ALWAYS AS (TO_NUMBER(TO_CHAR(CREATION_DATE, 'DD'))) VIRTUAL
    )
    PARTITION BY RANGE (LAST_MODIFIED_DATE) INTERVAL(NUMTOYMINTERVAL(1, 'MONTH'))
    SUBPARTITION BY LIST (CREATION_DAY)
       SUBPARTITION TEMPLATE
       ( SUBPARTITION days_1_5 VALUES (1,2,3,4,5)
       , SUBPARTITION days_6_10 VALUES (6,7,8,9,10)
       , SUBPARTITION days_11_15 VALUES (11,12,13,14,15)
       , SUBPARTITION days_16_20 VALUES (16,17,18,19,20)
       , SUBPARTITION days_21_25 VALUES (21,22,23,24,25)
       , SUBPARTITION days_26_31 VALUES (26,27,28,29,30,31)
       )
    (
       PARTITION prior_to_2013 VALUES LESS THAN (TO_DATE('2013-01-01', 'YYYY-MM-DD'))
    )
    
  • Add the column to an existing table-based user-defined type

    Hello guys,.
    I am compiling my function that returns a type defined by the user based on an existing table. Throughout the process of initialization so my query returns an additional column - SCORE (1). Here is my package:

    create or replace
    PACKAGE STAFF_AGENCY_PKG AS

    TYPE TYPE_SEEKER_TABLE IS TABLE OF THE DRAW. SEEKER % ROWTYPE;
    FUNCTION GET_SEEKERS (IN_KEYWORD IN VARCHAR2)
    TYPE_SEEKER_TABLE RETURN PIPELINE;

    END STAFF_AGENCY_PKG;
    -------

    create or replace
    STAFF_AGENCY_PKG PACKAGE BODY
    AS

    FUNCTION GET_SEEKERS (IN_KEYWORD IN VARCHAR2)
    TYPE_SEEKER_TABLE RETURN PIPELINE
    IS
    R_TBL TYPE_SEEKER_TABLE; -to return
    BEGIN
    FOR R IN)
    SELECT Seeker.SEEKER_ID,
    Seeker.FIRSTNAME,
    Seeker.LASTNAME,
    Seeker.NATIONALITY,
    Seeker.ISELIGIBLE,
    Seeker.BIRTHDATE,
    Seeker.ISRECIEVEEMAILS,
    Seeker.HIGHESTDEGREE,
    Seeker.ETHNICITY,
    Seeker.GENDER,
    Seeker.ISDISABILITY,
    Seeker.DISABILITY,
    Seeker.CV,
    Seeker.PASSWORD,
    Seeker.PREFFERED_CITY,
    SEEKER. E-mail
    SEEKER. JOB_PREFERENCES_ID,
    SCORE (1)
    THE APPLICANT Seeker
    WHERE CONTAINS (CV, ' < query >)
    < textquery lang 'grammar' = 'context' = > ' |
    GET_RELATED_CATEGORIES (IN_KEYWORD) |
    ' < / textquery >
    < score datatype = "INTEGER" / >
    (< / query > ', 1) > 0
    )
    LOOP
    PIPE ROW (R); -Error (38,10): PLS-00382: expression is of the wrong type
    END LOOP;
    RETURN;

    END GET_SEEKERS;
    END STAFF_AGENCY_PKG;

    How do I change my user type to be sufficient?

    Oracle version 11.2.0.1.0
    Thanks in advance!

    >
    How do I change my user type to be sufficient?
    >
    You will need to create two new TYPEs. The one who has all the columns of the draw. The REQUESTOR table and the new column SCORE, then a TYPE which is an array of the first type.

    See example 12-22 using a Pipelined Table function for a Transformation in the PL/SQl language reference

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/tuning.htm#i53120

    Here's the first part

    -- Define the ref cursor types and function
    CREATE OR REPLACE PACKAGE refcur_pkg IS
      TYPE refcur_t IS REF CURSOR RETURN employees%ROWTYPE;
      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;
     FUNCTION f_trans(p refcur_t)
          RETURN outrecset PIPELINED;
    END refcur_pkg;
    /
    
    CREATE OR REPLACE PACKAGE BODY refcur_pkg IS
      FUNCTION f_trans(p refcur_t)
       RETURN outrecset PIPELINED IS
        out_rec outrec_typ;
        in_rec  p%ROWTYPE;
      BEGIN
    

    Change

      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;
    

    to include all the columns you need. Unfortunately, you have to manually list all the columns in the draw. The REQUESTOR table. If you think you need this same structure in other places you must create them as SQL types instead of PL/SQL types.

    This example should be enough to show you how to modify your code to do something similar.

  • Casting table PL/SQL for the type of existing table and back ref cursor

    Hello



    I have the problem of casting a pl/sql table for the type of an existing table and turning the ref cursor to the application. Casting a ref cursor back and number of pl/sql table works well.



    Declarant

    < strong > TYPE type_table_name IS TABLE OF THE package_name.table_name%ROWTYPE; < facilities >

    within the stored procedure, fill in a table of this type temp_table_name and returning the ref cursor help

    < strong > results OPEN to SELECT * FROM TABLE (CAST (temp_table_name AS type_table_name)); < facilities >

    generates an error. type_table_name is unknown in this distribution. According to me, this happens because of the declaration of the type locally.



    Statement type_table_name inside the package specification does not work neither. Incredible, cast to the said dbms_sql.number_table to specify ref cursor back and dbms_sql package works very well!



    < strong > CREATE TYPE type_table_name IS TABLE OF THE package_name.table_name%ROWTYPE; < facilities > deals without any error but creates an invalid type complain a reference to package_name.table_name



    I don't want to declare every column in the table in type_table_name, because any change the table_name table would result in an inconsistent type_table_name.



    Thanks in advance!

    Edited by: user6014545 the 20.10.2008 01:04

    In any case you are right that there is a problem around anchorage (or maintaining) types of objects persistent to match the table structures, they may represent.

    In the case you describe, you might be better off just open the refcursor immediately the using one of the techniques described in the http://www.williamrobertson.net/documents/comma-separated.html to manage the delimited list.

    In the more general case where the line of treatment is necessary, you may make the pipeline functions.

    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL> CREATE TABLE table_name
      2  AS
      3     SELECT ename column_name
      4     FROM   emps;
    
    Table created.
    
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3     TYPE type_name IS TABLE OF table_name%ROWTYPE;
      4
      5     FUNCTION function_name_pipelined (
      6        parameter_name IN VARCHAR2)
      7        RETURN type_name PIPELINED;
      8
      9     FUNCTION function_name_refcursor (
     10        parameter_name IN VARCHAR2)
     11        RETURN sys_refcursor;
     12  END package_name;
     13  /
    
    Package created.
    
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3     FUNCTION function_name_pipelined (
      4        parameter_name IN VARCHAR2)
      5        RETURN type_name PIPELINED
      6     IS
      7     BEGIN
      8        FOR record_name IN (
      9           SELECT table_alias.*
     10           FROM   table_name table_alias
     11           WHERE  table_alias.column_name LIKE parameter_name) LOOP
     12
     13           PIPE ROW (record_name);
     14        END LOOP;
     15
     16        RETURN;
     17     END function_name_pipelined;
     18
     19     FUNCTION function_name_refcursor (
     20        parameter_name IN VARCHAR2)
     21        RETURN sys_refcursor
     22     IS
     23        variable_name sys_refcursor;
     24     BEGIN
     25        OPEN variable_name FOR
     26           SELECT table_alias.*
     27           FROM   TABLE (package_name.function_name_pipelined (
     28                     parameter_name)) table_alias;
     29
     30        RETURN variable_name;
     31     END function_name_refcursor;
     32  END package_name;
     33  /
    
    Package body created.
    
    SQL> VARIABLE variable_name REFCURSOR;
    SQL> SET AUTOPRINT ON;
    SQL> BEGIN
      2     :variable_name := package_name.function_name_refcursor ('%A%');
      3  END;
      4  /
    
    PL/SQL procedure successfully completed.
    
    COLUMN_NAME
    -----------
    ALLEN
    WARD
    MARTIN
    BLAKE
    CLARK
    ADAMS
    JAMES
    
    7 rows selected.
    
    SQL> ALTER TABLE table_name ADD (new_column_name VARCHAR2 (1) DEFAULT 'X');
    
    Table altered.
    
    SQL> BEGIN
      2     :variable_name := package_name.function_name_refcursor ('%A%');
      3  END;
      4  /
    
    PL/SQL procedure successfully completed.
    
    COLUMN_NAME NEW_COLUMN_NAME
    ----------- ---------------
    ALLEN       X
    WARD        X
    MARTIN      X
    BLAKE       X
    CLARK       X
    ADAMS       X
    JAMES       X
    
    7 rows selected.
    
    SQL>
    
  • Custom extension created logical partition

    I created a custome partition by reducing 50 GB on my C drive.  I named the new logical drive A
    Now, I've exhausted 49 GB of this space and I need to extend it.  Is possible to allocate more memory to a custom created existing logical partition?

    You cannot extend to the rear.
    If you have another Partition after it, you need to remove the next Partition > extend your 50 GB in this space.
    It's your choice.

    Read these tutorials:

    http://www.Vistax64.com/tutorials/95418-disk-management-delete-extend.html

    http://www.Vistax64.com/tutorials/95398-disk-management-shrink-partition.html

    See you soon.

    Mick Murphy - Microsoft partner

  • Windows 7 RTM Installer deleted logical Partitions

    My computer has two physical hard disks, each with multiple partitions. I did a custom installation of Windows 7 Professional RTM on the first hard disk, deleting an old primary partition containing Windows XP (which wouldn't start). However, after I installed Windows 7, ALL of my logical partitions on this disk had also disappeared. The Windows 7 Installer creates two primary partitions: the big partition I realized it, and a partition of 100 MB system reserved. (It is always not allocated the remaining space on the disk, as the new partition for Windows 7 was smaller than the Windows XP partition, which I've deleted.)

    Former route:

    GiB 250 NTFS (primary)
    100 MiB ext2 (primary)
    3 logical partitions (two ext3, a FAT32)
    100 giB encrypted (primary)

    New layout:
    100 MiB NTFS (primary)
    149.9 giB NTFS (primary)
    Unassigned 100 GiB
    100 MiB ext2 (primary)
    115,66 giB space (!) free where the logical partitions used to be
    100 giB encrypted (primary)

    It seems that the installation program has decided to get rid of my extended partition. How can I recover my old logical partitions?

    I managed to restore the missing partitions to aid CGSecurity's TestDisk, but it took some doing. Always, however, the fact that the Windows 7 Installer has deleted my partitions without asking confirmation is more worrying. That's what I guess happened:

    Disc has 3 primary partitions and one extended partition, before starting the installation.
    I told the installer to remove a primary partition and create a new one in its place to install Windows 7 on. He wanted to do a second primary partition, so she won another partition to delete. He didn't tell me that. He said he may need create additional partitions, but nothing has been said to delete those that already exist.
    The Setup program has installed Windows 7, and my extended partition was gone (so logical partitions inside it were no longer accessible).

    I recommend strongly anyone install Windows 7 on a disk that contains several other partitions to create a partition for Windows 7 in advance (using the management of disks or DiskPart.exe), instead of using Setup to do. In this way, it will not create the partition of MiB 100 extra.

  • We get an error "could not create a new partition or find existing. "For more information, see the Setup log file" error message "while trying to install Windows 8

    * Original title: 8 victory moved - Error Message: failed to create new partition...

    I have Win XP on my Dell Dimension 5150, which is the dual boot with Linux Mint 12 Lisa and this is my favorite of the bunch.

    I bought the DVD of 8 Pro Windows by an Australian retailer.

    Win XP is on a 39 GB partition with other application files. I had to delete several files to get the free space necessary to WIN 8 and finally finished by formatting the partition and passes for a COMPLETE new installation.

    Unfortunately, I now get the "failed to create new partition or find existing. For more information, see the Setup log file"error message. I can't find a Setup log file that I do a boot from the DVD.

    I tried to delete all external drives and other USB devices, including my Modem but my Wired USB keyboard/mouse.

    Two internal HARD drives are as follows:
    Disk 0 Partition 1-110 GB - system (LINUX)
    Disk 0 Partition 2 - 3.5 GB - logical

    Disk 1 Partition 1 - 47 MB - OEM (reserved) [DellUtility]
    Disc 1 2:Win - 39.1 GB - System Partition
    1 3 disk partition: DATA - 39,1 GB - logical
    Disk partition 1 4:OfficeProgs - 19.5 GB - logical
    Partition on drive 1 logical - 39.1 GB - 5:PROJECTS
    etc to score 8 with 9 MB of unallocated space.

    I have tried both 64 and 32 discs with the same result.

    As I have now is no longer no matter what Windows on my computer, what's the next step? If any ;-)

    Hello

    I solved the problem. It seems that you can not install on a secondary partition with in an earlier version of windows. You must restart the computer and run the installation from a dvd or other media.  Once you get the installation running you should be able to install on another partition without any problems.

    Nice day

Maybe you are looking for