Comments (7)
You can also install the older version of the module, zip it, then choose to add your own module in the Azure Automation Account instead of using the gallery and specifically use the 21.1.18256 version of SQLServer instead of 22 and above. Ran into the same issue with both RunBooks and normal scripts in the past when mixing in Az, PnP, or Graph modules and 21 never runs into the conflict for me.
from sqlserverpsmodule.
Hi @Tbablani72 ,
The issue is most likely a duplicate of another one which is going to require a complete rewrite of the module, sadly. But maybe there is hope that we can patch it up somehow...
Would you happen to know what thos "Automation Run Book" are setup and run? I have no clue... (well, I think I did something a while back, but I completely forgot).
It would be nice to know how the environement this script runs in is setup... i.e. what modules are loaded before the sqlSERVER cmdletes are executed...
Best option for me would be to have a repro that does not involve the Automation Run Book...
if that is not possible, could you at least have the script temporarily updated to dump the output of:
$PSVersionTable
Get-Module
(before and after running the script fragment that is failing)- Get all the loaded assemblies before and after running the script fragment that is failing)
[System.AppDomain]::CurrentDomain.GetAssemblies() | Where-Object Location | Sort-Object -Property FullName | Select-Object -Property FullName, Location, GlobalAssemblyCache
- A description of the setup (I see there's an AVK, a DB, a managed identity, ...): how would I go about setting up an environment similar to that?
from sqlserverpsmodule.
This looks a lot like #45
@DBarmanMS - can you take a look at these issues and see if there's anything that we can suggest as workaround?
The ALC work is big and hardly coming any time soon... but perhaps we could play with our assembly resolution logic or maybe avoid this dependency in the AE cmdlet...
from sqlserverpsmodule.
Hi @Tbablani72 ,
Could you please share a stand-alone script to reproduce this issue? I'm not able to reproduce this in my setup following the cmdlet article.
from sqlserverpsmodule.
Easiest solution is to run the script in powershell 7. Please try it out and let me know if you face any issue.
from sqlserverpsmodule.
We were facing the same error when trying to run PowerShell script from our Jenkins pipeline. Only thing that worked was to change the SQLServer version to 21.1.18256. Seems using the latest version throws the error.
from sqlserverpsmodule.
This worked for us in our release pipeline when we toggled 'Use powershell core' in the release definition under Advanced.
from sqlserverpsmodule.
Related Issues (20)
- Expose ObjectId parameter via Add-SqlLogin to create logins using ObjectId
- Data conversion error while writing table with Write-SqlTableData HOT 1
- Get-SqlDatabase and Invoke-Sqlcmd Piping HOT 2
- Backup-SqlDatabase File Splitting
- Read-/Write-SqlTableData not working with -AccessToken and managed-identity (Azure Function to work with Azure SQL DB) HOT 2
- Enclave enabled keys in a database without an enclave HOT 1
- Invoke-SqlAssessment - IndexFragmentation rule doesn't take partitions into consideration
- Using Invoke-SqlCmd in ForEach-Object -Parallel loop - not threadsafe? HOT 3
- Received parsing error for current version that I never received in 21.1.18256 HOT 3
- Invoke-Sqlcmd documentation incorrectly says -InputFile parameter disallows spaces HOT 3
- Adding module to azure automation runtime 7.2 fails with This module requires PowerShell 7.2.1+. Please, upgrade your PowerShell version by checking https://aka.ms/pscore6. HOT 9
- Invoke-Sqlcmd gets TypeInitializationException with 22.1.1 HOT 4
- Consider adding a new parameter -ServerCertificate where applicable
- Write-SqlTableData doesn't clear Write-Progress bar HOT 3
- Write-SqlTableData : A parameter cannot be found that matches parameter name 'TrustServerCertificate' HOT 2
- SQLRegistration does not work with SSMS 20.0 and SqlServer module 22.2.0 HOT 5
- Question: Version 22.2 Release Notes Aren't Yet Populated HOT 2
- Add-SqlLogin: DenyWindowsLogin: unknown property. HOT 3
- Set-SqlColumnEncryption: Login failed for user '' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlserverpsmodule.