Filetable Insert Triggers

  • Comments posted to this topic are about the item Filetable Insert Triggers

  • Fell right into the trap and learnt something in the process - after considering the correct response!!! Many thanks for this one 😉

    ...

  • This was removed by the editor as SPAM

  • Hi Andy,

    Good question, but in SQL Server SP1 2014 I managed to create the trigger and the file was inserted as normal.

  • I couldn't test it, but I find this:

    https://msdn.microsoft.com/en-us/library/gg492086%28v=sql.120%29.aspx

  • Books on Line


    For non-transactional update operations through File system, SQL Server will create an internal transaction to capture the CloseHandle operation and the any defined DML triggers may be fired as part of that transaction. A rollback such a transaction inside the trigger body, while not prevented, does not roll back the changes done to the FILESTREAM.

    That statement in BOL seems to suggest that copying the file into the folder will work - or does it apply only to contens of the file, not to the filetable?

    Junior Galvão statement that the file was inserted despite the trigger when he tried it suggests that the trigger does allow the file to be copied into the folder.

    Tom

  • Nice question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Thanks for the question, Andy. I haven't worked with filetables, so I wasn't sure about this (and I got it wrong :(). I was able to deduce that the file copy would either succeed or fail, and the insert statement would either succeed or fail, so since we were supposed to choose two options, the first and last choices must be false. This is another case where showing the number of choices to be made is not a good idea. Otherwise, it's a great question.

  • Filetable is not my favorite topic so I had to try to find the most logical choices ( according to me ). I got 2 points in a surprising way. It will incite me to study filetable in a deeper way but I think I will need an huge time. So I will avoid other QOD about it for a long time ( at least 3 months )

  • HappyGeek (10/8/2015)


    Fell right into the trap and learnt something in the process - after considering the correct response!!! Many thanks for this one 😉

    Same here.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply