Hot answers tagged

7 votes
Accepted

When should I inspect the Error Log?

I've had a varied career, but I have never found relevant information in the SQL Server Error Log. I'm happy you've had an easy time with SQL Server :) Under what circumstances should I consider ...
Sean Gallardy's user avatar
5 votes

When should I inspect the Error Log?

Well darn. It looks like I should be checking that thing more often. Usually, it's just flooded with info telling me that my log backups are working great. If you’d like a free tool that narrows the ...
Erik Darling's user avatar
  • 40.5k
5 votes
Accepted

EVENTDATA() function is giving only null values in sql server

XML is case sensitive, and you're not capitalizing things properly. "Clienthost" should be "ClientHost", which you can see in the documented schema: <xs:element name="...
Erik Darling's user avatar
  • 40.5k
4 votes
Accepted

How can I know how many tables my DELETE has changed?

If you’re just generally curious, look at the query plan. It will show all the tables involved. If you’re looking to log or audit them, that’s a different story. You would need to use triggers, or ...
Erik Darling's user avatar
  • 40.5k
4 votes
Accepted

INFORMATION_SCHEMA.COLUMNS - how to distinguish between table columns and view columns

The INFORRMATION_SCHEMA.TABLES view contains a TABLE_TYPE column, with a value of either "BASE TABLE" or "VIEW" to denote whether the object is a table or view. Join to this ...
Dan Guzman's user avatar
  • 28.1k
3 votes

When should I inspect the Error Log?

Here's three more cases, in addition to Sean's list: When the instance won't start properly (as vonPryz noted). In similar vein, when a database won't come back online. When a user is encountering ...
J.D.'s user avatar
  • 37.1k
2 votes

When should I inspect the Error Log?

A few small additions to the good answers from Sean Gallardy and J.D.: I've used the SQL Error Log when troubleshooting problems with encrypted connections. In the first ten or twenty seconds after ...
Doug Deden's user avatar
  • 1,708
2 votes

How can I know how many tables my DELETE has changed?

... I could delete one row from one table in a sufficiently evil database and unknowingly delete 99% of the database's data. Absolutely correct. One of the biggest threats to our databases is the &...
Phill  W.'s user avatar
  • 8,503
2 votes

How can I know how many tables my DELETE has changed?

You could get this information out of the Actual query plan. If you want to parse the query plan to find out how many rows were actually affected, you can do it like this. WITH XMLNAMESPACES ( ...
Charlieface's user avatar
  • 12.2k
1 vote

Cannot disable Query store due to QUERY STORE ASYNC LOAD

Did you try ? ALTER DATABASE [dbname] SET QUERY_STORE = OFF (FORCED)
Stephen Morris - Mo64's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible