Monthly Archives: August 2010

IT Toolbox: TechNet Magazine August 2010

The new August 2010 IT Toolbox posts are on the TechNet Magazine site. Continue reading

Posted in Microsoft TechNet | Leave a comment

T-SQL: Backup All User Databases

Here’s an easy, generic way to back up all user databases on a SQL Server instance:   DECLARE @name VARCHAR(50) — database name DECLARE @path VARCHAR(256) — path for backup files DECLARE @fileName VARCHAR(256) — filename for backup DECLARE @fileDate VARCHAR(20) … Continue reading

Posted in MS SQL Server, T-SQL | Leave a comment

Stored Procedure to Export a Table via BCP

If you are looking for a generic way to export table data via BCP, here’s how:   CREATE PROCEDURE [dbo].[u_ExportDataViaBcp] ( @name VARCHAR(100), — this is the table (or table function) name to export @file VARCHAR(200), — output file @fmt_date … Continue reading

Posted in T-SQL | Leave a comment