hello
I'm looking to move an SQL 2017 database to another drive. A software company has installed a package that required SQL, we setup the SQL server and then the software company installed the package creating two new databases rather than use the two we prepared for them.
The issue is that they created both databases on the same drive rather than separate the databases on the two drives we had prepared. Looking at moving the database it is recommended to use ALTER DATABASE and herein lies my issue.
They created a user database files for each database with the same name, database1.mdf / database1.ndf and database2.mdf / database2.ndf,
How do i use MODIFY FILE when both the mdf and ndf files have the same name 'database2', if we were creating user files we would normally differentiate the file names such as database2.mdf and database2_user.ndf then use
ALTER DATABASE database2MODIFY FILE ( NAME = database2
FILENAME = 'G:\MSSQL\Data\database2.mdf');
ALTER DATABASE database2
MODIFY FILE ( NAME = database2_user
FILENAME = 'G:\MSSQL\Data\database2_user.ndf');