MAP: How to Enter Multiple Log File Paths for Log Parsing

MAP: How to Enter Multiple Log File Paths for Log Parsing

IMPORTANT: Keep checking the MAP Blog and MAP Toolkit Survival Guide(en-US) for updates and changes , especially after new versions of MAP are released.

  1. Consolidate all the directories and subdirectories containing your server log files into a single folder (like D:\logs)

  2. Create an Excel file as a directory builder with the following values/formulas in the cells:

    A B
    1 DBName =CONCATENATE("INSERT INTO [",A1,"].[dbo].[lp_usage_log_sources]")
    2 ([log_path])
    3 VALUES
    4 START HERE =IF(LEFT(A4,2)="\\",CONCATENATE("('",A4,"')",IF(LEFT(A5,2)="\\",",","")), IF(MID(A4,2,1)=":",CONCATENATE("('",A4,"')",IF(MID(A5,2,1)=":",",","")),("GO")))
    5 copy the formula above from B5 down through B9
    6 ...
    7 ...
    8 ...
    9 ...
  3. The Excel document should look similar to this (coloring and spacing shown in image is optional):

  4. Create a text file with the directory names by typing this from a command prompt: dir /s /ad /b FilePath > C:\LogDirs.txt

  5. Open the text file and copy all the file paths

  6. Open the directory builder spreadsheet and enter your database name in the yellow box cell, overwriting "DBName" and paste your file paths, starting in the cell labeled "START HERE" in the image.

  7. Make sure you copy/paste the formula in B4 into every cell of column B that has a directory value in column A plus one more. See the image in step 8 for an example.
  8. Copy the cells starting in column B with the INSERT statement, up to and including the first GO at the end of your paths list.

  9. Open SQL Server Management Studio and expand the Databases node and find your database. Right click on the database and choose New Query. Paste the copied cells into the query editor window

  10. Execute the query
  11. Open MAP, select the Usage Tracking scenario group, click the tile corresponding to the scenario you would like to run, then "Configure Log Parser" and confirm it contains the data you expect.
Leave a Comment
  • Please add 3 and 7 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Michael Board [MSFT CSG] edited Revision 25. Comment: Updated log path screenshot for new ui

  • Ed Price - MSFT edited Revision 23. Comment: Removing "(en-US)" from the title. The conclusion is that we don't add the English title on the English wiki, just the non-English title codes on the English Wiki.

  • Michael Switzer [MSFT CSG] edited Revision 7. Comment: table fix

  • Michael Switzer [MSFT CSG] edited Revision 6. Comment: Another attempt at fixing the formatting of the table

  • Michael Switzer [MSFT CSG] edited Revision 3. Comment: Fixed table

  • Michael Switzer [MSFT CSG] edited Revision 2. Comment: fixed table formatting

  • Michael Switzer [MSFT CSG] edited Revision 1. Comment: Added call back to MAP survival guide

  • Michael Switzer [MSFT CSG] edited Original. Comment: Removed redundant title

Page 1 of 1 (8 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Michael Switzer [MSFT CSG] edited Original. Comment: Removed redundant title

  • Michael Switzer [MSFT CSG] edited Revision 1. Comment: Added call back to MAP survival guide

  • Michael Switzer [MSFT CSG] edited Revision 2. Comment: fixed table formatting

  • Michael Switzer [MSFT CSG] edited Revision 3. Comment: Fixed table

  • Michael Switzer [MSFT CSG] edited Revision 6. Comment: Another attempt at fixing the formatting of the table

  • Michael Switzer [MSFT CSG] edited Revision 7. Comment: table fix

  • Ed Price - MSFT edited Revision 23. Comment: Removing "(en-US)" from the title. The conclusion is that we don't add the English title on the English wiki, just the non-English title codes on the English Wiki.

  • Michael Board [MSFT CSG] edited Revision 25. Comment: Updated log path screenshot for new ui

Page 1 of 1 (8 items)