Advanced Subnet calculator


Working on a small network and wanted to double check the IP address range.

This is from Solar Winds and totally free - can be useful.

https://www.solarwinds.com/free-tools/advanced-subnet-calculator

I like the fact you can change the "skins" and it gives you loads of information.



MySQL - installation on Solaris

Notes for MySQL on Solaris Using a Solaris PKG

I initially installed MySQL a very long time ago. In fact it was version 5.0.96 and I have included the quick notes I made for the installation - initially just wanting to evaluate it. 

As the version I was running was very old, there are some notes at the bottom of this post, as if like me you want to move to a more up-to-date implementation.

root@dbserver> pkgadd -d ./mysql-5.0.96-solaris9-sparc-64bit.pkg

The following packages are available:

1 mysql MySQL Community Server (GPL)

(sun4u) 5.0.96

Select package(s) you wish to process (or 'all' to process

all packages). (default: all) [?,??,q]: all

Processing package instance <mysql> from </angela01/mysql/mysql-5.0.96-solaris9-sparc-64bit.pkg>

MySQL Community Server (GPL)(sun4u) 5.0.96

Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc. All rights reserved.

Use is subject to license terms.

The selected base directory </opt/mysql> must exist before installation is attempted.

Do you want this directory created now [y,n,?,q] y

Using </opt/mysql> as the package base directory.

## Processing package information.

## Processing system information.

## Verifying disk space requirements.

## Checking for conflicts with packages already installed.

## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user

....output skipped for brevity

Postinstall script.

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/opt/mysql/mysql/bin/mysqladmin -u root password 'new-password'

/opt/mysql/mysql/bin/mysqladmin -u root -h observer password 'new-password'

Alternatively you can run:

/opt/mysql/mysql/bin/mysql_secure_installation

which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers.

The latest information about MySQL is available on the web at http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

Installation of <mysql> was successful.

see also : http://www.developerscrappad.com/172/database/mysql/installing-mysql-5-0-on-solaris-10/

Default options are read from the following files in the given order: /etc/my.cnf /opt/mysql/mysql/etc/my.cnf ~/.my.cnf

# Starting up:

root@dbserver> nohup mysqld -u root &

root@dbserver> mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 5.0.96 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 


mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| drpl_devstyle |
| mysql |
| test |
+--------------------+

4 rows in set (0.00 sec)

mysql> 

 Additional notes for MySQL on Solaris Using a Solaris PKG when upgrading.

You can install MySQL on Solaris using a binary package using the native Solaris PKG format instead of the binary tarball distribution.

To use this package, download the corresponding mysql-VERSION-solaris10-PLATFORM.pkg.gz file, then uncompress it. For example:
shell> gunzip mysql-5.5.61-solaris10-x86_64.pkg.gz
To install a new package, use pkgadd and follow the onscreen prompts. You must have root privileges to perform this operation:
shell> pkgadd -d mysql-5.5.61-solaris10-x86_64.pkg
The following packages are available:
  1  mysql     MySQL Community Server (GPL)
               (i86pc) 5.5.61
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
The PKG installer installs all of the files and tools needed, and then initializes your database if one does not exist. To complete the installation, you should set the root password for MySQL as provided in the instructions at the end of the installation. Alternatively, you can run the mysql_secure_installation script that comes with the installation.

By default, the PKG package installs MySQL under the root path /opt/mysql. You can change only the installation root path when using pkgadd, which can be used to install MySQL in a different Solaris zone. If you need to install in a specific directory, use a binary tar file distribution.

The pkg installer copies a suitable startup script for MySQL into /etc/init.d/mysql. To enable MySQL to startup and shutdown automatically, you should create a link between this file and the init script directories. For example, to ensure safe startup and shutdown of MySQL you could use the following commands to add the right links:
shell> ln /etc/init.d/mysql /etc/rc3.d/S91mysql
shell> ln /etc/init.d/mysql /etc/rc0.d/K02mysql


To remove MySQL, the installed package name is mysql. You can use this in combination with the pkgrm command to remove the installation.

To upgrade when using the Solaris package file format, you must remove the existing installation before installing the updated package. Removal of the package does not delete the existing database information, only the server, binaries and support files. The typical upgrade sequence is therefore:
shell> mysqladmin shutdown
shell> pkgrm mysql
shell> pkgadd -d mysql-5.5.61-solaris10-x86_64.pkg
shell> mysqld_safe &
shell> mysql_upgrade
You should check the notes on  http://www.mysql.com  before performing any upgrade

Oracle Data Recovery Advisor

