Wednesday, May 30, 2012

Use Central Administration to export a site, list, or document library in SharePoint Server 2010

Follow below steps to export a site, list, or document library by using Central Administration
  • In Central Administration, on the Home page > Backup and Restore.
  • On the Backup and Restore page > Granular Backup > click Export a site or list.
  • On the Site or List Export page,
  • In the Site Collection section, select the site collection from the Site Collection list, and then select the site from the Site list.
  • If you are exporting a list, skip this step, Select the list or document library from the List list.
  • In the File Location section,
  • In the Filename box, type the UNC path of the shared folder and the file to which you want to export the list or document library.
  • The file name must use the .cmp extension.
  • If the file already exists and you want to use this file, select the Overwrite existing files check box.
  • Otherwise, specify a different file name.
  • If you want to export all the security and permissions settings with the list or library, in the Export Full Security section, select the Export full security check box.
  • If you want to specify which version of the list or library to export, select one of the following versions from the Export versions list:
  • All Versions
  • Last Major
  • Current Version
  • Last Major and Last Minor
  • Click Start Export.
  • You can view the status of all backup jobs at the top of the Granular Backup Job Status page.
  • You can view the status of the current backup job in the Content Export section of the page.
  • The status page updates every 30 seconds automatically.
  • You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

User can still access Allitem.aspx via Mobile site after Lockdown Mode

Issue:
One of my user requested to block Allitems.aspx page to be blocked for internet users and I blocked it using following command
stsadm -o activatefeature -url <site collection url> -filename ViewFormPagesLockDown\feature.xml) it works and user get 401 Unauthorized.
However, when user browse into a mobile page they are able to see all the items in the AllItem.aspx page.
Resolution:
  • To turn off site access from mobile device we need to edit the “compat.browser” file for our SharePoint site.
  • To find this file, look in your IIS directory for your SharePoint site and look for the App_Browsersfolder.
C:\inetpub\wwwroot\wss\VirtualDirectories\<Site Folder>\App_Browsers
Edit the file as guided in http://blog.drisgill.com/2009/11/sp2010-branding-tip-6-mobile-browsers.html

Wednesday, May 23, 2012

SharePoint creates SQL Databases

When we install SharePoint we have the databases created in SQL, SQL is the backbone of the SharePoint server, whenever you upload any data or any document to the site its actually uploaded to the SQL database associated with that application, the documents gets stored in SQL and they have only the reference link

Let’s look at the databases created in SQL when you install SharePoint and configure stuff like search My Sites and SSP, also when you make your very first application
Installing SharePoint on your server

When you install SharePoint on your farm, irrespective of the type of installation you choose that’s Basic or Advanced (I mean using SSEE or Full SQL version) you get two databases created on your specified SQL instance they are:

Sharepoint_Config : This is the configuration Database for the site this database holds information on farm configuration, patches and updates applied to the server, versions of sites and databases, users, custom templates, Features, etc to be specific it contains 24 tables and each tables has its own significance

1> dbo.antivirusvendors – contains 3 columns
Vendor Id
Vendor Product
Vendor Version
As you would guess it will be talking about the Antivirus properties applied on the server obviously this table has to be present on the Config database as Antivirus is a portal level application and not an application level

2> dbo.Binaries - Contains 2 columns
Object ID
File Image
I am not really sure what this table is doing here its maybe used for some customization references

1> dbo.classes- contains 3 columns
Id –
BaseClassId-
FullName
It contains the classes used to create the SharePoint dll
So the next time you face an error of a particular class not working you can check the entry here

2> dbo.customtemplates – contains 6 columns
ID
Title
Description
LCID
Content
Template ID
This table would contain the information of the custom templates applied to the site, when you run the stsadm –o addtemplate command the attributes are added to the site as well as the dbo.customtemplates
just comparing these columns with the attributes of stsadm –o addtemplate, they are filename, title, description,
so we can troubleshoot issues with the custom templates not getting updated or the custom templates not being applied to the site from these

3> dbo.databases – contains 15 columns
DatabaseID
VirtualserverID
Name
UserID
Password
SiteCount
SiteCountWarning
SiteCountLimit
DatabaseServiceID
LastModified
LastModifiedUser
LastModifiedServer
Status
Version
Properties
As seen its used to get all the details of the databases used in the SharePoint site, It also contains the warnings and limitations of the site, status their version and properties

4> dbo.dependencies – contains 2 columns
ObjectID
DependentID
Generally a list of object ID and Dependent ID mapped together

5> dbo.EmailenabledLists- contains 5 columns
Alias
SiteID
WebID
ListID
Deleted
Whenever you create an email enabled document library you can see the attributes being listed here, we configure this library on a particular site collection and have to provide ‘Alias’ of the library while creating the library, the ‘SiteId’ of the site holinding the email enabled list, Web ID of that site, ListID of the List, and status as deleted or not

