Monday, July 30, 2012

Implementing Remote BLOB Storage

1: Enable the FILESTREAM Provider

2: Provision a BLOB Store with the FILESTREAM Provider

3: Enable and Verify RBS

 

 

1: Enable the FILESTREAM Provider

In this task, you enable and configure the FILESTREAM RBS provider for SQL Server 2008 R2.

1. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, point to Configuration Tools, and then click SQL Server Configuration Manager.

2. In the list of services, right-click SQL Server Services, and then click Open.

3. In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.

4. Right-click the instance and then click Properties.

5. In the SQL Server Properties dialog box, click the FILESTREAM tab.

6. Select the Enable FILESTREAM for Transact-SQL access check box.

7. Click Apply, and then click OK.

8. On the Start menu, point to All Programs, point to Microsoft SQL Server 2008 R2, and then click SQL Server Management Studio.

9. In SQL Server Management Studio, select the database for which you want to enable FILESTREAM and then click New Query to display the Query Editor.

10. In Query Editor, enter the following statements:

EXECsp_configurefilestream_access_level, 2

RECONFIGURE

11. Click Execute.

 

2: Provision a BLOB Store with the FILESTREAM Provider

1. Click Start, click All Programs, click Microsoft SQL Server 2008R2, and then click SQL Server Management Studio.

2. Enter the local server name and administrator credentials.

3. Expand Databases.

4. Select the “database you chose before” and then click New Query.

5. In the Query pane, execute each of the following statements in sequence:

use”Database name”

if not exists (select * from sys.symmetric_keys where name = N'##MS_DatabaseMasterKey##')create master key encryption by password = N'Admin Key Password !2#4'

use”Database name”

if not exists (select groupname from sysfilegroups where groupname=N'RBSFilestreamProvider')alter database ”Database name” add filegroupRBSFilestreamProvider contains filestream

use”Database name”

alter database ”Database name” add file (name = RBSFilestreamFile, filename = 'c:\Blobstore') to filegroupRBSFilestreamProvider

 

3: Enable and Verify RBS

In this task, you use PowerShell to enable RBS in SharePoint 2010, upload a file into a document library, and confirm that the RBS provider stores the file on the file system as specified.

1. On the Start menu, click Programs, click Microsoft SharePoint 2010 Products, and then click SharePoint 2010 Management Shell.

2. At the Windows PowerShell command prompt, type each of the following commands in sequence:

$cdb = Get-SPContentDatabase –WebApplication “your web application URL”

$rbss = $cdb.RemoteBlobStorageSettings

$rbss.Installed()

$rbss.Enable()

$rbss.SetActiveProviderName($rbss.GetProviderNames()[0])

$rbss

3. Browse to your web application URL, select Shared Documents, click the Documents option in the Ribbon, and then click Upload Document.

4. Select a Word file from your computer, and then click OK.

5. In Windows Explorer, browse to the c:\Blobstore directory, open the folder with the most recent modified date, and validate that the added Word fi

le file exists in the folder.

Thursday, July 26, 2012

Implementing an Image Library

1: Create Custom Media Content Types

2: Create and Configure an Assets Library

3: Configure Metadata Navigation

4: Add Image Assets to the Library

5: Configure the Preview Pane Metadata

 

1: Create Custom Media Content Types

Open your home page in Internet Explorer

1. Select Site Settings from the Site Actions control located in the upper left corner of the page.

clip_image001

clip_image003

2. In the Galleries section, click Site content types.

clip_image004

3. Click the Create link to create a new Content Type.

clip_image006

4. Enter Product Marketing Image in the Name text box.

5. Select Digital Asset Content Types in the Select parent content type from the drop-down.

6. Select Image as the Parent Content Type.

7. Click OK.

clip_image008

8. Click the Add from New Site Column link.

clip_image010

9. Enter Media Format in the Column name text box.

10. Select Choice for the type of field.

11. Create two choices for the field: Web and Print.

clip_image012

12. Click OK.

13. Click Add from Existing Site Columns link.

clip_image014

14. Add Product Category from the Available columns list box to the Columns to add list box.

clip_image016

15. Click OK.

16. From the Site Actions control, select Site Settings.

17. In the Galleries section, click Site content types links.

18. Click the Create link to create a new Content Type.

19. In the Name text box, enter Project Marketing Image.

20. In the Select Parent Content Type drop-down, select Digital Asset Content Types.

21. Select Image as the Parent content type.

22. Click OK.

23. Click the Add from Existing Site Columns link.

24. Add Media Format from the Available columns list box to the Columns to add the list box.

25. Add Project from the Available columns list box to the Columns to add the list box.

26. Click OK.

 

2: Create and Configure an Assets Library

1. Open your home page in Internet Explorer

2. From the Site Actions control, select More Options.

clip_image002

3. Select Asset Library and enter a name of Marketing Images; then, click Create.

4. Click the Library tab on the Ribbon.

clip_image003

5. Click the Library Settings Ribbon button.

clip_image005

6. Click the Add from Existing Content Types link.

clip_image007

7. Add the Product Marketing and Project Marketing content type to the Content types to add list box.

clip_image009

8. Click OK.

 

3: Configure Metadata Navigation

1. Open the existing Marketing Image library

2. Click the Library tab on the Ribbon.

3. Click the Library Settings Ribbon button.

4. Click the Metadata Navigation Settings link.

clip_image001[4]

5. In the Selected Hierarchy Fields list box, remove the existing Folders option.

6. Select Product Category and Project; then, click Add to add to the Selected Hierarchy Fields list box.

clip_image003[4]

7. Select Media Format from the Available Key Filter Fields; click Add to add to the Selected Key Filter Fields list box.

clip_image005[4]

8. Verify Automatically Manage Column Indices on This List is selected.

clip_image007[4]

9. Click OK.

 

4: Add Image Assets to the Library

Add some images to the Asset library

 

5: Configure the Preview Pane Metadata

1. Open the existing Marketing Image library

2. Click the Library tab on the Ribbon.

3. Click Modify View in the Manage Views section of the Ribbon.

clip_image002[4]

4. Select Media Format column to add the column to the view.

5. Uncheck the Modified, Modified By, Scheduling Start Date, Scheduling End Date columns to remove from the view.

clip_image004

6. Click OK.

7. Hover over a thumbnail image in the view.

Verify the Preview Pane includes the correct metadata

Wednesday, July 25, 2012

Create a Keyword and a Best Bet

Keywords and Best Bets are manually configured by a site collection administrator and are a great way to target important information in your search results. When a user enters a keyword into the search box, the Best Bets are displayed as part of the search results at the top of the page marked by a yellow starclip_image001.

 

Create a New Keyword

1. In your browser, navigate to your home page of your site.

2. Click Site Actions, and then click Site Settings.

3. In the Site Collection Administration section, click the Search Keywords link.

4. In the Manage Keywords page, click the Add Keyword link.

5. In the Add Keyword page, in the Keyword Information section, enter for example tasks into the Keyword Phrase text box.

 

Create an Asssociated Best Bet for the Keyword

1. In the Add Keyword page, in the Best Bets section, click the Add Best Bet link.

2. In the Add Best Bet dialog, enter:  your website/lists/tasks/allitems.aspx in the URL text box

3. Enter in (for example) Team Tasks in the Title text box.

4. Click the OK button, and then click the OK button in the Add Keyword page.

You should now see your keyword show in the list on the Manage Keywords page.

 

See How the Best Bet Impacts Search

When a user enters a keyword into the search box, the Best Bets are displayed as part of the search results at the top of the page marked by a yellow starclip_image001[4]. Putting the Best Bet at the top of the search results ensures the user will find the document for the given keyword.

 

Execute a Keyword Search and Check the Best Bets

1. In your browser, navigate to the home page of your site:

2. Enter the word tasks into the Search text box, and then click the Magnifying Glass to execute a search.

3. Observe that Team Tasks shows up at the top of the search results with a link to the URL of the page.

Tuesday, July 24, 2012

Create a Managed Property & Use it in the Refinement Panel Web Part

The managed property can be used to help users filter search results to make it easier for them to identify relevant content.

 

Create a New Managed Property

1. Navigate to Central Administration.

2. Under Application Management, click the Manage Service Applications link.

clip_image002

3. Click the Search Service Application link.

4. In the left navigation panel, click the Metadata Properties link.

5. At the top of the page, click the New Managed Property link

