Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • DB Console Mainenance. Oracle
  • Python class import from different folders Python/PySpark
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • Paste command syntax Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix
  • How to Modify the statistics collection by MMON for AWR repository Oracle
  • Monitor and Trace Unix processes using truss Linux/Unix
  • Multiple listeners Oracle
  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • DBMS_STATS Metalinks Notes Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • handling filenname with space 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 for Oracle DBA 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)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • How to remove blank lines using vi editor command Linux/Unix
  • New OFA for 11g Oracle
  • ORA-00064: object is too large to allocate on this O/S during startup Oracle
  • Find Stale DR Physical Standby Oracle
  • usnsql.sql Displays information about UNDO segments with sql statements Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme