Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Filetable paths Expand / Collapse
Author
Message
Posted Tuesday, May 13, 2014 7:52 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Yesterday @ 8:07 AM
Points: 645, Visits: 422
I disagree with the answer and believe it should be nvarchar. The documentation at http://technet.microsoft.com/en-us/library/gg492084.aspx shows that the path_locator is hierarchyid, but the name, which is defined as 'The file or directory name. ' is nvarchar. I could use the name to find something, not the hierarchyid.
Post #1570323
Posted Tuesday, May 13, 2014 8:02 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 8:26 AM
Points: 1,803, Visits: 2,168
Nice question. Had to do the research, as never had a chance to use them. I can see how the could be used. But doubt I'll ever have any need for them where I work.

Thanks Steve!


Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1570337
Posted Tuesday, May 13, 2014 8:07 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, June 26, 2014 9:20 AM
Points: 825, Visits: 721
gbritton1 (5/13/2014)


I'm still not sure how to extract that actual path (i.e. conventional Windows path name)


During my investigation on this question, I came across documentation on the FileTableRootPath function. "It returns the root-level UNC path for a specific FileTable or for the current database".

http://technet.microsoft.com/en-us/library/gg509104.aspx

I don't know if this is what you were specifically referring to. I am new to FileTables and have not used this functionality yet.

Regards,

Brian

EDIT: forgot to add the URL reference.
Post #1570340
Posted Tuesday, May 13, 2014 8:55 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 5:56 PM
Points: 33,202, Visits: 15,348
I've run into a few people using this, and Filestream. For Filestream it's mostly been .NET programmers that write thick apps and want drag/drop, easy storage of lots of images.

For Filetables, I've met a few early adopters that used it for Dfs replacements, moving files around on shares and syncing them with AlwaysOn.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1570386
Posted Tuesday, May 13, 2014 9:12 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Friday, August 22, 2014 8:50 AM
Points: 4,425, Visits: 3,417
With a little help from BoL... Thanks, Steve!
Post #1570410
Posted Tuesday, May 13, 2014 4:01 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, August 4, 2014 12:29 PM
Points: 1,812, Visits: 584
nice question steve.
Post #1570572
Posted Tuesday, May 13, 2014 10:53 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 4:30 AM
Points: 5,344, Visits: 1,388
Nice to know...


Post #1570629
Posted Tuesday, May 13, 2014 10:54 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Friday, August 22, 2014 2:42 AM
Points: 797, Visits: 153
New to me too....
Post #1570631
Posted Wednesday, May 14, 2014 6:51 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 1:37 PM
Points: 2,677, Visits: 215
Thanks
Post #1570817
Posted Wednesday, May 14, 2014 9:40 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 7:08 AM
Points: 8,727, Visits: 9,278
Interesting question. This is a feature I haven't yet used, so I had to do some reading, so it was useful for me.

At first I found myself wondering what the "path" intended by the question was.

Should it be the result of calling FileTableRootPath ( <FileTable_name>, 1)? The wording of the question asks for "stores the path for files in a filetable", not for "the path for a file in a filetable" so maybe it ought to mean that?

But of course it may be using "files" to mean that the (single) path for each file in which case it could mean the result of calling path_locator.PathName(2,0) where path_locator is the attribute of the row in the table that corresponds to the file.

Alternatively, "in the table" could qualify the verb "stores" instead of qualifying "files", which at first site seems just as likely as the other interpretations, and would mean that a path would the value of the relevant attribue (path_locator) of the row in the table that corresponds tofile .

So there are the three options for interpreting the question, one refers to a column in the table which has type hierarchyid, and two refer to nvarchar strings which are presumably stored somewhere in metadata as nvarchar. Almost time to toss a coin (if I could find a three-side one)!

But then my pedantic inclination kicked in: if I assumed that the question author would not have referred to "files in a filetable" because the filetable contains information about files (and directories) and doesn't contain not the files (and directories) themslves onlt the third interpretation is possible. Against that, I can imagine someone claiming that the value of the path_locator oject isn't a path, but a path locator - but to me that would be a silly argument because a path can have several representations: is the full machine name used, or just the terminal part? is the server name to be all upper case (NETBIOS format) or not? is the path to be relative to a root (other than the domain containing the server)? And so on - given there's no fixed representation of the path, there's nothing wrong with any representation that works.

So I ended up getting deciding the path was the value of the path_locator attribute, so that its type was hierachyid; fortunately for my point score that was the right answer.

I'm not sure how anyone would get to that answer without being careful as to how to interpret the phrase "in the table" in the question. Given that so far only a third of people trying it have got that answer, I think the question is probably harder than Steve intended it to be.


Tom
Post #1570912
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse