Databases Reference
In-Depth Information
the assembly. The following is a sample code of a console application that re-
gisters the assembly to a specific database in an Analysis Services instance:
using System;
using System.IO;
using AMO = Microsoft.AnalysisServices;
namespace RegisterAssembly
{
/// <summary>
/// This console program is used to add .NET
assemblies to Analysis Services
databases with appropriate permission set and
impersonation mode.
///
----------------------------------------------------------------------
/// </summary>
class RegisterAssembly
{
[STAThread]
static void Main (string[] args)
{
int impersonationMode = 0;
int permissionSet = 0;
//This console application takes five
command line parameters
// Server name
// Assembly name with full path that is
to be registered
// Database to which the assembly needs
to be added
// Permission
// Impersonation Mode
if (args.Length != 5)
{
Console.WriteLine ("Usage ...");
Console.WriteLine ("RegisterAssembly
{server} {assemPath} {database}
{PermissionSet (1-ExternalAccess,2-Safe,
3-Unrestricted) {ImpersonationMode (1-
Search WWH ::




Custom Search