How do you modify filepath of a database file that is inside a filegroup?
Just the normal and direct way?
Alter database []
Modify file (name='', newfilepath='')
Or
Alter database []
Modify filegroup []
Modify file (name='', newfilepath='')
How do you modify filepath of a database file that is inside a filegroup?
Just the normal and direct way?
Alter database []
Modify file (name='', newfilepath='')
Or
Alter database []
Modify filegroup []
Modify file (name='', newfilepath='')
Both options are incorrect.
For the first option newfilepath do not exists. Use FILENAME instead
From Move User Databases (Microsoft Learn | SQL)
ALTER DATABASE mydatabase_name
MODIFY FILE (
NAME = logical_name,
FILENAME = 'new_path\os_file_name'
);