Posts Tagged ‘Linux’

SQL Server Virtualization, Part One: Introduction

By Chris Presley October 3rd, 2008 at 3:25 pm
Posted in SQL Server
Tags:

Server virtualization is becoming a very hot topic out in the wild, and for good reason. This is a fantastic technology to bring to the x86 platform. When used right, it will solve a lot of problems and potentially reduce Total Cost of Ownership (TCO), while allowing many data centers to become greener by reducing power consumption, cooling requirements and waste (fewer servers = less hardware to dispose of later on). Not every server, however, is a candidate to be “virtualized.” When used in the wrong situation, virtualization can be a support nightmare.

I’m going to write a small series of posts on this topic because its something that will affect a lot of us even if you aren’t a DBA. I’m starting at the very beginning, so if you’ve already created virtual templates for all of your core applications, this post won’t have anything new for you. If you’re wondering what about “virtual” is virtual, this is the post for you to start at. Due to the number of different technologies and platforms and and lack of time on my part, I’m going to stick to Microsoft technologies (Microsoft Virtual Server 2005) and write from the perspective of an MS SQL Server DBA. Let’s get started.

What is server virtualization? (more…)

Installing Oracle R12 EBS in my Living Room

By Lukas Vysusil September 26th, 2008 at 4:29 pm
Posted in Oracle E-Business Suite
Tags:

I decided to build my first sand box ever. I always wanted one, but there was no time or reason until now. Fortunately, hardware is ridiculously cheap these days compared to the past, so you can actually run full-blown Oracle Applications on your home PC without compromises.

I built a Dual Core box with 8G of RAM for an install of E-Business Suite R12. For OS I chose Oracle EL5U2, mainly because I’m used to the RH/OEL clones, and also because I expected it to be less painful than other distributions.

I started slowly, as time allowed, spending some time chasing various libraries and packages on the Net. Eventually it took me a week to realize how tedious it is to go the manual way. I got so frustrated by the dependencies that I gave up and purchased access to the ULN network.

Just to illustrate the type of struggle I went through, I found four distinct lists of required packages for 10g installation (in Oracle documentation and metalink combined). I’d recommend Note 421308.1 - Requirements For Installing Oracle10gR2 On RHEL/OEL 5 (x86_64), which summarizes the database part in a neat way. I also encourage you not to underestimate requirements of related Note 376183.1 - Defining a “default RPMs” installation of the RHEL OS.

Nevertheless, it’s just way more easy to use the oracle-validated package, which will download all dependencies for you. Well, almost all.

The next step was to prepare the machine. The only tricky part (from the DBA point of view) is to setup a DNS server, but even that went well. There are plenty of nice howtos on the web — search for keyword “rndc”.

Once I had all the required packages installed, users created, kernel parameters set, domain name resolution working, and Xvnc started, it was time to call a wizard.

(more…)

GNU basename in PL/SQL

By Don Seiler September 17th, 2008 at 5:03 pm
Posted in Oracle
Tags:

In the process of scripting a database migration, I was in need of something akin to the GNU basename utility that I know and love on Linux. basename is most famous for taking a full file path string and stripping away the leading path component, returning just the name of the file. This can be emulated in PL/SQL with calls to SUBSTR and INSTR, like this:

substr(dirname,instr(dirname,'/',-1)+1)

(Thanks to Ian Cary, who shared this logic on oracle-l)

As you can see, this simply finds the last occurence of /, which is our directory separator on *nix and Solaris operating systems. On Windows, it would be \. It then returns a substring beginning one character after that last separator until the end of the string. Voila, a basic basename routine!

Upon reading the basename man page again, I found that basename also takes an optional parameter, a suffix string. If this suffix string is provided, basename will also truncate that string from the end. For example:

(more…)

Oracle R12 Certified for Linux 64-bit on the x86_64 Platform

By Vasu Balla July 15th, 2008 at 10:51 am
Posted in Oracle E-Business Suite
Tags:

Oracle R12 is certified to install on 64-bit Linux for X86_64 platforms. Yeah, I know that’s old news. The interesting part here is it’s not “pure” 64-bit software like the Oracle Database on Linux 64-bit: R12 is taking advantage of the OS’s capability to run 32-bit executables.

If we look at metalink note 416305.1, there is a big list of 32-bit RPMs in the pre-req packages list for R12 on 64-bit Linux. This is not something new — 11i on Solaris, HP-UX, and AIX also had the same behaviour.

