March 11, 2004

SharePoint _SITE database

We seem to have a constant problem here with people modifying different bits of SharePoint in Visual Studio .NET, also known as directly modifying template files that SharePoint uses, then someone else loads one of those files in FrontPage messes around with it and saves the file. The act of saving the files "ghosts" (for some reason people here call it that), the file into the SharePoint _SITE database.  Then the original person modifies the base template file again using Visual Studio .NET and can't figure out why their changes are not working quite right.

Here is a simple query that can be run against the _SITE database to remove the file contents from the database:

--use query to remove file contents from

--DB and force SharePoint to look back at
--the template file

UPDATE docs SET metainfosize = null,
metainfo = null, content = null WHERE

leafname = 'default.aspx' AND dirname = '';
--leafname = filename, dirname = directory


--use query to find the DB reference to a file


leafname = 'default.aspx' AND dirname = '';
--leafname = filename, dirname = directory

NOTE: All changes made in FrontPage will be lost using this method.  I do not claim to know everything, there could be a much simpler way of doing this.  Post in the comments if you know of one.


Post a Comment

<< Home