SPDatabase.Provision Method (SqlConnectionStringBuilder, String, Dictionary<String, Boolean>)
Prepares a Microsoft SQL Server database for use with Microsoft SharePoint Foundation. If the database does not exist it will be created. If the database exists prior to calling the method, it will be provisioned with the SharePoint schema.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Shared Sub Provision ( _
connectionString As SqlConnectionStringBuilder, _
provisioningScriptPath As String, _
options As Dictionary(Of String, Boolean) _
)
'Usage
Dim connectionString As SqlConnectionStringBuilder
Dim provisioningScriptPath As String
Dim options As Dictionary(Of String, Boolean)
SPDatabase.Provision(connectionString, _
provisioningScriptPath, options)
protected static void Provision(
SqlConnectionStringBuilder connectionString,
string provisioningScriptPath,
Dictionary<string, bool> options
)
Parameters
connectionString
Type: System.Data.SqlClient.SqlConnectionStringBuilderA SqlConnectionStringBuilder object that contains the connection string that is used to connect to the database.
provisioningScriptPath
Type: System.StringA string that contains the file system path of the provisioning script.
options
Type: System.Collections.Generic.Dictionary<String, Boolean>A Dictionary object that specifies SQL database options to use in creating the database. See SPDatabase.DatabaseOptions for possible values.