This is not new but it’s oft forgotten…

This is not new but it’s oft forgotten…
This process makes assumptions that the SharePoint environment is in a very exact state. Specifically that:
• All databases other the one currently being used for new MySites are in an offline state and that there is only ever one Web Application available.• There is a defined business need for a series of smaller databases rather than one large and potentially unwieldy one.
When a database in SharePoint is in an offline state it is not in an inaccessible mode but rather it is not viewed as a tenable location by the process that creates new site collections. Instead SharePoint will look at the delta on the current number of sites value versus the set maximum in any and all other open Content Databases and select the one with the greatest value.
To set a content database status to offline:
1. Go to “Central Administration > Application Management > Content Databases”
2. Then click on the database of your choice set it to “Offline”
To create a new database for every new site collection the following steps need be followed.
1. Create a new content database.
a. Start the SharePoint Central Administration Web site.
b. On the Application Management page, in the SharePoint Web Application Management section, click Content databases.
c. On the Manage Content Databases page, click Add a content database.
d. On the Add Content Database page:
e. Select a Web application for the new database.
f. Select a database server to host the new database.
g. Specify the authentication method the new database will use and supply an account name and password if necessary.
h. Specify both the total number of top-level sites that can be created in the database and the number at which a warning will be issued.
i. Click OK.
2. Create the new Site Collection.
3. Set the newly created content database status to Offline.
4. View the contents of the new content database to confirm that it only contains what it should. (In theory a new My Site could be in there.)
It is important to confirm that this new database is appropriately accounted for by backup and DBA maintenance routines.
If a site collection was errantly created during the period that the new content database was online it can be moved as follows:
1. Run the following stsadm command, to get a list of all the sites in the web application
Stsadm -o enumsites -url <URL> > <path/file name>.xml
Where:
• <URL> is the address of the Web application that contains the site collection that you want to move,and
• <path/file name> is the name of the XML file that you want to create with the site collection data.
(Example: stsadm -o enumsites -url http://localhost > c:Sites.XML)
Open the XML file that you created in a text editing application. If there are any URLs for site collections that you do not want to move, be sure to delete them from the file. The only URLs that should remain in the XML file should be for the site collections that you want to move.
Note: There is no need to change the site count or any of the other site collection information in the file. Only the URLs are relevant to this procedure.
2. Run the following stsadm command:
Stsadm -o mergecontentdbs -url <URL> -sourcedatabasename <database name> -destinationdatabasename <destination database name> -operation 3 -filename <file name>
Where:
• <URL> is the address of the Web application that contains the site collection that you want;
• <database name> is the name of the database that you want to move the site collection from; and
• <destination database name> is the name of the database that you want to move the site collection to;
• operation 3 is the “Read from file” operation; and
• <file name> is the name of the file that you created in step 4.
(Example: stsadm -o mergecontentdbs -url http://localhost -sourcedatabasename WSS_Content -destinationdatabasename WSS_Content2 -operation 3 -filename c:Sites.xml)
Note: This step assumes that all of the sites in the Sites.xml file where in the source database name. If the sites are located in multiple databases you may need to repeat these steps for each source Content Database.
3. Restart IIS by typing the following command, and then pressing ENTER: iisreset /noforce.
Sometimes you need to tightly control profile pictures in MOSS / SharePoint 2007. An easy way to do this if your pictures have the right naming convention is as follow.
Display Column Type |
Internal Column Type |
Single line of text |
Text |
Multiple lines of text |
Note |
Choice |
Choice |
Number |
Number |
Currency |
Currency |
Date and Time |
DateTime |
Lookup |
Lookup |
Yes/No |
Boolean |
Person or Group |
User |
Hyperlink or Picture |
URL |
Calculated |
Calculated |
Anybody who works with SharePoint has seen the following “Awesome” message…
An unexpected error has occurred
There’s more detail to be had with a simple tweak of the web.config in both MOSS SharePoint 2007 and SP2010.
Navigate to your virtualdirectory, typically here: c:inetpubwwwrootwssVirtualDirectories and then to the folder for your web application.
Opening the web.config in Notepad++ or any other editor and search for the following tags (there is only one of each):
Note: change them to the below:
You can hide this particular link from all but those users with full control over a WSS site rather easily.
Get to the field in the view and put this in. Should work without a hitch… The usual change from “<" to "< " has been made.
< name="SharePoint:AttachmentsField">
< name="runat">server< /xsl:attribute>
< name="ListId">
{LIST GUID HERE}
< /xsl:attribute>
< name="FieldName">Attachments< /xsl:attribute>
< name="ControlMode">Display< /xsl:attribute>
< name="Visible">true< /xsl:attribute>
< name="ItemId">
< select="@ID">
< /xsl:attribute>
< /xsl:element>
Displaying RSS feeds is a nice thing to be able to do. One way to do this is with JavaScript in a Content Editor Webpart. Code example below… As usual “<" has been replaced with "< ". < id="feed-control">
< style="color:#676767;font-size:11px;margin:10px;padding:4px;">Loading…< /span>
< /div>
< !-- Google Ajax Api -->
< src="http://www.google.com/jsapi?key=notsupplied-wizard" type="text/javascript">< /script>
< !-- Dynamic Feed Control and Stylesheet -->
< src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript">< /script>
< type="text/css">
@import url(“http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.css”);
< /style>
< type="text/javascript">
function LoadDynamicFeedControl() {
var feeds = [
{title: ‘Feed Items’,
url: ‘http://coreboarder.blogspot.com/feeds/posts/default?alt=rss’
}];
var options = {
stacked : true,
horizontal : false,
title : “Preview”
}
new GFdynamicFeedControl(feeds, ‘feed-control’, options);
}
// Load the feeds API and set the onload callback.
google.load(‘feeds’, ‘1’);
google.setOnLoadCallback(LoadDynamicFeedControl);
< /script>
Sometimes things go wrong with the SSP (life without it in SharePoint 2010 shall be interesting…) If you have one that will not delete, gets stuck in an “unprovisioning state”, cannot be opened or similar try this extra flag:
“Stsadm -o deletessp -title SSPNAME -force“.
The -force will normally delete the entry even if there are errors occurring.
Normally.
IF you’ve worked with SharePoint for any amount of time you know that is not always the word one would use to describe your experiences. Sometimes that command just does not work and you end up with a lingering SSP. To resolve you need to identify the GUID for the problem SSP and use STSADM -o deleteconfigurationobject -id “id retrieved from object table” to remove this/these item/s from the configuration database.
What’s the GUID? Use the following procedure to identify the Shared Services GUID:
A2B1EC50-7134-40D1-9D97-0D54E129AE70 1AAB936C-E65C-4829-9683-5CCF5BAB90B0 3ACD71A5-B35A-44F1-B524-F90FFEA1AACE SharedServices1_Search_DB
7BB6D64A-E954-4E55-B7CE-15F9AA071748 FB6E9959-5209-44FB-83A4-0A51C31F7A02 3ACD71A5-B35A-44F1-B524-F90FFEA1AACE SharedServices2_DB
A9013685-0830-43A9-925A-7875A10DDA82 9D95E78B-FA6F-4349-AD9A-43BD3EF44E99 43DAD086-2C32-4ECF-B545-9FC63D80698B SharedServices2