Wednesday, December 01, 2010

Oracle Export Tables with CLOB

Method 1:
Exp system@OraSID TABLES= (owner.table_name) DIRECT=Y RECODELENTH=65335 FILE=C:\table_name.dmp

Method 2:
Exp system@OraSID TABLES= (owner.table_name) FILE=C:\table_name.dmp BUFFER=37748736

The Buffer parameter applies only to conventional path export. It has no effect on a direct path Export. For direct path exports use RECORDLENGTH parameter to specify the size of the buffer that Export uses for writing to the export file. 64K is the max buffer size.

Wednesday, November 03, 2010

MS Terminal Service - Options

Many a times, one of my colleagues takes up a terminal session to a Windows server for some POC in the Lab. The problem is Windows provides licenses for upto 2 terminal connections to the server. In such a case, if you want to administer or even work on your stuff. You are forced to make a trip to the Lab or the data center to connect to the server and start the terminal manager and kill some of the sessions, this was the way I knew, until NOW.

the best way is to use mstsc /admin option to start the terminal service client in your computer and then you will be able to connect to the server even if both the terminal services are taken by other users. You can then choose to administer the server or log off unused sessions. Well this saves me a trip to the Lab.

Tuesday, October 05, 2010

My Writeup: Check Scam - Please read

Recently when I went to deposit a check at my Bank I found a leaflet saying "Don't be a victim of a check scam!" I was taken aback since I was not aware completely of how this works. So I grabbed the leaflet and drove to work. Later that day, I read it and understood it. 

Here is a gist of this leaflet.

How it occurs:

If someone sends a check or money order and asks you to deposit it in your account and wire-transfer the  money minus some bonus or incentive for your help, ensure you refuse to do it no matter how lucrative the offer is. If you do not know the person, DON'T DO IT.

Here is how the scam happens:

Requests can come in various forms:

  1. Say you are over paid by someone for an item you sold on the internet and are asked to wire transfer the extra money back.
  2. You might get a check saying you won a lottery overseas. You are asked to deposit a check and wire transfer a portion of the deposited amount as a tax or fees, so that the remaining earning would be mailed to you.
  3. Some one would email you saying they have inherited wealth and would need your help to get it and so on.

Here is why its a scam:

  1. The check or money order you get would be a counterfeit. 
  2. Counterfeit checks and money orders will be returned to your bank and the amount will be deducted from your account since you are responsible for any check or money order you deposit that turns out to be unpaid for any reason.
  3. Law requires banks to make deposited funds to be made available within 1-5 days. 
  4. Ability to withdraw cash from your account does not mean the check/money order is valid.
  5. It can be weeks before a check or money order is discovered to be counterfeit and returned unpaid to your bank.
  6. Bank employees may not be able to determine the validity of a check during deposit. They simple process the financial document.

Here is a link for more info - http://fakechecks.org/

This reminds about what my dad used to tell me, never be greedy, what you earn from hard work and sincerity is what would stay. A quick run to make some money could undo all the good deeds you have done. So be wise folks.

Thursday, September 30, 2010

Info: Preventing Falls

Falls are the leading cause of injury to seniors. There are many things seniors can do to help prevent falls, and maintain health and independence.

Go to the following link to read more on preventing falls for seniors - http://orthoinfo.aaos.org/topic.cfm?topic=A00135 


 

Saturday, September 25, 2010

OS for netbooks

Computer and Notebooks have evolved over the past few years. The use of applications are now internet centric. A couple of days back a friend of mine spoke to me about an OS for netbooks - Jolicloud. He said its similar to iPad and good support for drivers. I decided to give it a try. 

Jolicloud is a linux based OS, with simple GUI for netbooks. The OS has quite a lot of promise and has a smaller footprint. Now a thought struck me, can I run Jolicloud in a VM on my powerful desktop. Btw, I own a Phenom II X4 965 with 8 GB of DDR3 1600 RAM. 

Here are the steps.

1. Register in Jolicloud

2. Download the .ISO torrent for Jolicloud, not the Windows installer

3. Download the actual Jolicloud using the torrent. 

4. Download SUN's opensource VM solution Virtualbox.

5. Install Virtual box.

6. Open Virtualbox, 

