A customer had an URL to a page file, but couldn’t locate the page where the file was stored. And somehow the search in EPiServer didn’t give any hits on the file, so started digging around in the database and found the column ExternalFolderID in the table tblPage.
So a simple query like “SELECT pkID FROM tblPage WHERE ExternalFolderID = 3493” where 3493 was the page folder id gave us the answer.
As Anders says in the comment below, you can also get the page by code:
PageData ownerPage = UnifiedDirectory.GetOwnerPageFromVirtualPath(“/PageFiles/3493/”);