Understanding mysqlcheck and myisamchk utilities
mysqlcheck Client Program In some cases, mysqlcheck is more convenient than issuing SQL statements directly. For example, if you provide it with a database name as its argument, mysqlcheck determines...
View ArticleMySQL Table Maintenance – InnoDB, MyISAM, MEMORY, ARCHIVE
InnoDB Table Maintenance If a table check indicates problems, restore the table to a consistent state by dumping it with mysqldump, dropping it, and re-creating it from the dump file. In the event of a...
View ArticleOracle SQL Script to Detect Tablespace Fragmentation
The following is a script that will determine how many extents of contiguous free space you have in Oracle as well as the total amount of free space you have in each tablespace. From these results, you...
View ArticleHow to configure Linux Resource Groups (cgroups) for MySQL
The following provides the procedure for configuring and using resource groups under Linux: 1. To use cgroups, you must install the “libcgroup” package on your system. # yum install libcgroup 2. Create...
View ArticleFailed to Download Metadata for Repo ‘repo_name’
The Problem All the dnf commands fail with the following error: # dnf repolist Oracle Linux 8 BaseOS Latest (x86_64) 0.0 B/s | 0 B 00:00 Failed to download metadata for repo ‘ol8_baseos_latest’ Error:...
View ArticleOracle – How To Check if Autoextensible Datafiles Set To Maxsize Unlimited
Question: How to check whether the datafiles are set to AUTOEXTEND and UNLIMITED? We can query the DBA_DATA_FILES view to check whether the data file is in AUTOEXTEND mode. SQL> select...
View ArticleHow to Disable AUTOEXTEND Mode on a datafile in Oracle Database
Question: How do you take a datafile out of autoextend mode? Oracle datafiles were given the ability to extend automatically if needed from a long time. If the given datafile is unable to allocate the...
View ArticleHow to Rebuild GRUB on MSDOS Partition Type in CentOS/RHEL/OEL 7
Question: How to Rebuild Grub on Linux servers with MSDOS Partition type. (proc) (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) 1. Execute the following commands in Grub prompt to set the...
View ArticleCounting Rows Of A Table In MySQL Server
Let’s understand what are the available options to get an accurate number or an estimation of rows in a MySQL table. The option to get an accurate count of rows in a table is to perform: SELECT...
View ArticleHow To Shrink A Temporary Tablespace in Oracle Database
Question: How to resize the TEMPFILE(s) for a temporary tablespace after they have grown larger than needed? Large sort operations can cause temporary tablespaces to grow very large and as such there...
View ArticleHow to Compress and Decompress .bz2 files in Linux Using bzip2 Command
Introduction In this article we are going to learn How to compress files using bz2 file compression tool (bzip2 linux command) and unzip bz2 compressed file. bzip2 is a open source compress tool...
View ArticleHow to shrink a Temporary Tablespace datafile in Oracle
The database has a program which performs a huge sort operation (e.g. end of the year reporting process). This may cause the TEMP tablespace to grow and occupy most of the space on the file system. In...
View ArticleDowngrading an rpm package to a lower version (using “rpm” command)
Question: How to downgrade an rpm package in CentOS/RHEL 6 system to a lower version using the “rpm” command? Its not really recommended to use rpm command instead of yum to downgrade an rpm package....
View ArticleWhat are Bash Exit Codes in Linux
What is an exit code Every script, command, or binary exits with a return code. You can see this value in the special variable $?. Return codes are numeric and are limited to being between 0-255...
View ArticleWhat is the difference between & (ampersand) and && (double ampersand) while...
To run more that one command simultaneously we can use the & (ampersand) special character. Another use of & is running the commands in the background. In that case though, you should use &...
View ArticleHow to allow ssh with empty passwords in Linux
Question: How can we allow a user with empty password to login to a Linux system? Although it seems a risky requirement, but sometimes in a private, development environment this can come handy. Also...
View ArticleHow to Configure SSH to restrict Users/Groups with allow and deny directives
Question: How can we restrict user/group access to a system using ssh? SSH uses specific files for configuration to achieve these various restrictions. Inbound ssh sessions (into the host) are handled...
View ArticleHow to Set Space limits for MySQL for database/schema/table
MySQL itself has not such quotas, but it is possible to partially manage quota limitation at engine level. For MyISAM it is possible to limit table size using option myisam_data_pointer_size This...
View ArticleHow to test a PHP script
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP runs on all major operating systems, from Unix variants...
View ArticleHow to check and repair ACFS with FSCK
The Problem You noticed many inconsistencies in different asm metadata views, asmcmd and os outputs that are associated with the ACFS file system. Database shows corruption in RMAN or from dbverify....
View Article