Is there a way to rename the mdf and ldf files associated with a databse.
Also can I rename the fil nemae that is created for these when the databse
gets created.you can detach the database
rename the files
attach the database by specifying the new file names
"George Schneider" <georgedschneider@.news.postalias> wrote in message
news:25A21625-0C18-465F-ADCF-D0AB6B66F002@.microsoft.com...
> Is there a way to rename the mdf and ldf files associated with a databse.
> Also can I rename the fil nemae that is created for these when the databse
> gets created.|||To add to Jj's response, you can rename logical file names with ALTER
DATABASE. For example:
ALTER DATABASE MyDatabase
MODIFY FILE(
NAME='MyOldLogicalName',
NEWNAME='MyNewLogicalName')
See the Books online for more information.
Hope this helps.
Dan Guzman
SQL Server MVP
"George Schneider" <georgedschneider@.news.postalias> wrote in message
news:25A21625-0C18-465F-ADCF-D0AB6B66F002@.microsoft.com...
> Is there a way to rename the mdf and ldf files associated with a databse.
> Also can I rename the fil nemae that is created for these when the databse
> gets created.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment