I'm trying to relocate system databases files. I managed to do that with the tempdb database, but I'm stuck with msdb.
When I run:
SELECT name, physical_name AS current_file_location FROM sys.master_files WHERE database_id IN DB_ID('msdb')
it shows that the logical names are 'MSDBData' and 'MSDBLog'. Then when I run below mention TSQL query
alter database tempdb modify file (name = MSDBData, filename = 'C:\Data\MSDBData.mdf')
I am getting the following error:
MODIFY FILE failed. File 'MSDBData' does not exist.
MS Sql 2008 R2 server version: 10.50.1600