MS SQL Server
  Home arrow MS SQL Server arrow Page 2 - Source Code Management and Database Deploy...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

Source Code Management and Database Deployment
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 15
    2005-06-16

    Table of Contents:
  • Source Code Management and Database Deployment
  • Administering the Visual SourceSafe Database
  • Managing Create Scripts in Visual Studio .NET
  • Visual SourceSafe Explorer
  • Labels and Versions
  • Database Deployment
  • Deployment of Individual Objects
  • Scripting Data in Visual Studio .NET
  • Deploying Create Scripts in Visual Studio .NET

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Source Code Management and Database Deployment - Administering the Visual SourceSafe Database


    (Page 2 of 9 )

    Before you can use Visual SourceSafe, you need to create users and assign privileges to them.

    When you install Visual SourceSafe, you create just two users: Admin and Guest. The Admin user has all privileges in the database and can also create other users. The Guest user is initially limited to read-only access to source code files. Both users are created with their password set to an empty string (that is, blank). Since this state constitutes a threat to your source code, your first step should be to set the Admin password using Visual SourceSafe Administrator (User | Change Password). When you are done, create a user for yourself (Users | Add User) with the appropriate permissions.

    TIP


    If your Visual SourceSafe username and password match your  operating system username and password, you will not have to type them each time you open Visual SourceSafe on the local system. Visual SourceSafe can be configured to use them automatically.

    With Visual SourceSafe, you can assign more refined permission levels, such as Add, Rename, Delete, Check In, Check Out, Destroy, and Read. To activate this wide-ranging control, click Tools | Options | Project Security and check the Enable Project Security option.

    Adding Database Objects to Visual SourceSafe in Visual Studio .NET

    To demonstrate the implementation of source code control in a database project, you add code from your sample Asset database in Visual Studio .NET:

    1. Create the Asset database project in Visual Studio .NET.

    2. Open Solution Explorer.

    3. Make sure that the Asset database is one of the Database References. If the reference does not already exist, right-click Database References and select New Database Reference to create one that points to the Asset database.

                 Figure 11-1.  The Generate Create Scripts dialog box

    4. In the Server Explorer, expand the Data Connections node.

    5. Right-click the Asset data connection and choose Generate Create Script. The program prompts you for objects to be scripted (see Figure 11-1 above).

    6. Select Script All Objects, and then switch to the Options tab and select the Script Database, Script Object-level Permissions, Windows Text (ANSI), and Create One File per Object options.

    7. When the program prompts for the folder, accept …\Asset\Change Scripts. The program will then create a set of script files for the database objects (see Figure 11-2).

    8. Select File | Source Control | Add Solution to Source Control. Visual Studio .NET will prompt you to log in to the Visual SourceSafe Common database:
      Figure 11-2.  Crate scripts            

    9. If your Visual SourceSafe database is stored locally, you can keep the Common database. If your Visual SourceSafe database is not stored locally, use the Browse button to locate the shared srcsafe.ini file.

      NOTE

      On my machine, the Visual SourceSafe database is located in the C:\Program Files\Microsoft Visual Studio\Common\VSS folder. My computer, in this case, is a development workstation, as well as the database server and Visual SourceSafe server.

      If the Visual SourceSafe client is installed on the same machine as SQL Server, the location of the Visual SourceSafe database that you need to specify in this text box should be relative to the server machine. If you are developing from a workstation that is separate from the “development” server, you have to be careful how you enter the location of the Visual SourceSafe database. You should use the server’s absolute path (for example: C:\Program Files\Microsoft Visual Studio\Common\VSS) regardless of whether you have that drive mapped on your workstation using another drive letter (such as S:).
    10. Visual SourceSafe prompts you to add a project to Visual SourceSafe. Name the project (you can also type a comment to describe the project).

    Visual SourceSafe creates a project and locks all Create scripts (scripts that can be used to drop and create objects from scratch). You can see a small lock icon beside each Create script in Solution Explorer:

     NOTE


    From this moment, you must check out a Create script before you can change it.

    More MS SQL Server Articles
    More By McGraw-Hill/Osborne


     

    Buy this book now. 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.

    MS SQL SERVER ARTICLES

    - Windows Server 2008 as a Workstation OS
    - An Overview of Windows Server 2008 R2
    - LINQ to MySQL, Oracle and PostgreSQL Provide...
    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek