TechNet
Products
IT Resources
Downloads
Training
Support
Products
Windows
Windows Server
System Center
Microsoft Edge
Office
Office 365
Exchange Server
SQL Server
SharePoint Products
Skype for Business
See all products »
Resources
Channel 9 Video
Evaluation Center
Learning Resources
Microsoft Tech Companion App
Microsoft Technical Communities
Microsoft Virtual Academy
Script Center
Server and Tools Blogs
TechNet Blogs
TechNet Flash Newsletter
TechNet Gallery
TechNet Library
TechNet Magazine
TechNet Wiki
Windows Sysinternals
Virtual Labs
Solutions
Networking
Cloud and Datacenter
Security
Virtualization
Updates
Service Packs
Security Bulletins
Windows Update
Trials
Windows Server 2016
System Center 2016
Windows 10 Enterprise
SQL Server 2016
See all trials »
Related Sites
Microsoft Download Center
Microsoft Evaluation Center
Drivers
Windows Sysinternals
TechNet Gallery
Training
Expert-led, virtual classes
Training Catalog
Class Locator
Microsoft Virtual Academy
Free Windows Server 2012 courses
Free Windows 8 courses
SQL Server training
Microsoft Official Courses On-Demand
Certifications
Certification overview
Special offers
MCSE Cloud Platform and Infrastructure
MCSE: Mobility
MCSE: Data Management and Analytics
MCSE Productivity
Other resources
Microsoft Events
Exam Replay
Born To Learn blog
Find technical communities in your area
Azure training
Official Practice Tests
Support options
For business
For developers
For IT professionals
For technical support
Support offerings
More support
Microsoft Premier Online
TechNet Forums
MSDN Forums
Security Bulletins & Advisories
Not an IT pro?
Microsoft Customer Support
Microsoft Community Forums
Sign in
Home
Library
Wiki
Learn
Gallery
Downloads
Support
Forums
Blogs
Resources For IT Professionals
United States (English)
Россия (Pусский)
中国(简体中文)
Brasil (Português)
Skip to locale bar
Editing: MAP: How to Enter Multiple Log File Paths for Log Parsing
Wiki
>
TechNet Articles
>
MAP: How to Enter Multiple Log File Paths for Log Parsing
Article
Edit
History
Title
<html> <body> <p>IMPORTANT: Keep checking the <a href="http://blogs.technet.com/b/mapblog/">MAP Blog</a> and <a href="http://social.technet.microsoft.com/wiki/contents/articles/1640.microsoft-assessment-and-planning-toolkit-en-us.aspx"> MAP Toolkit Survival Guide(en-US)</a> for updates and changes , especially after new versions of MAP are released.</p> <ol> <li>Consolidate all the directories and subdirectories containing your server log files into a single folder (like D:\logs) <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/2843.Folders.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/2843.Folders.JPG" style="border:0px solid"></a></p> </li><li>Create an Excel file as a directory builder with the following values/formulas in the cells:<br> <br> <table border="3" rules="all" width="550" style="border:thin solid black; font-family:'Gill Sans','Gill Sans MT',Calibri,'Trebuchet MS',sans-serif; font-size:9pt"> <tbody> <tr valign="top" style="background-color:silver"> <td style="width:10px"></td> <td align="center" style="width:75px">A</td> <td align="center" style="width:455px">B</td> </tr> <tr> <td valign="top" align="center" style="background-color:silver">1</td> <td style="height:21px">DBName</td> <td style="height:21px">=CONCATENATE("INSERT INTO [",A1,"].[dbo].[lp_usage_log_sources]")</td> </tr> <tr> <td align="center" style="background-color:silver">2</td> <td></td> <td>([log_path])</td> </tr> <tr> <td align="center" style="background-color:silver">3</td> <td></td> <td>VALUES</td> </tr> <tr valign="top"> <td align="center" style="background-color:silver">4</td> <td>START HERE</td> <td>=IF(LEFT(A4,2)="\\",CONCATENATE("('",A4,"')",IF(LEFT(A5,2)="\\",",","")), IF(MID(A4,2,1)=":",CONCATENATE("('",A4,"')",IF(MID(A5,2,1)=":",",","")),("GO")))</td> </tr> <tr> <td align="center" style="background-color:silver">5</td> <td></td> <td>copy the formula above from B5 down through B9</td> </tr> <tr> <td align="center" style="background-color:silver">6</td> <td></td> <td><strong>...</strong></td> </tr> <tr> <td align="center" style="background-color:silver">7</td> <td></td> <td><strong>...</strong></td> </tr> <tr> <td align="center" style="background-color:silver">8</td> <td></td> <td><strong>...</strong></td> </tr> <tr> <td align="center" style="background-color:silver">9</td> <td></td> <td><strong>...</strong></td> </tr> </tbody> </table> </li><li>The Excel document should look similar to this (coloring and spacing shown in image is optional): <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/7331.XLS_5F00_DBname.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/7331.XLS_5F00_DBname.JPG" style="border:0px solid"></a></p> </li><li>Create a text file with the directory names by typing this from a command prompt: <code>dir /s /ad /b <em>FilePath</em> > C:\LogDirs.txt</code> <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/3644.Command.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/3644.Command.JPG" style="border:0px solid"></a></p> </li><li>Open the text file and copy all the file paths <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/7183.TextFile.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/7183.TextFile.JPG" style="border:0px solid"></a></p> </li><li>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. <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/7331.XLS_5F00_DBname.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/7331.XLS_5F00_DBname.JPG" style="border:0px solid"></a></p> </li><li>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. </li><li>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. <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/4718.XLS_5F00_FilePath.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/4718.XLS_5F00_FilePath.JPG" style="border:0px solid"></a></p> </li><li>Open SQL Server Management Studio and expand the <strong>Databases</strong> node and find your database. Right click on the database and choose <strong>New Query</strong>. Paste the copied cells into the query editor window <p><a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/5432.Query.JPG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/5432.Query.JPG" style="border:0px solid"></a></p> </li><li>Execute the query </li><li>Open MAP, select the Usage Tracking scenario group, click the tile corresponding to the scenario you would like to run, then <strong>"Configure Log Parser"</strong> and confirm it contains the data you expect.<br> <a href="http://social.technet.microsoft.com/wiki/cfs-file.ashx/__key/communityserver-wikis-components-files/00-00-00-00-05/2262.Logpaths.PNG"><img alt="" src="http://social.technet.microsoft.com/wiki/resized-image.ashx/__size/550x0/__key/communityserver-wikis-components-files/00-00-00-00-05/2262.Logpaths.PNG" style="width:350px; height:256px; border-width:0px; border-style:solid"></a> </li></ol> </body> </html>
Comment
Tags
Please add 4 and 3 and type the answer here: