question

darby avatar image
darby asked

Problem with CREATE DATABASE query

What is wrong with this query? It does not make any difference what I change the name to, I get the same error message with the new name!!

CREATE DATABASE MyFileTable

ON PRIMARY

(

Name = MyFileTable_data,

FILENAME = 'I:\Developement\FileTable\MyFileTable.mdf'

),

FILEGROUP FileStreamFG Contains Filestream

(

NAME = MyFileTable,

FileName = 'I:\Developement\FileTable\MyFileTable_Container'

)

LOG ON

(

NAME = MyFileTable,

FileName = 'I:\Developement\FileTable\MyFileTable_Log.ldf'

)

WITH FILESTREAM

(

NON_TRANSACTED_ACCESS = FULL,

DIRECTORY_NAME = N 'FileTableContainer'

)

Go

Error:

Msg 1828, Level 16, State 5, Line 1

The logical file name "whatever the file name is" is already in use. Choose a different name.


Completion time: 2021-05-22T13:48:00.5850750-04:00


databasesqlserver2012create
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
anthony.green avatar image
anthony.green answered

Your using the same name twice once for the filestream container and once for the log.

1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Yes, see that now. I had it right once, but not sure how it got changed. Didn't notice it after that. Thanks for the reply

darby

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.