質問

I'm starting to use Visual Studio 2012 with integrated SQL Server Data Tools and although I watched 2 of microsoft's video's on getting started with SQL Database Projects I'm still having trouble understanding how to work with them especially since I'm new to db development.

Some questions:

  1. What is the difference between Importing a database or adding a reference to the database?

  2. What is the difference between Server Explorer and SQL Server Object Explorer tabs? In one I can browse the database through localhost\SQLEXPRESS.dbname and the other goes through localdb\Projects. At what point are these synchronized?

  3. How do I change the Target Database Name under the Project's properties?

役に立ちましたか?

解決

1) Importing a data base creates a project that includes all of the databases artifacts. Adding a database as a reference allows a project to access the database. So if you have a SSDT project and a c# project that uses the db, the c# project gets the reference. You could choose to create the SSDT project by importing an existing db.

2) SQL Server Object Explorer is part of SSDT and allows you do perform online SQL development including creating new artifacts, adding data to tables, and executing scripts.

3) To change the target database name for debugging purposed (where the database goes when you build/debug) change the target connection string in the debug tab of the properties menu of the project.

I've found this link to be quite helpful.

他のヒント

There are many differences between SQL Server Object Explorer (SSOX) and Server Explorer. Here's a couple: SSOX allows you to launch refactoring operations SSOX provides a logical view of your source code in Solution Explorer

In short, SSOX targets database development whereas Server Explorer is (I think) a generic hierarchical viewer for many server types.

Regards Jamiet

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top