Tuesday, May 26, 2009

Check Index Details in Database

Following query helps to find the index details within a database.
This will list down all the tables and their index details that are indexed in a database.
SELECT
t.[name],
i.[name] as IndexName
FROM
SYS.INDEXES AS i WITH (NOLOCK)
INNER JOIN
SYS.TABLES AS t WITH (NOLOCK)
ON
i.[object_id] = t.[object_id]
INNER JOIN
SYS.INDEX_COLUMNS AS ic WITH (NOLOCK)
ON
i.[object_id] = ic.[object_id]
AND i.index_id = ic.index_id
WHERE
t.[type] = 'U'
AND t.Is_MS_Shipped = 0
AND i.Is_Hypothetical = 0

Monday, May 18, 2009

Sharepoint Stsadm command

cd \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

Adding a solution
stsadm -o addsolution -filename stsadm -o

ex: stsadm -o addsolution -filename c:\mysolutions\emprecord.wsp

Deploying a Solution

stsadm -o deploysolution -name .wsp

stsadm -o deploysolution -name emprecord.wsp


Delete Solution

stsadm -o deletesolution -name .wsp
stsadm -o deletesolution -name emprecord.wsp

Upgrade Solution
stsadm -o upgradesolution -name -filename WSP file name with the physical path where that is located> -allowGacDeployment –immediate

stsadm -o execadmsvcjobs

EX:
stsadm -o upgradesolution -name emprecord.wsp -filename c:\mysolutions\emprecord.wsp -allowGacDeployment –immediate

stsadm -o execadmsvcjobs