September 29, 2004 at 9:44 am
Hi,
Having trouble renaming logical db files using the Microsoft described way;
ALTER DATABASE dbname
MODIFY FILE(NAME=DB_Data, NEWNAME=DBTEST_Data)
QA does not recognise 'NEWNAME' as an option but it's the Sql2K Manual !?!?
ALTER DATABASE database
{ MODIFY FILE < filespec > }
[ , NEWNAME = new_logical_name ]
[ , FILENAME = 'os_file_name' ]
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] )
September 29, 2004 at 9:56 am
Just did this via QA
ALTER DATABASE testtheory
MODIFY FILE(NAME='testtheory_Log', NEWNAME='testtheory2k_Log')
Good Hunting!
AJ Ahrens
webmaster@kritter.net
September 30, 2004 at 12:21 am
works for me too (with and without the single quotes for the names)
ALTER DATABASE MetaData
MODIFY FILE(NAME=MetaData_Data, NEWNAME=MetaData)
GO
ALTER DATABASE MetaData
MODIFY FILE(NAME='MetaData', NEWNAME='MetaData_Data')
What is the exact error description you are seeing?
September 30, 2004 at 12:55 am
Hi,
Thanks for the replies. However I seem to have omitted that I was trying it on a SqlServer 7 !, as it too works ok for me on Sql2k.
Is this option a new feature for Sql2k ?, if so, how was it managed prior to this version ?
Thanks in advance.
j
September 30, 2004 at 1:22 am
yes...the NEWNAME option was added in SQL 2000 and isn't available in SQL 7.0...the only workaround (AFAIK) was modifying the system tables directly (
)
any specific reason for changing the logical file name?? they are applicable only at a database level so it shouldn't matter much what the logical file names are...![]()
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply