Solved

T-SQL Error using SSMS 2012

Posted on 2014-02-07
1
372 Views
Last Modified: 2014-02-07
I am trying to run the T-SQL below in SSMS and I am getting an error on the CONTAINS keyword.  IS there an option in SSMS that I am missing to be able to run all T-SQL commands?  

CREATE DATABASE Documents ON PRIMARY (    NAME = N'Documents',    FILENAME = N'C:\SQL2012\Documents.mdf' ), FILEGROUPFSGROUP CONTAINS FILESTREAM (    NAME = FSData,    FILENAME= 'C:\SQL2012\FSDataStore.ndf' ) LOG ON (    NAME = N'Documents_Log',    FILENAME = N'C:\SQL2012\Documents_log.ldf' ) WITH FILESTREAM (    NON_TRANSACTED_ACCESS = FULL,    DIRECTORY_NAME = N'Documents' )

Open in new window


Msg 156, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'CONTAINS'.
Msg 319, Level 15, State 1, Line 8
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
Msg 156, Level 15, State 1, Line 8
Incorrect syntax near the keyword 'CONTAINS'.
Msg 319, Level 15, State 1, Line 8
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
0
Comment
Question by:hojohappy
1 Comment
 
LVL 21

Accepted Solution

by:
Dale Burrell earned 500 total points
ID: 39843615
Looks to me like you are missing a space i.e.

FILEGROUPFSGROUP CONTAINS FILESTREAM

should actually be

FILEGROUP FSGROUP CONTAINS FILESTREAM
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now