Tag Archives: SQL

Sharepoint 2010 ULS logs – How to keep them in SQL

This is another “Wow that was easy!” SharePoint items…

Open Central Admin
Go to the Monitoring section, then under “Timer Jobs”, select “Review job definitions”

There’s a timer job called “Diagnostic Data Provider: Trace Log”

It’s disabled by default, enable it and it will create new tables and a view on your logging database. (I think by default this is named WSS_Logging)
Leave it enabled (mine is set to run every 10 minutes)

Open SQL server Management studio and connect to your sharepoint DB server.
expand the WSS_Logging DB
Expand Views
Look for the new view called “ULSTraceLog”

I usually right click on the view name and “Select Top 1000 Rows”
Then from there I can add a where clause to the query thats on screen,
most often it’s
WHERE CorrelationID = ‘abcd-efg-hijk-lmnop-qrstuv’

Another tip- in the results (which on my system default to the “grid” view),
Right Click, Select All, then
Right Click, Copy with headers
you can then paste this into Excel and it’s pretty readable if you need to email it to someone.

As a side note, I’ve enabled this on a handful of farms and it seems to auto trim the DB sizes – so you don’t need to worry about the DB filling up over time.

Using Visifire Charts in Sharepoint with SQL data – Part 1

Visifire.com has a nice silverlight charting library that does animated charts and graphs.

My employer was looking to do up a Dashboard in SharePoint and I used Visifire, the Sharepoint Content Editor Web part and a few back end aspx pages to grab data from various sql servers to present the graphs.

I’m doing a video series on the basics of how to do it.

This first video introduces visifire, downloads some samples and walks through getting the sample to work locally on your PC.

Part 2 will discuss the Visifire Chart Designer.
Part 3 will show how to copy the needed files to SharePoint and how to put the relevant HTML in a SharePoint Content Editor WebPart.
Part 4 talks about how to move Source XAML to a separate file.
Part 5 talks about one way to construct a back end ASPX page to produce the XAML and feed it back.
Part 6 talks about how to modify the ASPX page to query a database and produce live data
Part 7 talks about how to move that page onto the SharePoint Server.