DBCC INPUTBUFFER shows very little. In SQL Server 2016, the new sys.dm_exec_input_buffer function gives far more details about the last statement sent.
Rename MDF File Extension in SQL Server, Step by Step
To rename MDF file extension values safely, take the database offline, tell SQL Server the new file name, rename the file on disk, and bring the database online. This post walks through the four steps on a demo database. It also explains the RECOVERY_PENDING state you see when the two names don’t match.
Move the Master Database to a New Location in SQL Server
To move the master database, change its startup parameters in SQL Server Configuration Manager, stop SQL Server, move the files and start it again. This post explains why ALTER DATABASE can’t move master, reads the current paths with T-SQL, and lists the steps and the permission check that stops most failed moves. It also says what to do when the instance won’t start afterwards.






