logical_file_name is a name used to refer to the file in all Transact-SQL statements. The logical file name must conform to the rules for SQL Server identifiers and must be unique to the database.for example:logical file name: MyDB_Primary
physical file name: C:\Program Files\Microsoft SQL Server\MSSQL\Data\MyData.mdflogical file name: MyDB_Log
physical file name: C:\Program Files\Microsoft SQL Server\MSSQL\Data\MyData.ldf

解决方案 »

  1.   

    逻辑名就是你的SQL Server显示的名字,物理名就是你的数据库在你硬盘上保存的文件的名字,不过通常就是逻辑名+"_data"
      

  2.   

    数据库名:TEST
    主要文件逻辑文件名:TEST_DATA
    日志文件逻辑文件名:TEST_LOG
    主要文件物理文件名:c:\Program Files\Microsoft SQL Server\MSSQL\data\TEST_DATA.MDF
    日志文件物理文件名:c:\Program Files\Microsoft SQL Server\MSSQL\data\TEST_LOG.LDF清楚了吧!
      

  3.   

    大王,你随便在哪个数据库中执行这样的语句:
    select name,filename from sysfiles
    结果中的name就是数据文件的逻辑名称。
    filename就是数据文件的物理名称。
    在T-SQL中,只要是针对数据文件的任何操作都是写逻辑名称而非物理名称的。
    比方说DBCC shrinkfile