Thursday, August 17, 2006 5:10 PM
by
slkblog
How do you "unconfigure" SLK?
Posted By: Eric Ledoux, SLK Development Manager
SharePoint Learning Kit provides a user interface, integrated into SharePoint Central Administration, for configuring a SharePoint site collection for use with SLK. The association between a site collection and SLK data is called a "SLK mapping". (In the SLK software development kit (SDK), it's called a "SlkSPSiteMapping". "SPSite" is SharePoint's internal term for "site collection", which is a set of SharePoint Web sites.)
A SLK mapping consists of the following information:
-
The GUID (globally unique identifier) of the SharePoint site collection.
-
The name of the SLK database, and the name of the server containing the database, that will be used to hold all assignments created in Web sites in that site collection. Multiple site collections can share the same SLK database, but a site collection can map to only one database.
-
The names of the instructor and learner permissions (e.g. "SLK Instructor" and "SLK Learner") used by that mapping. For example, when you create an assignment using the SLK UI, you'll see one checkbox for each learner with the "SLK Learner" permission.
SLK mappings are stored in the SharePoint configuration database when you use the "Configure SharePoint Learning Kit" page in SharePoint Central Administration.
Question: How do you remove a mapping? How do you "unconfigure" SLK?
You may think that uninstalling SLK (i.e. "retracting" and "deleting" the SharePointLearningKit.wsp solution) will remove mappings, but that's not the case. (That's a good thing—it means you can upgrade to a new version of SLK software without losing your assignments, assuming the new version is compatible.)
You may think that deleting the SLK database will remove mappings. That won't work either, since the mappings are stored in SharePoint's configuration database, not the SLK database.
The easiest way to remove a mapping is to use the "slkadm.exe" console (command-line) application provided with SLK. This tool is modeled after "stsadm.exe", a console application included with SharePoint as a way to configure SharePoint from the command line or from batch files. slkadm.exe is included in the SLK-Install-1.0.nnn-ENU.zip file (where nnn is the build number).
Here's an example of a simple use of slkadm.exe within a Command Prompt window on a SharePoint front-end server. Yellow text is what I typed. (This example assumes you've copied the contents of SLK-Install-1.0.nnn-ENU.zip to C:\Install, and you've installed SLK.)
|
C:\Install>slkadm -o enummappings http://ericle1/districts/bellevue (696119ae-dd2f-42fb-b1c2-f57cef818553) --> Server=ERICLE1;Database=SharePointLearningKit http://ericle1 (936ca441-9a5a-4cbb-b772-185d011fba5c) --> Server=ERICLE1;Database=SharePointLearningKit
C:\Install> |
Above, "-o enummappings" means "perform the operation: enumerate mappings". The output from slkadm.exe is the list of mappings that are currently on my machine. In the example above, there are two mappings:
- The SharePoint site collection "http://ericle1/districts/bellevue", which has a GUID of 696119ae-dd2f-42fb-b1c2-f57cef818553, is mapped to the SLK database named "SharePointLearningKit" on the server named "ERICLE1". (In this case, the front-end server, "ericle1", is the same as the database server.)
- The SharePoint site collection "http://ericle1", which has a GUID of 936ca441-9a5a-4cbb-b772-185d011fba5c, is mapped to the same SLK database as the first mapping.
These two mappings were created by me using the Configure SharePoint Learning Kit page (in SharePoint Central Administration) twice: once to configure "http://ericle1/districts/bellevue" and once to configure "http://ericle1".
Suppose I want to delete the second mapping. Here's what I'd do:
|
C:\Install>slkadm -o deletemapping -guid 936ca441-9a5a-4cbb-b772-185d011fba5c SLK mapping deleted for SPSite GUID 936ca441-9a5a-4cbb-b772-185d011fba5c
C:\Install> |
I can verify it's deleted as follows:
|
C:\Install>slkadm -o enummappings http://ericle1/districts/bellevue (696119ae-dd2f-42fb-b1c2-f57cef818553) --> Server=ERICLE1;Database=SharePointLearningKit
C:\Install> |
As you can see, the only mapping left is the first one.
Keep in mind that removing a mapping does not delete the SLK database or any information in that database associated with that site collection. Currently there's no one-step way to delete all information in a SLK database associated with a given site collection. It wouldn't be that hard, though—e.g. a batch file with a bunch of calls to sqlcmd that delete rows from various tables given a SPSite GUID. Perhaps that can be a subject of a future blog posting...
By the way, slkadm.exe does more than just manage SLK mappings. It can also be used to configure SLK and upload a SLK Settings file from the command line or a batch file. But that, too, is another story...