7. Click Add New (to create a new VM). Hit Next

9. Give a name for the VM and select Linux and Other Linux, Hit Next

10. Select Base memory - 256 MB would be sufficient. 512 MB will be adequate.

11. In Virtual Hard disk screen, Check Boot Hard disk and select Create new hard disk. Hit next. Hit next again

12. Select Fixed or Dynamic storage, Fixed is good for experimental purpose (10GB should do). For Dynamic, select 5 GB, the VM manager will expand the size as required. beyond 5 GB. Hit Next

13. Click Finish.

14. Click Start. Hit next.

15. Its time to select the ISO file, Click on the folder icon.

16. Click Add icon, navigate to Jolicloud's iso and select Open.

17. Click Select

18. Click Next

19. In Summary screen, click Finish.

20. You will get the Jolicloud installer. Select your language.

21. Select Install

22. Go through the installation steps (they are simple), In prepare disk space, select use the entire disk.

23. Click Restart now.

24. Click Machine -> Close and Select power off machine.

25. Change boot order now, Settings, System, make Hard Disk as first bootable option. Click OK

26. Start the VM

27. OS comes up, Click Start, Define model - Desktop, Other, VM, Click Next

28. Give computer name, Click Close

29. Install update and App Sync.

30. You are done.

 

Jolicloud is a very good neat option for today's requirement.

 

 

Friday, September 17, 2010

Hardware Info in Unix

Solaris: prtdiag -v, /usr/bin/iostat -En

Linux: /proc/meminfo, /proc/cpuinfo, fdisk -l

HPUX: sysinfo, /usr/sbin/cstm

IBM AIX: lsconf, prtconf

 

Refer the link below for some scripts to get the same info in an effortless way

http://www.cfg2html.com/

Tuesday, September 07, 2010

Oracle Tips: Retaining AWR report

DBAs would want to preserve the AWR snapshots beyond the default 7 day period for performance analysis. This will help to query dba_hist tables.

 

execute dbms_workload_repository.modify_snapshot_settings(interval => <minutes for snapshot>,retention => <no. of days in minutes>);

Tuesday, August 31, 2010

Moore's Law & more

Computers, Notebooks, Laptops, Smartphones, Netbooks seem to be popular now than a decade away. The advent of smaller devices have always grabbed my attention. Apple has always lead the way bringing in a revolution time and again. Be in the first of the Mac desktops, iPhone, iPad, they have defined the way humans interact with the machines. (not as in Terminator)

While talking of computers, I get reminded of the Moore's Law which states "The number of transistors that can be placed inexpensively on an integrated circuits will double approximately every two years"

The first time I came to know about Moore's law in 1998 (Pentium III, AMD K6 days), I wondered is it even possible. Now over 12 years hence I believe in the law more than anything. Intel and AMD are able to churn out faster, multi cored, 64 bit processors to market in the last 3 years. Its amazing how things are turning out - quad core, hexa core and octa cores.

While speed and parallel processing is the key, there is a separate market segment that has evolved since the advent of the first iPhones and Netbook based-computers. Smart Phones evolved that empowered users to be "connected" all the time. Netbooks were lighter alternatives to cater majority of users whose computing requirement is just "internet based". Lighter netbooks came with single and dual core processors that are energy efficient with longer battery life enabling users to stay on the go longer.

The next few years, one can clearly see the market belongs to iPad and Anaroid based pads with touch sensitive screens, HD screens and HD audio, that users can carry easily and satisfy their thirst be it being connected, entertainment, games or reading books. These small devices will be the household names. No wonder Internet is the best invention ever.

Wednesday, August 25, 2010

Oracle Tips: Table Reorg

The most efficient way to re-organize tables in 11.2 is
alter table <table_name> move;

The above command preserves all constraints and index definitions.
Of course, indexes based on row_id would be impacted. 
But its important to verify if any of the indexes on the table are UNUSABLE. If so rebuild the indexes as below
Alter index <index_name> rebuild tablespace <tablespace_name> ;

Another way I came across but have not tried is

alter table <table_name> enable row movement;
alter table <table_name> shrink space;

This is supposed to repack the rows and bring the High Water Mark down.


Tuesday, August 24, 2010

