Showing Posts for SQL

SQL script to kill all processes on a specific database

Michael Roma

This post shows a SQL script that can be used to kill all processes that are connected to a database. This is useful when you need to take the database down for maintenance.

  • SQL

How to get started with Microsoft SQL Server on Linux using Docker

Michael Roma

How to get started with Microsoft SQL Server on Linux using Docker

  • Docker
  • SQL

SQL Script to find all SQL Agent Jobs for SQL Reporting Services Subscriptions

Michael Roma

SQL Script to find all SQL Agent Jobs for SQL Reporting Services Subscriptions, SSRS

  • SQL

SQL Script to find all Indexes that need to be added

Michael Roma

This SQL script will show all Table Indexes that need to be added based on query history

  • SQL

SQL helper script to generate properties for an Entity Framework model

Michael Roma

This post shows a T-SQL script that can be used to generate the properties for a class that correspond to to a field in a database table. This can be used with Entity Framework.

  • C#
  • SQL
  • Entity Framework

C# Helper functions to map a DataTable or DataRow to a class object

Michael Roma

The following methods will allow you to map your DataTable, DataRow results to a class object.

  • C#
  • SQL

How to join a table-valued function in T-SQL

Michael Roma

Example on how to join a table-valued function in a T-SQL query

  • SQL

How to get date only from datetime in T-SQL

Michael Roma

The following code snippets are examples of how to return the date only part from a datetime data type.

  • SQL

Counting records in associated tables in Entity Framework

Michael Roma

The following example shows how to query a table and count records associated in another

  • C#
  • Entity Framework
  • SQL

Using Inheritance in Entity Framework

Michael Roma

C# Examples on how to use inheritance in Entity Framework

  • C#
  • Entity Framework
  • SQL