December 2001
Intermediate to advanced
800 pages
17h 55m
English
You may recall from Chapter 4 that we wired VSS's difference-checking tool into Query Analyzer's tools menu so that you could difference check T-SQL scripts. Sp_diff takes a similar approach. It calls VSS's command-line interface, SS.EXE, and accesses its differencing engine to check the differences between two files that you supply. It returns the differences VSS finds between the files as a result set. Here's the code (Listing 21-2):
USE master GO IF OBJECT_ID('sp_diff') IS NOT NULL DROP PROC sp_diff GO CREATE PROC sp_diff @file1 sysname='/?', @file2 sysname=NULL /* Object: sp_diff Description: Returns the differences between two text files as a result set (uses VSS) Usage: sp_diff @file1=full path to first file, ... |
Read now
Unlock full access