How to shrink transaction log files for SharePoint

 

I found a great post from : SharePoint: How to shrink transaction log file and
I was able to follow the instruction and successfully shrink transaction logs for SharePoint database without any problem. 

Here is the instruction to shrink transaction logs  files for SharePoint

  1. Change the database recovery model to SIMPLE using the next command:
    • ALTER DATABASE SET RECOVERY SIMPLE;

      shrink_transaction_logs_for_sharepoint

  2. Shrink the database or transaction log file using Microsoft SQL Server Management Studio:
    Right click on the database which you  altered to recovery simple and go to Task | Shrink | Database  It will take some time depend on on the size of database

    Shrink Transaction Log for SharePoint
    Or use the following command to shrink the transaction log file, for example, to 5 MB:

    • DBCC SHRINKFILE (_Log, 5);
  3. Set back the database recovery model to FULL using the next command:
    • ALTER DATABASE SET RECOVERY FULL;

      shrink_transaction_logs_for_sharepoint_recovery_full

If it’s not production database, you, in principle, can skip step 3 leaving the database recovery model in SIMPLE. Transaction log in this case will not grow. But note that some people complain that it can cause some problems while attempting to delete SiteCollection from SharePoint Central Administration. I’ve never been faced with such issue, but just in case keep FULL recovery model.

Best Practices For SharePoint Server 2010

 

Power Shell Command Builder for SharePoint 2010 and Office 365

Silverlight application allow you to visually assemble commands and you can use these commands for SharePoint 2010 and Office 365 administration purpose.
Great tools for those who want to create Power Shell scripts fast.

URL : http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html

Supported Products : SharePoint Foundation 2010, SharePoint Server 2010 and Office 365

Windows Power Shell Command Builder

Build your own Power Shell Scripts

Build Power Shell Scripts for SharePoint 2010

SharePoint 2010 MySite Portal Home Link

How do I add Portal Home Link in my SharePoint 2010 MySite?

By default when user create a MySite in SharePoint 2010, they won’t see any link to your Portal home page.  In order to add Portal Link in everyone MySite in SharePoint 2010 or any other important link, this is what you have to do…

1. Go to Central Administration –> Manage Service Applications 

Adding Portal Home Link in SharePoint 2010 MySite: Step 1

2.  User Profile Service Application –>

Adding Portal Home Link in SharePoint 2010 MySite: Step 2

3. In the Manage Profile Service page, go to “Configure Personalization Site”

Adding Portal Home Link in SharePoint 2010 MySite: Step 3

4. under “My Site Settings”. Create a “New Link”

Use this list to add personalization site navigation links to the My Site left navigation. Links added here will show up as navigation links after “My Personal Content” on the navigation bar. Use audiences to specify if a link should only appear for a specific set of users.

Personalization site navigation links to the My Site SharePoint 2010

5. with the URL of the above site and scoped to a previously compiled Target Audience.

URL: Your Portal Site URL
Description:  I want to add a link in everyone SharePoint MySite called “Home”
Owner: SharePoint Admin or Power User
Target Audiences: I want to target to all the users (Domain users)

Adding Portal Link to MySite SharePoint 2010

SharePoint 2010 SP1 – Site Recycle Bin

 

One of the cool new features introduced in SharePoint 2010 SP1 is the Site Recycle Bin feature.

Earlier, the only way to restore deleted sites and site collections required to restore the appropriate content databases. But from SP1 onwards, deleted sites can be recovered from the Site Recycle Bin.

Deleting and Restoring Sites (SPWeb)

When users delete a site, they are presented with the following page:

clip_image001[4]

As you can see from the message, the entire site including its contents, permissions are sent to recycle bin.

When you click Delete, you are prompted with another message box, which may be confusing:

clip_image002

Even though it says the site will be deleted permanently, it is not.

If you are a PowerShell user, you can use the Remove-SPWeb cmdlet to delete the web instead of the UI. Just use the –Recycle parameter:

