Thursday, March 22, 2012

Database Files (file name)

I've detached a database and then reactached it specifing a new name for
the database within SQL Server 2000. But, if i right click and select
the database properties and then select the "Data Files" tab the file
name is still the same as the original database. How do i go about
changing that? Thanks in advance.
Vincent
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!
Hi Vincent
Changing the database name only changes one value, in the sysdatabases table
in the master database. It doesn't change any info in the database itself,
including the logical names associated with the database files which are
stored in the sysfiles table in the database itself.
To change the logical file names, you can use ALTER DATABASE... MODIFY FILE,
and specify a value for NEWNAME.
Please see the complete ALTER DATABASE syntax in the Books Online.
HTH
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Vincent Cristiano" <vincec@.mail.com> wrote in message
news:eTK%23YXruEHA.1984@.TK2MSFTNGP14.phx.gbl...
> I've detached a database and then reactached it specifing a new name for
> the database within SQL Server 2000. But, if i right click and select
> the database properties and then select the "Data Files" tab the file
> name is still the same as the original database. How do i go about
> changing that? Thanks in advance.
> Vincent
>
> *** Sent via Developersdex http://www.codecomments.com ***
> Don't just participate in USENET...get rewarded for it!
sql

No comments:

Post a Comment