Posted on

MCT Classes Play Ground for MS Server Platform

http://mctclassnotes.blogspot.com/

This is my instructor’s Dan’s Posting in regards to class Activity.

 

Q: Where can I find a SharePoint 2013 “playground”, i.e. a SharePoint farm I can learn on or test things on?

A: This is a question that comes up a lot, and there are no really great answers, but there are some pretty good ones.
Probably your best bet, if you have a system with Hyper-V and adequate resources, is to download this set of VHDs:
https://www.microsoft.com/en-us/download/details.aspx?id=40266
https://www.microsoft.com/en-us/download/details.aspx?id=40267
https://www.microsoft.com/en-us/download/details.aspx?id=40265
It’s actually a “Lync Server 2013 Test Drive” image, but it also includes Exchange 2013 and SharePoint 2013.
Another possibility, for targeted experimentation purposes, is to use the TechNet Virtual Labs:
https://technet.microsoft.com/en-us/virtuallabs/bb467605.aspx
These are labs with specific objectives, e.g. “Introduction to Backup and Restore in Microsoft SharePoint 2013”, but they give you an online instance of SharePoint to do the lab work on. It only gives you a couple of hours to complete the lab, but they do have the merit of being almost instantaneously accessible.
Of course, if you don’t mind paying $5/month, you could always get yourself the bare-bones version of SharePoint online:
https://products.office.com/en-us/SharePoint/compare-sharepoint-plans
For additional options, this guy:
http://www.matthewjbailey.com/sharepoint-2013-dev-environment/
…has compiled a pretty decent list of options.

POSTED BY DAN COSTELLO

Q: How do I programmatically dump the contents of a SharePoint list to an Excel file, ideally on a schedule?

There are a lot of ways of doing that, depending on your specific goals.
For example:
Here’s a guy who’s thrown together a simple little console application using the server-side
object model, you could pretty readily adapt it to a timer job or just run it on a SharePoint server with Windows scheduler.
http://sharepointplays.blogspot.com/2013/11/programmatically-export-data-from.html
Or you could use powershell and dump it as a csv:
https://kmlsp.wordpress.com/2014/08/04/how-to-export-sharepoint-list-to-csv-file-by-powershell/
(By the way, here’s a really nice example of doing it the other way ‘round, i.e. csv file—>SharePoint
list.)
https://blogs.technet.microsoft.com/stuffstevesays/2013/06/06/populating-a-sharepoint-list-using-powershell/
Personally, I’d prefer using an SSIS package. This is the MSDN article about the SharePoint list adapters for SSIS:
https://msdn.microsoft.com/en-us/library/hh368261.aspx?f=255&MSPPError=-2147217396
…and this is a slightly old but still relevant and nicely-documented article about how to do an extract:
http://dataqueen.unlimitedviz.com/2011/06/how-to-use-a-sharepoint-list-as-a-data-source-in-your-ssis-package/

POSTED BY DAN COSTELLO

Q: How do I get SharePoint 2013 Excel Services workbooks to refresh their data automatically?

Microsoft Certified BI consultant Tavis Lovell has written a very good and thorough step-by-step guide to configuring automatic data refreshes:
http://tavislovell.com/the-dark-art-of-the-excel-services-workbook-data-refresh/ .
It’s a longish post, but he covers manual refreshes, refreshing every time the book is opened, and scheduled refreshes.

POSTED BY DAN COSTELLO

Q: Why is my log backup failing periodically?

A: I got this question via email from a student:

So we have this job that backs up the transaction log every hour.
Whenever I shrink the transaction log, this backup will fail until the next full backup of the database. Why?
This is what the SHRINK script looks like:
USE [master]
GO                                                                                                                                 
ALTER DATABASE [DBNAME] SET RECOVERY SIMPLE
GO
USE [DBNAME]
GO                                                                                                                                
DBCC SHRINKFILE (N’DBNAME_log’ , 0, TRUNCATEONLY)
GO                                                                                                                                
USE [master]
GO
ALTER DATABASE [DBNAME] SET RECOVERY FULL WITH NO_WAIT
GO
Is there a particular time to do a shrink?

I’ve found that this is a pretty common issue, so I wanted to address a couple of the problems with this maintenance script.
First, it’s not the shrinking, it’s the “SET RECOVERY SIMPLE”.
https://technet.microsoft.com/en-us/library/jj835093%28v=sql.110%29.aspx
The relevant text from that article is (emphasis added):