Remove-SPWeb http://site -Recycle

After the site is deleted, it will be available in the top-level site’s recycle bin to restore:

clip_image004

Deleting Site Collections (SPSite)

Unfortunately, if a site collection is deleted, the only way to recover is to use the new Restore-SPDeletedSite cmdlet.

When users delete a site collection, they are presented with the following page:

clip_image005

Below are the steps to restore a deleted site collection using PowerShell:

The deleted site collections are stored in the SPDeletedSite object.

The Get-SPDeletedSite cmdlet lists all the deleted site collections:

clip_image006

Do remember that the Get-SPDeletedSite returns an array if Get-SPDeletedSite is > 1. Use the following command to get the count:

(Get-SPDeletedSite).Count

All we need to do now is bind this with the Restore-SPDeletedSite cmdlet:

Get-SPDeletedSite | where{$_.SiteId -eq “d48e6455-a1ad-43f4-ac11-a5b558b06ead”} | Restore-SPDeletedSite

clip_image007

Use the Remove-SPDeletedSite to permanently remove the deleted site collection. As always, use this with caution.

Recommended Reading

Creating a Custom SharePoint Theme Using PowerPoint 2010

 

One of the nice little features of the latest version of SharePoint is that you can quickly create themes for SharePoint 2010 by using Microsoft PowerPoint 2010.

The concept of themes were introduced in SharePoint 2007, and they’re now given a different touch in SharePoint 2010.

In this tip, you will see how to quickly create a theme using PowerPoint 2010 and then import and apply it to SharePoint 2010 site(s).

1. Open a PowerPoint 2010 and create new file, you can also use existing PowerPoint file.

2. Select Design Colors and select Grayscale, see the figure below.

3. Select DesignàFonts and select Office Classic 2 as shown in figure below.

4. Our basic theme is now ready (you can do other modifications but better to keep it simple for now). To save the theme file (.thmx) select File à Save As. On the Save As dialog enter My Custom Theme for the File Name and select Office theme (*.thmx) for Save as type. This is shown in figure below.

5. For importing the theme file into SharePoint 2010 browse to the site collection and go to Site Settings Page. Click on the Themes links present under Galleries section, this will open the Themes Gallery page.

6. Click on Documents Tabs and select Upload Document as shown in figure below.

7. On the Upload Document dialog browse and select My Custom Theme.thmx file that you had created earlier.

8. Your new theme is now available in Themes Gallery and ready for use.

9. In order to apply this new theme to the site, browse to Site Settings page and select Site Theme link present under Looks and Feel section as shown below.

10. On the Site Theme page, select My Custom Theme as shown below.

11. You have an option to apply theme only to the current site or to the current site and all its sub sites, you can choose either option. In this example later is selected as shown below.

Finally, click the Apply button to save and apply your changes.

12. My Custom Theme is now applied to current site and all its sub sites. You can browse to various pages in the site to see the theme in action.

The following is the default home page of the site with this theme applied.

There is a Microsoft Theme Builder product available in BETA release at the moment, this will allow you to slightly more that you can in PowerPoint i have added a link and some details for you to download and have a play:

The Theme Builder tool enables the creation of document themes for Microsoft Office 2007.  Document themes provide a quick and easy way to apply a consistent look across all your Microsoft Office documents.  You can apply the same theme to PowerPoint presentations, Word documents, Excel spreadsheets, and even Outlook emails.

Download Theme Builder Here

Open Theme Builder, and click on the help menu.  There you’ll find all the information you need to create amazing document themes!
Screenshot of the Theme Builder tool.
Before you can run the tool, you’ll need to install the following items:

.Net Framework 3.0
http://www.microsoft.com/downloads/details.aspx?FamilyId=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en
Office 2007 Primary Interop Assemblies
http://www.microsoft.com/downloads/details.aspx?familyid=59daebaa-bed4-4282-a28c-b864d8bfa513&displaylang=en