I just got started using FileTables in SQL Server 2012. I have set everything up on a remote server and got things rolling without any issues. Non-transactional file inserts etc worked absolutely fine.
However, when I attempted to create a new Text-file in the FileTable share directory from Windows Explorer (right-click -> New -> Text Document), it totally froze. Now when I execute queries at the FileTable, the queries just freeze and I get no response. So I figured that my non-transactional insert from the file system had put a lock on the FileTable.
Anyhow, this is what I've tried so far (without success):
Kill ongoing filestream handles (http://msdn.microsoft.com/en-us/library/gg492061.aspx#BasicsKilling) with no results. The executions just freeze.
-- Kill all handles on database EXEC sp_kill_filestream_non_transacted_handles; GO -- Kill handles on filetable EXEC sp_kill_filestream_non_transacted_handles @table_name = 'dbo.MyFileTable'; GO -- Kill single handle EXEC sp_kill_filestream_non_transacted_handles @handle_id = <handle id>; GO
Take database offline. This results in the error message:
Msg 5061, Level 16, State 1, Line 2 ALTER DATABASE failed because a lock could not be placed on database 'FOO'. Try again later.
Drop database. This results in the error message:
Msg 3702, Level 16, State 4, Line 2 Cannot drop database "FOO" because it is currently in use.
Kill ongoing sessions(?) on my Database:
EXEC sp_who2 KILL <SPID>
As mentioned, I'm unable to interract both Transactionally and Non-transactionally with my FileTable. As you can see, I can't even drop my own Database.
Any suggestions in what may have caused this? Should I be careful using FileTables? Any suggestions on how to solve this?