T-SQL (3)

Executing SQL script with GO statement from C# code

In the middle of a project you might want to automate DB restoring and upgrading  by means of existing SQL scripts which may contain GO-statements. If you are that person who is attempting to execute scripts at runtime with GO-statements, this article describes how to do that.

Truncate log file of a MSSQL database

From time to time it’s required to clean up log file, but Managment Studio does not offer straightforward command to do that. This script will help in cleaning up.

Drop All Objects in a SQL Server Database

Originally posted here: Paige C#: Drop All Objects in a SQL Server Database: Here is a script that I created that will drop all the objects in a SQL Server database. It was created using a lot of other scripts out on …