Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: tablesspace copy and rename

Re: tablesspace copy and rename

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 10 Feb 2005 10:05:51 +0100
Message-ID: <cuf823$egd$1@news5.zwoll1.ov.home.nl>


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 Bortel
Received on Thu Feb 10 2005 - 03:05:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US