Search

Add support for the full folder structure from Database Projects into SSDT by Mark Freeman

Active

1
0
Sign in
to vote
Type: Suggestion
ID: 775510
Opened: 12/31/2012 11:23:50 AM
Access Restriction: Public
0
Workaround(s)
I invoked Project | Import | Script, selected a .sql file that I had exported from DTA, but found no override option. (See note regarding this missing UI element from Gert Drapers in http://social.msdn.microsoft.com/Forums/en/ssdt/thread/531d22dc-cdaf-4788-8220-3fad91eef8f0). Although there is a drop down for "Folder Structure", the option "Schema\Object Type" does not do what I am used to from Database Projects.

Instead of creating new files under Schema Objects\Tables\Statistics, it appended the CREATE STATISTICS statements to the existing CREATE TABLE scripts in Schema Objects\Tables. Just as I don't want the constraints and keys in my table definition, I don't want the statistics there either. This creates inconsistencies with the way that the project scripts were created and maintained in the Database Projects before SSDT "replaced" those. If I want to look in my source code to find the statistics, I don't want to have to open each CREATE TABLE script. I want to be able to expand the Schema Objects\Tables\Statistics tree in Solution Explorer.

When SSDT "upgraded" my Database Projects, it did not consolidate the existing Constraints, Keys, or Statistics scripts into the Tables scripts. It is therefore unexpected that the Schema Comparison and Import Scripts executions only update Tables scripts and do not create or maintain the more specific script types.

Meanwhile, I am not looking forward to having to create around 100 CREATE statistics scripts without assistance from a tool. I realize that I can write my own Powershell script to parse the DTA-produced .sql file into individual CREATE STATISTICS scripts, then use "Add Items to Folder" in Source Control Explorer, and add use "Add Existing Item..." to add them to my Project, but this seems like a lot of work that should be done for me. And the Database Projects feature that SSDT superseded used to do all that for me.
Details (expand)

Product Language

English

Category

Developer Tools (SSDT, BIDS, etc.)

Proposed Solution

1) Add "overwrite" option to the Import Script dialog so it is not necessary to use the command line (Project.SSDTImportScript /FileName d:\temp\cots.sql /encoding Unicode /Overwrite true /IgnoreExtendedProperties true /IgnorePermissions true /AddImportedPermissionsToModel true) to obtain access to this functionality.

2) Add support in both Import Script and Schema Comparisons (from database to project) for supporting the more detailed folders (Keys, Constraints, Statistics, etc.) used by Database Projects and not just consolidating everything into the CREATE TABLE scripts.

As an alternative to #2, document this significant change in behavior for SSDT so this is not a surprise for the users and enhance the software that upgrades Database Projects to SSDT Projects to consolidate existing scripts of types that are now consolidated in CREATE TABLE scripts into the existing CREATE TABLE scripts to enable consistent handling of the scripts once the Project has been converted to SSDT.

Primary Benefit

Faster Development

Other Benefits

Improved User Interface.
Improved Administration (more granular management of database objects).

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/17/2013 at 10:46 AM
Thank you for the input. We will consider this for a future version of SSDT.
Sign in to post a workaround.