question

aziegler-4728 avatar image
0 Votes"
aziegler-4728 asked Criszhan-msft answered

SQL Server throws error after deinstalling Visual 2010 C++ redistributable

Hello,

I manage several stand-alone SQL Servers with SharePoint on top. The architecture is a bit special due to location-issues, so it may not look "best practise", but for good reasons.

I manage about a dozen farms like that. It's always SQL Server 2012 - database engine & client tools like Management Studio. Again, this is due to location issues.

As far as I understand, during the installation of Management Studio for SQL Server 2012, Visual 2010 C++ redistributable is installed. This software is now "end-of-lifecycle", so my IT Security-department has asked me to deinstall it. On most farms, this wasn't an issue. However, the final three farms throw weird errors. During the uninstallation, the process says it has to stop & restart SQL Server (hasn't happened on the other boxes) and after the Uninstall, Management Studio doesn't work anymore. Even when installing the newest Management Studio or connecting from another server with Management Studio, I get errors.

Example, when I try to open the properties of a database:

"Could not load the DLL xpstar.dll or one of the DLLs it references. Reason 126 (the specified module could not be found"

Funnily enough, this DLL still exists, so it has to be a reference or something. SharePoint seems to work, but I haven't tested this properly, I rolled back the uninstall. Most activities within Management Studio were impossible.

Does anyone know this error? Does anyone have any idea?

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Criszhan-msft avatar image
0 Votes"
Criszhan-msft answered

Hi,

"Could not load the DLL xpstar.dll or one of the DLLs it references. Reason 126 (the specified module could not be found"

For SQL Server 2012, xpstar.dll is located at C:\Program Files\Microsoft SQL Server\MSSQL11.Instancename\MSSQL\Binn by default.

I saw some related posts about this error and someone suggested to replace xpstar.dll or apply SP on SQL Server. Please check.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cc1ae2d5-e01c-447c-937f-9101ea66f434/sql-2012-sqlagent-wont-start?forum=sqlsetupandupgrade
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/346e1cdf-bb84-41e2-8f04-9e2cd9e5ebab/error-22272-cannot-load-xpstardll?forum=sqltools

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

aziegler-4728 avatar image
0 Votes"
aziegler-4728 answered

The patch-level on all machines is the same. I'll try the xp_readerrorlog during the next maintenance window. Thanks for the advice.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

aziegler-4728 avatar image
0 Votes"
aziegler-4728 answered ErlandSommarskog commented

While I would certainly like to tell the Security Department to get all off my back of this, this is not how it works in our corporate environment. :)

We have plans to upgrade the entire architecture, however this will only happen next year and cannot be done quickly, as this is a production system.

I wonder however why this error is only thrown on a few systems, not all of them. Can I work around this somehow? Or is this an error only within Management Studio, does SQL Server work properly otherwise?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Try running xp_readerrorlog directly from a query window on both machines where it work, and where it does not.

If it still works on some, and not on others, check @@version on the servers. Maybe you are behind on the service-pack level on some of them.

This is indeed an error with the engine, if only with a component that could be called optional with a stretch of the word.

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

xpstar.dll is a DLL used to run some built-in extended stored procedures, including xp_readerrorlog, which SSMS is likely to access when you open the database properties. Overall, this is a handy procedure to have available, as it permits you to look at the errorlog without having to go to the actual folder.

I would tell your IT department to drop dead and reinstall the VC++ Redistributable.

In the long run, you may want to be a good boy and upgrade to a newer version of SQL Server. After all, SQL 2012 is going out of mainstream support next year.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.