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.
Showing posts with label Oracle Databases. Show all posts
Showing posts with label Oracle Databases. Show all posts
Tuesday, July 13, 2010
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.
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.
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 .
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 .
Subscribe to:
Posts (Atom)