Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12554

How does the software know the database is suspect or unavailable?

$
0
0

Hello,

We know it is unavoidable that SQL Server database may be  damaged, suspect or unavailable for some reasons such as power off unexpectedly,  harddisk failure etc.

If this happens, we can choose to execute 'DBCC CheckDB' or restore from the backup. basically this has to be done by manual with 2 steps:

1, the user find that the database is not OK;

2, the user try to find a way to fix it.

Now I try to develop a software application to do these because it is a unattended product.

My question is:

Is there any way that SQL Server can let the visiting software know that the target database is damaged, suspect or unavailable? does SQL Server return specific error code for this?

Thanks!


Viewing all articles
Browse latest Browse all 12554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>