Import errors
You may receive the error, Import-SPMetadataWebServicePartitionData
. This error indicates that you do not have permission to use the bulk load statement when attempting to import the metadata.
This error happens if the service application pool used by the Managed Metadata service does not have the bulkadmin SQL Server database permission.
The steps detailed in this section are from http://www.lucacostante.com/item/5-import-spmetadatawebservicepartitiondata-you-do-not-have-permission-to-use-the-bulk-load-statement.html
To determine the account name and database name, run the following commands in the PowerShell window:
$mmsApplication.ApplicationPool
$mmsApplication.Database.Name
The service account pool and metadata service database name gets displayed.
For example:
In this example, the service application pool account is BONZAI\sp-ap-service
and the database name is BONZAI_Service_MetaData.
Now, do the following:
- Open SQL Server management Studio and grant the bulkadmin server role for the service account.
- Navigate to Security> Server Roles >bulkadmin.
- Add the service application application pool service account.
Return to the PowerShell window on the SharePoint server and re-run the Import-SPMetadataWebServicePartitionData cmdlet
.
For example:
In SharePoint farms where SQL Server is dedicated to its own machines, the cabinet must be put on a local drive on the SQL Server and shared. If not, Import-SPMetadataWebServicePartitionData
generates an Access Denied error.