How to move a tablespace

What are the steps to move a tablespace?

You can go through this link in Oracle documentation :
http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96521/dfiles.htm#ADMIN012

Similar Messages

  • How to move table from one tablespace to other tablespace?

    how to move table from one tablespace to other tablespace?

    887274 wrote:
    how to move table from one tablespace to other tablespace?
    alter table <table_name> move  tablespace <new_tablespace_name>;
    Rebuild the indexes; alter index <index_name> rebuild <new_tablespace_name> online;Example;:
    SQL> create table ttt( ID NUMBER PRimary key);
    Table created.
    SQL> insert into ttt values (1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL> alter table ttt move tablespace users;
    Table altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 UNUSABLE
    SQL> alter index SYS_C0010863 rebuild tablespace users online;
    Index altered.
    SQL> select index_name, status  from dba_indexes where table_name='TTT';
    INDEX_NAME                 STATUS
    SYS_C0010863                 VALID
    SQL>

  • How to move Tablespace from One disk group to another disk group in RAC

    Hi All,
    I have 11gR2 RAC env on Linux.
    As ofnow I have problem with disk group. I have 3 disk group which is almost full - 98%. I have added one NEW disk group and want to move some of the Tablespace(TBS) from OLD disk group to NEW diskgroup and make some free space in OLD disk group.
    Can any one suggest me how to move TBS from one disk group to another disk grup without shutting down the instance.
    DB is in Noarchive mode.
    Thanks...

    user12039625 wrote:
    Hi Helios,
    Thanks for doc id but I am looking for noarchive mode solution. becaues I got ORA-
    "ORA-01145: offline immediate disallowed unless media recovery enabled " when run alter database datafile '...' offline.
    Hence I am trying something and findout below steps but not sure how useful it is:
    1- put tablespace offine
    2- Copy the file to new diskgroup using Either RMAN or DBMS_FILE_TRANSFER.
    3- Rename the file to point to new location.
    4- Recover the file.
    5- Bring the file online.
    I had move 240M TBS from OLE to NEW.
    These steps run successfully so I think this is valid for noarchive mode.Hence want to confirm..so inform me please.
    Thanks :)I have doubt in my mind:
    1. You database is in noarchivelog mode
    2. You're taking tablespace offline
    3. Suppose you're moving a file of size 10GB(or any larger filesize) to another disk group
    4. Now after moving the file, you're trying to bring the tablespace online............NOW
    tablespace will need recovery. if the required data is inside the SGA then it is ok. But if the data has been flushed, then?
    if step 2 and 3 has taken significant time, then most probably you'll not be able to bring that tablespace online.
    Regards,
    S.K.

  • How to move a specific tablespace datafile from one directory to another

    Database: 10.2.0.1
    OS : Generic
    Problem Description : How to move a specific tablespace datafile from one directory to another considering that the database is on Oracle Dataguard setup
    ** Oracle is working on this issue, but in parallel is opening the topic to the Community so that Community members can add their perspective, experience or knowledge. This will further enhance all knowledge bases including My Oracle Support and My Oracle Support Communities **
    Edited by: ram_orcl on 16-Aug-2010 21:21

    Dear ram_orcl,
    Please follow the procedures here;
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14239/manage_ps.htm#i1034172
    8.3.4 Renaming a Datafile in the Primary Database
    When you rename one or more datafiles in the primary database, the change is not propagated to the standby database. Therefore, if you want to rename the same datafiles on the standby database, you must manually make the equivalent modifications on the standby database because the modifications are not performed automatically, even if the STANDBY_FILE_MANAGEMENT initialization parameter is set to AUTO.
    The following steps describe how to rename a datafile in the primary database and manually propagate the changes to the standby database.
       1.
          To rename the datafile in the primary database, take the tablespace offline:
          SQL> ALTER TABLESPACE tbs_4 OFFLINE;
       2.
          Exit from the SQL prompt and issue an operating system command, such as the following UNIX mv command, to rename the datafile on the primary system:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf
          /disk1/oracle/oradata/payroll/tbs_x.dbf
       3.
          Rename the datafile in the primary database and bring the tablespace back online:
          SQL> ALTER TABLESPACE tbs_4 RENAME DATAFILE      2> '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            3>  TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
          SQL> ALTER TABLESPACE tbs_4 ONLINE;
       4.
          Connect to the standby database, query the V$ARCHIVED_LOG view to verify all of the archived redo log files are applied, and then stop Redo Apply:
          SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
          SEQUENCE# APP
          8 YES
          9 YES
          10 YES
          11 YES
          4 rows selected.
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
       5.
          Shut down the standby database:
          SQL> SHUTDOWN;
       6.
          Rename the datafile at the standby site using an operating system command, such as the UNIX mv command:
          % mv /disk1/oracle/oradata/payroll/tbs_4.dbf /disk1/oracle/oradata/payroll/tbs_x.dbf
       7.
          Start and mount the standby database:
          SQL> STARTUP MOUNT;
       8.
          Rename the datafile in the standby control file. Note that the STANDBY_FILE_MANAGEMENT initialization parameter must be set to MANUAL.
          SQL> ALTER DATABASE RENAME FILE '/disk1/oracle/oradata/payroll/tbs_4.dbf'
            2> TO '/disk1/oracle/oradata/payroll/tbs_x.dbf';
       9.
          On the standby database, restart Redo Apply:
          SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE
            2> DISCONNECT FROM SESSION;
    If you do not rename the corresponding datafile at the standby system, and then try to refresh the standby database control file, the standby database will attempt to use the renamed datafile, but it will not find it. Consequently, you will see error messages similar to the following in the alert log:
    ORA-00283: recovery session canceled due to errors
    ORA-01157: cannot identify/lock datafile 4 - see DBWR trace file
    ORA-01110: datafile 4: '/Disk1/oracle/oradata/payroll/tbs_x.dbf'Hope That Helps.
    Ogan

  • How to move only subset of data from one database to another?

    Both source & destination are Oracle11g databases.
    The requirement details are as below,
    1) The database contains static as well as transactional data for telecom domain.
    2) We have to move region-wise data from one database to another.
    3) There are around 10 regions.
    4) The region wise data extraction from source db is based on around 40 to 50 tables. Rest of the tables contains
    static data & it will not change.
    5) The volume is around 1 million subscribers per region.
    6) The migration is required because
    a) The client is upgrading its base product which uses this database
    b) There is a change in structure of static tables
    c) Hardware upgrade
    d) The client want to start with single region on new database & rest of the regions will be operated from old
    database.
    7) Keep execution time to very minimum.
    I am thinking to have solution as below,
    1) Create destination database with upgraded db structure (as mentioned in 6b)
    2) Create database links to access source db in destination db.
    3) Write SQL queries to fetch data from all the respective tables for a specific region
    4) Write separate PL/SQL blocks for each table to fetch data from source db & insert into respective table in
    destination db
    a) Use FOR ALL & bulk collect to improve the performance
    b) Divide table data into multiple chunks & execute parallel batches (around 10) to insert the data
    5) Validate pre & post counts to verify the success of migration
    Is there any other better way?
    Regards,
    Sandeep

    How to move only subset of data from a partiular table by using transportable tablespace?
    E.g. SUB table using SMP_SUB tablespace contains subscriber data in source database.
    The indexes defined on SUB table are under SMP_IDX_SUB tablespace
    The subscribers data can be categorized by different regions, say region_id column. Then how to move data & indexes of SUB table from source db to destination db?
    any specific example would be helpful.

  • How to move E-Business from HP-UX to AIX

    Do you have any reference on how to move E-Business suite to different operating systems or more specifically from HP-UX to AIX? Thx.

    We have done the platform move and upgrade at the same time :
    From: To:
    RHEL 2.1 -> AIX 5.3
    DB 9.2 -> DB 10.2
    eBS 11.5.9 -> eBS 11.5.10.CU2
    High level steps where :
    1. take a copy of the 9i database to a staging area (using data guard etc)
    2. upgrade database to 10g to get datapump capabilities (we had to upgrade to 10.1 since 10.2 was not certified on RHEL 2.1)
    3. datapump export all metadata and data
    4. create fresh eBS install on target platform, then delete all database objects
    5. Create new database,
    6. datapump import (from step 3) and recreate indexes
    7. upgrade database to 10gR2
    8. upgrade apps to 11.5.10CU2
    9. re-install upgraded CEMLI components
    10. validate and reconcile data
    We are preparing presentation for AUOUG that will describe this in more details, we are happy to share this as soon as it is ready.
    If you are not doing and upgrade (of DB and eBS) at the same time as migration your process can be simplified.
    Usage of the 10g datapump export / import was essentiall part of our strategy.
    We have decided not to use Transportable tablespacess as there is no documented way how to do this with 11i DB, (System tablespace is not transportable which causes number of problems with AQ, etc ).
    If you are moving to another platform that has the same endian format (AIX and HPUX are both big endian), and you are on DB 10.2 (or ready to upgrade to 10.2) you can use Transportable Database
    Transportable Database is a new feature in Oracle Database 10g Release 2 (10.2) that is the recommended method for migrating an entire database to another platform that has the same endian format. The principal restriction on cross-platform transportable database is that the source and destination platform must share the same endian format. For example, while you can transport a database from Microsoft Windows to Linux for x86 (both little-endian), or from HP-UX to AIX (both big-endian), you cannot transport a whole database from HP_UX to Linux for x86 using this feature.
    More info on http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/dbxptrn002.htm#sthref1397
    For the 11i middle tier, safest and easiest way is to re-install it from CD, and then add you custom CEMLI bits.
    Regards,
    Radomir

  • How to move lob segment in partitioned table

    On my Oracle 11.2, I have a partitioned table wich I would like to move to another tablespace
    After invoking script, there's still unmoved lob segment withing table
    CREATE TABLE BONGO.AAA_3
      ID       NUMBER,
      DATUM    DATE,
      OBJEKAT  BLOB
    TABLESPACE BONGODATA_HUGE
    PCTUSED    40
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    LOGGING
    PARTITION BY RANGE (DATUM)
      PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
        LOGGING
        NOCOMPRESS
        TABLESPACE BONGODATA_HUGE
    LOB (OBJEKAT) STORE AS
            (   TABLESPACE  BONGODATA
              ENABLE        STORAGE IN ROW
              CHUNK       8192
              RETENTION
              NOCACHE
              STORAGE    (
                          INITIAL          64K
                          NEXT             1M
                          MINEXTENTS       1
                          MAXEXTENTS       UNLIMITED
                          PCTINCREASE      0
                          FREELISTS        1
                          FREELIST GROUPS  1
                          BUFFER_POOL      DEFAULT
        PCTUSED    40
        PCTFREE    10
        INITRANS   1
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    NEXT             1M
                    MINEXTENTS       1
                    MAXEXTENTS       UNLIMITED
                    FREELISTS        1
                    FREELIST GROUPS  1
                    BUFFER_POOL      DEFAULT
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;how to move this lob segment in partitioned table?
    or, is there some package for data move within tablespaces?
    regards

    tnx...
    now, I have another problem..
    I have a nested table within partitioned table, and I'm trying to move it to another tablespace.
    I tried to move child table (of nested type colum), but I didn't succedeed...

  • Note:304522.1 How to Move Queue Tables without using export import

    Trying to use the pkg available in Metalink "Note:304522.1 How to Move Queue Tables without using export import"
    Using the 10.1.0.x and upwards Package, I'm getting the following error on a single consumer queue table with an xmltype payload:
    SQL> exec move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK');
    BEGIN move_aqt.move('XFORM_TEST_INT','INTERFACE_XML_QUEUE','SMALLBLOCK'); END;
    ERROR at line 1:
    ORA-20000: ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.MOVE_AQT", line 652
    ORA-06512: at line 1
    We've tried in multiple environments, always with the same results.
    Trace file shows:
    *** 2006-11-08 10:06:47.154
    *** SERVICE NAME:(SYS$USERS) 2006-11-08 10:06:47.147
    *** SESSION ID:(379.954) 2006-11-08 10:06:47.147
    qtable move procedure starting execution at 08-11-2006 10:06:47 for queue table XFORM_TEST_INT.INTERFACE_XML_QUEUE
    qtable move procedure experienced an exception at 08-11-2006 10:06:47
    qtable move error message ORA-06502: PL/SQL: numeric or value error
    qtable move procedure ended execution at 08-11-2006 10:06:47
    Can anyone help with this? Has anyone used this before successfully (or not successfully). We urgently need this working today to test moving our queue table into a tablespace with a smaller block size for performance reasons in production.
    Thanks for the help!
    Tony

    Thank you,
    Yes we've done that. They've confirmed a problem with the links/scripts on the note. The 10.1 and up version was not really 10.1 and up.
    As they would not have a new version available in time for the move we needed to perform, we switched our approach to using dbms_redefinition instead.
    Thanks for the reply,
    Tony

  • How i can change tablespace of a table in oracle 8.04

    Dear I want to move tablespace of a table in oracle 8.04 version but it is not working my statement is
    ALTER TABLE ACCOUNTING_ENTRY MOVE TABLESPACE EDI_TSPACE;
    and got the following error message:
    ORA-14004: missing PARTITION keyword
    how i can change tablespace of a table

    Hi,
    It seems that the move tablespace feature is available on 8.1 or higher versions of Oracle. In your case you can try one of the foll....
    Option 1:
    Step 1:CREATE TABLE T1
    TABLESPACE NEWTBS
    AS(SELECT * FROM T);
    Step 2: Rename or Drop the old table.
    Step 3: Rename the new table to the old table name.
    Option 2:
    Step 1: Export the old table.
    Step 2: Rename or Drop the old table.
    Step 3: Create the table in the new tablespace. You may use the INDEXFILE from the imp command here.
    Step 4: Import the old table and use IGNORE=Y
    Reply back if you need assistance on syntax.
    Regards.

  • Move single tablespace

    Running Oracle 10gR2 on RHEL 4
    Just wondering if someone can give me some insight on how to move a single tablespace from PROD to TEST. We use Noetix and would like to move the Noetix tablespace from our production (PROD) environment to our test (TEST) environment. Would this be best achieved with RMAN? Datapump? Typically I refresh the entire database, but I've never moved a single tablespace from one environment to the other so this is all new to me.
    Thanks!
    Edited by: user496996 on Apr 18, 2011 9:25 AM

    You can use transporting tablespace feature
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tspaces.htm#i1007169

  • How to move video inside LR 4?

    Hi
    Could anyone please explain to  me how to move a video, from one folder to another inside LR 4?
    I've moved pictures from one folder to another inside LR 4 several times before, I just marked the pics I wanted to move, and draged them to the desired folder, but I can't do it with these videos........
    The arrow in the left side , in folders, pointing to the folder I wish to move, is greyed out, as if something is wrong, can't figure out why.....
    If I right click on the selected videos, there's no "move" option.......
    kindly
    Jan

    Hi Victoria
    Thx for your reply :-)
    Actually I'm not able to drag and drop any of my video files anymore....must be something "newbie" stuff :/
    I've attached a screenshot, and the videos I want to move, are inside the ¨DIGITAL....¨ folder,  but as said, I'm not able to move them anywhere...... Could it be that I've ¨locked¨something when messing around in LR 4??
    The Greyed out arrow is normal, as I see it now...
    what could I possible be doing wrong here?
    Kindly
    Jan

  • How to move a button in gird layout(16-block game)?

    I am designing a 16-block puzzel game and don't have any idea about how to move buttons in a grid on mouse click.

    This is the code now me help me to solve this problem.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.util.*;
    public class Puzzel extends JFrame {
              JButton[] arr = new JButton[15];
              String[] add = {"1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg","8.jpg","9.jpg","10.jpg","11.jpg","12.jpg","13.jpg","14.jpg","15.jpg"};
              int X;
              int Y;
              public Puzzel(){
                        Image image;
                        Toolkit toolkit= Toolkit.getDefaultToolkit();
                        image=toolkit.getImage("icon.jpg");
                        ImageIcon icon=new ImageIcon("icon.jpg");
                        setIconImage(image);
                        setTitle("Puzzal");
                        JMenuItem pic = new JMenuItem("Solved");
                        pic.setMnemonic('a');
                        JPanel jp = new JPanel(new GridLayout(4,4));
                        ArrayList list = new ArrayList();
    MouseListenerClass M1 = new MouseListenerClass();
                           for(int x = 0; x < arr.length; x++)
                               arr[x] = new JButton(add[x], new ImageIcon(add[x]));
                               getContentPane().add(arr[x]);
                              list.add(arr[x]);
                        Collections.shuffle(list);
                        for(int x = 0; x < list.size(); x++)
                              jp.add((JButton)list.get(x));
                            getContentPane().add(jp);
                                 pack();
                                 setSize(427,427);
                                        setResizable(false);
                        /*for(int x=0;x<arr.length;x++){
                             arr[x].addSelectionListener(new SelectionAdapter());
                   public void widgetSelected(SelectionEvent event){System.out.println("IN");
                        if (event.getSource().getClass().equals(Button.class)){
                             Button button = (Button) event.getSource();
                             if (button.getText().equals("") )
                                  Toolkit.getDefaultToolkit().beep();
                                  else
                                       this.swapPlaces(((Integer) button.getData()).intValue());
                   public void widgetDefaultSelected(SelectionEvent event){
                                  System.out.println("Widget was defaultselected: " + event.getSource());
               for(int x = 0; x < arr.length; x++)
              arr[x].addMouseMotionListener(M1);
              private class MouseListenerClass extends MouseMotionAdapter
                   public void mouseDragged(MouseEvent E)
                   X=E.getX();
                   Y=E.getY();
                   for(int x = 0; x < arr.length; x++)
                        arr[x].setBounds(X,Y,100,100);
    public static void main(String[] args){
                    new Puzzel().setVisible(true);}
         }

  • How to move the "back" button to the top ?

    Hi there,
    I had some sub-menus and iDVD auto generate the "FORWARD" and "BACKWARD" buttons in the shape of a triangle. Problem is this buttons are alwayd at the bottom and I do not seem to be able to move the buttons around.
    Any tips on how to move these buttons to other places ?
    Thanks

    Old Toad wrote:
    You can't move them.  Those are hard coded into the themes.
    OT
    Thanks OT ... been trying for hours to move them !!

  • I can't figure out how to move my playlist folders to my iPod

    I have a 5th Generation iPod and I am using it with the latest version of iTunes on a dare I say it Windows machine.
    I organize my playlists in folders on my iTunes. When I sync to my iPod those folders do not carry over, but the playlists in those folders do not. I have sorted through the manual, the options on both iTunes and my iPod and this website, and for the life of me I can't even find a mention of how to move these folders over to my iPod.
    ANY help is apreciated.
    Thanks,
    Karl

    Although iTunes supports the use of folders in the manner you describe, unfortunately the iPod does not.

  • How to Move a Video File from Movie Section to "TV Shows" Section

    I have an Ipod classic, and am trying to figure out how to move a video file from the "Movie" section to the "Tv Shows" section. I have Itunes version 1.3 which for my device is listed as the most current version.

    haha itunes 1.3, epic.
    to clarify that, I think he would have an ipod classic 80gb which the newest version is 1.3 I think.
    However to answer your question, in itunes right click the movie, go to properties, then go to options, where it has media kind put it to tv show
    Message was edited by: Nudethecih

Maybe you are looking for