Accessing a SharePoint Database

By Michael Flanakin @ 6:29 AM :: 1416 Views :: SharePoint :: Digg it!

Accessing SharePoint Databases

Working with the SharePoint object model can sometimes be a pain. Specifically, when you need to get a lot of information from multiple sources, it can become a very painful experience when you have to write pages of code to do something that takes entirely too long. I've heard of one case that took hours to accomplish in the object model, but querying the database directly brought that down to minutes. The question here is, what's supported. The typical dogma is that SharePoint databases are completely off limits. I have to admit this is something I wanted a bit more proof of. It reminds me of the unfounded rumors people sometimes spread without realizing it.

Adam Ruderman pointed me to SharePoint Database Access on MSDN that states, "Direct modification of the SharePoint database or its data is not recommended because it puts the environment in an unsupported state." I was hoping for something within the license, but this is good enough for me. Now, I know I can treat a SharePoint database as a read-only data source. Of course, I'd strongly recommend people avoid such a practice. I simply wanted to know for those odd-ball scenarios where the object model just doesn't cut it performance-wise.

If you're looking for something that covers supportability of changes to the database, you can also check out Support for changes to the databases that are used by Office server products and by Windows SharePoint Services, which talks about the supportability aspects we're actually concerned with.

Ratings