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
Solved

T-SQL Error using SSMS 2012

Posted on 2014-02-07
1
378 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to prevent deleting SQL tables thru FE Application? 20 86
Add a step to a system backup job 6 19
backup and restore 21 30
SQL R 21 28
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

828 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