Alias is definitely one of those commands which we would have read about in the beginners books on learning unix. But it took me 10 years to really use this command.
I had to change directories frequently and was tired of typing the whole directoy path and was thinking of a smarter way to accomplish it. I googled for a while and found this method.
alias abc = ‘cd change/to/directory/abc’
And now add the above command to the .profile so that we can just use the abc command when ever we want to move to the directory abc. Its very basic but pretty cool.
Tuesday, November 16, 2010
Tuesday, November 09, 2010
Loading data from a file into the database quickly
Below is a small procedure I created to load the contents of a file quickly into a database.
create or replace directory ext as 'C:\Nirmala\OracleLearning\ext';
create or replace procedure search_file(l_file_name varchar2
, search_string varchar2 default null ) as
l_table_count number;
begin
select count(1)
into l_table_count
from all_tables
where table_name = upper(trim(replace(l_file_name,'.','')));
if(l_table_count=1) then
execute immediate ' drop table '||trim(replace(l_file_name,'.',''));
end if;
execute immediate ' create table '||trim(replace(l_file_name,'.',''))||' (text clob ) organization external (type oracle_loader default directory ext location ('''||l_file_name||'''))';
execute immediate ' create table '||trim(replace(l_file_name,'.',''))||'_perm as select text , rownum line_number from '||trim(replace(l_file_name,'.',''));
end ;
Monday, November 08, 2010
Password Case sensitive in Oracle 11g.
Today I learned a new thing that from Oracle 11g the password has become case sensitive. The user id is still not case sensitive.
In older verison I never had a problem when I entered the password in upper or lower case. I checked on 10g and the password is case insensitive but in 11g it is sensitive. I guess if I read the new features guide I would have already know it. So its time again to remind my self that I need to read it.
In older verison I never had a problem when I entered the password in upper or lower case. I checked on 10g and the password is case insensitive but in 11g it is sensitive. I guess if I read the new features guide I would have already know it. So its time again to remind my self that I need to read it.
Thursday, November 04, 2010
7 Sins to stay away from
Politics without principles.
Wealth without work.
Pleasure without conscience.
Knowledge without character.
Commerce without morality.
Science without humanity.
Worship without sacrifice.
Wealth without work.
Pleasure without conscience.
Knowledge without character.
Commerce without morality.
Science without humanity.
Worship without sacrifice.
Tuesday, November 02, 2010
Word Power Made Easy - 2
fungible
:easily replaceable.
Autarky
:the condition of self-sufficiency, especially economic, as applied to a nation.
:a national policy of economic independence
Zeitgeist
:The taste, outlook, and spirit characteristic of a period or generation.
snivel
:to weep or cry with sniffling.
Schwag
:free merchandise
garter
:Also called, British , sock suspender, suspender. an article of clothing for holding up a stocking or sock, usually an elastic band around the leg or an elastic strap hanging from a girdle or other undergarment.
:a similar band worn to hold up a shirt sleeve.
:a leather strap for passing through a loop at the back of a boot and buckling around the leg to keep the boot from slipping.
foibles
:a minor weakness or failing of character; slight flaw or defect: an all-too-human foible.
paean
:any song of praise, joy, or triumph.
francophile
:friendly to or having a strong liking for France or the french.
kibble
: pet food.
tykes
: any small child.
:easily replaceable.
Autarky
:the condition of self-sufficiency, especially economic, as applied to a nation.
:a national policy of economic independence
Zeitgeist
:The taste, outlook, and spirit characteristic of a period or generation.
snivel
:to weep or cry with sniffling.
Schwag
:free merchandise
garter
:Also called, British , sock suspender, suspender. an article of clothing for holding up a stocking or sock, usually an elastic band around the leg or an elastic strap hanging from a girdle or other undergarment.
:a similar band worn to hold up a shirt sleeve.
:a leather strap for passing through a loop at the back of a boot and buckling around the leg to keep the boot from slipping.
foibles
:a minor weakness or failing of character; slight flaw or defect: an all-too-human foible.
paean
:any song of praise, joy, or triumph.
francophile
:friendly to or having a strong liking for France or the french.
kibble
: pet food.
tykes
: any small child.
Labels:
Words
Subscribe to:
Posts (Atom)