I like to do following steps automatically
Need to get the database name from e:\back\databasename_datetime.bak
get all user and windows logins
restore the database with database name taken in the step 1
import all the user logins.
run orpan users
and iterate all other files under e:\backup folder and do other mentioned above
Is anyone has done this before?
Problem is how to the database name from file from xp_cmdshell or by another means?