Open
Description
- MSSQL Extension Version: v1.29.1
- VSCode Version: v1.98.2
- OS Version: Windows_NT x64 10.0.26100
Steps to Reproduce:
- Suppose you have some required permission over a MSSQL server. Mine was v16.0.1006.6.
- Add a new Linked Server on MSSQL server. Mine used "Microsoft OLE DB Provider for SQL Server".
- Add a Synonym about the Linked Server on some random database, like
[dbo].[SomeData] for [1.2.3.4].[SomeData].[dbo].[SomeData]
. - Make the Linked Server irresponsive. I don't know why for mine but I think it was some IP address changes.
- Try refreshing Intellisense cache about the database on VSCode and you'll see that it has completely bricked.
- Delete the Synonym(It took three days for me to be authorized to do that. 🤦) and everything got back to normal.
Try querying select * from sys.sysprocesses
while doing MS SQL: Refresh IntelliSense Cache
and find this OLEDB wait.
With that sql_handle
I called sys.fn_get_sql()
to get the command, remove the parameterized where
parts, ran it, and got this result.
This bug also occurs in SSMS(v20.2.30.0) (AFAIK sqltools service and SSMS uses same query),
but at least it doesn't completely brick intellisense.