6> dbo.globals- Contains 14 columns
GlobalID
SchemaVersion
UseHostHeader
UseNTAuthfordatabase
smtpserviceID
Mailcodepage
FromAddress
Replytoaddress
LastModified
LastModifiedUser
LastModifiedServer
Status
Version
Properties
These all are the global settings for the site which can be done via several links on the central administration page like Web application general settings, AAM etc

7> dbo.InstalledWebpartPackages- contains 5 columns
WPPID
url
IISInstance
ServerID
Globalinstall
It talks about the third party web parts added to the site or the custom webpart solution deployed to the server, can be a good medium to troubleshoot the issues with Out of the Box web part solutions

8> dbo.LastUpdate – contains 2 columns
Value
Version
This is an interesting thingy to look at cause it contains the information of the last update applied to the server, so In case you feel that something happened to your server because of the automatic update applied or you want to check on the last update you can check this table

9> dbo.Objects- contains 7 columns
ID
ClassID
ParentIDName
Status
Version
Properties
Contains information of the objects

10> dbo.pendingDistributionList- contains 5 columns
SiteID
WebID
GroupName
ModifiedBY
Version
Contains list of pending DL’s and some information

11> dbo.Servers- contains 9 columns
ServerID
Name
Address
LastModified
LastModifiedUser
LastModifiedServer
Status
Contains information of the servers in the farm and there details

12> dbo.services- contains 10 columns
ServiceId
ClassId
ServerID
Instance
LastModified
LastModifiedUser
LastModifiedServer
Status
Version
Properties
Contains information of the services

13> dbo.SiteCounts- contains 2 columns
DatabaseID
NumSites
It contains the count of sites in each Database

14> dbo.SiteMap- contains 9 columns
ID
ApplicationID
DatabaseID
Path
Pairing
Status
Version
Redirecturl
HostheaderIssiteName
This also gives information about the sites

15> dbo.sites- contains 9 columns
SiteId
DatabaseID
URLpath
LastModified
LastModifiedUser
LastModifiedServer
Status
Version
Properties
This one is supposed to contain the number of sites and its attributes with respect to each application

16> dbo.Timerlocks- contains 9 columns
JobID
LockedByServerName
LockedTime
This contains all the jobs Locked by the timer job

17> dbo.TImerRunningJobs - contains 10 columns
ServiceID
VirtualServerID
JobID
JobTitle
ServerName
Status
StartTime
CurrentStatus
TargetCount
CurrentTargetPageDone
Shows time and status of all the timer jobs

18> dboTimerTargetInstances- contains 2 columns
JobID
TargetInstanceID
Will contain Timer Target Instances and there list with the Job ID

19> dbo.tombstones- - contains 2 columns
ID
Version

20> dbo.Versions - contains 10 columns
VersionID
Version
ID
Username
Timestamp
Finaltimestamp
Mode
ModeStack
Updates
Notes
Contains previous versions of the site and the version History, also account that changed it the newer version (by applying updates)

21> dbo.Virtualservers- contains 12 columns
Virtualserver ID
Name
smtpserviceID
Mailcodepage
Fromaddress
Replytoaddress
LastModified
LastModifiedUser
LastModifiedServer
Status
Version
Properties
Shows the entries and attributes of virtual servers added to the farm

22> dbo.webpartpackages- contains 3 columns
WPPID
Title
Content
Similar to dbo.InstalledWebpartPackages contains information of the OOB or custom web part packages


Admin_Content : This database is created when you complete running the PS Config wizard for SharePoint, this wizard launches the Central administration application, actually in background the wizard creates an application for the Central admin page

The central admin database is names as admin_content database, this is by default and you cannot rename or edit it.

It is just like any other normal content database, but it has the Central Admin site, which is the most important site.

Tuesday, May 22, 2012

SharePoint site templates codes


Each Site Template that is installed on SharePoint 2007 has a unique name and number to allow for referencing when coding applications or using STSADM for site deployment (when using the -sitetemplate parameter, e.g. -sitetemplate STS#0 would apply a team site template)


WSS Templates

Team Site: STS#0

Blank Site: STS#1

Document Workspace: STS#2

Wiki Site: WIKI#0

Blog Site: BLOG#0

Basic Meeting Workspace: MPS#0

Blank Meeting Workspace: MPS#1

Decision Meeting Workspace: MPS#2

Social Meeting Workspace: MPS#3

Multiple Meeting Workspace: MPS#4

MOSS Templates

Document Center: BDR#0

Site Directory: SPSSITE#0

Report Center: SPSREPORTCENTER#0

Search Center with Tabs: SRCHCEN#0

My Site Host: SPSMSITEHOST#0

Search Center: SRCHCENTERLITE#0

Personalisation Site: SPSMSITE#0

Collaboration Portal: SPSPORTAL#0

Publishing Portal: BLANKINTERNETCONTAINER#0

Publishing Site: CMSPUBLISHING#0

Publishing Site with Workflow: BLANKINTERNET#2

News Site: SPSNHOME#0

Thursday, May 17, 2012

How to back up a User Profile Service application using SQL Server in SharePoint 2010 ?

  • Open SQL Server Management Studio
  • Connect to the database server.
  • Expand Databases.
  • Right-click the database that you want to back up, point to Tasks
  • Then click Back Up.
  • In the Back up Database dialog box,
  • In the Source area, select the backup type that you want to perform
  • User Profile Service application always requires a full backup, so select Full backup
  • In the Backup component area, click Database.
  • Provide the name to the backup
  • We can set an expiration date to make this back up available till desired date.
  • By default its 0, means no expiration date
  • Provide the path where you want to store this back up under Destination
  • That’s it we are done with user profile backup

Back up in SharePoint Server 2010


Backup in SharePoint 2010

Basically there are 3 types of backup methods used in SharePoint server 2010

·         Using Windows PowerShell
·         Using SharePoint 2010 Central Admin
·         Using SQL server

Use Windows PowerShell to back up a farm in SharePoint

You can use Windows PowerShell to back up the farm manually or as part of a script that can be run at scheduled intervals.
1.      Click on the Start menu
2.      Click All Programs.
3.      Click Microsoft SharePoint 2010 Products.
4.      Click SharePoint 2010 Management Shell.
5.      At the Windows PowerShell command prompt, type the following command: 

Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} [-Verbose]

Use Central Administration to back up a farm in SharePoint

You can use Central Administration to back up the farm.
1.      In Central Administration, on the Home page > Backup and Restore > Perform a backup.




2.      On the Perform a Backup — Step 1 of 2: Select Component to Back Up page, select the farm from the list of components, and then click next.


3.      On the Start Backup — Step 2 of 2: Select Backup Options page, in the Backup Type section, select either Fullor Differential.


4.      In the Back Up Only Configuration Settings > Back up content and configuration settings.


5.      In the Backup File Location section, type the UNC path of the backup folder, and then click Start Backup.


6.      You can view the general status of all backup jobs at the top of the Backup and Restore Status page in the Readiness section. You can view the status for the current backup job


7.      in the lower part of the page in the Backupsection. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

Use SQL Server tools to back up a farm in SharePoint

Using SQL server you can back up site content DB only, this is not useful when we have to take a full farm backup.
1.      Open SQL Server Management Studio
2.      Connect to the database server.
3.      Expand Databases
4.      Right-click the database that you want to back up, point to Tasks, and then click Back Up.
5.      In the Back Up Database dialog box, in the Sourcearea, select the kind of backup that you want to perform from the Backup typelist.
6.      In the Backup component > Database.
7.      Either use the default name provided or specify a name for the backup set in the Name text box.
8.      Specify the expiration date for the backup set. This date determines how long, or when, the backup set can be overwritten by any later backups that have the same name. By default, the backup set is set to never expire (0 days).
9.      In the Destination area, specify where you want to store the backup.
10.  Click OKto back up the database.
11.  Repeat steps 1-10 for each farm database.

Ref: http://technet.microsoft.com/en-us/library/ee428316.aspx


Configure managed accounts in SharePoint 2010

  •  Open Central Administration and click Security.
  •  Navigate to General Security > Configure managed accounts.

 







  
 
  • On the Managed Accounts page > Register Managed Account.


  • Enter the service account credentials in the Account Registration section
  • Mark Enable automatic password change check box in the Automatic Password Change section
  • Also select Start notifying by e-mail check box which will send email notification before automatic password change takes place



  • Click OK.

Saturday, May 12, 2012

Access Errors Publishing or Exporting to SharePoint when Attachment File Name is Invalid

Issue:
You receive one of the following errors when you attempt to export a Microsoft Access table to a SharePoint list:

There was an error copying data to a SharePoint list. The Microsoft Access database engine encountered an error while communicating with SharePoint. More detailed information: "

-OR-

There was an error copying data to a SharePoint list. Network I/O error.

You receive the following error when you attempt to publish a Microsoft Access 2010 database to a SharePoint Server:

Publish Failed. Your application has encountered errors while attempting to publish. The publish operation has failed and the target site has not been created.

When you click to view the details for the message, the first error entry is:

"There was an error uploading the data in the tables being created on the server. The Microsoft Access database engine encountered an error while communicating with SharePoint. More detailed information"

Resolution:
  1. Open the table in datasheet view in Microsoft Access
  2. Open the Attachments window
  3. Select the file that contains the invalid characters
  4. Click Save As.
  5. Save to your desktop
  6. Remove the file from the Attachments list
  7. Click ok
  8. Save the table
  9. Rename the file you just exported to your desktop
  10. Add the file back to the record

Ref: http://support.microsoft.com/kb/2711562