RE: Moving Tables to another tablespace

RE: Moving Tables to another tablespace

 

  

Al

Try something like this:

Declare
W_table_name varchar2(40);
Cursor table_cursor is
Select table_name from dba_tables where
Owner = 'xxx';
Begin
Open table_cursor;
Loop
Fetch table_cursor into w_table_name;
exit when table_cursor%notfound;
dbms_redefinition.......
exception
.....
End Loop;
End;

-----Original Message-----
From: [Email address protected] [mailto:[Email address protected]
Sent: Thursday, January 31, 2008 2:17 PM
To: Panagopoulos, Chris
Subject: RE: Moving Tables to another tablespace

Chris,

Tables must be online R/W.

Thanks,

Al

Quoting Panagopoulos Chris <[Email address protected]

> **A LazyDBA.com subscriber has responded to your lazydba.com post**
> **LazyDBA.com mail shield has forwarded you this email,
> **and removed any attachments, and kept your email address secret
> **from this person, and any viruses/trojans.
> **If you reply to this email, the person will see your email address
as
> normal
> **Anything below this line is the original email text
>
>
> Just out of curiosity, why don't you use the move command?
>
> -----Original Message-----
> From: ab265
> [Email address protected]
> Sent: Thursday, January 31, 2008 1:38 PM
> To: LazyDBA Discussion
> Subject: Moving Tables to another tablespace
>
> Experts,
>
> I need your help. We have a database that contain around
> (2000)
> tables.
> We need to move those tables to another tablespace using
> DBMS_REDEFINITION
> package. It is impossible to go manually by this process. I need to
> write a
> procedure that will select every table, pass it to the procedure
> dbms_redefinition.can_redef_table and then move it to the new
> tablespace
> if it
> can be moved or raise an exception if it can't. Please Please please,
> any kind
> of help would be highly appreciated. I am new to the PL/SQL stuff.
> That's why i
> need your help.
>
>
> Thanks,
>
> Al
>
>
> ---------------------------------------------------------------------
> TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
> To post a dba job: http://jobs.lazydba.com
> To Subscribe : http://www.LazyDBA.com
> To unsubscribe: http://www.lazydba.com/unsubscribe.html
>
>
>
>
> This message (including any attachments) is confidential and intended
> solely for the use of the individual or entity to whom it is
addressed,
> and is protected by law. If you are not the intended recipient,
please
> delete the message (including any attachments) and notify the
originator
> that you received the message in error. Any disclosure, copying, or
> distribution of this message, or the taking of any action based on it,
> is strictly prohibited. Any views expressed in this message are those
> of the individual sender, except where the sender specifies and with
> authority, states them to be the views of Vanguard Health Systems.
>
>
>



This message (including any attachments) is confidential and intended solely for the use of the individual or entity to whom it is addressed, and is protected by law. If you are not the intended recipient, please delete the message (including any attachments) and notify the originator that you received the message in error. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Vanguard Health Systems.

Oracle LazyDBA home page