다음을 통해 공유


How to export Crawl Logs in SharePoint 2007 ?

Do you want to gather Crawl logs for documentation or troubleshooting in SharePoint 2007? With ExportCrawlLog utility from CodePlex, you can achieve that requirement. Here are the simplified steps for you:

- Download the .zip archive from https://www.codeplex.com/ExportCrawlLog to the Index Server box
- Extract the contents of the zip file
- Go to STSADMExportCrawlLog\STSADMExportCrawlLog\bin\Release folder
- Click Start > Run; type %WINDIR%\assembly
- Drag and drop the STSADMExportCrawlLog.dll into %WINDIR%\assembly folder
- Make sure STSADMExportCrawlLog.dll is present in %WINDIR%\assembly folder
- Go to STSADMExportCrawlLog\STSADMExportCrawlLog folder
- Click Start > Run; type %commonprogramfiles%\Microsoft Shared\Web Server Extensions\12\Config”
- Drag and drop the file stsadmcommands.STSADMExportCrawlLog.xml into "%commonprogramfiles%\Microsoft - Shared\Web Server Extensions\12\Config” folder.

Now run this command using the account which has access to SSP databases [normally using Search service account] to get the command line options:

stsadm -help ExportCrawlLog

Do you get the supported parameters for ExportCrawlLog like this one? 

-t (d|s|c|p) -site <portal url> [-outfile filename] [-history] [-s startdatetime] [-e enddatetime] [-from #] [-thru #] [-cat (Portal_Content|ProfileImport)] [-csid #] [-msgid #] [-u url pattern] [-hostname hostname] [-mt (s|w|e)]

Then You are done!

Let us see some examples about how to make use of ExportCrawlLog option with stsadm:

Example 1. To get the all results within a specific time window [like 15:10 hrs to 21:00 hrs]:

stsadm -o ExportCrawlLog -t d -site " https://sitename " -history -outfile c:\output.log -s "2009-03-25 15:10:26" -e "2009-03-25 21:00"

Example 2. To get all information in the crawl log irrespective of timeframe:

stsadm -o ExportCrawlLog -t d -site " https://sitename " -history -outfile c:\output.log

Example 3. To find out the content sources and their associated content IDs, run this command:

stsadm -o ExportCrawlLog -t c -site https://site

This will give the summary like this one:

Content Source Summary Report
=============================

4 : Local Office SharePoint Server sites
Start Addresses
---------------
https://site:4444/
https://site:5555/
https://site/
sps3://site:5555/
Operation completed successfully.

Here 4 : is the content ID for the content source. It can be associated with the ContentSourceId field of the resulting output files [for examples 1 & 2]

Hope this information is helpful!