Thursday, 21 April 2016

send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol


Issue :--

send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
send-mail: warning: inet_protocols: configuring for IPv4 support only
postdrop: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
postdrop: warning: inet_protocols: configuring for IPv4 support only




Solution :--

Check below :- inet_protocols in /etc/postfix/main.cf file 

 more /etc/postfix/main.cf | grep inet_protocols
inet_protocols = all


To disable the messsage, go to /etc/postfix/main.cf and change from:

inet_protocols = all

TO

inet_protocols = ipv4


# /etc/init.d/postfix restart

Monday, 19 October 2015

1129 error connecting to master


mysql> show slave status \G;
*************************** 1. row ***************************
               Slave_IO_State: Connecting to master
                  Master_Host: 000.000.000.100
                  Master_User: rep_user
                  Master_Port: 3300
                Connect_Retry: 60
              Master_Log_File: mysql-bin.017008
          Read_Master_Log_Pos: 6004
               Relay_Log_File: relay-bin.000001
                Relay_Log_Pos: 4
        Relay_Master_Log_File: mysql-bin.017008
             Slave_IO_Running: Connecting
            Slave_SQL_Running: Yes
          Master_SSL_Key:
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 1129
                Last_IO_Error: error connecting to master 'rep_user@000.000.000.100:3300' - retry-time: 60  retries: 1074
               Last_SQL_Errno: 0
               Last_SQL_Error:
  Replicate_Ignore_Server_Ids:
             Master_Server_Id: 0
                  Master_UUID: de4-1fa393-90303b
             Master_Info_File: /test01/master.info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
           Master_Retry_Count: 86400
                  Master_Bind:

[testserver]$ telnet 000.000.000.100 3300 
Trying 000.000.000.100... 
Connected to 000.000.000.100. 
Escape character is '^]'. 
mHost '000.000.000.100' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host. 

solution :--

>'000.000.000.100' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host. 

After more than max_connect_errors unsuccessful tries, the ip will be blocked by the master's instance. 

To solve this problem you could execute 'mysqladmin flush-host' to unblock all blocked ip or 

execute FLUSH HOSTS on the master. 

The link below explains the issue in detail. 
https://dev.mysql.com/doc/refman/5.6/en/blocked-host.html 

Master server :-
mysqladmin -u username -ppasswd flush-hosts

Slave server:-

stop slave;
start slave;

show slave status \G;

Once the blocked host is flush the slave should be able to connect to the master. 

Try stopping the slave and starting the slave again after executing the FLUSH HOSTS 

For more information on FLUSH HOST please refer the link below. 
https://dev.mysql.com/doc/refman/5.6/en/flush.html 

To start or stop the slave you can use the START/STOP SLAVE command. 
https://dev.mysql.com/doc/refman/5.6/en/start-slave.html 
https://dev.mysql.com/doc/refman/5.6/en/stop-slave.html 

Thank you.

Thursday, 23 April 2015

ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

Today, I face below error while converting database into archive log mode. 
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode

This error usually come when database crashed unfortunately or we shutdown database with the help of database shutdown command as: 
shutdown abort, startup force mount or shutdown abort. 
These types of command will required instance recovery in next startup. 
In short it need clean database startup.

shutdown abort
Database closed.
Database dismounted.
ORACLE instance shut down.

startup mount
ORACLE instance started.

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            5972694080 bytes
Database Buffers         4664066048 bytes
Redo Buffers               53747712 bytes
Database mounted.


alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode



// Solution:--

shut immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.

startup mount;
ORACLE instance started.

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            7113544768 bytes
Database Buffers         3523215360 bytes
Redo Buffers               53747712 bytes
Database mounted.

recover database;
Media recovery complete.

alter database open;
Database altered.

shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 1.0693E+10 bytes
Fixed Size                  2157504 bytes
Variable Size            7147099200 bytes
Database Buffers         3489660928 bytes
Redo Buffers               53747712 bytes
Database mounted.
SQL>
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> alter system switch logfile;

System altered.

SQL> alter system switch logfile;

System altered.

Friday, 13 March 2015

MySQL Documentation: MySQL Reference Manuals


MySQL Documentation: MySQL Reference Manuals :-

Please use below link for MySQL details.

http://dev.mysql.com/doc/ 


Monday, 2 March 2015

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options


I have been getting 
ORA-27054: NFS file system not mounted with correct options error when running an EXPDP backup to a NFS mount point. 

The system administrator has not been successful in identifying the cause as it shows that the correct mount point options are being used.

Error :--

ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/expdir/expdp_backup/possit_fulldb_02032015.dmp"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 6

Metalink Doc ID 1518979.1 sets the event 10298, by-passing this check and allows writing to the mount point.

sqlplus / as sysdba

alter system set events '10298 trace name context forever, level 32';

Wednesday, 18 February 2015

parameter _TRACE_FILES_PUBLIC in Oracle


Generally all trace files have read and write permission for Oracle software owner and group of Oracle installation has permission of read only. Other users don’t have privilege of read.

