Manage Sql Server Database within Visual Studio Team System

No.of Views543
Bookmarked0 times
Downloads 
Votes1
By  pranay rana   On  20 Jan 2011 03:01:52
Tag : Visual Studios , General
In the below article I am going show how VSTS use full for the database developers. Note that I am not having full idea about all things but it’s very helpful to DBA and developer who is working on large project with the large no of team member.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

In the below article I am going show how VSTS use full for the database developers. Note that I am not having full idea about all things but it’s very helpful to DBA and developer who is working on large project with the large no of team member.

Some time when we are releasing our project/product to client problem arise that our dataset version is not matching with the current application version. There is always problem when no of people working on same project and updating database object frequently and we miss updated object at time of release.

But now with the help of the VS team system 2008 we can easily resolve this issue and keep the database changes in VSS. In this article I am going to show how to create Database project and the option you get after creating the database. You get following advantages.

1.Manage DB change through schema management
    “One version of the truth”
    Offline sandbox for multiple developers

2.Source control for DBs
    Ability to store different versions as change sets

3.Schema and data compare
    Generate scripts/apply updates

Start with Create DataBase Project

   1. Sql Server 2005
   2. Sql Server 2005 Wizard

 

Image Loading

Sql Server 2005 Wizard

Select database instance you installed on your machine or from you network.

Image Loading

Welcome note by wizard

 

Image Loading

Select you schema or the object type

A database schema is a way to logically group objects such as tables, views, stored procedures etc. Think of a schema as a container of objects.
You can assign user login permissions to a single schema so that the user can only access the objects they are authorized to access.
Schemas can be created and altered in a database, and users can be granted access to a schema. A schema can be owned by any user, and schema ownership is transferable.

Image Loading

Select database collation and some other options

A collation encodes the rules governing the proper use of characters for either a language, such as Greek or Polish, or an alphabet, such as Latin1_General (the Latin alphabet used by western European languages).

  • Each SQL Server collation specifies three properties:
  • The sort order to use for Unicode data types (nchar, nvarchar, and ntext). A sort order defines the sequence in which characters are sorted, and the way characters are evaluated in comparison operations.
  • The sort order to use for non-Unicode character data types (char, varchar, and text).
  • The code page used to store non-Unicode character data.

 

 

Image Loading

Create new database or import database schema form existing one by selecting from combo box
Choose important options according the needs

Image Loading

Provide information to connect with the database

Image Loading

Build and deploy Configuration

Image Loading
Image Loading

Once you done with the database creation project get created with the folder you see in below screen

  • Stored Procedures
  • Functions
  • Triggers
  • Arbitrary SQL

 

Image Loading

You can find below options which allow you to compare data or schema of the database

1.Allows comparisons of: 
    Project -> database; database -> database

2.Object level script difference between DBs
3.Notifies when data loss may occur
4.Generate script or apply changes directly
5.It’s smart!
    understands constraints, creates temp tables to hold data, more

6.Compare security settings
    Users, roles and permissions 

Image Loading
Image Loading

After you done with the adding and changing database object you can build and deploy project as you can see in blow project

Image Loading
Image Loading

ya, now its within your VSTS, you can play around.

Summary

DataBase project and the related utilities to support it by VSTS is very important, time saving and make database maintainable.

 
Sign Up to vote for this article
 
About Author
 
pranay rana
Occupation-CEO
Company-GMind Solusion
Member Type-Senior
Location-India
Joined date-08 Jan 2011
Home Page-http://pranayamr.blogspot.com
Blog Page-http://pranayamr.blogspot.com
Hey, I am Pranay Rana, working as a Senior Software engineer in mid-size company located in ahmedabad. Web development in Asp.Net with C# and MS sql server are the experience tools that I have had for the past 4.3 years now. For me def. of programming is : Programming is something that you do once and that get used by multiple for many years You can visit me on my blog - http://pranayamr.blogspot.com/ StackOverFlow - http://stackoverflow.com/users/314488/pranay My CV :- http://careers.stackoverflow.com/pranayamr
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top