Oracle Tips: using Data Pump

Create Directory for Export & Import Data in Oracle
-- Unix
create directory expdp_dir as '/u01/backup/exports'; OR
-- Windows
create directory expdp_dir as 'C:\orabackup\exports';

grant read,write on directory expdp_dir to system, user1, user2, user3;

Data Pump Export
Full Export Mode

expdp system/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=expfull.dmp FULL=y LOGFILE=expfull.log

Schema Export Mode
expdp <schema_owner/system>/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=schema_exp.dmp SCHEMAS=<schema1>,<schema2> LOGFILE=expSCHEMA.log

Table Export Mode
expdp <schema_owner>/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=tables_exp.dmp TABLES=<table1>,<table2>,<table3> LOGFILE=expTABLES.log


Data Pump Import
Full Import Mode
impdp system/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=expfull.dmp FULL=y LOGFILE=impfull.log

Schema Import Mode
impdp <schema_owner/system>/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=expfull.dmp SCHEMAS=<schema1>,<schema2> LOGFILE=impSCHEMA.log

Table Import Mode
impdp <schema_owner>/<password>@<db_name> DIRECTORY=expdp_dir DUMPFILE=expfull.dmp TABLES=<table1>,<table2>,<table3> LOGFILE=impTABLES.log

Thursday, August 19, 2010

Oracle Tips: Writing to File

Need to have these executed before you can write to files on server

1. CREATE DIRECTORY utl_dir1 AS '<path>';
2. GRANT ALL ON DIRECTORY utl_dir1 TO <owner>;

The following code demonstrates how to write the contents of a table to a file.
Declare
f utl_file.file_type
indx number:=1;
f  := utl_file.fopen('UTL_DIR1',<file_name>,'W');

CURSOR <cursor_name>
  IS
    SELECT *
    FROM <table_name>;

BEGIN
indx:=1;
FOR <row_variable> IN <cursor_name>
LOOP
  utl_file.put_line(f,convert_row_to_delim_str(fxd_loan_row,','));
  indx:=indx+1;
END LOOP;

utl_file.fclose(f);

END
/

Oracle Tips: Speeding up Index Creation

3 Steps to create indexes faster

1. CREATE INDEX on <table_name>(<column1>, <column2>) UNUSABLE;
2. ALTER INDEX REBUILD parallel 16 NOLOGGING;
-- Does FFS rather than FTS when using Create statement
3. ALTER INDEX NOPARALLEL;


Monday, August 16, 2010

Microsoft Word Spell Check Issues

My Microsoft Office spell checks stopped to work. I tried all possible methods listed in Microsoft help - like Proofing options in Word, Set Proofing options and so on. But nothing worked except the one below.

1. Go to "Start"->"Run", then type "regedit" and follow the link as below:
"HKEY_CURRENT_USER\Software\Microsoft\Shared Tools\Proofing
Tools\1.0\Override"

2. Remove Override folder.

3. Spell Check will work as its meant to.

Tuesday, July 06, 2010

Learning about Web Development

I would like to list the best sites that I am aware of to learn about Web development.

1. W3Schools
2. Web Development Notes
3. Java Script Kit
4. Entheos
5. Net Tuts+

Have fun learning

Monday, June 28, 2010

Test Your Network Speed

When you take a internet connection be in through a DSL or Cable or Satellite. It is important to check the speeds you get from time to time. Most of the ISPs (Internet Service Providers) play with the bandwidth available with them amongst its users. Hence we might not see what we were promised.

Here is a simple way to test it. Use Speedtest to check the speed from your PC/laptop to a nearby or far away server.

Saturday, June 26, 2010

Firefox Addons (2010)

Its 5 years since I adopted Firefox as the primary browser. Ever since I have managed to get it into over 20 households. People love it once they see its secure, fast and the best. Over 2 years back I listed some of the best addons for firefox, Guess its time to do it again. But before that here are some key facts on Firefox

1. Its open source (mozilla project)
2. Its sister softwares are thunderbird (email client) and Sunbird (Calendar app)
3. Mozilla has integrated these apps into SeaMonkey a single application for Internet requirements.
4. On firefox, ver 4 (currently 3.6.4) is going have a 64 bit version with its addons and extensions.
5. Check out the browser market share stats at http://www.w3schools.com/browsers/browsers_stats.asp

