Home Forums SQL Server 2008 SQL Server 2008 High Availability check if database exist before restore RE: check if database exist before restore
Neeraj Dwivedi
SSCertifiable
Points: 6768
More actions
May 7, 2013 at 8:53 am
#1613034
You are doing it right. What issue you are facing?
Instaed of if exists use "If NOT EXISTS"
Check for DB from sys. sysdatabases then get path from sys.master_files.