SM2G

Amat Victoria Curam

Latest Articles

database
ID: 20140920

Running Mysql commands from Bash script

#mysql #linux

Eventually, you’ll need to automate queries on your Mysql database, let’s say, for reporting purposes. Hee’s how to put SQL queries into a shell script, and possibly including variables based on th... Read more

20 Sep 2014 - less than 1 minute read
database
ID: 20140820

Create a read-only MySQL user

#mysql

Sometimes you just need to give access to some users of your database. As you don’t want theses users to modify or accidentally delete some data, it’s advisable to grant them only read access to th... Read more

20 Aug 2014 - less than 1 minute read
database
ID: 20140720

Oracle sqlplus silence output

#oracle #sqlplus #database

Use the following code on your scheduled Oracle scripts to silence terminal output except your data. SET autocommit off; SET echo off; SET feedback off; SET head off; SET heading ... Read more

20 Jul 2014 - less than 1 minute read

database
ID: 20140620

MySQL transaction isolation

#database #mysql #transaction

You can get session-level and global transaction isolation levels using these commands : SELECT @@global.tx_isolation; SELECT @@tx_isolation; SET [SESSION | GLOBAL] TRANSACTION ISOLATION LEVEL ... Read more

20 Jun 2014 - less than 1 minute read
database
ID: 20140520

How to prepare a DML list script

#database #oracle #script

Sometimes, you need to execute a lot of DML instructions on a database. This might look trivial but there are some very important elements to consider before running this kind of script on a produ... Read more

20 May 2014 - 1 minute read
system
ID: 20140420

Using SCP with file compression

#mysql #linux

The command-line tool SCP can be effectively used to move files and perform file compression in the transfer. However, there’s different ways to achieve this, with different results. Here are a fe... Read more

20 Apr 2014 - less than 1 minute read

database
ID: 20140320

Resolving the “ERROR 126 Incorrect key file” error

#database #mysql

The Incorrect key file error: ERROR 126 (HY000) at line 3: Incorrect key file for table '/var/tmp/#sql3f5_1b6c4e_1.MYI'; try to repair it This error probably means that you ran out of disk space... Read more

20 Mar 2014 - 1 minute read
database
ID: 20140220

Data export/import on MySQL

#database #mysql #import #export

MySQL provides you with a lot of flexibility when it comes to import or export data between databases. Let’s examine a few possibilities to export/import data: To export a whole database The foll... Read more

20 Feb 2014 - less than 1 minute read
database
ID: 20140120

Check all tables on MySQL

#database #mysql

Data corruption is every DBA’s worst nightmare and can happen anytime. Use this command to check and repair all tables on a MySQL database : mysqlcheck -u root -p --auto-repair --check --optimize ... Read more

20 Jan 2014 - less than 1 minute read