Kamran Agayev's Oracle Blog

Oracle Certified Master

Archive for November, 2012

How to mount CD-ROM in Linux using CLI

Posted by Kamran Agayev A. on 21st November 2012

Just wanted to share with you steps to mount CD-ROM in Linux without having GUI.

First of all, you should check /mnt and /media folders and see if it has already been mounted. If it’s not, then you have to mount it by your own

For this make sure you do have CD-ROM plugged in using the following command:

dmesg | grep CD
– Added public key D4A26C9CCD09BEDA
scsi 4:0:0:0: CD-ROM Optiarc DVD RW AD-7270H 1.80 PQ: 0 ANSI: 5
Uniform CD-ROM driver Revision: 3.20
sr 4:0:0:0: Attached scsi CD-ROM sr0

 

If you got an output something like above, it means that you’ve CD-ROM plugged to the server. Next ,check /dev folder, cdrom should be there:

[root@localhost cdrom1]# ls -ltr /dev/cd*
lrwxrwxrwx. 1 root root 3 Nov 21 13:55 /dev/cdrw -> sr0
lrwxrwxrwx. 1 root root 3 Nov 21 13:55 /dev/cdrom -> sr0
[root@localhost cdrom1]#

 

And last, create a folder and mount /dev/cdrom to that folder:

mkdir /cdrom 

mount /dev/cdrom -t iso9660 -r /cdrom

 

For more information on CD-ROM mounting, check the following useful link:

http://www.linuxfocus.org/English/September1999/article106.html

Posted in Oracle on Linux | 1 Comment »

ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind

Posted by Kamran Agayev A. on 19th November 2012

Today, when I was using BULK COLLECT to fetch some rows to the collection, I got the following error:

ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind

I checked my code and didn’t find anything special that can cause this error. After investigating a while, I found that the row which has length more than 2000 bytes causes that error. I checked my collection and saw that this row was defined as – dbms_sql.varchar2_table

What do you think, how it was defined in the package level (DBMS_SQL)? I was thinking it was defined as “VARCHAR2(4000)“, but it was “VARCHAR2(2000)“.

type Varchar2_Table is table of varchar2(2000) index by binary_integer;

So I declared new variable, changed the declaration of my collection as follows and it worked:

type Varchar4000_Table is table of varchar2(4000) index by binary_integer;

TYPE trec  IS RECORD (

…..

…..

column Varchar4000_Table;

)

Posted in Administration, SQL and PL/SQL | 2 Comments »

Do you backup your blog?

Posted by Kamran Agayev A. on 12th November 2012

Last month I got an email from wordpress.com that my password was changed. Hmm … I opened the browser and tried to login to my page, but password was incorrect! I resetted my password and asked wordpress to send me a new password to my email, but I didn’t get it. Ohh .. The password was changed and sent to the hacker’s email! I checked my webpage and got “hacked” message. The hacker get into my wordpress database (either due to wordpress plugin bug or hosting security hole)

I called hosting service and asked them to check my webpage and recover it back immediately! It took more than 2 hours to recover my blog.

In my opinion, getting your webpage hacked is not a big deal, the big deal is if you don’t have backup of your blog! Can you imagine what happened if I lost my blog which contains 140 technical posts with 1983 Comment? Your blog is your career. If you lost it, you can lose your career.

I would advice you to have backup of your blog (don’t rely to hosting backup, make backup after each blog post you post, copy the backup to the different storage), to not use unnecessary and untested wordpress plugins and to choose the one of the best hostings in the market

Posted in Uncategorized | 2 Comments »

APAC OTN Tour 2012 – Thailand, Bangkok – OUGTH

Posted by Kamran Agayev A. on 8th November 2012

Two months ago I was invited by my friend, an Oracle ACE Director – Francisco Munoz Alvarez to present at APAC OTN Tour this year. My papers were accepted for Thailand Oracle User Group (OUGTH) meeting. I was very excited as it was my first time to present at OUGTH

At Bangkok airport, I was met by my Azerbaijani friend, Ibrahim Jabbari, who helped me a lot when I was at Bangkok.

At the next day, I got up early, have a wonderful breakfast at the hotel and went to the Eastin Grand Hotel Sathorn for the conference where I was met warmly by OUGTH staff. After a while Francisco and Mike Dietrich arrived.

It was my pleasure to meet Francisco in person  and present with him in the same conference. He has a very deep knowledge of Oracle and he’s doing a great job for the Oracle community. Francisco talked about Database Security and showed some magics with Oracle in real life scenario

Mike, who works Upgrade Consultant for Oracle, presented three sessions in this conference. Two of them were related with Database upgrade, the last one was related with Data Pump which was very interesting. I must say that I haven’t seen such guy who has very strong knowledge of Oracle Upgrade issues in my whole DBA career.

Then I talked about RMAN 11g new features and showed some pre-created video tutorials

Then Thai DBA, Tanakorn talked about Constraints in Thai language, although I didn’t understand anything :), the presentation was prepared good

At the end, we took some photos together with OUGTH staff. You can find some of pictures from the following link:

http://oracle.in.th/?p=11691

To see my updated during the conference, check my twitter account:

https://twitter.com/KamranAgayev

I would like to thank to OTN and OUGTH for organizing this event and wish to present at Bangkok again next year :)

Here’re some pictures I’ve taken at conference and at Bangkok


Posted in Uncategorized | No Comments »