Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlDatabaseOwner: Does not support multi instances setting #1197

Closed
apichaya-s opened this issue Aug 16, 2018 · 1 comment · Fixed by #1204
Closed

SqlDatabaseOwner: Does not support multi instances setting #1197

apichaya-s opened this issue Aug 16, 2018 · 1 comment · Fixed by #1204
Labels
bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@apichaya-s
Copy link

Details of the scenario you tried and the problem that is occurring

The SqlDatabaseOwner has only Database as a key so it failed when there are 2 or more instances on the same computer.

Resources have identical key properties but there are differences in the following non-key properties: 'InstanceName'. Values
'Instance1' don't match values 'Instance2'. Please update these property values so that they are identical in both cases.

The DSC configuration that is using the resource (as detailed as possible)

        SqlDatabaseOwner "Instance1_Owner_Db1" {
            Name         = $DatabaseOwner
            Database     = 'Db1'
            ServerName   = 'localhost'
            InstanceName = 'Instance1'
        }
        SqlDatabaseOwner "Instance2_Owner_Db1" {
            Name         = $DatabaseOwner
            Database     = 'Db1'
            ServerName   = 'localhost'
            InstanceName = 'Instance2'
        }

Version of the operating system and PowerShell the target node is running

Caption OSArchitecture Version MUILanguages $PSVersionTable.PSVersion


Microsoft Windows 10 Pro 64-bit 10.0.17134 {en-US} 5.1.17134.165

SQL Server edition and version the target node is running

Edition : Developer Edition
Version : 12.0.2000.8
Language : 1033

What SQL Server PowerShell modules, and which version, are present on the target node.

Name Version Path


SQLPS 1.0 C:\Program Files\Microsoft SQL Server\120\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1
SQLASCMDLETS 1.0 C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\SQLASCMDLETS\SQLASCMDLETS.psd1
SQLPS 1.0 C:\Program Files (x86)\Microsoft SQL Server\120\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1
SQLPS 14.0 C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules\SQLPS\SQLPS.psd1

Version of the DSC module you're using, or write 'dev' if you're using current dev branch

Name Version Path


SqlServerDsc 11.4.0.0 C:\Program Files\WindowsPowerShell\Modules\SqlServerDsc\11.4.0.0\SqlServerDsc.psd1

@johlju
Copy link
Member

johlju commented Aug 16, 2018

@apichaya-s agree this is a bug, and it wasn't caught because the example is only using instance of the resource. Are you up to sending in a PR resolving this issue?

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub labels Aug 16, 2018
johlju pushed a commit that referenced this issue Aug 27, 2018
- Changes to SqlDatabaseOwner
  - BREAKING CHANGE: Support multiple instances on the same node.
    The parameter InstanceName is now Key and cannot be omitted (issue #1197).
@johlju johlju removed the help wanted The issue is up for grabs for anyone in the community. label Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants