???????????????????
????1????????????????????????Logical file name??
????MODIFY FILE ( NAME = ‘logical_file_name’?? NEWNAME = ‘new_logical_name’ )
??????????????????fg_newdb1_1 ????????????? fg_newdb1_file1
????alter database newdb
????modify file
????(NAME ='fg_newdb1_1'??newname='fg_newdb1_file1')
????2???????????????????????
????MODIFY FILE ( NAME = logical_file_name?? FILENAME = ' new_path/os_file_name ' )
?????????????????????????????????????????????????λ??????????????
????step1????????????????????????μ??????????
????alter database newdb
????modify file
????(name='fg_newdb1_file1'??filename='F:MSSQLServerfg_newdb1_file1.ndf');
?????????г???????????????????????????????????????
????The file "fg_newdb1_file1" has been modified in the system catalog. The new path will be used the next time the database is started.
????step2????????????
????use master
????go
????alter database newdb
????set offline
????with rollback immediate;
??????????????????????take offline????????????????Sleeping Session???????????query??????У????Take Offline???????????????????????κ?query???У???? ROLLBACK IMMEDIATE  ??????????????????????????е??????????Take Offline ?????????ɡ?
????step3?????????????????μ?λ????
?????????????????move?????????????μ?λ???????????????μ??????????
????move D:MSSQLServerfg_newdb1_1.ndf F:MSSQLServerfg_newdb1_file1.ndf

????step4????????????
????use master
????go
????alter database newdb
????set online
??????????????????????????
??????SQL Server?У???????????????????????????????????????????????п??????????????????????
????1?????????????????????
????step1????????????
????USE [db_study]
????GO
????DBCC SHRINKFILE (N'db_study_file1' ?? EMPTYFILE)
????GO
????Step2?? ???????????????????
????USE master;
????GO
????ALTER DATABASE db_study
????REMOVE FILE db_study_file1;
????GO
????2????????????????????
????step1???????????
????USE [db_study]
????GO
????DBCC SHRINKFILE (N'db_study_log1' ?? EMPTYFILE)
????GO
????step2????????????????????
????USE master;
????GO
????ALTER DATABASE db_study
????REMOVE FILE db_study_log1;
????GO
????3???????????????????
????USE master;
????GO
????ALTER DATABASE db_study
????REMOVE FILEGROUP fg_study1;
????GO