Monday 12 November 2018

ORA-00600: internal error code, arguments: [4193], [31580], [31585], [], [], [], [], [], [], [], [], []

Problem: The following error coming from alert log

Errors in file /d01/app/oracle/diag/rdbms/bacdbpr/bacdb/trace/bacdb_m001_26439.trc  (incident=1129768) (PDBNAME=CDB$ROOT):
ORA-00600: internal error code, arguments: [4193], [31580], [31585], [], [], [], [], [], [], [], [], []
Incident details in: /d01/app/oracle/diag/rdbms/bacdbpr/bacdb/incident/incdir_1129768/bacdb_m001_26439_i1129768.trc

Solution:

idle@SYS> select TABLESPACE_NAME,STATUS from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
SYSAUX                         ONLINE
UNDOTBS1                       ONLINE
TEMP                           ONLINE
USERS                          ONLINE

idle@SYS>


1. Create pfile from spfile to edit
SQL> Create pfile='/export/home/oracle/pfile081018.ora' from spfile;

2. Shutdown the instance

3. set the following parameters in the pfile /tmp/initsid.ora
    undo_management = manual
    event = '10513 trace name context forever, level 2'

4. SQL>>startup restrict pfile='/export/home/oracle/pfile081018.ora'

startup restrict pfile='/export/home/oracle/pfile081018.ora'

5. SQL>select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';

idle@SYS> select tablespace_name, status, segment_name from dba_rollback_segs where status != 'OFFLINE';

TABLESPACE_NAME                STATUS           SEGMENT_NAME
------------------------------ ---------------- ------------------------------
SYSTEM                         ONLINE           SYSTEM
UNDOTBS1                       ONLINE           _SYSSMU33_748006928$
UNDOTBS1                       ONLINE           _SYSSMU34_2282707298$
UNDOTBS1                       ONLINE           _SYSSMU35_3873732304$
UNDOTBS1                       ONLINE           _SYSSMU36_2146687221$
UNDOTBS1                       ONLINE           _SYSSMU37_2465056056$
UNDOTBS1                       ONLINE           _SYSSMU38_941211847$
UNDOTBS1                       ONLINE           _SYSSMU39_113148174$
UNDOTBS1                       ONLINE           _SYSSMU40_2428414494$
UNDOTBS1                       ONLINE           _SYSSMU41_3210694757$
UNDOTBS1                       ONLINE           _SYSSMU42_1725270345$

.
..
.
.
.
.


This is critical - we are looking for all undo segments to be offline - System will always be online.

If any are 'PARTLY AVAILABLE' or 'NEEDS RECOVERY' - Please open an issue with Oracle Support or update the current SR.  There are many options from this moment and Oracle Support Analyst can offer different solutions for the bad undo segments.

If all offline then continue to the next step

6. Create new undo tablespace - example
SQL>create undo tablespace datafile size 2000M;

CREATE UNDO TABLESPACE UNDO2 DATAFILE   '+DATA/bacdb/undo2tbs01_dbf' SIZE 10240M AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED;

7. Drop old undo tablespace
SQL>drop tablespace including contents and datafiles;

drop tablespace UNDOTBS1 including contents and datafiles;


8. SQL>shutdown immediate;

9 SQL>startup nomount;  --> Using your Original spfile

10. Modify the spfile with the new undo tablespace name

SQL> Alter system set undo_tablespace = '' scope=spfile;

Alter system set undo_tablespace = 'UNDO2' scope=spfile;

11. SQL>shutdown immediate;

12. SQL>startup;  --> Using spfile

Monday 17 September 2018

step by step to configure NTP client in Soalris

How to Set Up an NTP Client in Soalris


Step 1: Login as root user


Step 2: Create the ntp.conf file.

# cd /etc/inet

-bash-4.1$ ls -lrt
total 203
-r--r--r--   1 root     sys         3262 Oct  6  2015 dhcpd.conf.example
-rw-r--r--   1 root     sys         5832 Oct  6  2015 slp.conf.example
-rw-r--r--   1 root     sys         4570 Oct  6  2015 services
-rw-r--r--   1 root     sys         1882 Oct  6  2015 protocols
-rw-r--r--   1 root     sys          462 Oct  6  2015 networks
-rw-r--r--   1 root     sys          487 Oct  6  2015 netmasks
-r--r--r--   1 root     sys         2088 Oct  6  2015 ipsecinit.sample
-rw-r--r--   1 root     sys         2039 Oct  6  2015 ipsecalgs
-rw-r--r--   1 root     sys          528 Oct  6  2015 ipaddrsel.conf
-rw-r--r--   1 root     sys          812 Oct  6  2015 inetd.conf
-r--r--r--   1 root     sys           22 Oct  6  2015 datemsk.ndpd
-r--r--r--   1 root     sys         4001 Oct  6  2015 ntp.server
-r--r--r--   1 root     sys         4122 Oct  6  2015 ntp.client
-r--r--r--   1 root     sys         3290 Oct  6  2015 wanboot.conf.sample
drwxr-xr-x   4 ikeuser  sys            8 Jul 18  2016 ike
drwx------   3 root     sys            6 Jul 18  2016 secret
lrwxrwxrwx   1 root     root           7 Jul 18  2016 ipnodes -> ./hosts
-rw-r--r--   1 root     root          63 Jul 18  2016 static_routes-DefaultFixed
-rw-r--r--   1 root     sys          252 Feb  5  2018 hosts
-bash-4.1$ 

# cp ntp.client ntp.conf

Edit the ntp.conf file.

#vi /etc/inet/ntp.conf


# Many ISP's also provide NTP servers for use by their customers. 

# server server_name1 iburst
# server server_name2 iburst
# server server_name3 iburst
server
# Always configure the drift file. It can take days for ntpd to completely 
# stabilize and without the drift file, it has to start over on a reboot
# of if ntpd restarts. 

Step 3: To activate the ntpd daemon,Start the ntpd daemon.

# svcadm enable ntp

Friday 7 September 2018

Step by step : How to add space in existing file system from Physical Volume (LVM)

Step 1. Check Physical Volume and Volume Group  

[root@oracledb ~]# pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/sda2  rhel lvm2 a--  19.05g  4.00m
  /dev/sdc3       lvm2 a--  11.72g 11.72g
[root@oracledb ~]# vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  rhel   1   4   0 wz--n- 19.05g 4.00m
 
Step 2. Now add 11.72 GB to rhel VG
 
[root@oracledb ~]# vgextend rhel /dev/sdc3
  Volume group "rhel" successfully extended
 
[root@oracledb ~]# vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  rhel   2   4   0 wz--n- 30.77g 11.72g
 
Step 3. Check file system
 
[root@oracledb ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root  7.9G  6.5G  1.4G  83% /
devtmpfs               909M     0  909M   0% /dev
tmpfs                  918M   84K  918M   1% /dev/shm
tmpfs                  918M  9.1M  909M   1% /run
tmpfs                  918M     0  918M   0% /sys/fs/cgroup
/dev/mapper/rhel-home  497M   47M  451M  10% /home
/dev/sda1              497M  122M  376M  25% /boot
/dev/mapper/rhel-u01   8.8G  6.9G  2.0G  78% /u01
/dev/sr0               3.5G  3.5G     0 100% /run/media/root/RHEL-7.0 Server.x86_64

Step 4. Check Logical Volume Status

[root@oracledb ~]# lvs
  LV   VG   Attr       LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
  home rhel -wi-ao---- 500.00m
  root rhel -wi-ao----   7.81g
  swap rhel -wi-ao----   1.95g
  u01  rhel -wi-ao----   8.79g
[root@oracledb ~]# vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  rhel   2   4   0 wz--n- 30.77g 11.72g
 
Step 5. Now Merge added 11.72 GB space with /dev/rhel/u01 
 
[root@oracledb ~]# lvextend /dev/rhel/
/dev/rhel/home  /dev/rhel/root  /dev/rhel/swap  /dev/rhel/u01
[root@oracledb ~]# lvextend /dev/rhel/u01 /dev/sdc3
  Extending logical volume u01 to 20.51 GiB
  Logical volume u01 successfully resized
[root@oracledb ~]#

Step 6. Still /dev/mapper/rhel-u01 size previous one but lvs command output showing added space

[root@oracledb ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root  7.9G  6.5G  1.4G  83% /
devtmpfs               909M     0  909M   0% /dev
tmpfs                  918M   84K  918M   1% /dev/shm
tmpfs                  918M  9.1M  909M   1% /run
tmpfs                  918M     0  918M   0% /sys/fs/cgroup
/dev/mapper/rhel-home  497M   47M  451M  10% /home
/dev/sda1              497M  122M  376M  25% /boot
/dev/mapper/rhel-u01   8.8G  6.9G  2.0G  78% /u01
/dev/sr0               3.5G  3.5G     0 100% /run/media/root/RHEL-7.0 Server.x86_64
[root@oracledb ~]# lvs
  LV   VG   Attr       LSize   Pool Origin Data%  Move Log Cpy%Sync Convert
  home rhel -wi-ao---- 500.00m
  root rhel -wi-ao----   7.81g
  swap rhel -wi-ao----   1.95g
  u01  rhel -wi-ao----  20.51g
[root@oracledb ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Mar 11 23:15:03 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root   /                       xfs     defaults        1 1
UUID=c6708dec-5103-402c-84f3-9bd7f39686ef /boot                   xfs     defaults        1 2
/dev/mapper/rhel-home   /home                   xfs     defaults        1 2
/dev/mapper/rhel-u01    /u01                    xfs     defaults        1 2
/dev/mapper/rhel-swap   swap                    swap    defaults        0 0
192.168.184.128:/netshared      /soft   nfs     _netdev 0       0

Step 7.  Now extend /u01 filesystem size

[root@oracledb ~]# resize2fs /dev/mapper/rhel-u01
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/rhel-u01
Couldn't find valid filesystem superblock.

Note: Possible reason is, the mounted filesystem would be XFS filesystem. SO resize2fs wont work for xfs filesystem, we should use xfs_growfs instead of resize2fs.

[root@oracledb ~]# resize
resize2fs   resizecons  resizepart
[root@oracledb ~]# xf
xfreerdp       xfs_copy       xfs_estimate   xfs_growfs     xfs_io         xfs_metadump   xfs_quota      xfs_rtcp
xfs_admin      xfs_db         xfs_freeze     xfs_info       xfs_logprint   xfs_mkfile     xfs_repair
xfs_bmap       xfsdump        xfs_fsr        xfsinvutil     xfs_mdrestore  xfs_ncheck     xfsrestore
[root@oracledb ~]# xfs_growfs /dev/mapper/rhel-u01
meta-data=/dev/mapper/rhel-u01   isize=256    agcount=4, agsize=576000 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0
data     =                       bsize=4096   blocks=2304000, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 2304000 to 5376000

[root@oracledb ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root  7.9G  6.5G  1.4G  83% /
devtmpfs               909M     0  909M   0% /dev
tmpfs                  918M   84K  918M   1% /dev/shm
tmpfs                  918M  9.1M  909M   1% /run
tmpfs                  918M     0  918M   0% /sys/fs/cgroup
/dev/mapper/rhel-home  497M   47M  451M  10% /home
/dev/sda1              497M  122M  376M  25% /boot
/dev/mapper/rhel-u01    21G  6.9G   14G  34% /u01
/dev/sr0               3.5G  3.5G     0 100% /run/media/root/RHEL-7.0 Server.x86_64
[root@oracledb ~]#


Thats it !!!!!!!!!!!!!!!!!!!!!