image

6. In the Name and Type section, type DocumentType in the Property name text box.

7. In the Mappings to Crawled Properties section, click the Add Mapping button.

8. In the Crawled Property Selection dialog, type ows_contenttype in the Crawled     Property Name text box, and then click the Find button.

image

9. In the Select Crawled Property list, select the ows_contenttype (Text) crawled property, and then click the OK button.

10. Check the Include values from a single crawled property based on the order specified option.

11. In the Optimize Managed Property Storage section, check the Reduce storage requirements for text properties by using a hash for comparison option.

12. Click the OK button to finish.

 

Start a Full Crawl on the Content Source

1. Click the Content Sources link in the left navigation panel.

2. Hover your mouse above the Local SharePoint sites and click the drop-down arrow.

clip_image001

3. In the context menu, click Start Full Crawl.

After the full crawl is completed, the new managed property can be used in the Refinement Panel Web Part

Note: Any time a managed property is created or changed, a full crawl must be executed to ensure that the managed property is applied consistently across all the content sources.

 

Issue an IISReset

1. In the Start menu, click Run.

2. In the open text box, type cmd.

3. At the command prompt, type IISReset and wait for the window to close.

Note: This is to refresh the managed properties cache.

 

Use a Managed Property in the Refinement Panel Web Part

The managed property can be added to the Refinement Web Part to help users filter search results. We start by adding a new refinement category to the web part. This is accomplished by creating and modifying XML and adding it to the Refinement Web Part’s configuration. When this is done, you will do a search and filter the results using the new managed property. You will observe how this can help users find what they are searching for.

1. Navigate to the search results page and open the Refinement Panel Web Part for editing.

2. Create and modify XML to add a new filter to the Refinement Panel Web Part.

3. Execute a search and use the new category filter.

 

Navigate to the Search Results Page and Open the Refinement Web Part for Editing

Navigate to your Enterprise Search Center Site

On the Site Actions menu, click Edit Page

1. In the Refinement Panel Web Part, hover your mouse over the upper right corner until a blue drop- down arrow displays. Click the drop-down arrow to display the Web Part menu, and then Edit Web Part. This opens the Web Part tool pane.

clip_image002[4]

In the Refinement section, clear the Use Default Configuration check box.

 

Create and modify xml to add a new filter to the Refinement Panel Web Part.

In the Refinement section, click on the Filter Category Definition textbox, and then click the ellipsis (…) button for the Filter Category Definition field. This opens the Text Entry window for the Refinement Panel Web Part’s Filter CategoriesDefinition property

image

Next, insert the XML snippet at the place noted in the previous illustration. This represents the new filter category using the managed property you created before.

Category Xml:

<Category Title="Document Types" Description="Different types of documents" Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator" MetadataThreshold="5" NumberOfFiltersToDisplay="4" MaxNumberOfFilters="20" SortBy="Frequency" SortByForMoreFilters="Name" SortDirection="Descending" SortDirectionForMoreFilters="Ascending" ShowMoreLink="True" MappedProperty="DocumentType" MoreLinkText="show more" LessLinkText="show fewer" />

Note: The Title attribute will be the title displayed for the category in the Refinement Panel. The MappedProperty attribute is the managed property you created.

Click the OK button of the Text Entry window.

Click the OK button of the Refinement Panel Web Part’s tool pane.

In the Page section of the Ribbon, click the Save & Close button.

 

Execute a Search and Use the New Category Filter

In your browser, navigate to your home page of your site URL:

In the search box, on the home page, type Document.

Click the Magnifying Glass icon to execute a search.

In the search results page, the Refinement Panel displays on the left. Click a different Document Types category, specifically Wiki Page.

Observe that when you click on a Document Type category, the search results are filtered to show just results of that category. This helps the user narrow the results, making easier to browse.

Tuesday, July 17, 2012

Multilingual term sets (SharePoint Server 2010)

 

Microsoft SharePoint Server 2010 lets you define and use managed metadata in multiple languages. This is done by distinguishing the term itself from the words that represent the term.

A label is a word or a phrase that represents a term. A term can have multiple labels. For example, a term set that represents the days of the week would contain seven terms. One term might have the labels “Sunday”, “dimanche”, and “domingo”. Regardless of which label a person uses when applying the term to an item, SharePoint Server recognizes it as the same term. You can configure SharePoint Server to use the label that is appropriate for the language in which a user views the site when it displays terms.

 

