Category Database

Oracle Database: Reset User Password and disable passowrd expiration.

SQL> select resource_name,limit from dba_profiles where profile=’DEFAULT’ and RESOURCE_NAME=’PASSWORD_LIFE_TIME’; RESOURCE_NAME LIMIT ——————————– —————————————- PASSWORD_LIFE_TIME 180 alter profile DEFAULT limit password_life_time UNLIMITED; alter user oblicore identified by oblicore;  

Oracle Database check PFILE or SPFILE usage

  SQL> SELECT DECODE(value, NULL, ‘PFILE’, ‘SPFILE’) “Init File Type” FROM sys.v_$parameter WHERE name = ‘spfile’; Init File Type ——————————– SPFILE   SQL> SELECT DECODE(value, NULL, ‘PFILE’, ‘SPFILE’) “Init File Type” FROM sys.v_$parameter WHERE name = ‘spfile’; Init F ——…

Mysql: remove binlogs and set expare_logs_days

shell> mysql -u username -p mysql> PURGE BINARY LOGS TO ‘mysql-bin.000015’; Alternatively, you can remove the binary older than a specific date. shell> mysql -u username -p mysql> PURGE BINARY LOGS BEFORE ‘2009-11-01 00:00:00’; expare_logs_days  = 10 mysql> show variables…

MySQL: slow_query_log without restart

mysql> pager less; PAGER set to ‘less’   Выводим информацию о текущих установках глобальных переменных: mysql> SHOW VARIABLES; | slow_query_log | OFF | | slow_query_log_file |   Включаем ведение лога: mysql> set global log_slow_queries=’ON’; Query OK, 0 rows affected,…

Rsync corruption innodb

I skimmed over this thread and I think I can help clarify the innodb, rsync, and lvm situation. The basic issue with just running rsync on the files under a running mysqld is that the rsync will copy different parts…

MySQL Innodb Backup

1. Download and install the latest version #For Debian wget deb/squeeze/x86_64/percona-xtrabackup_2.0.6-521.squeeze_amd64.deb dpkg -i percona-xtrabackup_2.0.6-521.squeeze_amd64.deb #For RedHat wget RPM/rhel6/x86_64/percona-xtrabackup-2.0.6-521.rhel6.x86_64.rpm yum install percona-xtrabackup-2.0.6-521.rhel6.x86_64.rpm innobackupex –user=DBUSER –password=DBUSERPASS ${/path_to/BACKUP-DIR} $ gpg –keyserver –recv-keys 1C4CBDCDCD2EFD2A … [some output removed] … gpg: imported: 1…