MSSQL Query Blog

Listing Active Connections in SQL Server

Hello to everyone, In this article, I will try to give information about listing active connections in SQL Server. In SQL Server you may want to list active connections in some cases. You can easily do this using the code below. select db_name(dbid) as DatabaseName, count(dbid) as NumberOfConnections, loginame as...

Finding All Caps Words in SQL Server

Hello to everyone, In this article, I will try to give information about finding words with all capital letters in SQL Server. In SQL Server you may want to find words with all caps in some cases. You can do this easily using the code below. SELECT * FROM dbo.Categories...

Re-Enable All Triggers in SQL Server

Hello to everyone, In this article, I will try to give information about how to reactivate all Triggers in SQL Server. In SQL Server you may want to re-enable all Triggers in some cases. You can easily do this using the code below. EXEC sp_MSforeachtable ‘ALTER TABLE ? ENABLE TRIGGER...

Listing Indexes Linked to Tables in SQL Server

Hello to everyone, In this article, I will try to give information about listing indexes linked to tables in SQL Server. In SQL Server, in some cases, you may want to list the indexes that are linked to the tables. You can easily do this using the code below. SELECT...

Don`t copy text!