VS 2012 SSDT (June 2103) does not import object filegroup placement - by dejan1

Status : 

 


1
0
Sign in
to vote
ID 794315 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 7/17/2013 4:17:51 PM
Access Restriction Public

Description

I have a table created on default [DATA] filegroup (SQL Server 2008 R2)

If I script the table out using SSMS 2008 R2, it is scripted like this:

CREATE TABLE [IN].[Message](
	[MessageID] [int] NOT NULL,
	[MessageReference] [varchar](100) NOT NULL,
PRIMARY KEY CLUSTERED 
(
	[MessageID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [DATA]
) ON [DATA]


When I import the database into VS 2012 with June SSDT, it is imported like this:

CREATE TABLE [IN].[Message] (
    [MessageID]         INT           NOT NULL IDENTITY(1, 1)  PRIMARY KEY CLUSTERED,    [MessageReference]  VARCHAR (100) NOT NULL,
);

Note that filegroup placement has not been imported. If a target database has PRIMARY as its default, the object will be create on the wrong filegroup. 

Also, for some reason, SSDT is treating table filegroup setting as an error if clustered index also has it. This setting is ignored, so it should maybe be a warning, not an error. More importantly, as SSMS scripting produces create table scripts with filegroup specified for both table and index, these scripts will be flagged as error by VS. 

Sign in to post a comment.
Posted by Microsoft on 8/1/2013 at 12:29 PM
Hi Dejan,

I have clarified earlier (in the workaround section) that this behavior is by design, and there isn’t actually an issue. Please let me know if that resolves your issue.

Thanks
Ali Badereddin
Posted by Sara [MSFT] on 7/22/2013 at 7:20 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Macy [MSFT] on 7/17/2013 at 4:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)