11i doesn’t take advantage of 64-bit capabilities of the OS at full scale. It runs in 32-bit mode even on a 64-bit OS, as all its executables are 32-bit. One place where 11i does use the 64-bit feature is the “Memory Based Planner” program, which is part of the Advanced Supply Chain Planning (ASCP) module. Oracle shipped a 64-bit version of the program only for the Solaris, AIX, and HP-UX platforms, while the Linux version had just the 32-bit version. I have seen customers who added a Solaris Middle Tier to their Linux 11i instances just to run this 64-bit Planner program, spending all the dollars they saved with Linux middle tiers thus far, in consulting fees to add that extra Solaris middle tier node.

The good news for R12 customers is that, we don’t need a Solaris, AIX or HP-UX middle tier any more to run the 64-bit Planner program. Oracle has started shipping 64-bit Planner (MSONWL64.exe) for Linux 64-bit from version 12.0.3 onwards. Check Metalink note 254810.1 for details.

If you are a early adopter of R12 with a version earlier than 12.0.3, its time to patch up to 12.0.3 or 12.0.4. and migrate to the Linux 64-bit platform. This migration to Linux 64-bit should not be a big hassle, as it is binary-compatible with Linux 32-bit. I expect it be as simple as 1) copy, 2) relink, and 3) startup. I will, however, find out the exact method, and post here in the blog.

Fedora 9’s Broken Install

By Raj Thukral May 16th, 2008 at 2:07 pm
Posted in SysAdmin
Tags:

Fedora 9 was released on the 13th. I waited a whole three days to make sure I wasn’t going to be the beta-tester. Then I tried out the live release, and finally decided to upgrade my main workstation to Fedora 9 today. To be sure I wouldn’t mess stuff up, I used the DVD installer to upgrade.

The upgrade finished fine, but when I rebooted, XChat would not run.

[14:15:53]$ xchat
xchat: error while loading shared libraries: libperl.so: cannot open shared object file: No such file or directory

What did rpm have to say about this?

[14:26:31]$ rpm -q xchat
xchat-2.8.4-11.fc8.i386

[14:26:39]$

Hmm . . .  looks like the package did not get upgraded. Wondering how many others did not get upgraded, I did a quick check:

[14:26:39]$ rpm -qa | grep fc8|wc -l
139

Wow! 139 packages still carry the fc8 tag! Next I checked if the updates repository has the updates:

[root@rajlin ~]# yum update
...

...
Transaction Summary
===================================================================
Install     18 Package(s)
Update     148 Package(s)
Remove       0 Package(s)

While I didn’t check all the packages in the list, XChat is definitely there:

xchat                   i386       1:2.8.4-15.fc9   fedora            1.3 M

So did Fedora just push out a release with old packages just to stay on schedule, and is actually releasing packages now hoping nobody would notice? (more…)

Debian OpenSSL Package Introduces Vulnerability

By Don Seiler May 13th, 2008 at 3:47 pm
Posted in SysAdmin
Tags:

The highlight today of probably every Linux-related mailing list and IRC channel was the announcement of CVE-2008-0166, affecting OpenSSL libraries on Debian-based Linux distributions, including the popular Ubuntu.

According to the Debian Security Advisory, a change made to Debian’s OpenSSL package makes its random number generator predictable. Obviously this is less than desirable in a random number generator used for things like, say, all of your SSH keys.

The vulnerability has been present since September of 2006, and Debian strongly suggests throwing your old keys out completely:

It is strongly recommended that all cryptographic key material which has been generated by OpenSSL versions starting with 0.9.8c-1 on Debian systems is recreated from scratch.

Debian has now disabled public key authentication on their project servers until further notice, and are generating new keys for those servers and new certificates for db.debian.org.

So all you Debian and Ubuntu folks out there will probably want to do the same for your own keys and certificates. Note that this patch was never used by the upstream OpenSSL team nor by other distros like Fedora or RHEL (or CentOS), so they are not affected.

Installing Oracle 11g on Ubuntu 8.04 LTS (Hardy Heron)

By Augusto Bott May 6th, 2008 at 4:07 pm
Posted in Oracle
Tags:

After our last post about installing Oracle 11g on Ubuntu 7.10 (November, 6th), and considering Ubuntu 8.04 LTS was released on April 21st, I spent some time reviewing and putting together this new HOWTO for the installation.

Please note: I’ve used the x86 server version of Ubuntu 8.04, but the same steps should work without any problems for the Desktop version. Also notice that this whole procedure can easily take over six hours to complete, so don’t complain I didn’t warn you!

So, let’s get started, shall we?

Step One

Get the Ubuntu Linux 8.04 Hardy Heron (x86, 32-bit) image here, burn it, and install on any box you like. The only remark on the installation is that you should ask the installer to install an OpenSSH server at the end of the installation, since we’ll perform all the steps on this procedure remotely.

