The T-SQL code below will give you an idea of the memory used by your reporting service. This query should be executed on the “reportserver ” database. Please be aware executing this statement can take some time.
You can use the default trace in SQL server in order to track CREATE/DELETE/ALTER DDL operations.The T-sql code below will show the CREATE/DELETE/ALTER DDL operations visible in the default trace.
SQL server is of course caching data, in order to minimize access to disks. Sometimes you want to clear that memory, for testing purposes for example. You can use DBCC commands in order to clear the system / proc /…
Sometimes you need to know when a SQL login was created. The SQL code below will list the SQL logins, when this was created, and if this is enabled or disabled.
The t-sql code below will give you the top 10 most CPU consuming SQL statements in your database, sorted by CPU time.
Disk I/O is most of the time the bottleneck of your SQL database, even when using SSD. The SQL statement below will show you the most heavy disk I/O statements, which you should improve.
Interested to see how long your SQL server agent is up and running, or you want to see if that agent is operational? You can use the t-sql code below to find out:
You can use the t-sql code below in order display the size of each table in a specific database.
Sometimes you need to do maintenance on a database, and you don’t really want to use single user mode or disable accounts. In that situation you could kill all connections to a specific database.In order to achieve that, you can…
from : The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions.…