Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Sunday, March 08, 2015

An error has occurred while accessing the SQL Server database or the Office SharePoint Server Search service. If this is the first time you have seen this message, try again later. If this problem persists, contact your administrator.

1.       Go to SharePoint Central Administration -> Operations -> Services on Server
2.       Stop the services for Office SharePoint Server Search.
3.       Restart the Services.
4.       Within the Configure Office SharePoint Server Search Service Settings checkmark “Use this server for indexing content” and/or “Use this server for serving search queries”
5.       Enter the username and password that will be running the services and click “ok”
6.       Once the services restarts go to your “Shared Services Administration”
7.       Click on the down error next to your Shared Service Provider and select “Edit Properties”
8.       Scroll down to the “Index Server” section and select the server from the dropdown list.
9.       Make sure you enter your username and password in the SSP Services Credentials
10.   Click Ok.
11.   Go to Services.msc
12.   Restart Office SharePoint search Service.

Wednesday, February 25, 2015

Procedure to Use STSADM Commands

Using the STSADM commands

Central Admin

1. stsadm -o updatefarmcredentials -userlogin [Service Account] -password [Password]
IISRESET /NOFORCE

NOTE:
One or more errors deploying administration application pool credentials. Please check the application event log and fix manually. This command must either be used on a server where Central Administration is running, or you must specify the
-local parameter.

There was an error encrypting or decrypting credentials. Either a credential update is currently being performed, or you must update the farm account credentials on this server before you can perform this task. Run the above command with
-local parameter

App pool password change

2. stsadm -o updateaccountpassword -userlogin [Service Account] -password [Password] -noadmin

IISRESET /NOFORCE

NOTE: in case there is an error in the above step saying "please retry manually”. Re-run the above script after opening the Central Admin site.

WSS Search Help

3. stsadm.exe -o spsearch -farmserviceaccount [Service Account] -farmservicepassword [Password]

4. stsadm.exe -o spsearch -farmcontentaccessaccount [Service Account] -farmcontentaccesspassword [Password]

SSP

5. stsadm.exe -o editssp -title [Name of SharedServices] -ssplogin [Service Account] -ssppassword [Password]

Office SharePoint Service Search

6. stsadm.exe -o osearch -farmserviceaccount [Service Account] -farmservicepassword [Password]

7. Finally, Manually change the password for “Default content access account”

Friday, January 30, 2015

Example to add an user into the SharePoint Group using STSADM Command

Logon to SharePoint Server which is hosting the SharePoint Site.

Go to Command Prompt as Admin

Now run the below command and provide details as mentioned below. SiteCollection Admin UserName should also be like Domain\UserName

stsadm -o adduser -url "SharePoint Site URL" -userlogin "domain\username" -useremail "username@domain.com" -group "group name" -username [SiteCollection Admin UserName]

Thursday, January 22, 2015

How to grant Permissions to a folder and share it from command prompt

cacls D:\ParasdBolla /T /E /G Domain\UserName1:f
cacls D:\ParasdBolla /T /E /G Domain\UserName2:f
net share PrasadBolla="D:\PrasadBolla"

How to add users to admin group from command prompt

net localgroup administrators Domain/userName /add

Command to Restart a Remote Computer when it is in hung state or when you are hope less

This command Helps you to restart the remote server/client machine when it is down.

Example if you are not able to login into the machine and you are hopeless then use the below command should solve your issue.

shutdown -r -m \\Full Computer Name

Tuesday, June 04, 2013

SharePoint 2007 List Edit in Datasheet not working in IE10

When i open Edit in Datasheet view with IE 10 then i was not able to see the excel type output. To make this functionality work i clicked on F12 to open IE toolbar  and went to Browsermode menu and selected IE8 compatibility view. Then i am able to open edit in datasheet view option.

Thursday, May 30, 2013

Tuesday, May 14, 2013

Remodeled Code: Progress Bar in GridView using SharePoint Tasks List



 The old post is available in this location:- Old Code for Progress Bar in GridView

Notes:-
  1. For Percentcomplete column keep 0 as default value.
  2. Specify Minimum value as 0 and Maximum value as 100.
  3. Create one caluclated column in Tasks List with name ConvertPC.
  4. Now in the column do the settings3and code as shown in the below figure.

  1. This is used to convert double value into Percentage.
  2. Now Press ok and take the TemplateField in the GridView and do the changes as shown in the ascx file.

Ascx
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestPBarUserControl.ascx.cs" Inherits="TestPBar.TestPBar.TestPBarUserControl" %>
<asp:GridView ID="dgvProgressBarSample" runat="server" CellPadding="4"
    EnableModelValidation="True" ForeColor="#333333" GridLines="Both" AutoGenerateColumns="false" Width="100%">
    <AlternatingRowStyle BackColor="White" />
    <EditRowStyle BackColor="#7C6F57" />
    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="#E3EAEB" />
    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
    <Columns>
    <asp:BoundField HeaderText="Title" DataField="Title" />
    <asp:TemplateField HeaderText="% Complete">
    <ItemTemplate><div><table width="<%# Eval("ConvertPC") %>%"  bgcolor="yellow"><tr><td><strong><%# Eval("ConvertPC") %>%</strong></td></tr></table></div></ItemTemplate>
    <AlternatingItemTemplate><div><table width="<%# Eval("ConvertPC") %>%"  bgcolor="yellow"><tr><td><strong><%# Eval("ConvertPC") %>%</strong></td></tr></table></div></AlternatingItemTemplate>
    </asp:TemplateField>
    </Columns>
</asp:GridView>
Ascx.cs
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using System.Security;

namespace TestPBar.TestPBar
{
    public partial class TestPBarUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SPWeb currentMeb = SPContext.Current.Web;
            SPList lst = currentMeb.Lists["Tasks"];
            SPQuery sQuery = new SPQuery();
            sQuery.Query = "";
            SPListItemCollection myColl = lst.GetItems(sQuery);
            if (myColl.Count > 0)
            {
                dgvProgressBarSample.DataSource = myColl.GetDataTable();
                dgvProgressBarSample.DataBind();
            }

        }
    }
}

STSADM vs PowerShell


Using PowerShell we can do more program oriented things like retrieving lists in the site, retrieving sub web details etc., where as we cannot do these things with STSADM command. We can do all things with PowerShell what we can do with STSADM command.

Friday, May 03, 2013

JQuery Plugin 1.9.1 not supporting SPServices

I am unable to pull the data from SharePoint List when i use JQuery plugin 1.9.1. When i used JQuery 1.8.3 plugin then i am able to retrieve data successfully.