Hopefully, if you have any dealings with Oracle you will never need to deal with the Data Recovery Advisor - 'DRA'  in an actual disaster. It has been around ages but I always forget about it so thought I would post a reminder on here.



From the docs :

"Purpose of Data Recovery Advisor

Data Recovery Advisor is an Oracle Database tool that automatically diagnoses data failures, determines and presents appropriate repair options, and executes repairs at the user's request. In this context, a data failure is a corruption or loss of persistent data on disk. By providing a centralized tool for automated data repair, Data Recovery Advisor improves the manageability and reliability of an Oracle database and thus helps reduce the MTTR."

Easy to access through the Enterprise Manager Cloud Control 12c and via RMAN.

Great tutorial here :


Worth spending a bit of time on even though like I say you hopefully will never need it.


GDPR - May 2018

If you don't know what the General Data Protection Regulation is right now, you soon will. The EU Data Protection Directive has been around since 1995 but it is only a directive and not a regulation**. The bit that I can see see causing issues is the "right to be forgotten". So if you have data on social media I am guessing those companies will have to just delete you if that is what you want. It kicks in from May this year but as it is an EU directive I reckon a lot of companies will think they can just ignore it with "Brexit" kicking in but if you want to have any dealings with Europe, probably worth following it.

**Regulations have binding legal force throughout every Member State and enter into force on a set date in all the Member States. Directives lay down certain results that must be achieved but each Member State is free to decide how to transpose directives into national laws.

https://www.eugdpr.org/eugdpr.org.html

This from the Wikipedia page for the "Right to be forgotten"

"In 1995, the European Union adopted the European Data Protection Directive (Directive 95/46/EC) to regulate the processing of personal data.[9] This is now considered a component of human rights law.[10] The new European Proposal for General Data Protection Regulation provides protection and exemption for companies listed as "media" companies, like newspapers and other journalistic work. However, Google purposely opted out of being classified as a "media" company and so is not protected. Judges in the European Union ruled that because the international corporation, Google, is a collector and processor of data it should be classified as a "data controller" under the meaning of the EU data protection directive. These "data controllers" are required under EU law to remove data that is "inadequate, irrelevant, or no longer relevant", making this directive of global importance.[7]"

International Women's Day

Sorry this is a few days late but thought I would share this. Apologies for the shocking English - nothing to do with me. Joking aside, anything that helps to address gender pay differences and domestic abuse etc can't be a bad idea. Sure somebody will come up with something as funny in November for International Men's Day.


Samba

I have recently been moving a lot of data between Windows and Linux. As much as WinScp is an excellent way of doing that, it is not the only way. Samba allows the mapping of the Unix filesystems into file explorer so they look just like any other windows drive.

https://www.samba.org/

Now I don't want this site just to repeat stuff from other sites so I will point you in the right direction and point out any problems.

http://www.tomsitpro.com/articles/linux-server-configuration-guide-book-excerpt,2-777-2.html

After installing samba you will end up with a /etc/samba directory with a smbusers file. Now it may be tempting just to edit that file but you should use :

smbpasswd -a <username>

Once you have mapped a drive test it out. There are loads of other ways to get Windows / Unix to share drives but I like Samba as you can give access to individuals or groups and because it has been around for ages is stable and for a lot of sites it is free too.




Monitoring Oracle


Although Enterprise Manager Cloud Control needs a separate license to use it, it is probably one of the best utilities to monitor your estate. Strangely, at one point it needed an 11g Oracle database as a repository and was not compatible with 12c. You can use a 12c database now but not on Oracle Linux version 7.

https://oracle-base.com/articles/12c/cloud-control-12cr5-installation-on-oracle-linux-5-and-6

I use Oracle-Base as a chef would use a recipe book. Follow the instructions and hope you produce something tasty. So rather than put out the same recipe I will point you to the best cook books.

The great thing about Cloud Control is that you can put an agent on a server and monitor what is going on, RAC, Oracle Application Server Farms etc. It is not only Oracle you can monitor, Microsoft SQL Sever too, so a very useful application if you can have access. An alternative would be something like Quest Spotlight but I have only ever been on one site that had this running and that was a few years back so if someone has any recent experience with this please let me know.


If you don't have Cloud Control or Spotlight there is still the 12c Database control aka EM Database Express but it is built inside the database server so limited functionality. SQL Developer has some tools for monitoring but most of the time you are back to manually checking the alert log and trace files for problems, running O/S tools like prstat, vmstat, top etc. 

Sys Admin guys can be useful for problems at the O/S level (especially for h/w issues - "dodgy" disks can be a pain) and speak to network teams (firewalls, routers, switches can be a pain). If you have the diagnostics pack run AWR reports when you are seeing issues (remember AWR reports are different for stand alone instances and for RAC).  Most DBAs have their own scripts and if you have been running a system for any length of time you get a "feeling" for what is going on. 

Oracle monitoring is not just a one approach fits all it you often need a holistic approach. I remember after moving a Sun Server the performance was terrible. The only difference was the network had changed so the network lads were getting the blame. After a week I spotted the memory was only half of what it should have been. After a power down and a re-seat of the memory the server was back to what it was. I have learnt that the "Occams Razor" quite often applies when it comes to Oracle.






Oracle 18c


Last month (Feb 2018) another version of Oracle to think about. Other than us DBAs, will anybody really care ? The version numbering has been fine for what seems forever. After the 'i's and the 'g's and the 'c's at least the numbers followed on. Now we have jumped from 12c to 18c - what happens to 13,14,15,16 & 17 ? I can only presume 18 as it is 2018 so why not call it that, because in a few years time it will seem very old. At least I know 18c is really 12.2.0.2 and they have not called it Oracle X or some other stupid marketing name. Maybe Oracle should be more imaginative and go down the car road (maybe it already has talking about "self-driving") - Oracle GTD or Oracle GTi perhaps ? Why I don't work in marketing. I suppose this means anybody using 12c will feel like a dinosaur when Oracle 19 and 20 turn up.



I have been reading about it and the 18c version seems like a cloud only database and will be completely autonomous (it will patch itself, fix issues "auto-magically" and autotune). So either way, if it is truly autonomous, there wouldn't be a need for any Oracle DBAs - hmmm. Mind you, Oracle have been pretty crafty as the database will only be autonomous if Oracle have it on their cloud. So if you are an Amazon shop well that is too bad. Sure it will all become clear by the summer.

https://diginomica.com/2018/01/29/reminder-oracle-18c-is-only-autonomous-if-oracle-runs-it-for-you/

It did get confusing talking about R12 (E-Biz) and 12c (the RDBMS) but jumping from 12 to 18 seems a bit strange. Maybe Oracle were worried about having an unlucky version 13 but surely professional staff can't be superstitious - can they ?



Windows tip.

Oracle runs on most Operating Systems, Linux, AIX, Red Hat, Solaris etc but not OS X for some reason, if anybody out there has managed to do so please let me know.

It also runs on Windows but if you mention running Oracle on Windows to a lot of DBAs they just give you a funny look. Well, if I am honest, I was like that too but in reality it is not too bad.

If you need to know the specification of Windows you can open up a command prompt and run systeminfo and then ipconfig /all to find out the network information. One thing I found out today I thought I would share. If you run msinfo not only does it give you all the information you need but if you look under File there is an option to either export all the info for the machine or just the bits you need. So the next time someone asks what the specification of your Windows box is, you can easily provide it. Who would have thought it, a Windows tip from me.






When running on an RDP if you need to change the password use - CTRL / ALT / End


If you use CTRL / ALT / Del you reset the local machine password.



Quick facts..

Sometimes team meetings can be a complete pain, especially when you have a lot of work to do and that daily catch-up meeting just gets in the way. One thing I have noticed in these meetings is that the quiet members of the team often have the most useful things to say, apprentices mainly. To give everyone a chance, one of the projects I was on made everyone give a useful fact, someone might talk about Oracle constraints or give a useful command they have used. It does not even have to be about work, just get staff talking. Takes seconds and a good confidence builder. Did you know the Honda Civic is named after "Compound Vortex Controlled Combustion" or Japan produced the world's biggest battleships - life does not have to be all IT. Put quick facts in your daily meetings, you never know it might be that one thing that gets you through a show stopper or wins you some money on "The Chase".

Useless humans

Couple of stories trawling around "The Register" that caught my eye. The first one was about the guy who pushed the power button on a server and then immediately realised it was the wrong one. He had to stand for an hour while his colleagues ran around trying to organise a controlled power down before he could release his finger. Never managed to power down the wrong server but stood next to a Unix person who pulled the wrong network cable and with the speed of a wild west gunslinger plugged it back in in the vain hope nobody would notice.

The second story was about someone trying to get a system up and using "password1" as the password and amazingly it worked or proves humans are useless at security. I once had to use a tape library and to open it up you had to enter a 8-digit passcode. After trying lots and lots of dates and telephone numbers etc. no joy, only to discover that 7-2-7-7-9-6-7-3 worked. Why that number, well it is "password" on a telephone keypad. Once again, humans are useless.



