Home Dashboard Directory Help
Search

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


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 794315
Opened: 7/17/2013 4:17:51 PM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

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.

Details
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 Microsoft 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 Microsoft 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)
Sign in to post a workaround.
Posted by Microsoft on 7/30/2013 at 12:49 PM
Hi dejan1,

I was able to reproduce the behavior you were seeing, where the File Group placement is not happening on the [Message] table in VS. However, this won't affect the functionality during deployment to a target database.

Go to the Properties of your project after you've imported from the database, click on the "Database Settings…" button, and select the "Operational" tab. You can see that the "Default firegroup" is set to [Data].

If you deploy your VS project to a new database, you will notice that the new database has [Data] as the default filegroup. From SQL Management Studio, if you view the script of the [Message] table (Ex: Script table as "Create To"), you will notice that the table is actually on the [Data] filegroup.

Thanks
Ali