Peter Lalovsky


T-SQL: (Migration) Export the definition of Stored Procedures

Very often we need to bulk export database objects and move them to another server. Manually we do this by right click on the database –> Tasks –> Generate Scripts… In this example I show how we can export Stored Procedures with T-SQL and SQLCMD. This model gives us the […]


Training: The Kindle version of Learn Microsoft® SQL Server® Intuitively. Transact-SQL: The Solid Basics is on Amazon

As of today, after a one year and a half long process of writing and preparing, the book that gives you the solid basics in Transact-SQL Learn Microsoft® SQL Server® Intuitively. Transact-SQL: The Solid Basics is now on Amazon in Kindle format. Select your market: USA Canada Great Britain Australia […]


T-SQL: NVARCHAR(255) vs. NVARCHAR(MAX) Disk Space Comparison

In some scenarios like ETL or load data into a DB, we need to insert the data into a staging table, where all the columns are String data type and on the next step to cleanse and manipulate the data. I heard a discussion about the data type of the […]