Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: tablesspace copy and rename
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 @dbname=N'NEW_NAME',
> @filename1= N'E:\db\NEW_NAME.mdf',
> @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
>
>
>
Apart from what Mark already explained, the little
I know of these TSQL commands, is that these have
something to do with Database Ownership
(dbo = database owner).
Realise that a database (MS)!= database(ORACLE).
If you want an analogy, SYS is the database owner,
and you cannot change that.
Also oracle schema == MS database
-- Regards, Frank van BortelReceived on Thu Feb 10 2005 - 03:05:51 CST
![]() |
![]() |