PLUGINs
Firefox comes with various plugins. All plugins can be accessed from the following link - https://addons.mozilla.org/en-US/firefox/
Upon installing firefox, the first step is to install the plugins you require. The most important plugins you should not forget to add are - Adobe Flash and Media Player plugins.

Adblock Plus
This is a fantastic Ad blocker to firefox. Adblock Plus replaces my previous utility Adblock. Adblock has its own subscriptions facility that helps keeps ads under check. It also can be customized based on the website we visit. Its so good, You will never realize you have it in your browser.

Personal Ratings
Ease of Use: ****
Utility Value: *****


NoScript
This particular addon is amazing. It secures your browser to the highest level. All sites through numerous scripts that are intrusive and annoying if not dangerous. Noscript gives one the power to control what sites are allowed. Don't trust my word, check it out yourself. Install this addon, go to a website like weather.com (it may not load properly at first). Checkout the small icon (S sign with a strike across it in red) on the status bar of the browser. Click on it and it will reveal all the other host sites that have scripts on weather.com. Just allow the base URL (address) and your website will be rendered properly but preventing other sites you want to keep out of your browser. Use it for its the best addon of all. Again it is simple to use for me but not for some of my friends.

Personal Ratings
Ease of Use: **
Utility Value: *****


Forecastfox
This is a great weather forecast addon to your browser, It hooks up with Accuweather to bring you an updated weather information. Not only that, if you travel frequently like me, you will love it even more, just create all your towns and cities and just with a click of a button, you can get the updated weather on any city you want. It is fantastic considering it pulls weather info for cities in India as well. It was amazingly simple to configure and operate for me, But my wife took sometime to figure how it works.

Personal Ratings
Ease of Use: ****
Utility Value: ****


XMarks (formerly Foxmarks)
This is an addon for firefox that helps in synchronizing your bookmarks (favorites in IE) across your computers. Its very useful to me since, whenever I update my bookmarks, Foxmarks helps to synchronize them at my home computer, my wife's computer, my parents' computer as well as my in-law's computer. This way all of us are able to view the same bookmarks. Foxmarks not only gives you an option to download bookmarks but also merges with the one you might not want to delete. This way you can choose to merge/overwrite the bookmarks. Be careful on what you choose, else you will lose all your bookmarks on the server.

The recent feature improvement is sync up your passwords. But I do not trust it yet for that purporse, I use another utility for that.

Personal Ratings
Ease of Use: ***
Utility Value: ****


This is a mozilla labs addon. Helps one stay in sync with their Firefox by providing access to history, passwords, bookmarks and even open tabs across all devices.

Personal Ratings
Ease of Use: *****
Utility Value: ****


IE Tab Plus (better than IE Tab)
An enhanced version of IE Tab with Adblock Plus in IE supported. It also allows you import settings from IE Tab and synchronize cookies between IE and Firefox. Supports Firefox 3.6 and beyond.

Personal Ratings
Ease of Use: *****
Utility Value: ****


FireFTP is a free FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers

Personal Ratings
Ease of Use: *****
Utility Value: ****


ScribeFire
This is an addon for firefox for active Bloggers. It connects to various Blogs and helps you to configure your account on Scribefire. Scribefire offers an editor like interface (just like the one your blog service provides). The editor comes up on your firefox by clicking a small notepad icon on your status bar. This is fantastic to post something on your blog. Scribefire has come a long way and the latest version is very simple and easy to you. Try it and you will like it a lot. Please note Scribefire would put in a non-intrusive Ad on all you posting. But if you reload the post, remove the ad & re-publish it, it goes off.

Personal Ratings
Ease of Use: *****
Utility Value: *****


Dictionary (spell check)
This is a quite addon, it sits on your browser advising the user whenever he types emails or writes something on websites or on Scribefire about spellings. It just puts a red underline on words that are mis-spelt. Just right click and correct your spellings. People who like the spell check in MS Word, will find an amazing similarity in using this addon. Its a must have addon

Personal Ratings
Ease of Use: *****
Utility Value: *****


