Select Page

Viewing OS and Service Events, Managing Service

In this article, we’ll discuss how DBServ works with Windows events and services—from monitoring to management.

How to Use Windows Event Viewer to Troubleshoot Server and Application Issues

Both database management systems (DBMS) and operating systems generate events regularly, which need to be logged for future analysis in case of issues. In Windows, this is achieved through the built-in Event Log.

Most of the entries in this log contain information about routine OS activities, configuration changes, and other system actions. However, it also records any errors or issues, making the Event Viewer an essential tool for system administrators to diagnose crashes, freezes, and failed operations.

    How to Launch Event Viewer

    There are several ways to access event logs in Windows. The primary tool is Event Viewer, which is often used alongside the Services console to assess the status of specific services.

    Event Viewer

    The Event Viewer is a convenient tool for reviewing system-level and application events on both local and remote servers.

    You can view local service errors using the method shown in the screenshot below.

    Examples of Useful Operating System Event Codes

      • 6013 — Displays the uptime of the OS in seconds since the last restart.
      • 1074 — Indicates that the system was properly shut down by a user or process.

    Useful Event Codes Related to DBMS

      • 17162— Indicates that the DBMS is running with a normal priority base.

    Services

    The Services console allows you to view the current status of operating system and application services, start or stop them, and access detailed information from both local and remote servers.

    The screenshot below demonstrates how to view services on a remote server.

    Changing Service Startup Types in Windows Using the Command Line

    While services in Windows can be managed through the MMC tool services.msc, it is sometimes more convenient to use the command line. Our specialists recommend using the SC utility, which allows interaction with and management of the Service Control Manager in Windows.

    Example Command for Changing Service Startup Type

    sc config <service name> start=<mode>

    sc config tlntsvr start=auto

    Here’s what the startup types mean:

    • Automatic: The service starts automatically when the computer boots, requiring no user intervention.
    • Manual: The service doesn’t start during boot but can be activated by other programs or services when needed. This mode saves system resources while keeping the service available.
    • Disabled: The service neither starts at boot nor can be triggered by other services. Use this mode cautiously to avoid breaking dependencies.

    Supported startup modes for services:

    • Auto: Starts automatically during boot, even if no user logs in.
    • Boot: Used for device drivers loaded by the bootloader.
    • Demand: Requires manual startup (default mode).
    • Disabled: Prevents the service from starting.
    • System: Launches during OS kernel initialization.

    Remote Configuration Example

    To modify the startup type on a remote server, DBServ engineers recommend using SC alongside PsExec. For instance:

    psexec64 \\SRV-OREP02-MRG -h sc config OracleJobSchedulerFMWREP start=disabled

    Our team can assist you with maintaining system operability and implementing any infrastructure changes to your DBMS environment.

    Cleaning, Deleting, and Disabling Event Logs

    Though event log files don’t typically consume significant disk space, selective or complete log cleanup may sometimes be necessary.

    Selective Cleanup

    This is done manually:

      1. Open the Event Viewer.
      2. Right-click the target log in the left column.
      3. Choose Clear Log from the options.

    Complete Cleanup

    For full log cleanup, you can use the command line:

    for /F “tokens=*” %1 in (‘wevtutil.exe el’) DO wevtutil.exe cl “%1”

    Alternatively, use PowerShell:

    wevtutil el | Foreach-Object {wevtutil cl “$_”}

    PowerShell may leave some records, which can be deleted manually if needed.

    Disabling Event Logs

    To fully disable event logging:

      1. Open the Services console (services.msc).
      2. Locate Windows Event Log, double-click to open its properties.
      3. Set the startup type to Disabled, then click Stop.
      4. Reboot the computer.

    Important: Disabling the event log also deactivates related services. Proceed only if absolutely necessary.

    Summary

    Windows OS, system services, and applications log events and errors in system logs, providing system administrators with the tools needed to diagnose issues effectively. This article highlights the tools and approaches DBServ uses for event monitoring and service management in Windows.