To Read Error Log, we can use xp_readerrorlog, which is a external SP.
see the following code, it let us know, how to use this SP
This extended stored procedure will return a errorlog file.
This following Query Explains, How to use Exists in SQL Query.
Have a look at the sample given below
SELECT au_lname, au_fname FROM authors
(SELECT * FROM publishers WHERE authors.city = publishers.city)
When a subquery is introduced with the keyword EXISTS, it functions as an existence test. The WHERE clause of the outer query tests for the existence of rows returned by the subquery. The subquery does not actually produce any data; it returns a value of TRUE or FALSE.