Now I am not a fan of long passwords they are a pain to remember and get written down, they are also open to brute force attacks. We have all had that moment you lock yourself out after a couple of attempts and need to get someone to unlock your account. Yes I am a useless human. Come on server people do something with passwords, remember I am only human. I don’t want crazy combinations of uppercase and lowercase, letters swapped out for numbers and special characters tagged on the end - there must be a better way. Thoughts ?

https://xkcd.com/936/

Ninite

Came across this website via the BBC Click programme a few years back and completely forgot about it until I had to install Putty on another machine recently. Loads of other useful stuff too, an excellent site to use.

Will add it the useful links,

https://ninite.com/


Easy anti-virus ?

On my very first laptop I had a professional copy of McAfee anti-virus software running but since then I have been running the free version of Avast anti-virus. Now it maybe that I don't go onto "dodgy" sites but never had a virus so well done Avast.

Avast Anti-virus

A few years ago I remember coming across something called a "Pico Gatekeeper" and it a Linux based usb stick that provides anti-virus, anti-spam, anti-phishing, anti-spyware, intrusion detection and prevention, transparent email and Web proxies, parental control and a firewall. However despite Amazon still having some in stock the Gatekeeper is now longer available. Pity as it was a really good idea.



However, there is an alternative and you can buy it for under ten pounds (30 day trial) otherwise fifty pounds for the year. Like the Gatekeeper you plug it in and as if by magic it seems to provides all the security you will ever need. I will stick to Avast but if you want an easy solution this could be for you and by all means send me a review.

Fixmestick







Python / Cozmo / Big Trak

Back in the day I used to own something called a "Big Trak".
It was about the size of a shoe box and used very rudimentary commands to move around and it could fire a "laser". It was an introduction to simple programming and once you put the batteries in you were up and running.

Now the good people at Anki have came up with a tracked
vehicle called "Cozmo". It is about the size of a playing card (to be precise it is 10cm long, 7cm tall by 5.5cm wide) and you can program it using Python or control it with an app. I refuse to refer to it as "he" although many people do, as it is very "Wall-E" esque. It also has a 128x64 bit pixel display to give it cartoon eyes.

I really wanted to like this little robot but there a few issues that are not made totally clear. Firstly, I can't work out if it a mini robot aimed at developers or a toy aimed at kids. Secondly, you need to have a device to run the Cozmo app which in itself is not too bad but to get the most out of it you need to connect that device using a usb cable to a laptop running the SDK, bit of a pain if I am honest.
Also, unlike Big Trak (I once bounced one down some stairs) a lot of reviews for Cozmo complain about the build quality, so if the makers are aiming it as a educational toy it needs to be more robust.

So I have an iPhone running the Cozmo app connected to a Windows laptop running the SDK. If you can program in Python you can do quite a lot but the cute voice can get annoying very quickly and the camera is awful. Hopefully a Cozmo v2 will get a decent camera. The poor camera is probably why it struggles with facial recognition.

So the SDK covers the developers but what about kids using it. Well Anki have came up with something called Code Lab which is based on Scratch. For most kids running the Cozmo app on an iPad is probably all they want. Cozmo can plays games (in a fashion) and has three cubes that light up that Cozmo interacts with and unlike Big Trak the firmware and app will be updated to add more features. At approx £200 it isn't exactly cheap but not massively expensive either, I just wish it was not so heavily dependent on the app and that my laptop could connect using Bluetooth without having to have a phone connected via a usb cable. At least now I have a reason to learn Python when my son asks if he can use Cozmo as a security guard or to chase the cat.

If someone out there wants to add Bluetooth connectivity to the BigTrak Junior (connected to a Raspberry Pi ) I am sure that would be a better option as an educational toy or for the education / budget sector to help teach Python than Cozmo.

ASM disks not on cluster

Had an issue where I used the command line to add two candidate disks to create an ASM disk group. However, when using the 'dbca' utility to create a database. kept hitting an issue where the disk group was only showing on one node on the cluster.

Think I hit a "wood for trees" moment and should have just logged into the second ASM instance and ran a "alter diskgroup DATA2  mount;" but like I say ended up scratching my head.

After a few minutes to contemplate I ran the 'asmca' utility and thought there must be a way to do this. It is not obvious but if you right click on the disk group you get a load of options, one being to mount the disks (or click the option at the bottom of the page) and as if by magic after one click everything was showing up. Had I not hit the issue I would have continued to run everything from the command line yet the graphical interface is so much better (even though good to know both).

From my test RAC cluster :