$cd /oradump/diag/rdbms/ABCPROD1/trace
$ls -lrt
-rw-r----- 1 ora11g dba      156 Feb 18 13:35 ABCPROD1_lmhb_37332.trm
-rw-r----- 1 ora11g dba     1892 Feb 18 13:35 ABCPROD1_lmhb_37332.trc
-rw-r----- 1 ora11g dba    72499 Feb 18 13:39 ABCPROD1_lms0_37322.trm
-rw-r----- 1 ora11g dba   448097 Feb 18 13:39 ABCPROD1_lms0_37322.trc
-rw-r----- 1 ora11g dba    71272 Feb 18 13:40 ABCPROD1_mmon_37350.trm

Because trace files may have some important information about database security or may have some sensitive details of data. 
Oracle applies this permission using hidden parameter called _TRACE_FILES_PUBLIC. 
Default value of _TRACE_FILES_PUBLIC is FALSE. Due to this parameter trace files don’t have read permission to other users or public. It is not recommended to change value of this parameter because it is security risk. But in some scenario it has needed to change permission to make it readable trace files to other users or PUBLIC.

We can change this parameter using parameter file or spfile and make it TRUE.

select value from v$parameter where name = '_trace_files_public';

VALUE
----------
FALSE

For modifing this parameter login as SYSDBA and execute ALTER SYSTEM command as follows.

SQL> ALTER SYSTEM SET “_trace_files_public” = TRUE SCOPE=SPFILE;

After changing _TRACE_FILES_PUBLIC parameter to TRUE. Newly generated trace has readable permission to other users and public too.

select value from v$parameter where name = '_trace_files_public';

VALUE
----------
TRUE

$cd /oradump/diag/rdbms/ABCPROD1/trace
$ls -lrt
-rw-r--r-- 1 ora11g dba     2247 Feb 18 13:48 ABCPROD1_lmhb_1907.trc
-rw-r--r-- 1 ora11g dba      156 Feb 18 13:48 ABCPROD1_dbrm_1885.trm
-rw-r--r-- 1 ora11g dba     1496 Feb 18 13:48 ABCPROD1_dbrm_1885.trc

Sunday, 14 December 2014

How to stop data pump jobs EXPDP


Export full DB backup :--

expdp \'/ as sysdba\' full=Y directory=TEST_DIR dumpfile=DB11G.dmp logfile=Full_DB_bkp.log compression=all 

Export: Release 11.2.0.2.0 - Production on Fri Dec 12 20:24:31 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Starting "SYS"."SYS_EXPORT_FULL_01":  "/******** AS SYSDBA" full=Y directory=TEST_DIR dumpfile=DB11G.dmp logfile=Full_DB_bkp.log compression=all 
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 27.60 GB


Stop Export Backup from DB level:--

SQL> set lines 1000 pages 1000
SQL> SELECT owner_name, job_name, operation, job_mode, state FROM dba_datapump_jobs;

OWNER_NAME                     JOB_NAME                       OPERATION                      JOB_MODE                       STATE
------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------
SYS                            SYS_EXPORT_FULL_01             EXPORT                         FULL                           EXECUTING


oracle@Test-DB$expdp \'/ as sysdba\' attach=SYS_EXPORT_FULL_01

Export: Release 11.2.0.2.0 - Production on Fri Dec 12 21:08:53 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

Job: SYS_EXPORT_FULL_01
  Owner: SYS
  Operation: EXPORT
  Creator Privs: TRUE
  GUID: 0A076075C651060DE054002128D658F4
  Start Time: Friday, 12 December, 2014 20:46:30
  Mode: FULL
  Instance: TestPRD
  Max Parallelism: 1
  EXPORT Job Parameters:
  Parameter Name      Parameter Value:
     CLIENT_COMMAND        "/******** AS SYSDBA" full=Y directory=CRAMERDATA_EXP dumpfile=Full_DB_bkp.dmp logfile=Full_DB_bkp.log
  State: EXECUTING
  Bytes Processed: 22,522,186,936
  Percent Done: 98
  Current Parallelism: 1
  Job Error Count: 0
  Dump File: /orabkp/exp_backup/Full_DB_bkp.dmp
    bytes written: 22,569,902,080

Worker 1 Status:
  Process Name: DW00
  State: EXECUTING
  Object Schema: Test
  Object Name: CR_FR_RO
  Object Type: DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
  Completed Objects: 313
  Total Objects: 3,100
  Worker Parallelism: 1

Export> STOP_JOB
Are you sure you wish to stop this job ([yes]/no): yes

oracle@Test-DB$

Export Check Status :--

SQL> set lines 1000 pages 1000
SQL> SELECT owner_name, job_name, operation, job_mode, state FROM dba_datapump_jobs;

OWNER_NAME                     JOB_NAME                       OPERATION                      JOB_MODE                       STATE
------------------------------ ------------------------------ ------------------------------ ------------------------------ ------------------------------
SYS                            SYS_EXPORT_FULL_01             EXPORT                         FULL                           NOT RUNNING

SQL> exit