Thursday, May 5, 2016

Setting up nmon and nmon_analyzer

This is one of the most usual tool I use along with RDA/OracChk and OSwatcher.

Download nmon


[root@localhost Downloads]# tar -xzvf nmon16e_mpginc.tar.gz
nmon_arm_ubuntu15
nmon_power_32_rhel6
nmon_power_32_sles11
nmon_power_64_kvm2
nmon_power_64_rhel6
nmon_power_64_rhel7
nmon_power_64_sles11
nmon_power_64le_fedora22
nmon_power_64le_rhel6
nmon_power_64le_rhel7
nmon_power_64le_ubuntu14
nmon_power_64le_ubuntu15
nmon_power_64le_ubuntu16
nmon_x86_64_centos6
nmon_x86_64_centos7
nmon_x86_64_opensuse11
nmon_x86_64_opensuse12
nmon_x86_64_rhel6
nmon_x86_64_rhel7
nmon_x86_64_sles11
nmon_x86_64_sles12
nmon_x86_64_ubuntu15

[root@localhost Downloads]# ./nmon_x86_64_rhel6 -f
[-f will put the output into cvs format]


Add-On for nmon.




[root@localhost Downloads]# mkdir nmon_analyzer
[root@localhost Downloads]# cd nmon_analyzer
[root@localhost nmon_analyzer]# wget https://www.ibm.com/developerworks/community/wikis/form/anonymous/api/wiki/61ad9cf2-c6a3-4d2c-b779-61ff0266d32a/page/b7fc61a1-eef9-4756-8028-6e687997f176/attachment/a51b993c-a47c-4eee-be12-6ea2d26ff9a2/media/nmon_analyser_v5_0_2.zip


At the command prompt, do
/nmon_x86_64_rhel6 -f -s2 -c 30

Run the nmon_analyzer and click at "Analyze nmon data" Button. (Note: macros must be enabled)
Search for the nmon file. nmon_analyzer will process and save the file as CVS format.

It is that easy! enjoy.



Wednesday, April 6, 2016

SQL Server: ..... " is incorrectly formed. SQL Server cannot process this media family "

This means sql server backup and restore not in the same version. SQL Server backup is not backward compatible.

Trying to perform a backup from Windows 2008 R2 SQL Server 2012 and restore it to Windows 2008 R2 Windows 2008. Later, realized the version was not the same. Spun up a new VM with SQL Server 2012 and was able to restore it correctly.

Msg 3241, Level 16, State 13, Line 1
The media family on device 'C:\VCDB\vcdb1\vcdb1.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

Tuesday, March 22, 2016

Unable to connect to the MKS: Could not connect to pipe

2 of my VMs at the lab were ping-able but cannot ssh or telnet in. Looking at the console in the VMs, it showed the following error. Other VMs in the same ESX Host were fine just these 2 were having ssh issues.







Put the ESX host on Maintanence mode then rebooted the hosts everything came back up fine. I was told, the switch was having issue recently.

Friday, February 26, 2016

SQL Server: Why does my sql server database growth and shrink on its own ?

Got a question from a user today that his SQL Server growing and shrinking on its own. Being shallow in SQL Server for the time being. That's triggered my curiosity and starting to do some reading about it.There are features in SQL Server database for this purpose.


Get a general idea of which DB actually growing or shrinking by monitoring it for a bit.

SELECT
    DB.name,
    MF.physical_name,
    MF.type_desc AS FileType,
    MF.size * 8 / 1024 AS FileSizeMB,
    fileproperty(MF.name, 'SpaceUsed') * 8/ 1024 AS UsedSpaceMB,
    mf.name LogicalName
FROM
    sys.master_files MF
    JOIN sys.databases DB ON DB.database_id = MF.database_id;


SELECT * FROM sys.database_files;


Look at the autoshrinking option


select name, is_auto_shrink_on  from  sys.databases;

From the GUI.


























Also likelihood reindexing, large batch jobs and database shrinking. Those do cause transaction logs to grow and shrink.

Also might be DBA performing shrinkfile.



BACKUP LOG VCDB_LOG TO DISK = 'E:\SQLbackup.bak'
GO
DBCC SHRINKFILE (N'VCDB_LOG' , 10)
GO

Impact on Oracle if ESX Host went down.

Here are collection of scenarios if ESX hosts gone down.

Symptom - vmwarning and storagerm logs will spit out tons of the following messages.


Some host is down, need to reset the slot allocation
Number of hosts has changed to 3
Number of hosts has changed to 8
Number of hosts has changed to 7
Some host is down, need to reset the slot allocation

Occasionally, the following would show up. This is when the the storage is impacted.

: NFSLock: 2208: File is being locked by a consumer on host 

As any Oracle DBA already can guess, the Oracle instance will crash and all depends on underlying disk availability. If the disks are down, ASM diskgroup will go down with it.

Alert log might show some or more of the following.


ORA-63999: data file suffered media failure
ORA-01114: IO error writing block to file 20 (block # 392072)
ORA-01110: data file 20: '+ASMDATA/st
ORA-15080: synchronous I/O operation failed to read block 0 of disk 7 in disk group DATA
ORA-27072: File I/O error
Linux-x86_64 Error: 5: Input/output error
Additional information: 4
Additional information: 24576
Additional information: 4294967295
NOTE: cache initiating offline of disk 7 group DATA

What can you do about it? If it's single instance, not much. Upon bringing up the ESX Host, it should restore the services (most of the time), otherwise, DBA might need to restore and recover from RMAN. If it's a RAC setup (RAC on multi-hosts), perhaps check the SCSI Controller's SCSI Bus Sharing options is set to NONE, things should failover to the node that residing in the good host. 

Wednesday, January 13, 2016

Oracle: Unable to access to Oracle 12C EM outside of a VAPP or VM.

I have seen user struggles with this for along period of time. Hence, I am posting this and hopefully, it helps in nailing the issue faster.  However, not all Linux will need to address this. I do not recalled default installation of Oracle 12C on Red Hat needs to address this at all only Centos. I could be wrong. 



Inside the Oracle Database VM.

https://<ip address>:5500/em

Outside of the VM, unable to connect. Pretty obvious, this is an indication that there are some sort of firewalls issues either from the VM itself or the host layer if the VM can be ping-ed and ssh-ed into.



In the VM check the firewalls HTTPS and ports.


Accessible now.

Tuesday, November 24, 2015

How to connect to a Workstation VM with putty.

Connecting to local VMware Workstation with ssh is the same as connecting to any Linux residing in ESX host but simpler since everything is local.


Within the VMware Workstation, locate the IP address








Type the ip into putty. The IP usually start with 192.168.x.x as it is local.















That's it.