Maxdop query

declare @core_cnt int declare @numa_node int set @core_cnt = ( select a.[cpu_count] from [sys].[dm_os_sys_info] a ) set @numa_node = ( select max(a.[memory_node_id]) + 1   from [sys].[dm_os_memory_clerks] a   where a.[memory_node_id] < 64 ) — IF LESS THAN 5 CORES, THEN DON’T BOTHER — if @core_cnt > 4 begin declare @max_dop int — 75% OF […]

how to use tablediff.exe tool

tablediff.exe  is a Microsoft Internal tool in SQL Server 2008. this is used to check a quick comparison between 2 table in 2 different instanced.tablediff.exe can  do a comparison search on row level ,common level and schema level, this command is located in the C:Program FilesMicrosoft SQL Server100COM path, syntax of tablediff.exe is as below […]

Port Used by SQL Server?

Every one knows that by default any version of SQL Server Uses 1433. how to check the port used by SQL Server. 1: execute use master go xp_readerrorlog 0,1,N’Server is listening on’,’any’,NULL,NULL,N’asc’ in the management studio Option 2 OPtion 3 run this query in the SQL  Server Management Studio select distinct local_net_address, local_tcp_port from sys.dm_exec_connections […]