-
Notifications
You must be signed in to change notification settings - Fork 225
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
xSQLServerHelper: Function Connect-SQL returns successfull even when connection fails #333
Comments
Funny thing that I've seen with the status is the property doesn't update until you actually get another property. I normally query the version to make sure I'm connected. |
If you just use $sql in this case, it returns 'sqltest\Default' (using ToString() or something) which is whatever you tried to connect with. So you are right, must use one of the properties. Only when you use one of the properties it actually connects (each time you use a property apparently). I thought Status -eq 'Online' was better, so it throws if the SQL server is in any other state. |
I'm working on this one. |
- Changes to xSQLServerHelper - Fixed Connect-SQL by ensuring the Status property returns 'Online' prior to returning the SQL Server object (issue #333).
Details of the scenario you try and problem that is occurring:
When running the following
An empty object is returned.
Instead of validating using the following, and throw an error is it is true.
Validation should use
The DSC configuration that is using the resource (as detailed as possible):
n/a
Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a
Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev
The text was updated successfully, but these errors were encountered: