troubleshooting Question

restoring the databases

Avatar of VIVEKANANDHAN_PERIASAMY
VIVEKANANDHAN_PERIASAMY asked on
Microsoft AccessMicrosoft SQL ServerMicrosoft SQL Server 2005
4 Comments1 Solution195 ViewsLast Modified:
I like to do following steps automatically
Need to get the database name from e:\back\databasename_datetime.bak
excluding "_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?
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros