title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GetPathLocator (Transact-SQL) |
GetPathLocator returns the path locator ID value for the specified file or directory in a FileTable. |
rwestMSFT |
randolphwest |
07/08/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
Returns the path locator ID value for the specified file or directory in a FileTable.
GetPathLocator ( filenamespace_path )
A namespace path in the FileTable. The namespace path is of type nvarchar(max).
When the database belongs to an Always On availability group, then the GetPathLocator
function accepts the virtual network name (VNN) or the computer name.
hierarchyid
For more information, see Work with directories and paths in FileTables.
You can use the GetPathLocator
function when you're migrating files from a file server to a FileTable. In this scenario, you move the files into the FileTable, and then replace the original UNC path for each file with the FileTable UNC path. For a complete example, see Load Files into FileTables.