March 4, 2018 at 2:10 am
Hi Experts,
I have created a filetable with full access and created a trigger on Filetable to insert the filename and streamid to another normal table.Everything was working as expect but when i moved the same setup from one server to another the file insertion to folder failed with below errors.
--when tried using TQL
Msg 33409, Level 16, State 1, Line 11
The operation caused a FileTable check constraint error. A file entry cannot have a NULL value for the data stream associated with the row. Insert file data or use 0x to insert a zero length file.
--when copied the file to location
The system cannot find message text for message number 0xfilename.sql in the message file for (null).
if i remove the trigger the copying works fine.
The difference between two servers are one is using disks and the other one is having mount points.
March 4, 2018 at 2:21 am
VastSQL - Sunday, March 4, 2018 2:10 AMHi Experts,I have created a filetable with full access and created a trigger on Filetable to insert the filename and streamid to another normal table.Everything was working as expect but when i moved the same setup from one server to another the file insertion to folder failed with below errors.
--when tried using TQL
Msg 33409, Level 16, State 1, Line 11
The operation caused a FileTable check constraint error. A file entry cannot have a NULL value for the data stream associated with the row. Insert file data or use 0x to insert a zero length file.--when copied the file to location
The system cannot find message text for message number 0xfilename.sql in the message file for (null).if i remove the trigger the copying works fine.
The difference between two servers are one is using disks and the other one is having mount points.
Is the one failing the one with the mount pints?
😎
It might also be helpful if you post the trigger code.
March 4, 2018 at 2:57 am
Eirikur Eiriksson - Sunday, March 4, 2018 2:21 AMVastSQL - Sunday, March 4, 2018 2:10 AMHi Experts,I have created a filetable with full access and created a trigger on Filetable to insert the filename and streamid to another normal table.Everything was working as expect but when i moved the same setup from one server to another the file insertion to folder failed with below errors.
--when tried using TQL
Msg 33409, Level 16, State 1, Line 11
The operation caused a FileTable check constraint error. A file entry cannot have a NULL value for the data stream associated with the row. Insert file data or use 0x to insert a zero length file.--when copied the file to location
The system cannot find message text for message number 0xfilename.sql in the message file for (null).if i remove the trigger the copying works fine.
The difference between two servers are one is using disks and the other one is having mount points.
Is the one failing the one with the mount pints?
😎
It might also be helpful if you post the trigger code.
Thanks Eirikur for the quick reply.
Yes its failing in server with Mount Points. Please find the trigger code
Create TRIGGER [dbo].[Insert_Datain] ON [dbo].[BizTalkFT]
FOR INSERT AS
DECLARE @Stream_ID uniqueidentifier
DECLARE @Filename nVARCHAR(100)
DECLARE @CreateDate DAtetime
SELECT @Stream_ID =([Stream_id]) FROM INSERTED
SELECT @Filename=([name]) FROM INSERTED
SELECT @CreateDate=(Creation_Time) FROM INSERTED
INSERT INTO
[AllDocs]
([Filename],CreateDate)
VALUES
(
@Filename,@CreateDate
)
GO
March 4, 2018 at 4:22 am
VastSQL - Sunday, March 4, 2018 2:57 AMEirikur Eiriksson - Sunday, March 4, 2018 2:21 AMVastSQL - Sunday, March 4, 2018 2:10 AMHi Experts,I have created a filetable with full access and created a trigger on Filetable to insert the filename and streamid to another normal table.Everything was working as expect but when i moved the same setup from one server to another the file insertion to folder failed with below errors.
--when tried using TQL
Msg 33409, Level 16, State 1, Line 11
The operation caused a FileTable check constraint error. A file entry cannot have a NULL value for the data stream associated with the row. Insert file data or use 0x to insert a zero length file.--when copied the file to location
The system cannot find message text for message number 0xfilename.sql in the message file for (null).if i remove the trigger the copying works fine.
The difference between two servers are one is using disks and the other one is having mount points.
Is the one failing the one with the mount pints?
😎
It might also be helpful if you post the trigger code.Thanks Eirikur for the quick reply.
Yes its failing in server with Mount Points. Please find the trigger code
Create TRIGGER [dbo].[Insert_Datain] ON [dbo].[BizTalkFT]
FOR INSERT AS
DECLARE @Stream_ID uniqueidentifier
DECLARE @Filename nVARCHAR(100)
DECLARE @CreateDate DAtetimeSELECT @Stream_ID =([Stream_id]) FROM INSERTED
SELECT @Filename=([name]) FROM INSERTED
SELECT @CreateDate=(Creation_Time) FROM INSERTEDINSERT INTO
[AllDocs]
([Filename],CreateDate)
VALUES
(
@Filename,@CreateDate
)
GO
My suggestion would be to change the trigger, regardless whether that is the cause of the problem or not, as this code can only handle single row inserts.
😎
CREATE TRIGGER [dbo].[Insert_Datain] ON [dbo].[BizTalkFT]
FOR INSERT AS
INSERT INTO [AllDocs] ([Stream_id],[Filename],CreateDate)
SELECT
I.[Stream_id]
,I.[Filename]
,I.CreateDate
FROM INSERTED I
WHERE I.[Stream_id] IS NOT NULL;
GO
March 4, 2018 at 5:27 am
Eirikur Eiriksson - Sunday, March 4, 2018 4:22 AMVastSQL - Sunday, March 4, 2018 2:57 AMEirikur Eiriksson - Sunday, March 4, 2018 2:21 AMVastSQL - Sunday, March 4, 2018 2:10 AMHi Experts,I have created a filetable with full access and created a trigger on Filetable to insert the filename and streamid to another normal table.Everything was working as expect but when i moved the same setup from one server to another the file insertion to folder failed with below errors.
--when tried using TQL
Msg 33409, Level 16, State 1, Line 11
The operation caused a FileTable check constraint error. A file entry cannot have a NULL value for the data stream associated with the row. Insert file data or use 0x to insert a zero length file.--when copied the file to location
The system cannot find message text for message number 0xfilename.sql in the message file for (null).if i remove the trigger the copying works fine.
The difference between two servers are one is using disks and the other one is having mount points.
Is the one failing the one with the mount pints?
😎
It might also be helpful if you post the trigger code.Thanks Eirikur for the quick reply.
Yes its failing in server with Mount Points. Please find the trigger code
Create TRIGGER [dbo].[Insert_Datain] ON [dbo].[BizTalkFT]
FOR INSERT AS
DECLARE @Stream_ID uniqueidentifier
DECLARE @Filename nVARCHAR(100)
DECLARE @CreateDate DAtetimeSELECT @Stream_ID =([Stream_id]) FROM INSERTED
SELECT @Filename=([name]) FROM INSERTED
SELECT @CreateDate=(Creation_Time) FROM INSERTEDINSERT INTO
[AllDocs]
([Filename],CreateDate)
VALUES
(
@Filename,@CreateDate
)
GOMy suggestion would be to change the trigger, regardless whether that is the cause of the problem or not, as this code can only handle single row inserts.
😎
CREATE TRIGGER [dbo].[Insert_Datain] ON [dbo].[BizTalkFT]
FOR INSERT ASINSERT INTO [AllDocs] ([Stream_id],[Filename],CreateDate)
SELECT
I.[Stream_id]
,I.[Filename]
,I.CreateDate
FROM INSERTED I
WHERE I.[Stream_id] IS NOT NULL;
GO
Thanks Eirikkur .
Can you give a suggestion on how to handle this ? Is there any other way to achieve this?
March 4, 2018 at 7:05 am
Can you post the DDL for the AllDocs table please.
😎
This method is what I recommend, just wondering why you are getting NULL values for the Stream_id. Could be permissions issue, can you check that?
Is the new server a cluster?
March 5, 2018 at 12:11 am
Eirikur Eiriksson - Sunday, March 4, 2018 7:05 AMCan you post the DDL for the AllDocs table please.
😎This method is what I recommend, just wondering why you are getting NULL values for the Stream_id. Could be permissions issue, can you check that?
Is the new server a cluster?
Thanks Eirikur.
Strem_ID was never Null
CREATE TABLE [dbo].[AllDocs](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[Stream_ID] [uniqueidentifier] NOT NULL,
[FileName] [nvarchar](100) NOT NULL,
[ToProcess] [int] NOT NULL,
[CreateDate] [datetime] NOT NULL,
CONSTRAINT [PK_AllDocs] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[AllDocs] ADD DEFAULT ((0)) FOR [ToProcess]
GO
March 5, 2018 at 12:11 am
..
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply