I would like to set up automated job to restore a database from another live database nightly.
I can use SSMS UI to restore the database to point of time from the other live database.
Is there a way that I can do from script?
I can do something like below (pseudocode)
restore databaseA from database B
to point of time of tonight 9:00 pm.
I don't want to use the backup file names, for every night the backup name changes.
Just use the database name.