Introducing “Grab Oracle/PLSQL Errors” Series
In this hectic and kinda boring life of NOC shifts as a Unix admin often I’ve been amazed and overjoyed
finding the long cherished something to watch out for i.e., “ORA – *” errors that always helped me eased up and get back to life from hibernation
. To be honest it’s so powerful and lethal weapon that you start running like Usain Bolt
from almost half dead hibernated state. Anyways let’s not move further away from the point here. As a Unix admin & over 2 years veteran in system & software operations field often I’ve faced “ORA- *” errors i.e., Oracle/PLSQL errors. Most of the time I couldn’t understand what the f*ck those messages says., but I’ve always tried googling on them and have some precise knowledge (mostly overview though … I’m not even D of a DBA :’( ). As a matter of fact I felt it’s really important from system administration point of view that you have sufficient as well as proficient knowledge on the cause and primary resolution of these errors so that you can help your DBA digging in further providing the primary information on the fly. So here I’m introducing a new series of posts “Grab Oracle/PLSQL Errors”. Hope the upcoming posts will come handy.
Good Luck with your DB monitoring life
Recover GRUB after Windows Installation
Often we lose GRUB boot loader whenever we install Windows after Linux installation. This is a terrible hazard to all who love to use dual, triple or even quadrapole or even higher boot systems on their Lappys or Desktop PCs. Here’s the fix
Step 1. Boot with your Ubuntu Live CD or DVD
Step 2. Open gnome-terminal or konsole
Step 3.
$ sudo grub
You’ll get a” grub>” prompt.
Step 4.
grub>find /boot/grub/stage1
You’ll have an output like (hd0,0) , it’ll be the number of your partition.
For hda1,sda1 it’ll be (hd0,0),
For hda2,sda2 it’ll be (hd0,1),
For hdb1,sdb1 it’ll be (hd1,0).
Step 5.
grub>root (hd0,1)
Step 6.
grub>setup (hd0)
Step 7.
grub>quit
Step 8.
Reboot the machine.
The boot loader should be recovered now
.
Another way to fix is to enter into the single user mode at the time of boot from the selection menu & when you have the root prompt do the following:
# grub
You’ll have “grub>” prompt like before.
Now repeat from Step 4 to Step 8 as before and you’re done
Installing Git on Ubuntu 10.04 Lucid Lynx (Should Work for 10.10 Maverick Meerkat, too)
In my current job one of the most frequent things I do is to setup/install git for the developers which is very much essential tool for them as per our organization’s development architecture. Previously we built a customized deb package and added that to our local debian and ubuntu repository and the “apt-get install -t local git” used to work for us (the Sys. Admins here). But with the updated versions and increased workload on other sectors somehow that process is now obsolete for us. So now we’ve gone back to that sweet old “build from source file” approach. Here’s how I do that stuff for git 1.7.3
Step 1. Resolve The Dependencies:
$ sudo apt-get install curl libcurl4-openssl-dev libexpat1-dev gettext zlib1g-dev
Step 2. Download, untar and build:
$ wget http://kernel.org/pub/software/scm/git/git-1.7.3.tar.gz
$ tar -zxvf git-1.7.3.tar.gz
$ cd git-1.7.3
$ ./configure –prefix=/usr/local/git
$ make
$ sudo make install
Step 3. Check & Confirm Installation:
$ /usr/local/git/bin/git –version
** Errors You May Find During Installation:
Error Type 1:
* tclsh failed; using unoptimized loading
MSGFMT po/de.msg make[1]: *** [po/de.msg] Error 127
make: *** [all] Error 2
Solution:
$ sudo apt-get install gettext
Error Type 2:
CC fast-import.oIn file included from builtin.h:6,from fast-import.c:147:cache.h:17:18: error: zlib.h: No such file or directoryIn file included from builtin.h:6,from fast-import.c:147:cache.h:22: error: expected ‘)’ before ‘strm’cache.h:23: error: expected ‘)’ before ‘strm’cache.h:24: error: expected ‘)’ before ‘strm’fast-import.c:285: error: ‘Z_DEFAULT_COMPRESSION’ undeclared here (not in a function)fast-import.c: In function ‘store_object’:fast-import.c:996: error: ‘z_stream’ undeclared (first use in this function)fast-import.c:996: error: (Each undeclared identifier is reported only oncefast-import.c:996: error: for each function it appears in.)fast-import.c:996: error: expected ‘;’ before ‘s’fast-import.c:1028: error: ‘s’ undeclared (first use in this function)fast-import.c:1039: error: ‘Z_FINISH’ undeclared (first use in this function)fast-import.c:1039: error: ‘Z_OK’ undeclared (first use in this function)fast-import.c: In function ‘stream_blob’:fast-import.c:1142: error: ‘z_stream’ undeclared (first use in this function)fast-import.c:1142: error: expected ‘;’ before ‘s’fast-import.c:1143: error: ‘Z_OK’ undeclared (first use in this function)fast-import.c:1165: error: ‘s’ undeclared (first use in this function)fast-import.c:1175: error: ‘Z_STREAM_END’ undeclared (first use in this function)fast-import.c:1188: error: ‘Z_FINISH’ undeclared (first use in this function)fast-import.c:1200: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)fast-import.c: In function ‘git_pack_config’:fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)make: *** [fast-import.o] Error 1CC fast-import.oIn file included from builtin.h:6,from fast-import.c:147:cache.h:17:18: error: zlib.h: No such file or directoryIn file included from builtin.h:6,from fast-import.c:147:cache.h:22: error: expected ‘)’ before ‘strm’cache.h:23: error: expected ‘)’ before ‘strm’cache.h:24: error: expected ‘)’ before ‘strm’fast-import.c:285: error: ‘Z_DEFAULT_COMPRESSION’ undeclared here (not in a function)fast-import.c: In function ‘store_object’:fast-import.c:996: error: ‘z_stream’ undeclared (first use in this function)fast-import.c:996: error: (Each undeclared identifier is reported only oncefast-import.c:996: error: for each function it appears in.)fast-import.c:996: error: expected ‘;’ before ‘s’fast-import.c:1028: error: ‘s’ undeclared (first use in this function)fast-import.c:1039: error: ‘Z_FINISH’ undeclared (first use in this function)fast-import.c:1039: error: ‘Z_OK’ undeclared (first use in this function)fast-import.c: In function ‘stream_blob’:fast-import.c:1142: error: ‘z_stream’ undeclared (first use in this function)fast-import.c:1142: error: expected ‘;’ before ‘s’fast-import.c:1143: error: ‘Z_OK’ undeclared (first use in this function)fast-import.c:1165: error: ‘s’ undeclared (first use in this function)fast-import.c:1175: error: ‘Z_STREAM_END’ undeclared (first use in this function)fast-import.c:1188: error: ‘Z_FINISH’ undeclared (first use in this function)fast-import.c:1200: error: ‘Z_BUF_ERROR’ undeclared (first use in this function)fast-import.c: In function ‘git_pack_config’:fast-import.c:2846: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)make: *** [fast-import.o] Error 1
Solution:
$ sudo apt-get install zlib1g-dev
Now that should do for your Git installation
Waving Flag – K’NAAN
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
Born to a throne, stronger than Rome
But Violent prone, poor people zone
But it’s my home, all I have known
Where I got grown, streets we would roam
But out of the darkness, I came the farthest
Among the hardest survival
Learn from these streets, it can be bleak
Except no defeat, surrender retreat
So we struggling, fighting to eat and
We wondering when we’ll be free
So we patiently wait, for that fateful day
It’s not far away, so for now we say
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
So many wars, settling scores
Bringing us promises, leaving us poor
I heard them say, love is the way
Love is the answer, that’s what they say,
But look how they treat us, make us believers
We fight their battles, then they deceive us
Try to control us, they couldn’t hold us
Cause we just move forward like Buffalo Soldiers
But we struggling, fighting to eat
And we wondering, when we’ll be free
So we patiently wait, for that faithful day
It’s not far away, but for now we say
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
(Ohhhh Ohhhh Ohhhhh Ohhhh)
And everybody will be singing it
(Ohhhh Ohhhh Ohhhhh Ohhhh)
And you and I will be singing it
(Ohhhh Ohhhh Ohhhhh Ohhhh)
And we all will be singing it
(Ohhh Ohh Ohh Ohh)
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
When I get older, I will be stronger
They’ll call me freedom, just like a Waving Flag
And then it goes back, and then it goes back
And then it goes back
When I get older, when I get older
I will be stronger, just like a Waving Flag
Just like a Waving Flag, just like a Waving flag
Flag, flag, Just like a Waving Flag.
World Cup Mania & Brazil
It’s going insane and crazy all over the world. We Bangladeshis are not by any chance an exception to that. In fact we’re crazier I think
. Flags of many countries are waving high on the roof tops, buildings, shops, road side and where not. Many find this insane while others feel it doesn’t mater at all. Well I’m not worried with that kinda intellectual stuffz. All I feel is you gotta express your feelings no matter what the way might be. Just one thing to consider is not to hamper other’s feelings or to do harm others. That’s all. Anyways let’s move out from that boring discussions. Today i just came into my office in the morning and I was just listening & watching as well downloading to WC theme songs by K’NAAN on youtube, groveshark & beemp3 . Suddenly started thinking about a new FB Photo Album , googled a few and then started uploading. On the course found a nice animated gif image.
Objective of this post was to share the image with everyone. But you know what, I just can’t talk lesser
. Anyways I’m just enjoying this WC football mania & can’t help waiting for the Brazil matches to begin. Go Brazil … We are on the way to “Hexa” and we know you can bring it for us
Make an easy to remember login URL for WordPress
People often find it troublesome to remember the login url of wordpress. Specially when someone just forward his registered domain/s to the wordpress blog and there’s masking in place, it’s just a irritating problem. So why not go for a a easier and rather shortened url for your blog! It’s so simple.
Add this code on top of your .htaccess file in the root of your WordPress directory:
Redirect /login http://jaamee.com/wp-login.php
Now you can just go to:
http://jaamee.com/login
And it will automatically redirect you to the correct wp-login.php page.
Happy Blogging
Grab Oracle/PLSQL Errors – Code: ORA-00979
Error Message:
ORA-00979: not a GROUP BY expression
Cause of Error:
The GROUP BY clause does not contain all the expressions in the SELECT clause.
Explanation:
SELECT expressions that are not included in a group function, like AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, must be listed in the GROUP BY clause. Otherwise this error will occur. Actually it occurs when someone tries to execute a SELECT statement that includes a GROUP BY function (ie: MIN, MAX, SUM, COUNT) and an expression in the SELECT list, that was not in the GROUP BY clause.
Possible Resolution:
- Rewriting the SELECT statement so that the column or expression listed in the SELECT list is also found in the GROUP BY clause. But in that don’t include the SELECT expressions that are arguments of group functions.
- Removing the GROUP BY function (ie: MIN, MAX, SUM, COUNT) from the SELECT statement.
- Remove the expression from the SELECT list that was not in the GROUP BY clause.
Example:
If the following query is being executed:
SQL> select client, segment, count(*)
2 from corporate_segment
3 group by client;
select client, segment, count(*)
*
The following error occurs:
ERROR at line 1:
ORA-00979: not a GROUP BY expression
This happens because here segment “expression” is also selected along with “client” but “segment” is not a group function argument and not includded in the GROUP BY clause.
So the current one should be:
SQL> select client, segment, count(*)
2 from corporate_segment
3 group by client, segment
CLENT SEGMENT COUNT(*)
WHS Group Corp1 17
Xmacz Inc. Corp2 27
Check out for more similar “ORA – *” errors later in the series. For now its adios
RUET Network on FB
At last RUET Network is created on FB. Credit goes to enormous efforts from Rifat Bhai (EEE 02). Here is the details of what actually happened (I’m copying the mail body here that he sent on “ruetian” google group):
Dear RUETians,
02′EEE
———- Forwarded message ———-
From: The Facebook Team <networkrequest+dmczzmx@facebook.com>
Date: Sat, Nov 21, 2009 at 6:18 AM
Subject: Re: Rajshahi University of Science and Technology
To: iurifat@gmail.com
Hi Istiaque,
This network has been added to the site, but may not appear for 24 hours. Once this network appears on the site, you will be able to join the network by selecting “Account Settings” from the Settings drop-down menu and going to the Networks tab. Let me know if you have any further questions.
Thanks for contacting Facebook,
Avery
User Operations
Facebook
—–Original Message to Facebook—–
From: Istiaque uddin Rifat (iurifat@gmail.com)
To: The Facebook Team
Subject: Rajshahi University of Science and Technology
Dear Facebook,
Please open a Network with following details. Our university doesn’t provide
any email addresses.
1. Full name of your school: Rajshahi University of Science and Technology
2. City: Rajshahi
3. State, Country: Rajshahi, Bangladesh
4. School’s website: www.ruet.ac.bd
5. Whether your school provides email addresses to students: NO
6. Graduation year : 2007
My login email address is : iurifat@gmail.com and the email facebook sent
regarding this is given below:
———- Forwarded message ———-
From: The Facebook Team <info+nmczxjr@facebook.com<info%2Bnmczxjr@facebook.com>
>
Date: Mon, Nov 16, 2009 at 12:31 PM
Subject: Re: My College/University Network Doesn’t Exist on Facebook Yet
To: iurifat@gmail.com
Hi,
Facebook currently supports high school, college, and workplace networks.
If you would like us to create a network for your high school or college,
please send an email from your school email address (if you have one) to
networkrequest@facebook.com with the following information:
1. Full name of your school
2. City
3. State, country
4. Your school’s website
5. Whether your school provides email addresses to students (yes or no)
6. Your graduation year
7. Please also copy and paste this email (which should include your login
email address associated with your account)
If you would like us to create a network for your workplace, please send an
email from your work email address to networkrequest@facebook.com with:
1. The name of your workplace
2. The official website of your workplace
3. Your official work email address (unfortunately if your company does not
distribute official email addresses to employees, we will be unable to
create a network for you)
4. A copy of this email (which should include your login email address
associated with your account)
Once we receive this information, we will be able to assist you.
Thanks,
The Facebook Team
—–End Original Message to Facebook—–
An easy to remember login URL for WordPress
Often people finds wordpress login URL hard to remember or at least hazardous to type on the browser. I found a very nice tip on internet and I’d like to share it here. Thanks to the author for the awesome tip.
http://outthinkgroup.com/2008/12/10/wordpress-tip-make-an-easy-to-remember-login-url/
Happy Blogging
Publicize in WordPress
WordPress.com sends the published blog posts to several places to automatically promote them for the author. This is called as “Publicize”.
One can also choose to send the posts to any of several third party services. Currently, WordPress.com Publicize supports the following.
I found this while surfing through wordpress features. Following link has these details:
http://en.support.wordpress.com/publicize/
Happy sharing




