June 8, 2023 at 3:48 pm
We have a stored procedure that calls xp_cmdshell in order to use the BCP command. This SP works in SQL 2017 and 2019, but I am testing SQL 2022 in our environment and this SP does not work. I'm hoping to get some help in determining what is wrong.
Error: [Microsoft][ODBC Driver 17 for SQL Server]Unable to load xmlrw.dll while attempting to read xml format file.
BCP Version: 16.0.1000.6
SQL Version: Microsoft SQL Server 2022 (RTM-CU4) (KB5026717) - 16.0.4035.4 (X64) May 1 2023 10:34:45 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2022 Datacenter 10.0 <X64> (Build 20348: ) (Hypervisor)
Note: I am able to run the same command on previous versions of SQL
Things we've tried:
Thanks in advance for any help!
June 9, 2023 at 4:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
June 9, 2023 at 5:11 pm
It may help if you posted the actual xp_CmdShell call that you're making to BCP.
It also sounds like the default path (at the DOS level) when you simply make a call to BCP is set to the wrong target. It's been a thousand years since I have to make such a change but I, IIRC, it has to do with what the systems "Environment Variables" are set to.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 12, 2023 at 3:22 pm
We were able to get this to work by copying xmlrw.dll from another VM to this VM. I would prefer to understand why this file wasn't in place, but I guess this is a good work around for now.
June 12, 2023 at 7:01 pm
We were able to get this to work by copying xmlrw.dll from another VM to this VM. I would prefer to understand why this file wasn't in place, but I guess this is a good work around for now.
Crud... definitely didn't want to hear something like that. We're just starting migration to 2022. I have the developers edition installed on my laptop. And admin level search using the Cmd Prompt turned up nothing. I also have 2017 installed on the same machine.
What directory did you have to store the copied file in and is that the same directory you pulled the copy from that other machine?
--Jeff Moden
Change is inevitable... Change for the better is not.
June 13, 2023 at 6:05 am
On a single instance SQL Server 2022 installation, you can find bcp.exe overhere: "C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn"
With multiple instances, it may be needed to actually provide the correct path for the specific instance. ( didn't test because we don't mix versions )
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
June 13, 2023 at 2:11 pm
We copied xmlrw.dll from a working machine to the /system32/ and /SysWOW64/ directories on our Azure SQL VM in order to get this working. I think system32 was probably where it needed to be.
June 14, 2023 at 2:01 am
We copied xmlrw.dll from a working machine to the /system32/ and /SysWOW64/ directories on our Azure SQL VM in order to get this working. I think system32 was probably where it needed to be.
Thank you. I appreciate the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply