A time may come when you will need to alter your database to use a different collation. You can do this by using the following snippet: USE master; GO ALTER DATABASE [DatabaseName] COLLATE…
sql
To get a rough view of how many rows, total, used and unused space each table has, in a sql server database you can run the following query: USE {Database_Name};…
In Entity Framework code-first, if you have a domain model like the following: public class Country { public int Id { get; set; } [Index] public string IsoCode { get;…
In Azure if you have two or more SQL Databases and you want to perform a query across them, you might come across the following error: Reference to database and/or server name in…
These are some quick notes on how to configure an SQL Server to Listen on a Specific TCP port. Open Run Command line and type: SQLServerManager12.msc for SQL Server 2014 SQLServerManager11.msc for SQL…
SQL Server management studio allows you to have Database Diagrams to graphically show the structure of the database. In addition, you can create and modify tables, columns, relationships, and keys. Plus, you…