Problem with CREATE DATABASE

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

if you go into I:\Developement\FileTable\ what do you see?

1 Like

Nothing at all in the directory, but I have figured out my problem,

LOG ON
(
NAME = MyFileTable,
FileName = 'I:\Developement\FileTable\MyFileTable_Log.ldf'
)

NAME should = MyFileTable_Log
as soon as I fixed that it worked...I tried to create 2 MyFileTable support files, and the system didn't like it.

Thanks for the reply.

1 Like