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

Home -> Community -> Usenet -> c.d.o.misc -> tablespace copy and rename

tablespace copy and rename

From: Klaus Baumgart <news_at_dvberatung.com>
Date: Wed, 9 Feb 2005 16:12:40 +0100
Message-ID: <cud99d$mql$1@newsreader2.netcologne.de>


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 Received on Wed Feb 09 2005 - 09:12:40 CST

Original text of this message

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