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

SqlDatabase: RecoveryModel should accept wildcard * ? #1289

Open
Francois-Rousseau opened this issue Feb 24, 2019 · 1 comment
Open

SqlDatabase: RecoveryModel should accept wildcard * ? #1289

Francois-Rousseau opened this issue Feb 24, 2019 · 1 comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.

Comments

@Francois-Rousseau
Copy link

Francois-Rousseau commented Feb 24, 2019

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

I'm installing Sharepoint 2016 with DSC, and have to put the databases into SQL Always On.
For this, I have to use SqlDatabaseRecoveryModel to change the recovery mode to Full prior to use SQLAgDatabase.

The trick is that Sharepoint is creating databases with GUID in their names. So I can't know the database name before install Sharepoint, and I need it to use SqlDatabaseRecoveryModel.

Verbose logs showing the problem

Suggested solution to the issue

I suggest to be able to use Wildcard in the name property, as it is for SqlAgDatabase with the DatabaseName property.

With this, we should be able to do Always On on Sharepoint databases with only the first part of the database name knowed.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here
SqlDatabaseRecoveryModel "ChangeRecoveryToFull_OperationsManagerDW" {
                        Name                 = 'SharepointAdminContent' #should be able to have * !!
                        RecoveryModel        = 'Full'
                        ServerName           = ( $AllNodes | Where-Object { $_.Role -eq 'PrimaryReplica' } ).NodeName
                        InstanceName         = ( $AllNodes | Where-Object { $_.Role -eq 'PrimaryReplica' } ).InstanceName
                        PsDscRunAsCredential = $SqlInstallCredential
                        DependsOn            = '[WaitForAll]InstallSP_Serveur1'
                    }

SQL Server edition and version the target node is running

SQL 2016

SQL Server PowerShell modules present on the target node

12.2.0.0

The operating system the target node is running

OsName : Microsoft Windows Server 2016 Standard Evaluation
OsOperatingSystemSKU : 79
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.2791.amd64fre.rs1_release.190205-1511
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version and build of PowerShell the target node is running

PSVersion 5.1.14393.2791
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.2791
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Version of the DSC module that was used ('dev' if using current dev branch)

12.2.0.0

@johlju
Copy link
Member

johlju commented Feb 25, 2019

This was being worked on in PR #1052, but it is now abandoned. So someone might pick that up, please read How to continue working on a pull request (PR) when an author (contributor) is unable to complete it.

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Feb 25, 2019
@johlju johlju changed the title SqlDatabaseRecoveryModel should accept wildcard * ? SqlDatabase: RecoveryModel should accept wildcard * ? May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants