Truncate and shrink Transaction Log file in SQL Server 2008 for SharePoint

Most users always suggest to detach and re-attach DB to remove the log file when dealing with large Transaction log file. There is one proper way to truncate the transaction log file to certain size. Here are the sample steps to truncate SQL Log file:

Truncate the log by changing the database recovery model to SIMPLE

ALTER DATABASE []
SET RECOVERY SIMPLE;
GO

Shrink the truncated log file to 5 MB

DBCC SHRINKFILE ([_Log], 5);
GO

Reset the database recovery model.

ALTER DATABASE []
SET RECOVERY FULL;
GO

Import User Photos From Active Directory Into SharePoint 2013

Once the user photos are in AD you need to update the SharePoint user picture property  .  Open Central Administration and navigate to your User Profile Synchronization Service Application.  Click on Manage User Properties.

SPUP-1

Scroll down to the Picture property and choose Edit from the drop down menu.

SPUP-2

Scroll down to the Add New Mapping section.  Choose your AD data connection, select the thumbnailPhoto attribute and click Add, followed by OK to save the change.  This maps the SharePoint picture property to a user’s photo attribute in AD.

SPUP-3

Run a full user profile synchronization.

SPUP-4SPUP-5

Once the user synchronization has finished open the SharePoint 2013 Management Shell.  Run Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation %MySiteURL%

SPUP-6

You need to run above cmd with Farm Admin account.

once completed, the profile image will be showing in the profile

The Secrets of SharePoint Site Mailbox

The Secrets of SharePoint Site Mailbox

A site mailbox serves as a central filing cabinet, providing a place to file project emails and documents that can be only accessed and edited by site members.

It can be used from a SharePoint team site to store and organize team email. It can also be used from Outlook 2013 that ships in Office 365 ProPlus or Office Professional Plus for team email, and as a way to quickly store attachments and retrieve documents from the team site.

User will not see a site mailbox in their Outlook client unless they are an owner or member of that site mailbox.

Secret 1:  Remove Site Mailbox from outlook client

Anyone in the default owners group or the default members group for the site (anyone with Contribute permissions) can use the site mailbox from SharePoint. People can be listed in the owners or members group as individuals or as part of a security group.

There are two ways to hide the site mailbox appearing in user’s outlook

A. Managing the site mailboxes from Outlook Manually

Users can simply right click on the personal mailbox. By selecting ‘Manage All Site Mailboxes’, users will be directed to a list of all site mailboxes they have access to. They can easily pin and unpin site mailboxes to the outlook view from there.

1452.image_5F00_thumb_5F00_4D137D59

B. But if you don’t want users to see the site mailbox from the outlook at all. Here is the tip, do not add users to the default members or owners group of the SharePoint site. Create a separate SharePoint group with Edit permission and add users to the new group so that they can still access the site mailbox through the web but the mailbox will not appear on their outlook.

Secret 2: Rename an existing site mailbox

Here is another tip, what happened if users are not happy with site mailbox name appears on the Global address list? There is lots of efforts to delete the site mailbox and reassign the permission.

But here is the work around, you need to follow the steps below:

  1. In Office 365 admin center > Active users, find the site mailbox.
  2. Choose the site mailbox and edit its display name.
  3. Then go to the site with the mailbox, go to Site Settings -> Title, descitption and logo
  4. Update the Title with the new site mailbox name too

NB: if you did not update the site name, Exchange will reverse back the site mailbox name back to the site name. Smart enough, isn’t it 🙂

Dynamically Reference to the Strong Assembly in Feature Elements

 

<Control Id=”AdditionalPageHead” Sequence=”93″ ControlAssembly=”$SharePoint.Project.AssemblyFullName$” ControlClass=”RibbonCustomization” />

<Control Id=”AdditionalPageHead” Sequence=”94″ ControlAssembly=”$SharePoint.Project.AssemblyFullName$” ControlClass=”ScriptsRegistration” />

