Loading TOC...
Connector for SharePoint® Administrator's Guide (PDF)

Connector for SharePoint® Administrator's Guide — Chapter 3

mlcadm Command Line Utility

This chapter describes the commands you can use in the mlcadm utility. The following sections are included:

About the mlcadm Utility

The mlcadmin utility is a command-line program that can perform most of the functions of the connector running in SharePoint. The tool requires that the user have SharePoint administrative privileges.

mlcadm Command Line Usage

When the command references the log, it is referring the MLConnector.log file which will be written in the directory in which the command was run.

The mlcadm.exe file must be in the search path for the current user. The following is the usage of mlcadm, which you can also get by running the command with no arguments or by running mlcadm usage:

C:\SharePointConnector> mlcadm
Copyright (c) 2009 Mark Logic Corporation. All rights reserved.
Usage: mlcadm command connectString [ siteURL [ docURL [ mlURI ] ] ]

Connect string is of the form: xcc://user:password@host:port[/database]
mode is optional and takes the values: 'mirror', 'copy', and 'dont-copy'

MarkLogic server status commands:
test            Test the connection
status          Send STATUS request to server
getsites        Get web sites
getlists        Get site lists; requires siteURL
getfolders      Get folders under prefix; requires siteURL prefix
getdocs         Get documents under prefix; requires siteURL prefix
getdocprops     Get document properties; requires siteURL and docURL
geturis         Get URI list; requires siteURL and optional docURL

MarkLogic server document commands:
copyfolder      Mirror all documents contained in folder;
                requires siteURL and docUrl
getmetadata     Get metadata; requires siteURL and docURL
putmetadata     Put metadata; requires siteURL and docURL
upload          Upload a document;
                requires siteURL and docURL and optional mode
delete          Delete a document; requires siteURL and docURL
reset           Delete all files and folders on MarkLogic

Sample mlcadm Commands

The section shows some sample mlcadm commands, and includes the following samples:

Test the Connection

The following command tests the connection between the MarkLogic Connector for SharePoint and MarkLogic Server:

C:\> mlcadm test xcc://sharepoint-user:password@my-host:1234
Copyright (c) 2008 Mark Logic Corporation. All rights reserved.
SUCCESS: ML-Version-Edition-Platform: 4.0-2-Enterprise-winnt Server:
         sharepoint
Time: 2008-11-07-08:00 13:55:14-08:00

Check the Status of the Connection

The following command checks the status of the connection between the MarkLogic Connector for SharePoint and MarkLogic Server, and returns information about the version of the MarkLogic Connector for SharePoint, the version of MarkLogic Server, and other information:

C:\> mlcadm status xcc://sharepoint-user:password@my-host:1234
Copyright (c) 2008 Mark Logic Corporation. All rights reserved.
SUCCESS: OK: nvp
SPC-version=1.1-1
ML-version=4.0-2
ML-edition=Enterprise
ML-platform=winnt
ML-server=sharepoint
ML-time=2008-11-07-08:00/13:52:21-08:00
sites=0

Upload a Document From SharePoint to MarkLogic Server

The following command uploads a document from SharePoint to MarkLogic Server:

c:\>upload xcc://sharepoint-user:password@my-host:1234 \
	http://sharepoint-host:19459 \
	"Version Test/my Document.docx" \
	mirror
SUCCESS: GET_METADATA SEND_CONTENT: Document not found; send content
SUCCESS: UPLOAD 224441 bytes in 0.4218642
SUCCESS: PUT_METADATA OK: Metadata added to document

« Previous chapter
Next chapter »
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy