Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Tuesday, November 26, 2024

SQL error when connecting to server using servername\instance.

SQL error when connecting to server using servername\instance. 

Error:

A network-related or instance-specific error occurred when establishing a connection to SQL server. the server was not found or was not accessible.Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error:26 - Error Locating Server/Instance Specified) (Microsoft SQL Server)

 


 Solution:

The UDP port 1434  on destination server was being  blocked in  the firewall.


Wednesday, August 9, 2023

MECM/SCCM SQL Queries

 Get process core count.

SELECT
 DISTINCT(CPU.SystemName0) AS [System Name],
 CPU.Manufacturer0 AS Manufacturer,
 CPU.Name0 AS Name,
 COUNT(CPU.ResourceID) AS [Number of CPUs],
 CPU.NumberOfCores0 AS [Number of Cores per CPU],
 CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
 FROM [dbo].[v_GS_PROCESSOR] CPU
 GROUP BY
 CPU.SystemName0,
 CPU.Manufacturer0,
 CPU.Name0,
 CPU.NumberOfCores0,
 CPU.NumberOfLogicalProcessors0
 

Wednesday, October 20, 2021

SQL intellisense not working

The following are not a sequence of steps. You can try each one of these and something might work.

Check if you have  intellisense enabled.

 

If the Intellisense is not working only for certain databases.Keep the top check box enabled but remove the underline errors and outline statements.  Open a new query window and check.


  Disable SQLCMD mode.

 

Refresh Local Cache.