Tuesday, December 15, 2009

Extend SharePoint Databases

search DBs:
http://www.mssqltips.com/tip.asp?tip=1794

For Content DBs:
http://www.mssqltips.com/tip.asp?tip=1777

moving tables between filegroups:
http://decipherinfosys.wordpress.com/2007/08/14/moving-tables-to-a-different-filegroup-in-sql-2005/

search objects inside filegroup(By John@sqlservercentral):


SELECT o.name AS TableOrIndex
FROM sysfiles f
JOIN dbo.sysfilegroups s
ON f.groupid = s.groupid
JOIN dbo.sysindexes i
ON i.groupid = s.groupid
JOIN dbo.sysobjects o
ON i.id = object_id(o.name)
AND i.indid in (0, 1)
WHERE f.name = 'My_Logical_File_Name'

UNION

SELECT i.name
FROM sysindexes i join sysfilegroups f ON i.groupid = f.groupid
JOIN sysfiles l ON f.groupid = l.groupid
WHERE l.name = 'My_Logical_File_Name'

No comments: