Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • To Find Orphan OS processes. Linux/Unix
  • Default User Profile Oracle
  • move_arch_files.ksh Linux/Unix
  • Gathering statistics with DBMS_STATS Oracle
  • perf_today.sql Oracle
  • useful dg links Oracle
  • Changing default shell Linux/Unix
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • create PLAN_TABLE command. Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • Rename Tablespace Oracle
  • Find Command Linux/Unix

Day to day MYSQL DBA operations (Compared with Oracle DBA)

Posted on 24-Jul-202524-Jul-2025 By Admin No Comments on Day to day MYSQL DBA operations (Compared with Oracle DBA)

Here is a mapping of commonly used Oracle dynamic performance views (V$ views) and data dictionary views (DBA_*) to their closest equivalents in MySQL. These are especially useful for Oracle DBAs learning how to inspect system-level information in MySQL.


🔄 Oracle V$ and DBA_ Views vs MySQL INFORMATION_SCHEMA / Performance Schema

Oracle ViewMySQL EquivalentPurpose / Notes
V$SESSIONinformation_schema.PROCESSLISTperformance_schema.threadsShows active sessions / threads. Also use SHOW FULL PROCESSLIST.
V$DATABASESELECT @@hostname, @@version, @@datadirSELECT schema_name FROM information_schema.schemataNo direct equivalent; use system variables + schemata info.
V$INSTANCESELECT @@hostname, @@port, @@version, @@basedir, @@socketShows server instance details.
V$LOCKperformance_schema.metadata_locksinformation_schema.innodb_locks (if enabled)For active locks. Note: innodb_locks is deprecated in newer versions.
DBA_TABLESinformation_schema.tablesShows table metadata (rows, engine, size etc).
DBA_VIEWSinformation_schema.viewsLists view definitions and properties.
DBA_OBJECTSNo single equivalent. Use combination of:• information_schema.tables• information_schema.views• mysql.proc (for routines)Lists all objects (tables, views, procedures, triggers, etc). MySQL separates this.
DBA_USERSmysql.user (use: SELECT User, Host FROM mysql.user)Lists all users. Not available in information_schema.
V$PARAMETERSHOW VARIABLESinformation_schema.global_variablesFor system parameter values.
V$SYSSTATSHOW GLOBAL STATUSperformance_schema.global_statusFor system statistics.
V$DATAFILEMySQL manages files internally.Use: SHOW TABLE STATUS or check InnoDB tablespace infoMySQL hides datafile info; not user-controllable like Oracle.
DBA_TAB_COLUMNSinformation_schema.columnsShows column-level metadata.
DBA_INDEXESinformation_schema.statisticsShows indexes, columns, uniqueness, etc.
DBA_CONSTRAINTSinformation_schema.table_constraintsIncludes PRIMARY KEY, UNIQUE, FOREIGN KEY.
DBA_TRIGGERSinformation_schema.triggersLists triggers defined in the database.
DBA_PROCEDURESmysql.proc (before MySQL 8)information_schema.routines (MySQL 8+)Lists stored procedures and functions.
DBA_ROLESmysql.role_edges (MySQL 8+)Role information in MySQL 8+. Earlier versions lack role support.
DBA_TAB_PRIVSinformation_schema.schema_privilegesinformation_schema.table_privilegesLists privileges granted on schema/table level.
DBA_JOBSNo direct match. Use mysql.eventEvent Scheduler can act as job manager. Enable with SET GLOBAL event_scheduler = ON.

✅ Examples of Useful MySQL Queries

-- Active sessions (like V$SESSION)
SELECT * FROM information_schema.PROCESSLIST;

-- All databases (like DBA_USERS schemas)
SELECT schema_name FROM information_schema.schemata;

-- All tables and row counts
SELECT table_schema, table_name, engine, table_rows 
FROM information_schema.tables 
WHERE table_schema NOT IN ('mysql', 'information_schema', 'performance_schema');

-- Table columns
SELECT table_name, column_name, data_type, is_nullable, column_default 
FROM information_schema.columns 
WHERE table_schema = 'your_db';

-- Views
SELECT * FROM information_schema.views 
WHERE table_schema = 'your_db';

-- Stored procedures and functions
SELECT * FROM information_schema.routines 
WHERE routine_schema = 'your_db';

-- Indexes (like DBA_INDEXES)
SELECT * FROM information_schema.statistics 
WHERE table_schema = 'your_db';

-- Locks
SELECT * FROM performance_schema.metadata_locks;

-- Events (Scheduled jobs)
SELECT * FROM information_schema.events;

-- System variables (like V$PARAMETER)
SHOW VARIABLES;

-- System status (like V$SYSSTAT)
SHOW GLOBAL STATUS;

MYSQL

Post navigation

Previous Post: MYSQL and Oracle Comparison for Oracle DBA
Next Post: V$INSTANCE of Oracle in MYSQL

Related Posts

  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • V$INSTANCE of Oracle in MYSQL MYSQL
  • MYSQL for Oracle DBA MYSQL

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (393)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (342)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • crontab syntax Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • plan10g.sql Oracle
  • Single character replacement in Unix Linux/Unix
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • dbms_job.submit example Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Very Good Oralce Internal Tuning Book Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme