using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;

namespace BatchedInstructions
{
    class Program
    {
        static void Main(string[] args)
        {
            Server server = new Server("CANOPUS5");
            server.ConnectionContext.SqlExecutionModes = SqlExecutionModes.CaptureSql;
            Configuration config = server.Configuration;
            ConfigProperty defaultLanguage = config.DefaultLanguage;
            ConfigProperty isSqlClrEnabled = config.IsSqlClrEnabled;
            CapturedSql capturedSql = server.ConnectionContext.CapturedSql;
            Console.WriteLine(capturedSql.Text);
            Console.WriteLine(defaultLanguage.ConfigValue);
            Console.WriteLine(isSqlClrEnabled.ConfigValue);

        }
    }
}
