Solved

T-SQL Error using SSMS 2012

Posted on 2014-02-07
1
381 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

688 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