SunQuest
 
       MS SQL Server
  Home arrow MS SQL Server arrow 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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Source Code Management and Database Deployment


    (Page 1 of 9 )

    Source code control is used in development environments in which several programmers work with the same piece of code. Applications and databases that are created in a development environment must be deployed first in a test environment and then in a production environment; this raises a variety of issues. This article covers two different approaches for source code management and database deployment. It is excerpted from SQL Server 2000 Stored Procedure & XML Programming, second edition, written by Dejan Sunderic (McGraw-Hill/Osborne, 2004; ISBN: 0072228962).

     

    Source code control (or version control) is typically introduced in development environments in which more than one developer needs to work with the same piece of code. It allows development organizations and their members to

    •  Manage code centrally
    •  Manage multiple versions of the same code
    •  Track change history
    •  Compare versions
    •  Prevent or allow developers from modifying the same piece of 
       code at the same time
    •  Synchronize deployment of all modifications needed to
       implement a single feature or bug fix

    The problem that you will face relatively often is that, while you develop your database (and application) in a development environment, you must deploy the database first in a test environment and then in a production environment. Initially, you need to deploy the complete database, but later you will have to update the database with design changes and hotfixes.

    In this chapter, I will introduce methods and tools for source code management and database deployment. I will present solutions using two different approaches. One approach is for developers who have Visual Studio .NET (and who are probably doing both database and application development). The other, more traditional, approach is geared toward SQL Server specialists who are working with traditional database development tools. I will use the tools that are delivered with SQL Server, as well as tools that I have developed, to automate some processes.

    --------------------------------------------------------------------The Concept of Source Code Management

    Microsoft provides source code control software as an integral part of its development environment under the name Visual SourceSafe. This application allows developers to control their most valuable asset—source code. You can also use the Visual SourceSafe database to manage other file types such as web content, documentation, and test data, but our focus in this chapter is on how to use Visual SourceSafe to manage database objects.

    Introduction to Microsoft Visual SourceSafe

    Microsoft’s primary purpose in delivering Visual SourceSafe as a part of its Visual Studio .NET suite of development tools is to provide a project-oriented means of storing and organizing code that allows developers to spend more time developing their projects and less time managing them. The emphasis is on ease of use and integration with a wide range of development tools. SQL Server developers can benefit greatly from this ease of use and integration, not only with regard to source code, but also as a means of organizing related files such as project documentation and test data.

    As with SQL Server, there are different ways to use Visual SourceSafe. It is essentially a client/server application, but if you are an independent developer, your development workstation will likely also be your application server, database server, and source code server. Of course, if you are an independent developer, you may be wondering why you have a need for source code control at all. I will discuss this issue later in the chapter. For now, you can take my word that source code control is just as important for the solo developer working on a simple project as it is for a large development team working on a complex, component-based project.

    If you are a member of a development team, the Visual SourceSafe client will allow you to work with local copies of code while preventing other members of your team from overwriting your changes while you have the code checked out from the Visual SourceSafe database. The benefit of this simple concept is obvious, but you have to work with and become comfortable with Visual SourceSafe before its many other benefits will become just as obvious. After you have posted your source code, you can

    • Get the current version of all files.
    • Check out a copy of a file that needs to be changed. Visual SourceSafe is, by default, configured to prevent all other developers from changing the file until it is returned (checked in) to the Visual SourceSafe database.
    • View differences between a local version of a source code file and the latest version stored in the Visual SourceSafe database.
    • Label versions of files to identify them with a particular release of a software product.
    • Retrieve older versions of a particular file or a complete set of project files.
    • View changes between any two versions of a source code file.
    • Share common files between separate projects.
    • Make a single backup copy of the complete source code and all supporting files.
    • Create branches of source code files to separately manage multiple versions of a software project.
    • Merge code in different branches of the source code file.

    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

    - 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
    - Building a Multi-table Report with SQL 2005 ...
    - A Secure Way of Building Connection Strings
    - Transferring a Database Using the SSIS Desig...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway