Wednesday, 20 March 2013

Mysql change/recover root password

If you already know the root password you can just update it using
# mysqladmin -u root -p oldpassword newpassword


If you forgot root password and need to restore, it can be done easily with following steps

Step # 1: Stop the MySQL server process.

# /etc/init.d/mysql stop or Kill mysqld and if exists mysqld_safe processes.

Saturday, 23 February 2013

Putting Database in ARCHIVELOG mode

Archiving the filled up redo logs is important and enables us to perform a point in time recovery (PITR).

1) Setting initialization parameters:

First we set the location and format for archive logs.

SQL> alter system set log_archive_dest_1 = 'location=/home/oracle/archive';

Saturday, 16 February 2013

Renaming or Moving a Datafile

Steps to move or rename a datafile:

1) Making the tablespace read only in which datafile lies. 



SQL> alter tablespace test read only;

Tablespace altered.

SQL> select tablespace_name,status from dba_tablespaces            

       where tablespace_name='TEST';

TABLESPACE_NAME       STATUS

------------------------------ ---------
TEST       READ ONLY

Difference between undo segment and redo logs

Content moved, please visit my wordpress blog to view this content :)