The Log Chain
A continuous sequence of log backups is called a log chain. A log chain starts with a full backup of the database. Usually, a new log chain is only started when the database is backed up for the first time or after the recovery model is switched from simple recovery to full or bulk-logged recovery. Unless you choose to overwrite existing backup sets when creating a full database backup, the existing log chain remains intact. With the log chain intact, you can restore your database from any full database backup in the media set, followed by all subsequent log backups up through your recovery point. The recovery point could be the end of the last log backup or a specific recovery point in any of the log backups. For more information, see Transaction Log Backups (SQL Server).
To restore a database up to the point of failure, the log chain must be intact. That is, an unbroken sequence of transaction log backups must  extend up to the point of failure. Where this sequence of log must start depends on the type of data backups you are restoring: database, partial, or file. For a database or partial backup, the sequence of log backups must extend from the end of a database or partial backup. For a set of file backups, the sequence of log backups must extend from the start of a full set of file backups. For more information, see Apply Transaction Log Backups (SQL Server).

However, you shouldn’t be regularly shrinking your log files anyway. You should find a size where it never needs to autogrow and leave it at that size.
http://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files/
That article is primarily about shrinking data files, but includes this: “…shrinking the log should be a rare operation and should not be part of any regular maintenance you perform.” Presumably the reason that you’re shrinking the log file regularly is that you’ve got regular autogrowth happening, which is almost guaranteed to introduce fragmentation into the file.
https://support.microsoft.com/en-us/kb/315512
From that link: “Physical fragmentation from changing the size of the data or log files can have a severe affect on your performance. This is true whether you use the automatic settings or whether you manually grow and shrink the files frequently.”
So, in summary:

  • To allow your log backups to run without error, leave the database in full recovery mode.
  • Don’t shrink your log (or data) files as part of regular maintenance.
  • Pre-size your log file, leaving autogrowth turned on as a contingency.

POSTED BY DAN COSTELLO

Q: How do I refresh the bookshelf in the Skillpipe iOS app?

A: The question is, essentially: “I am using the Skillpipe Reader app for iOS on my iPad, and I have added a new book to my online ‘bookshelf’, but it doesn’t show up on the iPad. How do I get it to show up?”
This is obviously a pretty specific question, but someone asked it and I couldn’t find an answer anywhere online, so I’m putting it here in an effort to save someone else a little trouble. Also, honestly, because the answer was so surprising.
I wrote to Arvato, the company that makes Skillpipe. This was their reply (copied and pasted, i.e. all grammar and spelling is verbatim):

“Thank you for your e-mail regarding Skillpipe for iOS.
Please note that our responsible team is currently working on resolving
the issue with the refreshing the Skillpipe App for iOS.
In the mean time as work around please ask the student to re-install the
app.
That will force the app to refresh.
We since apologize for inconvenience.”

Got that? To refresh the contents of the bookshelf, uninstall, and then reinstall, the app. Which means that you will then have to log in again and re-download all of the books you previously had downloaded.
So there you have it.

POSTED BY DAN COSTELLO

Q: How do you keep SSMS icons from being tiny in High-DPI Displays?

OK, this one’s a bit of a cheat — I wasn’t asked this question directly in class. But while working on something else I encountered this problem in my own environment, which is Parallels Desktop on a Mac Powerbook with a retina display, and the solution was so arcane that I just had to share it here in case it helps someone else:
SSMS in High-DPI Displays: How to Stop the Madness – SQLServerCentral
The problem is basically that SSMS doesn’t work well with the operating system when it comes to scaling UI components, and the solution is to instruct it to use an “older” mechanism for drawing the UI. Specifically, it draws the UI in a buffer then scales it to the display and dumps it to the screen…

POSTED BY DAN COSTELLO

Q: How do I make sure I have all of the correct SharePoint 2013 service packs and cumulative updates installed?

The process of patching a newly installed SharePoint 2013 farm is very nicely outlined here:
https://blog.imason.com/fully-patch-sharepoint-2013-with-sp1/
That article is dated, of course, but still relevant, you just have to make sure you get the most recent Cumulative Update:
https://technet.microsoft.com/en-us/library/dn789211%28v=office.14%29.aspx#BKMK_2013

POSTED BY DAN COSTELLO

Leave a Reply

Your email address will not be published. Required fields are marked *