Source Code Management and Database Deployment - Visual SourceSafe Explorer
(Page 4 of 9 )
The full power of Visual SourceSafe can only be realized through one special tool— Visual SourceSafe Explorer. Take a look at this tool by following these steps:
- Open Visual SourceSafe Explorer from the Windows Start menu (depending on the version that you have: Start | Programs | Microsoft Visual Studio .NET | Microsoft Visual SourceSafe | Visual SourceSafe) or from Visual Studio .NET (File | Source Control | Microsoft Visual SourceSafe).
- Expand the Asset project and drill down until you reach Stored Procedures (see Figure 11-4).
The following sections examine some of the most interesting features of the Visual SourceSafe Explorer, particularly history, labels, and versions.
History Visual SourceSafe keeps an audit trail of changes made to a file. To view this history of changes:
- Right-click the stored procedure that you edited earlier in this chapter and select Show History from the pop-up menu.
- Visual SourceSafe prompts you to define the history details you would like to display:
- In this case, accept the defaults and click OK.

Figure 11-4. Visual SourceSafe Explorer
Visual SourceSafe Explorer displays a list of the different versions of the stored procedure, along with the name of the user responsible for each action.

Now you have several options. If you select one version, you can view (click View) the code in an ASCII viewer. You can also see details (click Details) of the selected version such as comments and timestamp. The Get button lets you obtain a version of the stored procedure in a text file.
You can also temporarily or permanently set one of the previous versions to be a current one. The Pin option is usually applied as a temporary measure to test the behavior of an older version of a procedure. If you find that changes you made in your code are introducing more problems than they are solving, you can use the Rollback function to return to an earlier version of the code. Note that all newer versions will be deleted.
My favorite option is Diff. It compares two versions of a file. To use it:
- Select two versions of a stored procedure (for example, version 2 and version 3) in the History window. You can select multiple versions by pressing the CTRL key and then clicking them.
- Click the Diff button. The Difference Options dialog box appears.
- This dialog box lets you specify parameters for comparing files. If you wish to ignore case and white space, click OK to accept the defaults; Visual SourceSafe Explorer displays a window in which the differences between the two versions are highlighted (see Figure 11-5).
Figure 11-5. File differences in Visual SourceSafe
Explorer
Next: Labels and Versions >>
More MS SQL Server Articles
More By McGraw-Hill/Osborne
|
This article is excerpted from SQL Server 2000 Stored Procedure & XML Programming, second edition, written by Dejan Sunderic (McGraw-Hill/Osborne, 2004; ISBN: 0072228962). Check it out at your favorite bookstore today. Buy this book now.
|
|