I’m not sure about the minimum requirements for the server, as, the last time I checked, running Oracle on Ubuntu is not officially supported by Oracle. In case you’re wondering, however, I’m using an x86 Pentium-like machine with 512M of RAM.

Step Two

Download Oracle 11g for Linux (x86, 32-bit).

(more…)

How To Set Up Oracle ASM on Ubuntu Gutsy Gibbon

By Grégory Guillou February 7th, 2008 at 1:06 pm
Posted in Group Blog PostsOracle
Tags:

I’ve recently moved to Ubuntu Linux, and this post describes my attempt to play around with Oracle ASM on Ubuntu. For this demonstration, I used Oracle 11.1.0.6 on Gutsy Gibbon. I hope it will be useful to somebody out there.

Important Notice: What I describe below is among the worst thing you can ever do with ASM. You can use it to play around but never use it with anything other than test data. If you lose something because of me, you’ll be the only one to blame !

Question #1: How do you simulate a disk from a file?

(See here for more details.)

If you have a free partition or disk to be used as an ASM disk, just skip this step. If you don’t, you can create a file with the dd command and create a device that actually loops to the file with the losetup command.

Let’s assume you’ve created a directory named /asmdisks (and you have write access to it). Run the command below to create a file named disk1 that is 3GB in size:

$ dd if=/dev/zero of=/asmdisks/disk1 bs=1024k count=3072
3072+0 records in
3072+0 records out
3221225472 bytes (3.2 GB) copied, 80.9113 seconds, 39.8 MB/s

Once you’ve created the file, map it to a device named loopN in /dev. You can list the used loop devices with the losetup -a command.

Once you’ve made sure the one you plan to used is free, e.g. /dev/loop1, you can map the device to the file with the following commands (you have to be root) :

# losetup /dev/loop1 /asmdisks/disk1
# losetup -a
/dev/loop1: [0802]:7438407 (/asmdisks/disk1)

Question #2: How do you create an interface to the disk that is usable by ASM?

(more…)

Pythian Goodies: The Answer to Free Memory, Swap, Oracle, and Everything

By Christo Kutrovsky December 19th, 2007 at 3:22 pm
Posted in Group Blog PostsOraclePythian GoodiesSysAdmin
Tags:

I gave this talk at the UKOUG, and I have received a few requests to post the slides online. Instead of just posting the PowerPoint I took some time to give the presentation again (internally here at Pythian) and this time we recorded the session and we’re posting it here in a variety of formats. This is a bit of a departure from the typical Pythian Goodies, in that it is scripted, and there is a lot of content here in the whitepaper, but there hasn’t been a Goodie in a while so why not!

I’d love to hear from you, so please feel free to ask any follow-up questions to this post in the comments.

Abstract

Do I have enough memory? Why is my free memory so low? Am I swapping to disk? Can I increase my SGA (db cache) size? Can I add another instance to this server? Are my system resources used optimally? These are all questions that often haunt DBAs. This presentation is The Answer. It covers in detail the different types of memory, how to monitor memory, and how to optimally use it with Oracle. Multiple examples in the presentation demonstrate how certain actions on the database side cause different memory areas to be allocated and used on the OS side. Key underlying differences in operating systems approaches to managing memory will be highlighted, with special attention given to Linux, Solaris, and Windows. Using Linux as an example throughout, this presentation explains how to effectively use tools such as “top”, “vmstat” and “/proc/meminfo” to look into into a system’s allocation and use of memory.

Below you should see a flash video with me giving the session.

Download this presentation!
Powerpoint
IPod video (right-click and Save As . . .)
MP3 audio only

And below you will find the complete contents of the whitepaper. This is intended to be a good overall reference resource for how memory works in Oracle, using Linux as an example.

(more…)

Installing Oracle 11g on Ubuntu Linux 7.10 (Gutsy Gibbon)

By Augusto Bott November 6th, 2007 at 3:59 pm
Posted in Group Blog PostsOracle
Tags:

After many requests from readers, I’ve put together new, revised version of the Oracle 11g on Ubuntu recipe. This new version is a little different than the first one published: it’s based on a bare-bones install of Ubuntu 7.10 (Gutsy Gibbon) server version instead of the desktop version. As an improvement, I’ve tried to pare down dependencies to a minimal set.

Your feedback is more than welcome — it’s the main reason why I wrote a new version of this HOWTO. I’ve also tested and repeated this procedure twice. Even so, it might still have problems, so please let me know so we can improve it 1.

(more…)