Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |
Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts

Wednesday, July 8, 2015

Sharepoint interview questions with answers: lists and library

I had faced below listed issues while doing migration from SharePoint 2007/2010 to 2013:

Quick Edit view issue:

Quick Edit view: Result: Get "Assertion Failed: Break into debugger?"
We applied the JavaScript at master page level, issue solved.

“Files” and “library” option are not available by default in ribbon for document library:
Issue is it will be disabled if you add any web part to the OOB pages (like CEWP)

By default, SharePoint limitation for Size of URL is 260 characters.
You might get the below exception if exceed the limit:
Exception: The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name.

Note: Microsoft recommended size limit for single file name is 128 characters and URL limit is 260 characters.

I have uploaded one document to the document library and when I open it through browser the size of the URL is 258 characters(max limit 260) and later on I have changed the web application “http://India.com to http://allindia.test.IND.com and now my the document size of the URL is 263 characters(means exceeded the limit). My Question how the SharePoint handles these types of scenarios?

As per my analysis: you can’t edit/download the document but we can view the document through browser.

View the large number of records in SharePoint list/library:
We can view the large number of records (around 1lac) by removing the filters, group by/sort by and select the “Show items without folders” option.

Export to excel the list item with attachments:
We can achieve it by using the "Open with access" option. From there if wants we can directly download from the access.

Export to excel the list item with attachments URLs:
We can achieve it by using web service concept in Nintex

Export to Excel”. Keep in mind that you can’t export a list that has more than 52,000 items;            


Friday, June 19, 2015

Solve edit page not working issue


Edit the sharepoint page:

Append the below one to the url if you are unable to edit the sharepoint pages and then now try to click on edit page option. problem solved.

?toolpaneview=2

Example:

URL: http://abc.com/sitepages/Home.aspx?toolpaneview=2

Please let me know for any issues.

Regards,
Sasi Kumar Reddy


Friday, April 3, 2015

Restore-SPSite problems in sharepoint

I have a requirement change the site collection URL (path based). Best recommended way to change the site collection URL in sharepoint 2010 is backup and restore. I followed the same, first I took the backup and then trying to restore the same but it giving exception.

Observation: Restoration fails if any of the URL characters exceed the limit of 260 characters. So, please check the URL characters before proceeds with backup and restore.

Below script will give the accurate results of the URL characters:

Step1:  connect to the DB server and then select the content DB

Step2: Run the script

SELECT
   ([DirName]+ N'/'+ [LeafName]) AS [FullRelativePath],
   LEN([DirName]+ N'/'+ [LeafName]) AS [Length]
FROM
   [dbo].[AllDocs]
ORDER BY
   [Length] DESC


Note: If any of the URL characters exceeds the 260 characters, please make it below and then try to do the back up and restore.

-Thanks,
Sasi kumar Reddy

Thursday, April 2, 2015

Solving access denied login for site collection administrators

Recently we migrated the applications from sharepoint 2007 to 2010. Once it’s done, we tried to browse the application but it is giving access denied error. Initially I thought it was due to access issue but I am the primary site collection administrator to that application.

Workaround:  Check status of the content DB whether it is in read-only or not locked stage. If it is in read-only, change it to “Not locked” and then save it.

Now try to browse the application and this time you can able to browse.

Regards,
Sasi Kumar Reddy




Friday, January 23, 2015

sharepoint interview questions with answers: ListVsLibrary

<<Previous post>>

Move documents between document libraries along with versions?
You can only copy the documents to others along with major version only.

Exception: “The data source control failed to execute the update command
Got the above exception while trying to attach the file to the list item in MOSS2007
The reason for the exception is attaching file name exceeded the limit (max size limit for single file is 128 characters).

Exception: “The specified file or folder name is too long. The URL path for all files and folders must be 260 characters or less (and no more than 128 characters for any single file or folder name in the URL). Please type a shorter file or folder name”
By default, SharePoint limitation for Size of URL is 260 characters.
Microsoft recommended size limit for single file name is 128 characters and URL limit is 260 characters. 
I have uploaded one document to the document library and when I open it through browser the size of the URL is 258 characters(max limit 260) and later on I have changed the web application “http://India.com” tohttp://allindia.test.IND.com and now my the document size of the URL is 263 characters(means exceeded the limit).

As per my understanding: you can’t edit/download the document but we can view the document through browser.

Thursday, January 15, 2015

Copy/Move items from one list to another list in sharepoint

Scenario:
List AA fields: Name, Title, User Name, Religion, Qualification.
List BB fields: Name, Title, User Name, Qualification, Designation, Salary and Description
Common field names: Name, Title, user name, Qualification
Now, I want to copy the common field values from List AA to List BB.

Approach:
//Read the list item values by ID and add the common field values as new item into the another list
SPListItem spLstItemsAA = listNameAA.GetItemById(ItemID); //ItemID of List AA
SPListItem spLstItemBB = list.Items.Add();
foreach (SPListItem spLstItemAA in spLstItemsAA.ListItems)
{
       for (int i = 0; i < spLstItemAA.Fields.Count; i++)
       {
          if ((!spLstItemBB.Fields[i].Hidden) && (!spLstItemBB.Fields[i].ReadOnlyField) &&    
                                  !(customfields.Contains(item.Fields[i].Title)))
           {
               spLstItemBB [item.Fields[i].Title] = spLstItemAA [item.Fields[i].Title];
             }
        }
 }
 spLstItemBB ["Salary"] = "50k";
spLstItemBB ["Description"] = "sharepointquicksolutions.blogspot.in ";
spLstItemBB.Update();

Condition#1: !spLstItemBB.Fields[i].ReadOnlyField
Condition#2: !spLstItemBB.Fields[i].Hidden
The above 2 conditions are used for to skip the read only and hidden fields.

Note: By default, every sharepoint list and library will have the below fields.


Saturday, January 10, 2015

SharePoint administrator interview questions and answers: Recycle Bin3

<<Previous page>>                                                                                            

Is it possible to re create the same site collection after immediate deletion of this?
We can recreate the site collection after immediate deletion of site but before starts we have to perform either of the below two actions otherwise you will get the below exception:
               "A site collection with the same URL is already in the Recycle Bin"

Action#1: Manually starts the “Gradual site delete:” timer Job.
Action#2: Return the “GradualDelete” parameter a $False in the PowerShell
Note: Microsoft recommending does not use the action#2 for in case of deleting the site collection which has larger volume. Reason it increases the load on the system during the deletion process.

I delete a site which has other sub sites. Now, is it possible to restore the deleted sub sites? I mean is it possible to restore the child sites without first restoring the parent sites.
Remember, Restore a child of site that has also been deleted, you need to restore the parent first. For example: If you try to restore “/sites/site1/subsite1/subsite2/sub3” before restoring the parent /sites/site1/subsite1/subsite2”, nothing happens.

Getting the exception “Specified method is not supported” while trying to delete the site?
Upgrade your databases to SP1.

What is the method to delete all the deleted site collections in web application?
Method to delete all the “deleted” site collections under a specified web application.

Get-SPDeletedSite -webapplication http://sharepoint | Remove-SPDeletedSite

Note: You will be prompted to delete them one by one, if you want it to run through them all without further prompts just enter the letter “A”

How to delete site that has other sub sites sharepoint?
SharePoint will give error “you can’t delete a site that has sub sites when we try deleting a site having sub sites”.
Good tip to overcome this and delete the site along with sub sites is using Site content and structure
In SP2007: using stsadm cmd, you cannot delete the sub site if it contains other sub sites.

Scenario on Office 365:

Deleted site collections go into the site collection Recycle Bin and are retained for a 90 day period. If you accidentally delete a site collection, it can be restored from the site collection Recycle Bin by a site collection administrator within 90. If you need a site collection restored after this 90-day period has elapsed, it can be restored by Microsoft within 14 days by contacting Office 365 via a Service Request.

<<Previous page>>                                                                                            

Please provide your valuable feedback if it's really helps you.

Thursday, November 20, 2014

Setup [Today] as default to the sharepoint date time control through browser


Step1:
Create a new date time field and set the calculated value as “Today”. That’s it.
Create a new item into the list. There you can see set the Today’s date as default to the date time field.

Step2
Creata new item into the list and there you will see the set the Today's date as default to the sharepoint date time field.[PFB the image]

Saturday, November 1, 2014

How to view the large number of records in a list/library even if exceeds the threshold limit value

There is a work around to view the large number of records in a list/library even if exceeds the SharePoint threshold limit value(5000 records).
 