Defining Terms

Before you can define term sets in multiple languages, you must perform the following actions:

  1. Install the SharePoint Server language pack for each language that you want to support.

The language packs can be downloaded from here. The language of your choice can be selected before downloading the pack. Once the installer is over, it would automatically open the SharePoint configuration wizard again. The config wizard should run in its default settings.

  1. From the Term Store Management Tool, add each language to the list of working languages for the term store.
  2. Select one language to be the default language for the term store.

In each language, you can associate multiple labels with a term. One label in each language is the default label for the language. Use the other labels for synonyms or abbreviations.

Within the Term Store Management Tool you can display the hierarchy of term sets and terms in any of the working languages. If a term does not have a label in the display language, the label in the default language of the term store is displayed. Term sets can also have a name in each language. If there is no name for the term set in the display language, the name in the default language is displayed.

By default, the terms in a term set are sorted according to the default sort order for the language. In many languages, this is alphabetical order. Using the default sort order often makes it easier for the user to find the correct term. However, in some cases there is a more appropriate order for the term set that is independent of language. A term set that represents clothingsizes is an example of a case in which using the default sort order for the language would not necessarily be natural. In these cases, you can specify a custom sort order for the term set. The custom sort order is used for all languages.

 

Using Terms (Tagging)

If SharePoint Server language packs are installed on the server, a farm administrator must specify a default language when creating a site collection. The site collection owner can then specify additional languages that the site collection will support. If a site collection supports multiple languages, users can change the display language when they browse to any page in the site collection. When a user changes the display language of a page, the new display language becomes the user's preferred language for the whole site collection.

Note:

Because the preferred language is stored in a cookie, the preferred language is associated with the user's computer. If a user views a site collection from multiple computers, the user may have a different preferred language on each computer.

When a user enters a term (for example, to provide a value for a managed metadata column that is bound to a term set), the user is presented with a list of options. These options are the labels in the user's preferred language for the terms in the term set. When a user types an enterprise keyword (for example, to add a social tag to a Web page), the suggestions that are displayed are the terms whose labels in the user's preferred language match what the user has typed. When a user enters a term or an enterprise keyword, if no label exists in the user's preferred language, the label in the default language for the term store is used.

When a user selects a term, instead of recording the label, SharePoint Server records an identifier that represents the term, and the language in which the term was selected. Because SharePoint Server does not simply record the label that a user selected, it can identify terms regardless of the language in which the terms were entered.

 

How the Terms are displayed

For each site collection, SharePoint Server maintains a cache of all of the terms that can be used within the site collection. Each entry in the cache contains:

· The identifier of the term.

· The text to display for the term in each language that is supported by the term store. For each language, the text is either:

· The default label of the term in the language, if such a label exists, or

· The default label of the term in the term store's default language, if a label does not exist in the language.

When displaying a term, SharePoint Server uses the term's identifier and the user's preferred language to obtain the text to display from the cache.

Note:

When a user enters a term, SharePoint Server uses the term store to display suggested terms and to validate the user's entry. SharePoint Server uses the cache only to display the terms that have been added to items.

Because SharePoint Server uses an identifier for a term, instead of a label, it can support the following multilingual scenarios:

· SharePoint Server displays terms in the user's preferred language, regardless of the language in which the term was entered.

· Tag clouds reflect the use of a term, regardless of the language in which the term was entered.

Changes made to the term store are propagated to each site collection's cache under the control of a timer job. There might be a delay between updating a term's label and the new label being displayed on the pages of a site collection.

 

Recommendations

As you plan how your SharePoint Server solution will use managed metadata in multiple languages, consider the following suggestions:

· If your SharePoint Server solution requires managed metadata in multiple languages, use the functionality described in this article. It is usually simpler to have a single term set that represents a concept, and then define labels for the terms in the term set in multiple languages, than to create a separate term set for each language.

· If you add a new working language to a term store, do so during a period when your SharePoint Server solution is not heavily used, such as at night. When you add a new working language, the next time that the timer job runs, SharePoint Server updates each site collection's cache and adds the text to display in the new language to every term in the cache. This may affect performance temporarily.

