Re: tablespace copy and rename
Date: Wed, 09 Feb 2005 15:47:28 -0800
Message-ID: <1107992679.754803_at_yasure>
Klaus Baumgart wrote:
> How can I rename a tablespace without copying the database.
> Also I have to change the Database User and Schemaname
>
> I would like to do this simelar to the SQL-Server features.
>
> copy Files
> cp ALT_NAME NEW_NAME
>
> EXEC sp_attach_db _at_dbname=N'NEW_NAME',
> _at_filename1= N'E:\db\NEW_NAME.mdf',
> _at_filename2= N'E:\db\NEW_NAME.ldf'
>
>
>
> EXEC sp_addlogin 'NEW_NAME', 'NEW_NAME', 'NEW_NAME'
> GO
> USE NEW_NAME
> GO
> EXEC sp_grantdbaccess 'NEW_NAME', 'NEW_NAME'
> GO
> EXEC sp_addrolemember 'db_owner', 'NEW_NAME'
> GO
> USE NEW_NAME
> GO
> EXEC sp_revokedbaccess 'NEW_NAME'
> GO
> EXEC sp_changedbowner 'NEW_NAME'
> GO
What on earth are you doing? This is an Oracle group. Or do you think Oracle is a subsidiary of Microsoft?
Here we read documentation.
Here versions matter.
So begin your education at: http://tahiti.oracle.com and also
check out Morgan's Library at http://www.psoug.org. The answers
are there and easy to find.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Feb 10 2005 - 00:47:28 CET