Solved

T-SQL Error using SSMS 2012

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

803 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