for our product we create a SQL Server database at install time. The first thing is: we create the database and the second: we create some tables in it. The queries for these actions are performed through SQL Server SMO API by the Database::ExecuteNonQuery function.
Sometimes we get the following error at the second step of creating the first tables in the new fresh database:
The log for database 'x' is not available. Check the event log for related error messages. Resolve any errors and restart the database.
It is not clear how to reproduce this situation. We already know that it can be solved manually by detaching and attaching the database or restarting SQL Server. However we perform automated tests on our product and thus we cannot do these things manually. Furthermore we don't want customers run into this problem. Do you know the cause of this problem or how to resolve it?
many thanx in advance
View Complete Post