· Although you can import term sets, you can only import one label for each term. If you do not want to define labels in each language by using the Term Store Management Tool, consider using another program such as Microsoft Excel to create a file that contains the terms and term sets, and writing a custom program to import the data into the term store. For more information about how to write a custom program that manipulates managed metadata, see the SharePoint 2010 SDK (http://go.microsoft.com/fwlink/p/?LinkId=190760&clcid=0x409).

· If your solution includes more than one term store, consider making each term store support the same set of working languages.

 

For more detailed information, check:

 

Nothing but SharePoint

1. Install Language Pack

Ask your IT Pro to install the language packs on your farm. The language packs can be downloadedfrom here. The language of your choice can be selected before downloading the pack. Once the installer is over, it would automatically open the SharePoint configuration wizard again. The config wizard should run in its default settings.

For demo purposes I am using the Dutch language pack on Server 2008 OS. Unlike Server 2008, on Windows 7 you need to individually download the OS language files (Grr…? Check Google on how to download these for win 7. Otherwise I strongly suggest using Server OS, see my article for this.)

2. Create Managed Metadata Service

In Central Admin > Application Management> Manage Service Applications

o Create a new managed metadata service instance if it is not already created. Name it Metadata Service.

Mulit Lingual Metadata

Mulit Lingual Metadata

Mulit Lingual Metadata

Note that while creating this service instance, you can configure a centralized location where all the content types will be syndicated. Go ahead and mention the full path of that site collection where you would like to store all the content types of your organization. For ease of demo I suggest using the same path as in the image above.

o Once the service is created a new entry will be added to the Service Application page. Click on the empty space before the text ‘Managed Metadata Service connection’ (don’t click on the service name, it would open the entry). This will select the particular row. Once selected click on ‘Properties’ in the ribbon above. A new modal box will open. Go ahead and make sure the box‘Consume Content Types from …’ is selected.

Mulit Lingual Metadata

o Once done, go to the service application page and click on the service instance link. It will take you to the screen below…

Mulit Lingual Metadata

In the Working languages box select Dutch. This will enable us to specify different language texts for every metadata terms ( i.e. Dutch names for Monday, Tuesday…etc)

o Start creating the Term Store, Term Group and Term… (FYI, each Term Store can have, at the max, 1 million terms. Every Term Group can hold 1000 Term sets and there can be 1000 terms per Term set.)

Mulit Lingual Metadata

For Term group you can specify the Group Managers as well as the contributors for terms in this group. This is called Taxonomy. Only selected people can contribute to the terms in the group. The cousin of Taxonomy is Folksonomy wherein every user can contribute ( i.e. something like ‘Like’ and ‘Dislike’ on YouTube). Folksonomy can be enabled by selecting ‘Submission Policy’ to open while creating the term set as shown in the figure below.

Mulit Lingual Metadata

o Next comes the Terms, the actual values which shall be used while tagging the contents. While creating the Terms you can also specify the Synonymous. Therefore, in case a user falsely types in ‘Mon’ or ‘Mond’, SharePoint will automatically set it to correct to 'Monday'.

Mulit Lingual Metadata

o Configure the terms in Dutch

Ok now comes the interesting part. To satisfy the manger’s requirement for being able to create a Content type which was created in theU.S. to be used in the Brussels office, we need to provide the Dutch equivalent of days …

Go back to the Terms on the left panel and select one. Notice that the right hand side of the window has a language drop down. Select Dutch and provide the Dutch for Monday in the Label field as shown in the figure below

Mulit Lingual Metadata

Go ahead and provide the labels for each day. For demo I am using two days in a week.. Monday and Tuesday as terms ( yes I know…I am lazy )

3. Content type Syndication

Let’s now go to our Content type hub and create a content type in which one of the columns will contain the information about the day of the week. Unlike the previous version of SharePoint, there is a metadata column now available which will pull the information from the instance of the Metadata service we created in step 2.

Open the browser and go to the site collection specified as hub in figure 2.

Create a new content type ‘Day Of Weak ContentType

Mulit Lingual Metadata

o Add a new column to this content type by clicking the ‘Add from new site column’ link on the settings page. Name the column as ‘Day Name’ and set it to type Metadata.

Mulit Lingual Metadata

Mulit Lingual Metadata

For the possible value of this column, select the Term Group

Mulit Lingual Metadata

o Publish content type

Go to the Content Type settings and click on ‘Manage Publishing for this content type’.

Mulit Lingual Metadata

This will take you to another screen as shown below. Select Publish and press enter.

Mulit Lingual Metadata

Note: If you do not see this link in the setting, please activate the ‘Content Type Syndication Hub’ feature in the site collection feature gallery

Mulit Lingual Metadata

4.Create consuming Site Collection

With the meat of the work past us, now is the time to satiate ourselves with this splendid feature.

Create a new site collection from the Central Admin. In the site collection screen select “Dutch” as the language (so that day names should appear in Dutch and not English)

Mulit Lingual Metadata

Go to the site content type gallery and you will find the Days Of Week content type listed. You can modify the content type if you wish, but the changes won’t be reflected back to the hub.

Note: There are two scheduled jobs which a) published the content type from hub and b) pushed these published content types to the consuming site collection. In case you do not find the new content type in the consuming site collection, go to Central Admin > Monitoring > Review Job Status and run the Content Type hub and Content Type subscriber jobs. You may need to wait for half an hour before the jobs are executed and the content type appears in the consuming site collection

Mulit Lingual Metadata

Create a new list and add the content type to the list. (Make sure you have enabled Allow content Type checkbox in the Advanced Settings link of the page for add content type to be enabled in the content settings page.)

Mulit Lingual Metadata

Now the real thing…go ahead create a new item in the list and you can see the metadata column showing the predefined days name in Dutch…

Mulit Lingual Metadata

Mulit Lingual Metadata

Caveat

Although the content type and metadata are available in a centralized location that does not mean each and every site content type/metadata should be defined there. The rule of thumb is to create only those items in the centralized hub which are to be used all across the organization’s IT footprint or at least which shall be used in more than one site collection.

For example, for a marketing site of an organization to syndicate a marketing content type and corresponding metadata is not really a good choice since it won’t be used anywhere... Just create the metadata/content type inside the site collection itself….

Monday, July 9, 2012

Restore content DBs to another SQL server

 

1) Find the content Database

Open SharePoint Central Admin->Application Management->Site Collection List

2) Backup the content database


You could alternatively detach it, and copy it. Just doing a backup in SQL Server 2005/2008 Management studio is easier.

3) Restore content database to new server
Copy the BAK file to new server. Create an empty DB in Management Studio, restore from backup, you may need to change an option in the “options” tab of the restore dialog to get it to work. (Overwrite db).

4) Create Web App on new Server

Central Admin->Application Management->Create or extend Web App->Create New Web App.

5) Associate restored DB with new Web App


Open SharePoint Central Admin->Application Management->SharePoint Web Application Management->Content Databases->Remove Content Database from your new web app.

Now use STSADM to add restored DB to this web app

c:\program files\common files\microsoft shared\web server extentions\12(14)\bin on new server is where you can find the STSADM.

run this command from there.
stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb -databaseserver yoursqlserver

6) Run ISSRESET from command prompt

Move SharePoint to another SQL Server

 

  1. Stop any processes that might be accessing your SharePoint databases
  2. Back up all your SharePoint databases on SQL A.
  3. Restore them on SQL B.
  4. Set up a SQL alias on SharePoint that points SQL A to SQL B

Stop any processes that might be accessing your SharePoint databases

Open services.msc and stop:

· SharePoint 2010 Administration

· SharePoint 2010 Timer

· SharePoint Server Search 14

· SharePoint Tracing

· World Wide Web Publishing Service

Check your actual database server in Central Admin and be sure that you are using a SQL alias.

(a SQL alias can be made by using the CLICONFG-command)

clip_image002

Check which databases are being used by SharePoint within Central Admin

clip_image003

Backup all these databases on SQL server A (SQLCluster) with SQL Management Studio

Put all databases on Offline after making the SQL Backup

Copy all BAK-files (SQL Backup files) to the new SQL server

Set up a SQL alias on SharePoint that points SQL A to SQL B (Start-Run-cliconfg)

clip_image004

Enter the same SQL Server alias but change the connection parameters to the new servername\instancename