Update docs (#200)

This is a documentation-only update so automerging.  Please review the commit if there are any follow-ups requested.

* Update .gitignore for docfx genertated files

* Update documenation (part 1)

* Update docs and add some samples

* More doc updates
This commit is contained in:
Karl Burtram
2016-12-20 15:52:46 -08:00
committed by GitHub
parent 1e59166147
commit 4184eae8a1
26 changed files with 2529 additions and 5 deletions

View File

@@ -0,0 +1,42 @@
using Microsoft.Data.Tools.DataSets;
using Microsoft.SqlServer.Management.Smo;
using System;
namespace Microsoft.SqlServer.Management.SmoSdkSamples
{
// This example displays information about the instance of SQL Server in Information and Settings, and modifies settings in Settings and UserOptionsobject properties.
public class Program
{
public static void Main(string[] args)
{
//Connect to the local, default instance of SQL Server.
Microsoft.SqlServer.Management.Smo.Server srv = new Microsoft.SqlServer.Management.Smo.Server();
//Display all the configuration options.
foreach (ConfigProperty p in srv.Configuration.Properties)
{
Console.WriteLine(p.DisplayName);
}
Console.WriteLine("There are " + srv.Configuration.Properties.Count.ToString() + " configuration options.");
//Display the maximum and minimum values for ShowAdvancedOptions.
int min = srv.Configuration.ShowAdvancedOptions.Minimum;
int max = srv.Configuration.ShowAdvancedOptions.Maximum;
Console.WriteLine("Minimum and Maximum values are " + min + " and " + max + ".");
int configvalue = srv.Configuration.ShowAdvancedOptions.ConfigValue;
//Modify the value of ShowAdvancedOptions and run the Alter method.
srv.Configuration.ShowAdvancedOptions.ConfigValue = 0;
srv.Configuration.Alter();
//Display when the change takes place according to the IsDynamic property.
if (srv.Configuration.ShowAdvancedOptions.IsDynamic == true)
{
Console.WriteLine("Configuration option has been updated.");
}
else
{
Console.WriteLine("Configuration option will be updated when SQL Server is restarted.");
}
// Recover setting value
srv.Configuration.ShowAdvancedOptions.ConfigValue = configvalue;
srv.Configuration.Alter();
}
}
}

View File

@@ -0,0 +1,21 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.SqlServer.Smo": "140.1.12"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}