From 7c0a848a20c8fdefc2bcefa3419652c9ec7f8e8e Mon Sep 17 00:00:00 2001 From: Johan Ljunggren Date: Mon, 15 Jul 2019 09:26:01 +0200 Subject: [PATCH] Changes to SqlDatabase - Updated resource description in README.md - Fix examples to use PsDscRunAsCredential (issue #760). --- CHANGELOG.md | 5 +++++ Examples/Resources/SqlDatabase/1-CreateDatabase.ps1 | 4 ++++ Examples/Resources/SqlDatabase/2-DeleteDatabase.ps1 | 2 ++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 642ba4871..d82b03154 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,10 +17,15 @@ - Can also pipe in 'Microsoft.SqlServer.Management.Smo.Server' object. - Can pipe Connect-SQL | Invoke-Query. - Added default values to Invoke-Query. + - Minor style fixes in unit tests. - Changes to SqlServerSecureConnection - Forced $Thumbprint to lowercase to fix [issue #1350](https://github.com/PowerShell/SqlServerDsc/issues/1350). - Changes to SqlSetup - Correct minor style violation [issue #1387](https://github.com/PowerShell/SqlServerDsc/issues/1387). +- Changes to SqlDatabase + - Updated resource description in README.md + - Fix examples to use `PsDscRunAsCredential` ([issue #760](https://github.com/PowerShell/SqlServerDsc/issues/760)). + - Added integration tests ([issue #739](https://github.com/PowerShell/SqlServerDsc/issues/739)). ## 13.0.0.0 diff --git a/Examples/Resources/SqlDatabase/1-CreateDatabase.ps1 b/Examples/Resources/SqlDatabase/1-CreateDatabase.ps1 index e3ce99289..72fc8a8ce 100644 --- a/Examples/Resources/SqlDatabase/1-CreateDatabase.ps1 +++ b/Examples/Resources/SqlDatabase/1-CreateDatabase.ps1 @@ -25,6 +25,8 @@ Configuration Example ServerName = 'sqltest.company.local' InstanceName = 'DSC' Name = 'Contoso' + + PsDscRunAsCredential = $SqlAdministratorCredential } SqlDatabase Create_Database_with_different_collation @@ -34,6 +36,8 @@ Configuration Example InstanceName = 'DSC' Name = 'AdventureWorks' Collation = 'SQL_Latin1_General_Pref_CP850_CI_AS' + + PsDscRunAsCredential = $SqlAdministratorCredential } } } diff --git a/Examples/Resources/SqlDatabase/2-DeleteDatabase.ps1 b/Examples/Resources/SqlDatabase/2-DeleteDatabase.ps1 index 482c454f4..480a14e40 100644 --- a/Examples/Resources/SqlDatabase/2-DeleteDatabase.ps1 +++ b/Examples/Resources/SqlDatabase/2-DeleteDatabase.ps1 @@ -22,6 +22,8 @@ Configuration Example ServerName = 'sqltest.company.local' InstanceName = 'DSC' Name = 'AdventureWorks' + + PsDscRunAsCredential = $SqlAdministratorCredential } } }