To export and import IT policies, open a command prompt window on the Microsoft SQL Server and type the following commands:
BlackBerry Enterprise Server 3.6 and earlier
Export IT policies
bcp besmgmt..itpolicy out c:\itpolicy.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicy2 out c:\itpolicy2.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate out c:\itpolicytemplate.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate2 out c:\itpolicytemplate2.txt -c -T -S SQLServername\SQLInstance
Where besmgmt is the name of the database, c:\itpolicy.txt, c:\itpolicy2.txt, c:\itpolicytemplate.txt, and c:\itpolicytemplate2.txt are the names and locations of the exported files, and C:SQLServername\SQLInstance is the name of the Microsoft SQL Server instance hosting the database.
Import IT policies
bcp besmgmt..itpolicy in c:\itpolicy.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicy2 in c:\itpolicy2.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate in c:\itpolicytemplate.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate2 in c:\itpolicytemplate2.txt -c -T -S SQLServername\SQLInstance
Where besmgmt is the name of the database, c:\itpolicy.txt, c:\itpolicy2.txt, c:\itpolicytemplate.txt, and c:\itpolicytemplate2.txt are the names and locations of the files containing the IT policy information that will be imported into the database, and C:SQLServername\SQLInstance is the name of the Microsoft SQL Server instance hosting the database.
BlackBerry Enterprise Server 4.0
Export IT policies
bcp besmgmt..itpolicy2 out c:\itpolicy2.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate2 out c:\itpolicytemplate2.txt -c -T -S SQLServername\SQLInstance
Where besmgmt is the name of the database, c:\itpolicy2.txt. and c:\itpolicytemplate2.txt are the names and locations of the exported files, and C:SQLServername\SQLInstance is the name of the Microsoft SQL Server instance hosting the database.
Import IT policies
bcp besmgmt..itpolicy2 in c:\itpolicy2.txt -c -T -S SQLServername\SQLInstance
bcp besmgmt..itpolicytemplate2 in c:\itpolicytemplate2.txt -c -T -S SQLServername\SQLInstance
Where besmgmt is the name of the database, c:\itpolicy2.txt and c:\itpolicytemplate2.txt are the names and locations of the files containing the IT policy information that will be imported into the database, and C:SQLServername\SQLInstance is the name of the Microsoft SQL Server instance hosting the database.
BlackBerry Enterprise Server 4.1 and later
BlackBerry Enterprise Server 4.1 does not allow the bulk copy program (BCP) Import and Export commands to access data, because Microsoft SQL Server stores this as binary data.
- BlackBerry® Enterprise Server 3.6 and later
- Microsoft® SQL Server®
Disclaimer
By downloading, accessing or otherwise using the Knowledge Base documents you agree:
(a) that the terms of use for the documents found at www.blackberry.com/legal/knowledgebase apply to your use or reference to these documents; and
(b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.
Visit the BlackBerry Technical Solution Center at www.blackberry.com/btsc.

