December 4, 2008 at 11:54 am
Does anyone know of any potential issues or downside to changing the logical file name of an existing DB that has been in use for a while?
We have a DB on SQL 2005 (Enterprise) running with compatability level set to 8 (required by the app that uses the DB) that has been in use for over 5 years. The logical file name has nothing to do with describing what the DB is for nor does it have anything in common with the actual file name of the MDF or LDF files. We have multiple copies of this DB;1 for live use and several for various testing/training purposes.
Can anyone think of any potential problem or downside with changing the logical file name on any of these copies of the DB? I did a quick search on Google but all hits were about how to do this and not why you should or shouldn't do it.
Thanks in advance!
Kindest Regards,
Just say No to Facebook!December 4, 2008 at 12:07 pm
the logical filename is generally used internally by SQL server, changing it to something different after copying the database is something i would defintiely do.
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 4, 2008 at 12:11 pm
Perry,
OK then this may sound like a dumb question but after copying the DB (creating a duplicate) when you change the Logcal File Name would you use a different Logical FIle Name from what is used on any other copy of that same DB? Does it matter if the copies of the DB are on different SQL Server boxes?
This also brings to mind the following (for anyone viewing thsi post):
When changing the Logical Filename do you follow any naming convention? For example do you use the same value for the Logical File Name that you use for the physical file name?
Thanks Again
Kindest Regards,
Just say No to Facebook!December 4, 2008 at 12:32 pm
from BOL
Logical and Physical File Names
SQL Server 2005 files have two names:
logical_file_name
The logical_file_name is the name used to refer to the physical file in all Transact-SQL statements. The logical file name must comply with the rules for SQL Server identifiers and must be unique among logical file names in the database.
os_file_name
The os_file_name is the name of the physical file including the directory path. It must follow the rules for the operating system file names.
it doesn't have to match the physical name, generally _Data and _Log are common apendages to the logical filenames
e.g.
Northwind_Data
Northwind_Log
Adventureworks_Data
Adventureworks_log
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
December 4, 2008 at 2:51 pm
This is just a conventions issue. It will only help if you use standard scripts to access those otherwise it should not matter.
* Noel
December 8, 2008 at 8:50 am
Thanks to all for replying!
Kindest Regards,
Just say No to Facebook!Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply