Tools to Troubleshoot DC issues

2


Tools to Troubleshoot DC issues

DCDIAG

DCDIAG analyzes the state of domain controllers in a forest or enterprise and reports any problems to help in troubleshooting.

  1. Preparing to install or migrate to Exchange new version
  2. Checking FSMO roles.
  3. Troubleshooting Group Policy.
  4. Investigating Active Directory not replicating frssysvol error.
  5. Running down Kerberos authentication problems.
  6. Resetting the Directory Service Administrator’s password.
  7. Fixing servers Service Principle Name (SPN) error.
  8. Other DC issues

Example: dcdiag.exe /V /D /C /E > c:\dcdiag.log

DCDIAG tool article http://technet.microsoft.com/en-us/library/cc731968(v=ws.10).aspx

REPADMIN

Repadmin.exe is a Microsoft Windows 2000 Resource Kit tool that is available in the Support Tools folder on the Windows 2000 CD-ROM. It is a command-line interface to Active Directory replication. This tool provides a powerful interface into the inner workings of Active Directory replication, and is useful for troubleshooting Active Directory replication problems.

Example: repadmin.exe /showrepl dc* /verbose /all /intersite > c:\repl.txt

RepAdmin tool article http://technet.microsoft.com/en-us/library/cc770963(v=ws.10).aspx

NETDIAG

This command-line diagnostic tool helps to isolate networking and connectivity problems by performing a series of tests to determine the state of your network client. These tests and the key network status information they expose give network administrators and support personnel a more direct means of identifying and isolating network problems. Moreover, because this tool does not require parameters or switches to be specified, support personnel and network administrators can focus on analyzing the output rather than on training users how to use the tool.

  1. Installing Exchange and you wish to check that you can connect to other servers.
  2. Checking VPN network tunnels on the WAN.
  3. DNS problems.  Computers cannot ‘see’ their domain controller on the LAN.
  4. A quick check on hotfixes.
  5. Check the Network Card Bindings from the command prompt.
  6. You are having problems with IPSEC.
  7. Winsock corruption, wrong version incompatibilities.
  8. NetDiag checks that Domain Controllers are all able to ‘speak’ LDAP.

 

Example: netdiag.exe /v > c:\netdiag.log

Note: This command need to be run on each DC of the domain.

NetDiag tool article http://technet.microsoft.com/en-us/library/cc731434(v=ws.10).aspx

Advertisements

T-SQL – Finding SQL Server Service Restart Date-Time

3

T-SQL – Finding SQL Server Service Restart Date-Time


There are many ways to find out the date & time on which SQL Server service was last restarted.

Method-1: Checking SQL Server Error Log

First time stamp in the SQL Server Error Log can be treated as the time when SQL Server service was restarted.


sp_readerrorlog 0,1,‘Copyright (c)’

Method-2: Using sys.dm_os_sys_info DMV

Starting SQL Server 2008, sys.dm_os_sys_info DMV has a column named sqlserver_start_time. This column as the name suggests stores the time when SQL Server was restarted.


SELECT sqlserver_start_time FROM
sys.dm_os_sys_info;


Or you can use Using sys.dm_exec_sessions DMV

session_id is created when the SQL Server is started and the login time remains the same until the service is restarted again.

SELECT login_time FROM
sys.dm_exec_sessions

WHERE session_id = 1;


Method-3: Start time of the Default Trace

The Default Trace is started when the SQL Server is started. The start_time of this trace can also be taken as the time when the SQL Server service was restarted.

select start_time from sys.traces

where is_default = 1


Method-4: Creating date of tempdb

The creation date of tempdb database will also be the time when SQL Server service was restarted. This is because the tempdb database is re-created whenever the SQL Server service starts up.

SELECT create_date FROM sys.databases
WHERE name = ‘tempdb’

T-SQL – To Get Graphical Execution Plan for Active Sessions

0

T-SQL – To Get Graphical Execution Plan for Active Sessions

If you want to get the graphical execution plan for all active sessions on an instance using T-SQL Script, then this handy script would be a great help. The below query gets the session_id and the query_plan (in XML format). This file in turn needs to be saved as a .sqlplan file to view the Execution Plan in Graphical format. The “Save as” option in SSMS or any text editor can be used for this purpose.

SELECT

er.session_id ,

qp.query_plan

FROM sys.dm_exec_requests er

CROSS APPLY sys. dm_exec_query_plan( er.plan_handle ) qp

If you click the query_plan link, you will get the execution plan in the graphical format (screenshot below)