SQL Prompt Error with TextMgrP.dll Registration
adambean
Posts: 1 New member
in SQL Prompt
"SQL Prompt has been disabled due to an error with the registration of a required DLL - TextMgrP.dll. To resolve the error, repair SQL Server Management Studio or Visual Studio from the Windows Control Panel. "
Running SSMS 2016 with VS 2015. Just installed the RedGate tools today and this shows up when launching SSMS.
Found this: viewtopic.php?t=16536 - but that dll doesn't exist in C:\Program Files\Common Files\microsoft shared\MSEnv. The only file in that directory is VSFileHandler_64.dll.
Thanks!
Tagged:
Best Answer
-
Dan B Posts: 287 Gold 5Hi adambean,
Another workaround we have used successfully in the past is below:
Can you kindly try manually re-registering the TextMgrP.dll on your machine which should hopefully resolve the error? Please:
Close SSMS and/or Visual Studio
Open a Command Prompt, running it as administrator
Run the following command regsvr32 "%CommonProgramFiles(x86)%\Microsoft Shared\MSEnv\TextMgrP.dll"
Open SSMS to test
I hope that will help but please let me know if any issues persist!Kind regards,
Dan Bainbridge
Product Support Engineer | Redgate Software
Answers
That's strange. The TextMgrP.dll should be installed with SSMS 2016 and VS 2015. If repairing SSMS and VS doesn't work, try installing SQL Server Data Tools for VS 2015: https://msdn.microsoft.com/en-us/mt186501.aspx - this is how the dll gets installed for VS 2017. Hopefully that'll resolve the issue.
Cheers
Harry
note: after i installed visual studio and SSIS extension, it worked. this shouldn't be a requirement though
What now?
I found you can get the previous version of SSMS here: https://learn.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-ver16#1901
Run command line as administrator and run;
regsvr32 "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation\TextMgrP.dll"
Good to go for me!
This seems like an issue that MS needs to fix. They obviously installed the dll with SSMS, but apparently forgot to register it.
Registering the dll worked for me too.
Edit: to be clear I used the DLL that was already on my machine in C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation.
Thanks 🙏 it worked
Instead of using this ( Wrong file !!!!!! )
regsvr32 "%CommonProgramFiles(x86)%\Microsoft Shared\MSEnv\TextMgrP.dll"
Use this ( Correct file !!!!!! ):
regsvr32 "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation\TextMgrP.dll"
There is a bug where this can show under certain circumstances on the latest version. The team are looking into a fix.
For context, I had SQL Management Studio version 19 installed, then installed version 20. I then uninstalled 19 (I didn't notice that SQL Prompt was not working at that time in version 20). This was couple days ago. Then this morning, I found new version of SQL Prompt on red gate's site that said it supported version 20 (version 10.14.11.7894) and installed it. Then got the TextMgrP.dll registration error. After running above command, the issue is fixed.
BTW, the error window says to do a repair from the Windows Control Panel. Version 20 no longer has the Repair option, so that message was not helpful.