Cooliris
The Cooliris 3D Wall -- The fastest and most stunning way to browse photos and videos from the Web or your desktop. Effortlessly scroll an infinite "3D Wall" of content from Facebook, Google, YouTube, Flickr, and more. Even watch TV shows & movies.

Personal Ratings
Ease of Use: *****
Utility Value: *****

Hope this article is of use to all Firefox users.

How to watch World Cup?

I have been looking around for a way to see these matches. ESPN3 was offering free streaming to some of the internet providers. Time Warner was not in the pack. My next alternative was P2P streaming. Here is a good site that helps people who loves football.

Choice 2: http://www.livefootballtvs.com/


Tuesday, June 22, 2010

Responsibilities

When I was a kid, I was told to be responsible. I used to think as a kid & even in college that doing well in studies and scoring high grades/marks is all that is to responsibilities. Then came job followed by marriage and kids of my own. Last decade flew by so swiftly that I never had time to think about the 'word' until recently. But I think I am closer to understanding it than ever before.

We grow and experience the world around us through success and failures of ourselves and those around us, just so that we might be ready to take care of the same world as a grown up. We as individuals are committed to take care of our children, parents, spouse, society and more than anything, trying to securing what we enjoyed as kids for the generations ahead.

All of us have made decisions. Very often we encounter cross ways in our life, every time the decision (if you think ethics and moral values) would be in binary - right and wrong. It takes guts for the individual to make the right choice time and again. The more the people who make the right decisions, the more they are being committed to the world around them even if no one knows or notices.

In ancient India people were divided into castes that defined and categorized people to certain duties and responsibilities. A kshatriya (warrior) is meant to protect and serve the people, a brahmin (those who understand karma & dharma) is meant to teach and provide knowledge to all, a vaishya (business man) is meant to make things available to all and a shudra (one who works with hands) is meant to create things for others existence. The people of all castes were equal and meant to be the same. Children born in one caste having skills in another could take up alternate ways of living. This way one generation would always surpass the next.

But generations later, some of the caste forgot their responsibilities and wanted to claim glory and riches for themselves, Ego, power and greed changed history to what it is now. These three caused people to forget their responsibilities.

When you look at American history, Abraham Lincoln showed the power and capability to execute his responsibilities, decades later, we still remember him as the best President of all times. And civil rights is what it is now in US because he chose to be responsible.

Though a simple term, it holds the power to change history to good or bad. This writeup would remain incomplete unless I quote a dialogue from the movie Spiderman - "With great powers comes great responsibilities"





Chennai has grow & has its problems

Few days ago I returned from a trip to Chennai, India, it seems like I was totally out of town, the city I grew up in, has grown beyond recognition in the past few years.

Well, there are few great flyovers - Guindy, Red-hills, and one coming up near Koyambedu, Chennai International Airport is going through modernization, new parks and community recreation places like tennis courts, skating arena have come up. Lots of malls and shops are springing up all around the city. The city itself has grown bigger now. Metro train is also being planned now for the city of Chennai.

Many key traffic junctions are being eliminated to minimize travel time. But since the process of infrastructure development has been reactive, we see new areas where where there was no traffic jams few years back now is jammed to 10-15 min of wait time. One such area is the Shanti Colony junction in Anna Nagar.

But there are still certain things that remains - indisciplined drivers & corrupt cops who rely on bribes for a fortune. There are cops who pay money to superiors and come to Chennai from other parts of Tamil Nadu so they can make money from the common man. This is like a chicken and egg story, cops don't stop taking bribes and indisciplined drives find a way by paying off with bribes.

Corporation needs to create zones for Commercial and Residential areas. This would prevent shops from coming up in residential areas like Shanti Colony and create a horde of traffic since the roads are not meant to carry that much traffic in the first place. But guess who provides clearance to these commercial buildings? Either its corrupt office bearers at the corporation or its lack of planning on their part for the future. In couple of years, it would come down to demolishing these commercial buildings like they did in New Delhi.

I have put my thoughts in the Public Grievance and Redressal System  at the website of Corporation of Chennai

Now its wait & see.

Monday, June 21, 2010

I am back

I took a break to attend to family and work the past year. Hope to be more active with my blog from now on.