Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> table space

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: table space
 Mukta  Posted: May 06, 2008 03:12:35 AM

 Total Post: 28
 Joined: Jan, 2007






 hello everyone,

I am using a schema X, which has 10 tables. now i have to move 4 tables out of these 10 to another schema Y. My query here is

1.how do I create another schema.
2.how do i shift these tables into newly created schema.


I dont mind creating a tablespace within the same schema X.but i m not getting how it is to be done as i want to shift the existing tables to new tablespace.

ne help would be much appreciated

 Mohammed Taj
Posted: May 06, 2008 03:48:05 AM  

 Total Post: 630
 Joined: Jul, 2007






 
1.how do I create another schema.
How you create your SCHEMA "x" then same command is use for creating new scheams.

SQL> CREATE USER username IDENTFIFIED BY password;



2.how do i shift these tables into newly created schema.
You can use
1. CTAS ( create table as select)
2. export import
3. COPY command

Search on net for full syntax.

 http://sharear.blogspot.com
Posted: May 07, 2008 01:11:55 AM  

 Total Post: 43
 Joined: Apr, 2008






 
suppose you move table test from x schema to y schema

for this
1.First create user Y (if it is exist then go to 2)

2. log on as sysdba
> sqlplus / as sysdba
SQL> create table y.test as select * from x.test;

the test table of y schema does not have the primary/foreign key and indexes which are in x schema. so you need to recreate those




 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Mohammed Taj630
  Murtuja Khokhar580
  Jayanta Sur479
  Vigyan Kaushik385
  Ramesh Jois226
  neeraj sharma189
  snehalatha p166
  Gitesh Trivedi145
  Gopu Gopi137
  Kushal ratnaker136






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software