Showing posts with label Moving tables from one tablespace to another .. Show all posts
Showing posts with label Moving tables from one tablespace to another .. Show all posts

Thursday, 26 September 2019

HOW TO MOVE TABLE FROM ONE TABLESPACE TO ANOTHER TABLESPACE

           Here the easy steps to move a table from one tablespace to another tablespace !!


SQL> select  tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
SYSAUX
UNDOTBS
TEMP
KAVIN
FOOTBALL

6 rows selected.

SQL> create table spurs (playername VARCHAR(20),goals INT);

Table created.

SQL> insert into spurs (playername,goals)
  2  values ('Harry kane',187);

1 row created.

SQL> select * from tab;

TNAME        TABTYPE CLUSTERID
------------------------------ ------- ----------
SPURS        TABLE

SQL> show user;
USER is "FOOTBALL"
SQL> 
SQL> select * from tab;

TNAME        TABTYPE CLUSTERID
------------------------------ ------- ----------
SPURS        TABLE

SQL> alter table spurs move tablespace kavin;

Table altered.

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME        TABLESPACE_NAME
------------------------------ ------------------------------
SPURS                 KAVIN

SQL> alter table spurs move tablespace football;

Table altered.

SQL> select table_name,tablespace_name from user_tables;

TABLE_NAME        TABLESPACE_NAME
------------------------------ ------------------------------
SPURS                    FOOTBALL

SQL> 

HOW TO RESIZE SGA AND PGA SIZE IN ORACLE

                                               TO INCREASE SGA SIZE: SQL> show parameter sga NAME      TYPE        VALUE ---...