質問

After converting VS 2010 DB projects to SSDT (SQL Server Data Tools) projects
(and a few comparisons with databases and between SSDT projects) I received the following folder structure:

  • Project
    • Data Generation Plans
    • dbo
      • Tables
      • Views
    • Schema Comparisons
    • Schema Objects
      • Database Level Objects
        • ...
      • Schemas
        • dbo
          • Programmability
          • Service Broker
          • Synonymns
          • Tables
          • Views
    • Scripts
      • Post-Deployment
      • Pre-Deployment
    • Security

If seems some of the tables and views are under Project\Schema Objects\Schemas\dbo and some are under Project\dbo.

The actual question(s):

  1. Why are there two different folders?
    (I suspect the import has something to do with this.)

  2. Can I unite the files under one folder and if so which?

  3. If not, to which folder to I add new files?

  4. If I selected the create backup during the import, where is the backup information saved? - I want to be able to delete it.


Edit:

Another inconsistency - files under Project\dbo\Tables contain keys and constraints, whereas files under Project\Schema Objects\Schemas\dbo\Tables are split (tables separately, constraints separately and etc.)

役に立ちましたか?

解決 2

It seems like the imported files (from VS 2010 dbproj) are under Project\Schema Objects\Schemas\dbo\Tables whereas everything added after that is under Project\dbo\Tables.

The new definitions are not split into different files and folders (tables, indexes, keys, ...) which makes the file system path less deep and reading all the information regarding a specific tables easier (especially if keys/indexes/constraints are deleted and then you compare with an older version of the table's file).

Moving the tables into Project\dbo\Tables and moving the contents of the satellite files into the main file seems to work (you'll have to add "GO"s between the commands in the file).

Another option is to create a database from the sqlproj (by comparing database to project), delete the old files and then recreate them in the new format by comparing project to database.

他のヒント

I had the same thing happen when I upgrade from DB Pro 2005 to DB Pro 2008. I haven't converted yet to SSDT format, but in the previous case, I just consolidated the files back into the older folders.

However, in some cases I just remade the project if it was easy enough or the database project was relatively new. (If I recreated/reimported, then I would lose the history of the files in source control.).

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