I have looked up in the internet for the ways and means to script out a database and check-in to TFS.
I didn't find any decent solution other than suggesting to buy or install software which is not what I wanted to do.
Here is how I did it.
Go to Visual Studio 2012 -> Create New Project -> under Other Languages -> select SQL Server -> Select SQL Server Database Project and name your project.
You can create a solution or not depending on your style/need.
Right click on db project -> Import -> Database
Click on "Choose Databse" or "New Connection". If you already have a database then its pretty straight forward (I guess!)
If you choose "New Connection" then, Enter your db server name, Log on to server using Windows/SQL Server Authentication (whichever applies to you) and in Connect database section select the database that you intend to script out.
Finally, "Test Connection" and if everything looks good, click "OK".
Now, under "Import Settings", check those options that you want. For me, I need Import application-schoped objects only, Import referenced logins, Import permissions.
In the folder structure section, I need Schema/ObjectType.
Then, click "Start".
It imports the database and security objects as well.
Now, you can add this solution/dbo/security (all these or any of these) into TFS.
Thats is all!
Now your database is in TFS.
I hope you find this useful in case this is what you are looking for.
Subscribe to:
Posts (Atom)
Combinable Enumerations [Flags] public enum SomeFlags { NoColor = 0, Red = 1, ...
-
I'm a full stack .NET developer. If you have any questions, you can send me an email at raghu dot muttana at g mail dot com. Wrote on...
-
When you reload the WPF Datagrid's ItemsSource, the previous SortOrder is not retained. Here is a simple way you can preserve the sort o...
-
Combinable Enumerations [Flags] public enum SomeFlags { NoColor = 0, Red = 1, ...