DBA Corner

Data is stored somewhere

Category: Guide

  • SQL Server 2000 Product Key and MDAC: Historical Inventory Note

    This is a historical inventory note. SQL Server 2000 and the Microsoft Data Access Components (MDAC) era are obsolete and unsupported. Do not expose product keys by querying the Windows registry from inside SQL Server. Inventory a current SQL Server instance SELECT SERVERPROPERTY(‘ServerName’) AS server_name, SERVERPROPERTY(‘ProductVersion’) AS product_version, SERVERPROPERTY(‘ProductLevel’) AS product_level, SERVERPROPERTY(‘Edition’) AS edition, SERVERPROPERTY(‘ProductUpdateLevel’)…

  • Use Excel Power Query to Read SQL Server Data Safely

    Excel can read SQL Server data without embedding passwords or building SQL text from worksheet cells. Power Query is the preferred workflow for most reporting workbooks. Connect with Power Query In Excel, choose Data > Get Data > From Database > From SQL Server Database. Enter the approved server and, optionally, database name. Prefer organizational…

  • Shell Script: Find the Script’s Own Directory

    A script’s current working directory and the directory containing the script are different concepts. pwd reports where the caller is working; it does not reliably report where the script file lives. Bash: directory containing the script #!/usr/bin/env bash set -euo pipefail SCRIPT_DIR=”$( cd — “$(dirname — “${BASH_SOURCE[0]}”)” >/dev/null 2>&1 pwd -P )” printf ‘Script directory:…

  • SQL Server Performance Hardware Checklist

    Choose SQL Server hardware from measured workload requirements, not a generic rule such as “buy the most CPUs possible.” Licensing, NUMA topology, storage latency, memory pressure, virtualization, and growth can matter more than a single headline specification. 1. Establish the workload Peak and typical transactions, batch duration, concurrent sessions, and data growth Read/write mix, working-set…

  • xbindkeys: Create Safe Linux Keyboard Shortcuts

    xbindkeys runs commands from keyboard or mouse shortcuts under the X Window System. It is useful for lightweight X11 desktops, but many Wayland sessions restrict global key capture; in that case, use the desktop environment’s native shortcut settings. Capture a key combination xbindkeys –key Press the desired key once. For combinations that are difficult to…

  • Oracle: Enable or Disable ARCHIVELOG Mode

    ARCHIVELOG mode is required for online backups and point-in-time recovery. Changing the mode requires the database to be mounted but not open, so plan an outage and confirm that recent backups are recoverable. Before the change Verify the current mode with SELECT log_mode FROM v$database;. Confirm the archive destination has enough capacity and is monitored.…

  • Oracle Transportable Tablespaces with Data Pump

    Transportable tablespaces move user tablespace data files plus a Data Pump metadata dump. They can be much faster than unloading and reloading large data sets, but the tablespace set must be self-contained and compatible with the target. 1. Check prerequisites and containment BEGIN DBMS_TTS.TRANSPORT_SET_CHECK( ts_list => ‘APP_DATA,APP_INDEX’, incl_constraints => TRUE, full_check => TRUE ); END;…