How to kill all sessions in SQL Server
In my previous two blogs, I talked about how kill a session in SQL Server and how to kill multiple sessions in SQL Server. In this blog I will talk about …
How to kill all sessions in SQL Server Read MoreSQL Server Education (by the geeks, for the geeks)
SQL Server Accidental/Involuntary/Junior DBAs Series
In my previous two blogs, I talked about how kill a session in SQL Server and how to kill multiple sessions in SQL Server. In this blog I will talk about …
How to kill all sessions in SQL Server Read MoreIn my last three blogs I talked about how to kill a session in SQL Server, how to kill multiple sessions in SQL server and how to kill all sessions in …
How to kill a thread in SQL Server Read MoreSometime or the other we do feel the need to forcefully kill a session in SQL Server. It’s not recommended and shouldn’t be run on production unless otherwise absolutely required. However, …
How to kill a session in SQL Server Read MoreBelow is a SQL query to find row size. The query uses DATALENGTH function, which returns the number of bytes used to represent a column data. A row may consist of …
SQL query to get row size in SQL Server Read MoreBelow is a SQL query to find table size in SQL Server. The calculation is based on SQL Query to find row size SQL Server blog (give the link of the …
SQL Query to find table size in SQL Server Read MoreThe blog explains a simple cursor in SQL Server to update rows. This is just for explanation, the update query can be written without using cursor too. The T-SQL is given …
Simple cursor in SQL server to update rows Read MoreA cursor is a way to iterate each row one by one in a SQL Server table. Although, T-SQL is a set based language however, many a times need arises to …
Simple cursor in SQL Server Read MoreBelow is a query to display foreign key relationships in a database. SELECT fks.NAME AS ForeignKey, fks.is_disabled, Schema_name(fks.schema_id) + ‘.’ + Object_name(fks.parent_object_id) AS TableName, Col_name(fkcs.parent_object_id, fkcs.parent_column_id) AS ColumnName, (SELECT Schema_name(schema_id) + …
Query to display foreign key relationships in SQL Server Read MoreRestore transaction log with NORECOVERY option is used when restoring multiple transaction log. Consider a backup strategy where in full backup is being taken once a week and transaction log backup …
Restore transaction log with norecovery in SQL Server Read MoreDatabase backup is a must know task for a DBA. In this blog we’ll look at T-SQL script to backup all databases at once. The logic is to iterate through all …
T-SQL Script to backup all databases Read More