Tuesday, July 13, 2010

what actually do u mean by oracle server?

Well it took me little affords to over come this great confusion about whats server when you are talking about the oracle databases. I heard people saying that all the work in oracle databases is done on Linux servers.
Now what was not getting in my head is, whats this server? I mean, i have done lots of programming in web servers,application servers but this oracle server??

Well Oracle calls its instance oracle server.Ooh, things are simple now.
But, whats there is oracle instance,
oracle instance is nothing but collection of some processes that must be running in the background along with the SGA also called as System Global Area.

Diffenece between tab and cat.

First of all what we are talking about here is the select query that returns tables that exist in the database.

Hence what we are differentiating here is
select * from tab and
select * from cat

Well I tried a lot to search for the difference by could not find anywhere, a proper answer.

Anyway, main difference is primarily concerned about the cluster in oracle databases.
Lets see it practically to make out the difference, observe the commands and there out put when they are run

desc tab;
output shows that there are 3 columns named
1:)table name
2:)table type
3:)cluster id

however,
desc cat;
output shows that there are 2 columns named
1:)table name
2:)table type

Hence the main difference is that with the cluster-id. Now whats that cluster id thing?
Well in order to increase the scalability of oracle databases ,Oracle came up with a concept called Oracle Clusters, now using these clusters u can creating multiple instances of oracle database on different machines.

And hence the additional column is nothing about talking about this cluster id. Now the difference b/t those select commands are quit simple.

Saturday, July 10, 2010

truncate and delete command

Well there is always this question about the difference between truncate and delete command.

First lets see what happens when u create a table.If you are using oracle 9i or below there is by default 8 blocks that are allocated for that table even if it does not have any data and this size increases by 8 every time. Hence when you populate the table with data that can not be held by these 8 block, next time there is allocation of 8 more block and hence size now becomes 16 block and so on.

But in latest Oracle databases the default size has been made as 0 block for table.

Now lets come to the difference.

When you delete data from the table, data gets lost but size of  the table remains the same.
Where as when you are truncate the table, size of the table becomes default size(as discussed above).

Now very critical question is
"truncate is a DDL or DML command"


If you had followed till now what i talked, answer to this question becomes way simple.
Well its a DDL command right?
That's because of the fact that its dealing with size of table.

For all the users doing Real DBA stuff, i meant running oracle on sun Solaris or any other Linux environment,
you can make use of
select * from user_ts_quotas ;
to see size of tables.

Wednesday, July 7, 2010

Whats Smon..

Well I was browsing for the Smon process i could not find much information about it.
Anyway putting it in very simple words its basically a process that must be up and running in the background in case any database instance is available.Whats interesting is that if u are using RAC than there can be many instance of the Oracle database that must be active at any instance, this is possible because of the clusters.
Hence to connect to any of the oracle databases available you must ensure that smon is running.

The simplest way to ensure this is by checking all the processes that are running at this time.This can be done by making use of ps -e command, if many processes are running we can make use of grep by pipe lining it with the ps-e out put.

Hence the command turns out to be
ps -ef |grep smon

Hence if grep gets u something means DB instance is up and running .

Tuesday, July 6, 2010

"POST"

Well its not html form submission type that we are talking about,we are talking about what's called Power On Self Testing.

What does it do?
Its basically is used in the process of loading operating system. This is the critical part of the booting process wherein this is held responsible for checking  hardware of the system, so in case anything goes wrong in testing process, it means that there is some part in the hardware that is not functioning as expected and since hardware is the basic part of any system, it makes no sense at all to boot the operating system(OS cant do anything without hardware). This failure makes the process(POST) not to transfer the control over to process responsible for operating system booting. Hence OS does not get booted. You can listen to some noise when any error is observed by POST.

The language responsible for post is fourth, i mean most of the POST programs are written by making use of programming language called Fourth.

Monday, July 5, 2010

Jdk7.0 is out?

Well jdk7.0 is about to be released with few more changes and cool features.

=>Algorithm for Garbage Collector in this version of Jdk is such that it more efficient and takes less pause time.
So program execution is faster.They call it to be First GC.

=>Also swings has been made better by providing even more API.

=>There is a mechanism introduced to make 64 bit pointer compressed and fitted in 32 bit, this reduces the memory requirements and performance.

=>Implementation of standard Elliptic-curve cryptography (ECC) for making java application use ECC out of box.


=>Unicode has been upgraded to 5.1.


=>There are many new API introduced for IO operations.


=> Attempt has been made to make the language as Modularize as possible.


=>Changes in the loader class,here they have provided a method which closes the resources which might be any file and other stuff. 

As quick as a snake's bite ( maybe quicker! )...

Hey I'm back and this time with a programming language that I have enjoyed programming in for the last few months probably most of you know what I'm talking about form the title ... well for those who don't know about it it's Python it's simple to learn... it's simple to use... and it's simple to what not?
So those who are not using it I strongly suggest you start to use it. It's basically a scripting language, dynamically and strongly typed, it's object oriented, you can also program functionally ( although I'd prefer LisP or Haskell to Python to program functionally ) and it's really fast. Now many of you may be wondering what is dynamic typing.... Now let me first tell you that it's got nothing to do with typing on your keyboard, it's the data-type of a variable that is under consideration. Now if you look up "Dynamic" on http//:www.dictionary.com under 'Computers' you find the meaning:
  • affected by the passage of time or the presence or absence of power: Dynamic memory must be constantly refreshed to avoid losing data.
What I need you to look at is "affected by the passage of time or the presence or absence of power". Here the data-type of the variable is what is affected. Suppose we have a variable say x declared as:

x = 10

the data-type of x is an INTEGER.
Now suppose I do this:

x = "aj"

here the data-type of the same variable is now STRING.
But in a "statically" typed language as C or C++, the data-type of a variable once declared cannot be changed. But what is the use of this?
Well it's easier to code and it makes a lot more flexible.