Options

SQL Prompt Error with TextMgrP.dll Registration

adambeanadambean Posts: 1 New member

"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

  • Options
    Dan BDan B Posts: 287 Gold 5
    Hi 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

  • Options
    Harry FrankishHarry Frankish Posts: 53 New member
    Hi adambean

    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
  • Options
    bajabaja Posts: 1 New member
    I stumbled across this identical issue when I've moved my license to a new laptop. Luckily manually registering TextMgrP.dll seems to have worked. Thanks
  • Options
    vsuvsu Posts: 1 New member
    I found out that the problem appeared after updating SSMS to version 19.0.2 in the folder "c:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv" the TextMgrP.dll library is not present, registering from another folder did not help. Fixing the installation didn't help either. Installing the previous version of SSMS (19.0.1) helped.
  • Options
    gfloresgflores Posts: 8 Bronze 1
    edited March 17, 2023 8:41PM
    also encountered the same issue in ssms 19.0.2 on a fresh windows install.
    note: after i installed visual studio and SSIS extension, it worked. this shouldn't be a requirement though
  • Options
    BalkothBalkoth Posts: 8 New member
    I observe the same as @vsu did. After upgrading to Version 19.0.2 the TextMgrP.dll can no longer be found in the "c:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv" folder. Unfortunately i can not go back to a previous version as in our company software is centrally managed. So the addon is unusable for me due to this error.

    What now?
  • Options
    prozach99prozach99 Posts: 8 New member
    Same issue here. Downgrading corrected the problem.

    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
  • Options
    Gary_SGary_S Posts: 2 New member
    I just ran into this as well. I was able to just copy that TextMgrP.dll from my old pc which had a v18 install of SSMS and had that file.  Copy the file and manually register and it works.

  • Options
    BalkothBalkoth Posts: 8 New member
    @Dinomite works, thanks!
  • Options
    prozach99prozach99 Posts: 8 New member
    @Dinomite thank you!! 

    This seems like an issue that MS needs to fix. They obviously installed the dll with SSMS, but apparently forgot to register it.
  • Options
    techredraidertechredraider Posts: 1 New member
    Registering at this location worked for me for SSMS 19.0.2:
    regsvr32 "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation\TextMgrP.dll"

  • Options
    JorritJJorritJ Posts: 1 New member
    I came here to say that upgrading from SSMS 18 to 19.0.2 I got the described error message after uninstalling 18. Installing extra tools did not work. Downgrading to 19.0.1 did the trick! Thanks!
  • Options
    running regsvr32 "C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation\TextMgrP.dll" worked for me.
  • Options
    Dinomite said:
    Ran into this as well after fresh install on a new laptop with the newest version of SSMS as of 3/22/2023 and visual studio 2022.  I searched my computer and found the dll in C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation

    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!
    Thank you, this did the trick indeed!
  • Options
    SQLkiwiSQLkiwi Posts: 3 Bronze 2
    SSMS 19.0.2

    Registering the dll worked for me too.

    C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Automation>regsvr32 textmgrp.dll



  • Options
    ray_22ray_22 Posts: 1 New member
    Hey!!!  If your system showing SQL Prompt Error with TextMgrP.dll missing file. Then don't worry you just download these missing dll files and fix your problem.
  • Options
    swvincentswvincent Posts: 1 New member
    edited April 12, 2023 1:07PM
    Thanks, ran into this with a new machine and brand new install of SSMS 19.0.2 and RedGate and registering the DLL fixed it.

    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.
  • Options
    BalkothBalkoth Posts: 8 New member
    Please don't randomly download dll files from dubious sites and put them on corporate machines. 
  • Options
    SDPmrem71SDPmrem71 Posts: 6 Bronze 1
    swvincent said:
    Thanks, ran into this with a new machine and brand new install of SSMS 19.0.2 and RedGate and registering the DLL fixed it.

    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
     :-] 
  • Options
    Lord02Lord02 Posts: 2 Bronze 1
    This works 100%

    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"
  • Options
    ATurnerATurner Posts: 189 Silver 2
    Hi All
    There is a bug where this can show under certain circumstances on the latest version. The team are looking into a fix. 
  • Options
    LexiconLexicon Posts: 76 Bronze 3
    Make sure to use elevated privileges when registering, otherwise you may get errors telling you with cannot register. @Lord02's solution definitely worked for me after I ran an Admin Terminal session.
    Paul.
  • Options
    pczarn2pczarn2 Posts: 4 Bronze 1
    edited March 29, 2024 12:19PM
    I had just ran into the same issue with SQL Management Studio 20. This command fixed the issue for me ( I ran it As Administrator): regsvr32 "C:\Program Files (x86)\Microsoft SQL Server Management Studio 20\Common7\IDE\Automation\TextMgrP.dll"

    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. 
  • Options
    ChrisBetsChrisBets Posts: 1 New member
    I also had the issue with SSMS 20. @pczarn2 solution worked fine for me.

Sign In or Register to comment.