<Control Id=”AdditionalPageHead” Sequence=”95″ ControlAssembly=”$SharePoint.Project.AssemblyFullName$” ControlClass=”SomeOtherActions” />

 

e.g.

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”&gt;

<Control Id=”AdditionalPageHead” Sequence=”500″

ControlClass=”MetaTagManager”

ControlAssembly=”$SharePoint.Project.AssemblyFullName$” />

</Elements>

You can check the result element file via going to the Feature folder under “\15\TEMPLATE\FEATURES\”

Exception calling “LoadFile” with “1″ argument(s): “An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See

I see what the issue is. Rightclick ClaimsAuth.dll > properties > unblock.

Seems to be a security feature of Microsoft that blocks all downloaded DLL´s.

 

image

 

image

Automatically created managed properties in SharePoint Server 2013

How site columns become managed properties

When you add columns to a SharePoint library or list, you can choose to add regular columns or site columns.

In SharePoint Server 2013, only site columns that contain values will automatically become managed properties when they are crawled. Regular columns will not automatically become managed properties when they are crawled.

Manually request crawling and re-indexing of a site, a library or a list

In SharePoint Online, content is automatically crawled based on a defined crawl schedule. The crawler picks up content that has changed since the last crawl and updates the index. In some cases, you may want to manually request crawling and full re-indexing of a site, a document library, or a list.

Re-index a site

WARNING    Re-indexing a site can cause a massive load on the search system. Don’t re-index your site unless you’ve made changes that require all items to be re-indexed.

  1. On the site, click Settings > Site Settings.
  2. Under Search, click Search and offline availability.
  3. In the Reindex site section, click Reindex site.
  4. A warning appears, click Reindex site again to confirm. The content will be re-indexed during the next scheduled crawl.
  5. image

image

Re-index a document library or a list

  1. On the site, go to the list or library that you want to re-index.
  2. In the ribbon, click the Library tab or the List tab.
  3. In the Library ribbon, choose Library Settings,
    or,

In the List ribbon choose List Settings.

  1. On the Settings page, under General Settings, choose Advanced settings.
  2. Scroll down to Reindex Document Library or Reindex List, and click the button. The content will be re-indexed during the next scheduled crawl.

image

 

image

Re-index after changing managed properties

When people search for content on your SharePoint sites, what’s in your search index decides what they’ll find. The search index contains information from all documents and pages on your site.

The search index is built up by crawling the content on your SharePoint site. The crawler picks up content and metadata from the documents in the form of crawled properties. To get the content and metadata from the documents into the search index, the crawled properties must be mapped to managed properties. Only managed properties are kept in the index. This means that users can only search on managed properties.

When you have changed a managed property, or when you have changed the mapping of crawled and managed properties, the site must be re-crawled before your changes will be reflected in the search index. Because your changes are made in the search schema, and not to the actual site, the crawler will not automatically re-index the site. To make sure that your changes are crawled and fully re-indexed, you must request a re-indexing of the site. The site content will be re-crawled and re-indexed so that you can start using the managed properties in queries, query rules and display templates.

You can also choose to only re-index a document library or a list. When you have changed a managed property that’s used in a library or list, or changed the mapping of crawled and managed properties, you can specifically request a re-indexing of that library or list only. All of the content in that library or list is marked as changed, and the content is picked up during the next scheduled crawl and re-indexed.

Learn more about search and crawled and managed properties in Manage the search schema in SharePoint Online.

New Managed Property limitation on SharePoint Online

In SharePoint Online, when you create a new managed property, it will have some limitations. For example, the property can only be of typeText or Yes/No, and it can’t be refinable or sortable.

Yup, no sorting for you, and no refinement panel goodness. And no search queries against date ranges. You can potentially search for a particular date, but not ‘between 1st Feb and 23rd March’.

 

I hope Microsoft can improve this function at least provide date ranges for the search query