I have been researching this for days on the web and I find f=things that are close but not exactly, I am hoping that someone can help me, please.
Basically, we have a database (we will call) Base1, and I need from this a copy to do development and call it base2_Dev. so at this point, it is easy I would just restore from Base1 and call it base2_Dev. I have done this many times. However, now I need the same thing for another one, we can call it base3. this it will not let me do.
So in my research, I found things like this below, in different variations, but none of them work. it complains about the file names or ti says the database is in use by the system, depending on what I do here.
RESTORE DATABASE Base1 FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Backup\Bak1.bak'
With MOVE 'Base' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\Namg.mdf',
MOVE 'base_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\Namg.ldf'
Any ideas on getting this to work or anything else would be great.