Skip to content

Add a win-sqlclient-x86 folder, in addition to win-sqlclient and copy certain files to there #11

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

Closed
wants to merge 1 commit into from

Conversation

ashdar
Copy link

@ashdar ashdar commented May 13, 2024

If I have this fix right, it closes #10.

I'm not sure if I have the build script perfect, in that I'm not 100% that the files I want will be copied when the Github build action runs. I just don't have a great way to test the build process, but I am only changing two files here and I'm only adding, not subtracting.

File #1: If you look at the PSM1 file, you can see that I am just adding a check (when we are running windows) to see if we are x86 or x86. I then choose a path (sql-winclient-x86 or sql-winclient) based on that.

File #2: If you look at build-core.ps1, you can see that I am creating sql-winclient-x86 in a way that mimics what was already there for sql-winclient (IOW both windows and non-windows), then copying three files into sql-winclient-x86. Two of the new files are identical to the ones found in sql-winclient, but the third is copied from the 'native x86' location the in the nupkg (which was already cracked open by pre-existing code in the build script). Anything else in there is basically "she does this for win-sqlclient, so we probably need it for win-sqlclient-x86 too".

I did hand-build a version on my laptop ("2024.4.99", so I can test auto import). It works as I expected it to. So, "it works on my machine", but we all know how that goes. I will probably go ahead and deploy this in my estate on at least one production machine where I have a particularly thorny problem. When the official version gets released with a new version number, my version will be automatically superseded.

potatoqualitee added a commit to niphlod/dbatools.library that referenced this pull request Jan 30, 2025
thank you @ashdar 🙏  Sorry it took so long! now there'd be a conflict so i added it myself
@potatoqualitee
Copy link
Member

this will 100% be in the next release, coming soon!

@potatoqualitee
Copy link
Member

thank you very much for htis btw

@ashdar
Copy link
Author

ashdar commented Apr 7, 2025

You are welcome. FWIW, I have been running my own (forked) version of this in (a very small) production environment since about the time I submitted this. It's been fine.

That particular version also remediated an issue where "sometimes" the dbatools module would not load in a SQL Agent task I had. (This was a simple little job to export all of the databases and DACPAC files, for safekeeping.) The Task would run weekly, for four or six weeks, then fail. The error message was something like "could not load the module". I'd manually restart the SQL Agent job, and it would run without any problem. It was weirdly random, and I never did reliably reproduce the bad behavior, but the problem disappeared. I presume that there was some other change in that particular release that helped me out.

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

Successfully merging this pull request may close these issues.

An attempt was made to load a program with an incorrect format. (0x8007000B)" problem, but with more research
2 participants