Using Import-spmetadatawebservicepartitiondata in a SharePoint availability farm environment that uses SQL Server high

Source: Internet
Author: User
Tags bulk insert

This article describes the author's problems with using Import-spmetadatawebservicepartitiondata in a SharePoint farm environment that uses SQL Server high availability. Hope to be of help to everyone.

I recently exported metadata using export-spmetadatawebservicepartitiondata from the development environment, Then use Import-spmetadatawebservicepartitiondata to import the metadata backup file into SharePoint 2013 using SQL Server High Availability In the test environment of the farm environment, specifically exported, import commands refer to migrating managed Metadata service between SharePoint 2013/2010 Farm.


However, when you import using Import-spmetadatawebservicepartitiondata, you encounter the following error

Import-spmetadatawebservicepartitiondata:cannot bulk Load because the file
"\\...\script\ecmgroup.dat" could
Not being opened. Operating System error Code 5 (Access is denied.).

+ Import-spmetadatawebservicepartitiondata $svc. Id-serviceproxy $proxyName
-path ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ Categoryinfo:invaliddata: (microsoft.share...cepartitiondata:
Spcmdletimportm...cepartitiondata) [Import-spmetadatawebservicepartitionda
TA], faultexception ' 1
+ FULLYQUALIFIEDERRORID:MICROSOFT.SHAREPOINT.TAXONOMY.CMDLET.SPCMDLETIMP
Ortmetadatawebservicepartitiondata


The author Google a circle, found that the explanation on the internet is nothing less than:

1. To use the network path \\...\script\ecmgroup.dat

2. To place the shared directory on a SQL Server server (on DB1)

3. To give SQL Server service permission to read and write to a shared directory


These authors have done, or package the same mistake.

The essence of Import-spmetadatawebservicepartitiondata is to use SQL bulk to bulk import data, so I use the following statements to test:

Use [service_db]bulk Insert [dbo]. [Table_1]from "\\...\script\ecmgroup.dat"

The error is found when connecting to SQL HAG cluster:

MSG 4861, Level A, State 1, line 2
Cannot bulk load because the file "\\...\script\ecmgroup.dat" could not being opened. Operating System error Code 5 (Access is denied.).

So I set the shared directory on the DB2, and then run the above command, successful


So I also import-spmetadatawebservicepartitiondata the parameters of the diversion DB2 on the shared directory, sure enough success.


It was later discovered that this was because DB2 was the master node of the entire Hag cluster.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.