New-DlmDatabaseDocumentation
Published 03 F 2016
New-DlmDatabaseDocumentation
Generates documentation for the validated database schema produced by the Invoke-DlmDatabaseValidation cmdlet.
Syntax
New-DlmDatabaseDocumentation [-InputObject] <ValidatedSchemaSource> [-TemporaryDatabaseServer <DatabaseServerConnection>] [<CommonParameters>] |
Description
The New-DlmDatabaseDocumentation cmdlet takes the output of the Invoke-DlmDatabaseValidation cmdlet and creates documentation for that schema. It creates a SchemaDocumentation object that represents the documentation of the validated schema.
You can use the New-DlmDatabasePackage cmdlet to include this documentation in the database package it creates.
In order to generate the documentation, the cmdlet creates a temporary copy of the database. By default, it uses LocalDB for this. Alternatively, you can use the TemporaryDatabaseServer parameter to specify a SQL Server instance for the temporary database. This is useful if your database uses features that aren't supported by LocalDB, such as Full-Text Search.
If you don't want to use LocalDB but don't have permission to create a database on the SQL Server instance, you can use the TemporaryDatabase parameter to specify an existing database.
Parameters
-InputObject
<RedGate.SQLRelease.Compare.SchemaValidation.ValidatedSchemaSource>
The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.
Aliases | None |
Required? | true |
Position? | 0 |
Default Value | None |
Accept Pipeline Input | true (ByValue) |
Accept Wildcard Characters | false |
-TemporaryDatabaseServer
<RedGate.SQLRelease.Compare.SchemaSources.DatabaseServerConnection>
The connection string for the temporary database server used for documentation. For example, 'Data Source=TempServer01'.
By default, SQL Release uses LocalDB for the temporary database. However there may be some features in your database that aren't supported by LocalDB (for example, Full-Text Search). In this case, or if LocalDB is not present, use this parameter to specify an alternative SQL Server instance for the temporary database.
Using this option, SQL Release will create a temporary, randomly-named database on the specified SQL Server instance.
You can't use this parameter in addition to the TemporaryDatabase parameter.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
-TemporaryDatabase
<RedGate.SQLRelease.Compare.SchemaSources.DatabaseConnection>
The details of the temporary database used for documentation. This can be:
- a database connection object that contains connection details for a database. See New-DlmDatabaseConnection for details.
- a database connection string. For example, 'Data Source=TempServer01;Initial Catalog=TempDatabase01'.
By default, SQL Release uses LocalDB for the temporary database. If you don't want to use LocalDB and don't have permission to create a database on the SQL Server instance, use this option to specify an existing database to use for the temporary copy of the database.
If you use this parameter, all existing data on the temporary database will be lost.
You can't use this parameter in addition to the TemporaryDatabaseServer parameter.
Aliases | None |
Required? | false |
Position? | named |
Default Value | None |
Accept Pipeline Input | false |
Accept Wildcard Characters | false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- RedGate.SQLRelease.Compare.SchemaValidation.ValidatedSchemaSource
The output object of Invoke-DlmDatabaseSchemaValidation cmdlet, which represents the validated database schema.
Return values
The output type is the type of the objects that the cmdlet emits.
- RedGate.SQLRelease.Compare.Documentation.SchemaDocumentation
Examples
---------- EXAMPLE 1 ----------
|
This example shows how to create database documentation for a validated scripts folder using the New-DlmDatabaseDocumentation cmdlet. The New-DlmDatabasePackage cmdlet includes this documentation with the schema in the database package it creates.