Posts

Showing posts from 2024

Resolving "Access Denied for user 'xxxx'@'xxx.xx.xxx.x' (Using password: YES)" in MySQL

Image
  When managing a MySQL database, it's common to encounter the "Access Denied for user 'xxxx'@'xxx.xx.xxx.x' (Using password: YES)" error. This issue typically arises when a MySQL user’s host does not have the necessary permissions to access the database from a remote machine. Understanding the Error This error is triggered when the MySQL server refuses a connection attempt from a user due to host restrictions. The error message usually looks like this: ERROR 1045 (28000): Access denied for user 'xxxx'@'xxx.xx.xxx.x' (using password: YES) If you encounter this issue, it could be because the MySQL user is restricted to accessing the database only from specific IP addresses.   Error:     To resolve this issue, you can modify the MySQL user’s host settings, allowing access from different remote machines. Here's a step-by-step guide on how to change the MySQL user host. Solution: 1.       Log into the MySQL console   ...

PURGE BINARY LOGS IN MYSQL

Managing the binary logs in MySQL is a critical aspect of database administration, especially for those who oversee replication or large-scale data modifications. The PURGE BINARY LOGS statement is an essential tool that helps maintain the health of your MySQL server by removing unnecessary binary log files, freeing up disk space, and ensuring smooth operations. What are Binary Logs? Binary logs in MySQL are files that store information about data modifications, such as INSERT , UPDATE , DELETE , and even structural changes like CREATE TABLE . These logs are vital for replication and data recovery, but they can accumulate over time, leading to performance issues or excessive disk usage. The PURGE BINARY LOGS command helps manage these files efficiently. The PURGE BINARY LOGS Statement The PURGE BINARY LOGS statement allows you to delete old binary logs that are no longer needed. It offers two options: TO 'log_name' : This option deletes all binary logs up to,...

Troubleshooting ORA-01111, ORA-01110, and ORA-01157 Errors in Oracle Standby Database

Error Description: During the recovery process on the standby database, you encounter errors such as: ORA-01111 : Name for data file is unknown. ORA-01110 : Data file is missing. ORA-01157 : Cannot identify/lock data file. These errors typically occur when a data file is created as "UNNAMED" in the $ORACLE_HOME/dbs directory, causing the Managed Recovery Process (MRP) to fail. Error Log: Errors in file /home/app/diag/rdbms/sandy04/SANDY/trace/SANDY_ora_59972.trc: ORA-01111: name for data file 30 is unknown - rename to correct file ORA-01110: data file 30: '/home/app/product/11.2.0/db_1/dbs/UNNAMED00030' ORA-01157: cannot identify/lock data file 30 - see DBWR trace file ORA-01111: name for data file 30 is unknown - rename to correct file ORA-01110: data file 30: '/home/app/product/11.2.0/db_1/dbs/UNNAMED00030' Completed standby crash recovery. Reason: The issue arises because the MRP process, while applying archives, creates an unnamed fi...

Calculation Network Bandwidth for Oracle Data Guard Disaster Recovery (DR)

In the realm of disaster recovery (DR) planning, calculating the network bandwidth required for Oracle Data Guard is paramount. Ensuring seamless replication and efficient data synchronization between primary and standby databases hinges on accurate bandwidth estimations   Understanding Redo Generation Rate At the heart of bandwidth calculation lies the average redo generation rate per second in the database. To ascertain this crucial metric, one approach is to query the DBA_HIST_SYSMETRIC_SUMMARY table:   SELECT AVG(MAXVAL) FROM DBA_HIST_SYSMETRIC_SUMMARY WHERE METRIC_NAME=’Redo Generated Per Sec’;   This query yields the average of maximum summary redo generation values over a period, providing a reliable baseline for bandwidth computation.   Bandwidth Calculation Formula   Required bandwidth = ((REDO rate (in bytes per second) / 0.75) * 8) / 1,000,000 (in Mbps)   Here, the redo rate in bytes per second is divided by 0.75 to ac...