Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • ORA-3136 Oracle
  • Backup and Recovery Scenarios Oracle
  • Linux CPU info. Linux/Unix
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • Histogram Overview Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • tab.sql Oracle
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • Proc code Oracle
  • Changing Instance Name ( No DB_NAME) Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • Deleting first line and lastline of a file using sed Linux/Unix
  • cold backup scripts to copy locally 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

  • MYSQL for Oracle DBA MYSQL
  • Oracle vs MYSQL Architecture differences (For DBAs) MYSQL
  • V$INSTANCE of Oracle in MYSQL MYSQL
  • MYSQL and Oracle Comparison 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 (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • 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
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • telnet listening Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • Changing the Global Database Name Oracle
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • Privilege to describe the table. Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme