How do I recreate a database that I accidentally dropped and am now getting error 17051?

Question

Grade: Education Subject: Support
How do I recreate a database that I accidentally dropped and am now getting error 17051?
Asked by:
88 Viewed 88 Answers

Answer (88)

Best Answer
(284)
You can recreate the database using T-SQL: `CREATE DATABASE YourDatabaseName;`. Alternatively, you can restore a database backup if one exists. Ensure the user account has sufficient privileges to create databases. After recreation, verify the database name in your connection string.