Let me explain you briefly, I have a custom list/library and it is having one lac records approximately and now  we wants to show the results of one lac records in my list/library. But it is not possible because Sharepoint can not view the large number of records if exceeds the sharepoint threshold limit value(5000 records). 

Solution: create a new view and remove the filters/orderby/sortby/group by and select the show items with out folder option. We can view large number of records by removing all the these.

Benefit: we can search the results.

Please let me know for any issues.

-Thanks,
Sasi kumar Reddy

Sunday, September 21, 2014

Create sharepoint datetime control using powershell script

Visit my previous post for to create a list through powershell script
Create list using powershell script
*********************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create DateTime field for allow only one user/group */
Add-SPDateTimeField -listName $lncustomListName -Name DateTimeFieldName  -DisplayName DateTimeFieldName  -DateType DateOnly -Required FALSE

/* Method to create people DateTime field */
function Add-SPDateTimeField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required, [string]$DateType)
{
   $OpenList = $docWeb.Lists[$listName]
   $fldXml = "<Field Type='DateTime' DisplayName='"+ $DisplayName +"' Format='"+ $DateType +"' Required='"+ $Required +"' Name='"+ $Name +"'/>"
   $OpenList.Fields.AddFieldAsXml($fldXml,$true,
   [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
}
**********************************************************************************
Please let me know if faced any issues.

Saturday, September 13, 2014

Create sharepoint People Picker field through powershell script

Visit my previous post for to create a list through powershell script
Create list using powershell script

********************************************************************************
$lncustomListName listName
$docSite = new-object Microsoft.SharePoint.SPSite($siteURL)
$docWeb = $docSite.OpenWeb()

/* To create people picker field for allow only one user/group */
Add-SPUserField -listName $lncustomListName -DisplayName MyList -Name MyList -Required TRUE

/* Method to create people picker field
function Add-SPUserField([string]$listName, [string]$DisplayName, [string]$Name, [string]$Required)
{
   $OpenList = $docWeb.Lists[$listName]
   $fldXml = "<Field Type='User' DisplayName='"+ $DisplayName +"' Required='"+ $Required +"' Name='"+ $Name +"'/>"
   $OpenList.Fields.AddFieldAsXml($fldXml,$true,
   [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)   
}
*******************************************************************************
Please let me know if faced any issues.

Wednesday, September 3, 2014

SharePoint administrator interview questions and answers: Recycle Bin

<<Previous page>>                                                                                            

What is Recycle Bin in sharepoint?
SharePoint has introduced a new feature called Recycle Bin to keep the deleted items, documents. Speciality of this feature is we can easily restore the accidently deleted items and files from the Reycle Bin. 

Recycle Bin Stages:
SharePoint supports two levels of Recycle bin. The initial or First level Recycle bin comes into picture when the user deletes an item from a list. Once the item is deleted again from the First level of Recycle bin it moves to the second stage of Recycle bin.
1st stage, known as the “end user recycle bin”
2nd stage, known as the “deleted from end user recycle bin”.
2nd stage Recycle Bin has a setting of site quotas for space limitations. If it reaches its quota limit, older items will be overwritten. If you are not enabled site quotas then 2nd stage recycle bin will have no space limitations.

Use the 2nd Stage Recycle Bin to define how long deleted items will stay in the site collection's Recycle Bin that only the administrator can use (Default: 50 percent of the disk quota for the web application. For example, if you have allotted 1000 MB of space for the web application, SharePoint will add 50 percent more (i.e., 500 MB) to that quota (a total quota of 1500 MB) to be used for the second-level Recycle Bin. When this limit is exceeded, the oldest items will be removed from the second stage Recycle Bin.
Note: First stage of Recycle Bin available at site level and only one Second Stage Recycle Bin available per Site Collection.

Below IMP points should keep in mind ever:
  1. The Site Recycle Bin feature is newly introduced in Service Pack 1 from SharePoint 2010, if you haven't installed ServicPack 1 for your SharePoint 2010 when you deleted the site collection; you need to restore the content database.
  2. The Recycle Bins can contain multiple copies of a document that each have the same file name and source. These documents cannot be restored over an existing copy of a document.
  3. The Recycle Bins cannot be used to recover previous versions or accidental overwrites of documents.
  4. Turning off the Recycle Bin for a Web application empties all Recycle Bins and permanently deletes all items in them and can only be restore from a backup.
  5.  If you have not enabled site quotas, the 2nd stage recycle bin will have no space limitations.

Who can view the 1st stage recycle Bin?
Minimum Permssions levels: Contribute, Design, or Full Control Permissions and site collection administrator.

What are all the minimal permissions required to restore the deleted items?
The deleted items can only view of their own and site collection administrator.
Recycle bin access permissions: Contribute , Design, and Full Control permissions.

What are all the permissions required to restore the deleted objects from the second stage of Recycle Bin?
Only the Site Administrator can restore objects from the site collection Recycle Bin.
You should have minimum site collection administrator permissions to restore the other’s deleted data from the Recycle Bin. Means the users who have deleted the content will be able to see the content in the recycle bin and next site collection administrators can view other’s data.

How many days the deleted content will be available in Recycle Bin?
The deleted object will stay in the Recycle Bin for 30 days by default.
After 30 days, the object is moved from the site's Recycle Bin to a site collection Recycle Bin.
All together is 30days: If deletes the item from the first stage recycle bin after 10 days. It moves to second stage recyle bin and stays there another remanining 20days. 

Which timer job cleans the recycle bin data if exceeded the time?
The “Recycle Bin” Timer job and it by default scheduled on daily basis in MOSS2007 and from 2010 onwards scheduled on weekly basis.

How to delete an item permanently from the SharePoint list?
Recycle () method: used for to move the items to the Recycle Bin
Delete () methods: used for to delete the items permanently.

<<Previous page>>                                                                                            

Friday, August 29, 2014

SharePoint interview Questions and anwers: Masterpage1

  • v4.master - This is default master page
  • Default. Master - this is used to support the 2007 user interface
  • Minimal. Master
  • Simple. Master- it is used for accessdenied.aspx, confirmation.aspx, error.aspx, login.aspx, reqacc.aspx, signout.aspx & webdeleted.aspx pages
V4.master:  Default master page for most non-publishing sites in SharePoint 2010. It is also the default system master page in both SharePoint Foundation and SharePoint Server.
Default.master: Helpful from upgrading MOSS 2007 sites to SharePoint 2010 sites.
Minimal.master: page is best suited for pages with minimal branding and navigation. The minimal.master is used with search pages and Office web applications.
Simple.master: Master page used for error and login pages. It lives in the fi le system and is not available in the master page gallery.
MWSDefaultv4.master: Found in the master page gallery of meeting workspace sites.
Nightandday.master: page contains controls specialized for publishing web content management.

V4.master: Default team site master page. Provides ribbon bar and other UI changes.
Characteristics:
  • Site actions are updated for 2010 and appear on left.
  • Ribbon bar is available
Default.master: Sites upgraded from SharePoint 2007 use this unless they are changed to use a v4 version.
Characteristics:
  • Site actions on right side and are same as SharePoint 2007 version
  • No ribbon bar
What is Page Layout?
Page layout dictates the overall look and feel of a web page. A page layout relies on a content type to determine the kind of content that can be stored on pages. Page layout contains field controls and web part.

Master pages and page layouts dictate the overall look and feel of your SharePoint site.
Differences are
Master pages contain controls that are shared across multiple page layouts, such as navigation, search, or language-preference for multilingual sites. Page layouts contain field controls and Web Parts
Page layouts can be used by all page instances that are based on that page layout. Master pages can be used by all page instances in a site.

Site navigation provides the primary interface for site users to move around on the sites and pages on the site. 


  1. Navigation controls on master pages
    1. Top link bar navigation
    2. Quick Launch navigation
    3. Breadcrumb navigation
    4. Tree view navigation
    5. Metadata navigation
  2. Navigation controls on page layouts
    1. Summary Links
    2. Table of Contents
    3. Content Query
  3. Navigation Web Parts
    1. Categories
    2. Site Aggregator
    3. Site in Category
    4. Tag Cloud
Ribbon Interface act as the UI enhancement in the product. It provides the commands to be executed in the form of Icons and tabs.

Select Empty Sharepoint template as a project template and select the module item for master page and css.
<Module Name="CustomMaster" Url="_catalogs/masterpage">  <File Path="CustomMaster\custommaster.master" Url="custommaster.master" Type="GhostableInLibrary" />
"Url="_catalogs/masterpage"" means this will be deployed to the master page library in SharePoint.
<Module Name="CustomCSS" Url="Style Library"><File Path="CustomCSS\DAVCSS.css"  Url="CustomCSS/yourfile.css"  Type="GhostableInLibrary" />
"Url="Style Library"" means this will be deployed to the style library in SharePoint.
Now add the following code in the feature receiver class file that contains above modules. Right click on the feature and click "Add Event Receiver"
public override void featureactivated(spfeaturereceiverproperties properties)
  {
      spsite currsite = (spsite)properties.feature.parent;
      spweb curweb = currsite.rootweb;
     uri masteruri = new uri(curweb.url + "/_catalogs/masterpage/custommaster.master");
     curweb.masterurl = masteruri.absolutepath;
     curweb.custommasterurl = masteruri.absolutepath;curweb.update();
   }
   This will apply the master page on activation of the feature.
  public override void featuredeactivating(spfeaturereceiverproperties properties)
  {
         spsite currsite = (spsite)properties.feature.parent;
        spweb curweb = currsite.rootweb;
       uri masteruri = new uri(curweb.url + "/_catalogs/masterpage/v4.master");
       curweb.masterurl = masteruri.absolutepath;
      curweb.custommasterurl = masteruri.absolutepath;
       curweb.update();
    }

3 steps involved to add the user control
Create and deploy user control
Register user control in the target
<%@ Register TagPrefix="MyUserControl"  TagName="UserName" Src="~/_controltemplates/MyUserControl/MyUserControl.ascx" %>
Insert the user control wherever required.
<MyUserControl:UserName id="MyUserControl1" runat="server" />
Note: For webpart (Page.LoadControl method)
Use SharePoint designer. Register the namespace of the web part class using <% Register directive. Then use the specified tag prefix from "Register" directive to add the instance of Web part class. Web parts outside the web part zones are referred as static web parts and behave as normal web control.
Register the custom css file as below .
<SharePoint:CssRegistration name="<% $SPUrl:~SiteCollection/Style Library/Custom/styles.css %>" After="corev4.css" runat="server"/>
In CSS, we can wirtie the style for attaching image
background:url(../images/mainBG.jpg)

With the help of delegate control, we can take any OOB control of SharePoint and replace with our custom control without any modification in the SharePoint page. So that new custom control overrides the existing one.
So the delegate control provide one of the option to add control (either server control or user control) on a SharePoint page
For example : In master page SearchBox control is included as  <SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />
This delegate control object uses features to locate the control which is specified in ControlId.
We can overwrite the above delegate control by presenting the below code in Element file of feature  <Control Id = "GlobalNavigation" Sequence="90"  ControlSrc="~/_ControlTemplates/ucGlobNavDelegateControl.ascx" />

AdditionalPageHead,  GlobalSiteLink(), GlobalSiteLink1, GlobalSiteLink2, SmallSearcgInputBox,
TopNavigationDataSource, PublicConsole, QuickLaunchDatasource
Searching through the main master page, Seattle.master, I’ve found these three new DelegateControls:
PromotedActions
SuiteBarBrandingDelegate
SuiteLinksDelegate
 
You can enable a Web Provisioned event receiver
using (SPWeb childSite = properties.Web)
 {   using (SPWeb topSite = childSite.Site.RootWeb)
  {    childSite.MasterUrl = topSite.MasterUrl;
       childSite.CustomMasterUrl = topSite.CustomMasterUrl;
      childSite.Update();
   }
 }
Using the SharePoint web interface or SharePoint Designer 2010
Using a master page
Using a page layout
Using a Content Editor Web Part
This has to be done in the site definition file system. I don't think there is an Interface for that, but it can be via SPD though.

List Attribute Id= 116

Changes in topnavigation control in  master page.
Ref: http://erikswenson.blogspot.in/2010/11/update-hide-first-tab-in-sp-2010.html

Master page and page layouts options missing in the left navigation in SharePoint designer2010
Users having site ownership privileges are able to view the site's Collection Administration pages but will not see the link enabling them to make the appropriate settings change.
Site collection administrators will enable the “Enable SharePoint Designer “(Site Actionsà SiteSettingsàselect SharePoint designer settings under site collection Administration category)

Conditionally renders the contents of the control to the current user only if the current user has permissions defined in the PermissionString.
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="XYZ">
</Sharepoint:SPSecurityTrimmedControl>