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

Need to provide parameter for which SQL PowerShell module to use #3762

Closed
MattTraxinger opened this issue Nov 14, 2024 · 3 comments · Fixed by #3763
Closed

Need to provide parameter for which SQL PowerShell module to use #3762

MattTraxinger opened this issue Nov 14, 2024 · 3 comments · Fixed by #3763
Assignees

Comments

@MattTraxinger
Copy link
Contributor

Describe the issue
There can be issues when both SQLPS and the SQLServer PowerShell modules are both installed. Restore-BcDatabaseFromArtifacts will fail. Additionally I believe SQLPS is not the recommended module at this point.

Scripts used to create container and cause the issue
Following the scripts here: https://community.dynamics.com/blogs/post/?postid=cb3372ed-161f-4549-b935-7b4028e0cd72

Proposed PR coming shortly.

@freddydk
Copy link
Contributor

Inside the container, SQLPS is only used in PS5 and the SQLServer module is only installed in PS7 (and is not compatible with PS5).
But... - that function should be working on both though as it doesn't run inside the container.

Will look at your PR when it arrives.

@MattTraxinger
Copy link
Contributor Author

Thanks. I ran in PowerShell 5 and 7. It always fails with SQLPS. Even if I uninstall it it comes back magically. But everything works like a charm with the SQLServer module. If there's a better way to do it I'm happy to.

@freddydk
Copy link
Contributor

SQLPS in PS5 is part of the SQL installation - will never exist on PS7.
SqlServer needs to be installed manually - can be installed globally (PS5 and PS7) or locally in PS7 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants