I'm working directly against the SharePoint DB (I know it is highly not recommended but I need to, for several reasons).

I'm trying to get the SPSite.Url property ("http://baseurl/sites/somename") but can't figure out how to do that. I can only find and get the second part ("sites/somename") for each site.

Does any one know which stored procedures I need to use in order to get that?

有帮助吗?

解决方案

The way to do that is: Retrieving the Farm Id--> Retrieving the Alternate URL Collection Ids--> Retrieving the Alternate URL Collections--> Alternate URL Matching

You can find in this link: [MS-WSSFO3]: Windows SharePoint Services (WSS): File Operations Database Communications Version 3 Protocol documentation with detailed explanation under this section:

Site Collection Lookup

许可以下: CC-BY-SA归因
scroll top