These are simple but I always forget them.If you are using Always On make sure you run this on all machines and move the files on all machines.Unless you are replicating master.
USE master;
SELECT
name
, physical_name
FROM sys.master_files
WHERE database_id = DB_ID('[DB Name]');
ALTER DATABASE [DB Name]
MODIFY FILE ( NAME = [Logical Name of File ], FILENAME = '[Filepath]')
GO
No comments:
Post a Comment