SqlDatabases is used to create or delete a database. For more information about SQL Server databases, please read the following articles Create a Database and Delete a Database.
This resource sets the recovery model for a database. The recovery model controls how transactions are logged, whether the transaction log requires (and allows) backing up, and what kinds of restore operations are available. Three recovery models exist: full, simple, and bulk-logged. Read more about recovery model in the article View or Change the Recovery Model of a Database.
Source |
|
DSC Resource |
|
Documentation |
-
Target machine must be running Windows Server 2012 or later.
-
Target machine must be running SQL Server Database Engine 2012 or later.
-
Valid values per SQL Server version for the parameter
CompatibilityLevel
can be found in the article ALTER DATABASE (Transact-SQL) Compatibility Level.
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Mandatory |
Hashtable[] |
List of SQL databases. |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name |
Key |
String |
The name of the SQL Server database. |
|
InstanceName |
Key |
String |
The name of the SQL Server instance to be configured. |
|
Enure |
String |
Determines whether the alias should be added ( |
|
|
ServerName |
String |
The host name of the SQL Server to be configured. Default value is the current computer name. |
||
Collation |
String |
The name of the collation to use for the new database. Default value is the collation used by the server. |
||
CompatibilityLevel |
String |
Specifies the version of the SQL Database Compatibility Level to use for the specified database. |
|
|
RecoveryModel |
String |
The recovery model for the specified database. |
|
SqlDatabases:
Values:
- EndpointName: HADR
EndpointType: DatabaseMirroring
Port: 5022
ServerName: SQL1
InstanceName: MSSQLSERVER
- EndpointName: HADR
EndpointType: DatabaseMirroring
Port: 5023
ServerName: SQL2
InstanceName: MSSQLSERVER