Saturday, December 18, 2010

Subnet Masks and Subnetting


I haven't work very much previously with network configuration but I am looking at more and more RAC issues recently.

I have started reading up to: Pro Oracle Database 10g RAC on Linux

This is a very good book, I have seen Julian present at an Oracle SIG before, and was rather baffled by the advanced RAC issues he tackled (I was a newbie DBA at the time). Still he had lots of enthusiasm and I have since read a number of presentation online.

Anyway while reading up about I decided I needed a refresher on the background network concepts:

The "Subnet Masks and Subnetting" webpage gives a simple example of how to use a 255.255.255.128 subnet mask to a create a restricted part in a class C network (e.g. 192.168.1.0) for a small enterprise.

Next I moved on to a more detailed explanation on wikipedia, subnetwork masks:

This logical addressing structure permits the selective routing of IP packets across multiple networks via special gateway computers, called routers, to a destination host if the network prefixes of origination and destination hosts differ, or sent directly to a target host on the local network if they are the same. Routers constitute logical or physical borders between the subnets, and manage traffic between them. Each subnet is served by a designated default router... The routing prefix of an address is written in a form identical to that of the address itself. This is called the network mask, or netmask, of the address. For example, a specification of the most-significant 18 bits of an IPv4 address, 11111111.11111111.11000000.00000000, is written as 255.255.192.0.

another important background concept for CIDR notation :

192.168.0.0, netmask 255.255.0.0 is written as 192.168.0.0/16
192.168.1.0, netmask 255.255.255.0 is written as 192.168.1.0/24

this concept is clearest by looking at the full binary format:

Binary form Dot-decimal notation
IP address 11000000.10101000.00000101.10000010 192.168.5.130
Subnet mask 11111111.11111111.11111111.00000000 255.255.255.0
Network prefix 11000000.10101000.00000101.00000000 192.168.5.0
Host part 00000000.00000000.00000000.10000010 0.0.0.130

so going back to the first example, which has a restricted access server on the 2nd half of there private class C network with IP 192.168.1.131, netmask 255.255.255.128 is written as 192.168.1.3/25

Binary form Dot-decimal notation
IP address 11000000.10101000.00000001.10000011 192.168.1.3
Subnet mask 11111111.11111111.11111111.10000000 255.255.255.128
Network prefix 11000000.10101000.00000101.10000000 192.168.1.1
Host part 00000000.00000000.00000000.00000011 0.0.0.3







Friday, November 26, 2010

Perl and Oracle

This page (http://www.orafaq.com/wiki/Perl) shows all the basics of setting up a perl script connection to an Oracle database can making basic calls...

PHP Oracle FAQ - Oracle Wiki

PHP Oracle FAQ - Oracle Wiki

A very good page showing how to work with PHP and Oracle.

I stumbled onto this page as I was just looking for a sample/simple stored procedure to borrow:

create procedure proc1(p1 IN number, p2 OUT number) as

begin

p2 := p1 + 10;

end;

|MG| Win7codecs 2.6.9 Download

|MG| Win7codecs 2.6.9 Download

There is something mysterious about codecs ... this one comes highly recommended :)

ORACLE-BASE - Recompiling Invalid Schema Objects

ORACLE-BASE - Recompiling Invalid Schema Objects

this is a good background summary page... the commands I like to keep at my fingertips are:

spool pre-compile-errors.lst

col owner form a15

col object_name a60

set line 100

select OWNER, object_name, object_type, status from dba_objects where status <> 'VALID';


spool utlrp.lst

@?/rdbms/admin/utlrp


spool post-compile-errors.lst

col owner form a15

col object_name form a30

set line 100

select OWNER, object_name, object_type, status from dba_objects where status <> 'VALID';

expdp/impdp, remap_schema and Oracle Wiki

Data Pump Export (expdp) and Data Pump Import(impdp) - Oracle Wiki

The Oracle wiki is great - a clear and concise repository of examples of standard DBA commands... I have been using remap_schema with impdp today. This wasn't on the page but all the basics of expdp and impdp were.

Saturday, June 12, 2010

Amsterdam foam - Ari Marcopoulo

Amsterdam is quite incredible, although it feels quite compact and friendly, you can easily walk across the city following beautiful canal paths and charming little streets.

However Amsterdam has a huge collection of museums, galleries, theatres and lots of charming buildings.

Foam is housed in a beautiful old canal mansion on Keizergracht, but unlike the "van Loon", on the opposite side of the canal, the inside of Foam is total modern with steel tubing and cobolt blue glass. The content of the gallery is very modern too, starting with Ari Marcopoulos who's work captures his interesting and colourful way of life, friends and family, plus the odd celebrity (e.g. Robert Mapplethorpe looking rather elegant):

Ari Marcopoulos (b. 1957) is an Amsterdam-born photographer and filmmaker, living and working in New York and California[1]. As a photographer, film artist and adventurist, Marcopoulos, who began his career in New York City assisting Andy Warhol, transplants himself into the intimate lives of people living on the edge. Artists, snowboarders, musicians and skateboarders have been both muses and commercial subject-matter throughout his quarter century career as a photographer.