<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5335252535709464945</id><updated>2011-12-14T10:06:33.593-08:00</updated><category term='Enterprise Manager Grid Control'/><category term='Admin / Config'/><category term='Export Import'/><category term='Unix/Linux/OSX'/><category term='XML'/><category term='RDBMS'/><category term='RAC'/><category term='Backup and Recovery'/><category term='mysql'/><category term='DOS/Windows'/><category term='Sql Plus/ PLSQL'/><category term='ORA-600'/><title type='text'>Oracle works...</title><subtitle type='html'>My Oracle Notes for Oracle 6,7,8i,9i,10g,11g.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default?start-index=101&amp;max-results=100'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3937557707217946357</id><published>2011-12-14T10:06:00.000-08:00</published><updated>2011-12-14T10:06:33.599-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Switch to new tempoary tablespace</title><summary type='text'>Create new temporary tablespace 

CREATE TEMPORARY TABLESPACE temp2 
TEMPFILE '/app/db/temp02.dbf' SIZE 20M EXTENT MANAGEMENT LOCAL ;

ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;

DROP TABLESPACE temp
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3937557707217946357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/12/switch-to-new-tempoary-tablespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3937557707217946357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3937557707217946357'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/12/switch-to-new-tempoary-tablespace.html' title='Switch to new tempoary tablespace'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2370241483189729166</id><published>2011-11-09T11:45:00.000-08:00</published><updated>2011-12-07T11:47:00.458-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>deleting / closing trace files</title><summary type='text'>Sometimes the trace files in oracle does not close so using oradebug you can close a trace file identifying the process id having a lock on the trace file, use the following commands below.
 
SQL&gt; oradebug setospid 88874
Statement processed.
SQL&gt; oradebug close_trace
Statement processed.


</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2370241483189729166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/11/deleting-closing-trace-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2370241483189729166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2370241483189729166'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/11/deleting-closing-trace-files.html' title='deleting / closing trace files'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4699349268985899705</id><published>2011-08-16T06:28:00.000-07:00</published><updated>2011-08-16T06:28:02.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Listener log file rename/reset/backup/zip it</title><summary type='text'>
Listener log file backup and zip. Start the listener control utility 
lsnrctl 
set current_listener listener_ora 
show log_status 
set log_status off
## here you rename the logfile
set log_status on
show log_status 
## Later you can zip the renamed logfile </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4699349268985899705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/08/listener-log-file-renameresetbackupzip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4699349268985899705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4699349268985899705'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/08/listener-log-file-renameresetbackupzip.html' title='Listener log file rename/reset/backup/zip it'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-794804545017344803</id><published>2011-07-05T11:59:00.000-07:00</published><updated>2011-08-19T12:02:27.989-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>reset mysql root password</title><summary type='text'>1) kill mysqld without -9 option
 
2) start mysqld with --skip-grant-tables  option

3) mysql --user=root --port=3306  --host=server1

4) 
  use mysql;
  update user set password=PASSWORD("letmein") where User='root';
  flush privileges;
  quit
OR 
   mysqladmin -u root flush-privileges password "letmein"


5) start mysqld with your regular option

</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/794804545017344803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/07/reset-mysql-root-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/794804545017344803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/794804545017344803'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/07/reset-mysql-root-password.html' title='reset mysql root password'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4205271510766140683</id><published>2011-06-17T07:24:00.000-07:00</published><updated>2011-06-17T07:37:34.699-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Enabling ODM for Oracle</title><summary type='text'>Symantec Reference for ODM config for Oracle 10g

This example is for 64 bit Oracle 11g 

* Oracle libraries location
oracle@serv1&gt; cd $ORACLE_HOME/lib

* Saving old link
oracle@serv1&gt; mv libodm11.so libodm11.so.orig

* Linking the VERITAS ODM library to Oracle 11g

Example for 64 bit Version 
oracle@serv1&gt; ln -s /usr/lib/amd64/libodm.so libodm11.so

oracle@serv1&gt; ls -l $ORACLE_HOME/lib/libodm11.</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4205271510766140683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/enabling-odm-for-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4205271510766140683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4205271510766140683'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/enabling-odm-for-oracle.html' title='Enabling ODM for Oracle'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8791595330514917982</id><published>2011-06-15T10:40:00.000-07:00</published><updated>2011-06-15T10:40:06.480-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Reconfiguring the Enterprise Manager service ports</title><summary type='text'>$ emca -reconfig ports -DBCONTROL_HTTP_PORT 5502
$ emca -reconfig ports -AGENT_PORT 1851
$ emca -reconfig ports -DBCONTROL_HTTP_PORT 5502
$ emca -reconfig ports -RMI_PORT 5520
$ emca -reconfig ports -JMS_PORT 5521
$ emca -reconfig ports -DBCONTROL_HTTP_PORT 5510 -AGENT_PORT 1851 -RMI_PORT 5520

</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8791595330514917982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/reconfiguring-enterprise-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8791595330514917982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8791595330514917982'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/reconfiguring-enterprise-manager.html' title='Reconfiguring the Enterprise Manager service ports'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7010434137153368126</id><published>2011-06-15T10:11:00.000-07:00</published><updated>2011-06-15T10:25:39.459-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Oracle Enterprise Manager and Real Application Cluster</title><summary type='text'>Oracle Enterprise Manager and Real Application Cluster
some useful commands 

Status of the services: crs_stat -t
 
Stop the instance: srvctl stop  instance –d mydb –i mydb1 –o immediate

Start the instance: srvctl start instance –d mydb –i mydb2

Find cluster name: CRS_HOME/bin/cemutlo -n 


Script to see the services in formated:
crs_stat -l  | \
awk ' { if ( $0 ~ /NAME/ ) printf "%-45s", $1 ;
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7010434137153368126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/oracle-enterprise-manager-and-real.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7010434137153368126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7010434137153368126'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/oracle-enterprise-manager-and-real.html' title='Oracle Enterprise Manager and Real Application Cluster'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5409546436936850592</id><published>2011-06-13T09:03:00.000-07:00</published><updated>2011-06-13T09:03:00.428-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Confiure TNS FAILOVER</title><summary type='text'>
Server1
~~~~~~~~~
alter system set local_listener=listener1
**tnsnames.ora
LISTENER1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = server1 )(PORT = 1521 ))

exec dbms_service.CREATE_SERVICE(SERVICE_NAME=&gt;'dbserv', NETWORK_NAME=&gt;'dbserv')

**Create the service on database startup 
CREATE OR REPLACE TRIGGER SYS.startup_trg
after startup on database
BEGIN
DBMS_SERVICE.START_SERVICE('dbserv');
END;
/



</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5409546436936850592/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/confiure-tns-failover.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5409546436936850592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5409546436936850592'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/confiure-tns-failover.html' title='Confiure TNS FAILOVER'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5034781547985913914</id><published>2011-06-03T07:15:00.000-07:00</published><updated>2011-06-16T09:56:02.113-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Using Multiple text based window session with Screen</title><summary type='text'>Screen Quickie
CTRL-a ? Help Screen
CTRL-a ^a Switch between previous Screen/Current Screen
CTRL-a " List of Screen use up/down arrow and enter to select
CTRL-a c Create a new window
CTRL-a spacebar Go to next window
CTRL-a backspace or del Go to previous window
CTRL-a 2 Go to window 2





Using Screen

Options:
-a            Force all capabilities into each window's termcap.
-A -[r|R]     Adapt</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5034781547985913914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/using-multiple-text-based-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5034781547985913914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5034781547985913914'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/using-multiple-text-based-window.html' title='Using Multiple text based window session with Screen'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8970964322742957805</id><published>2011-05-21T10:31:00.000-07:00</published><updated>2011-06-15T10:33:31.832-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Oracle Enterprise Manager dbconsole slow</title><summary type='text'>748251.1 OEM ISSUE

exec dbms_stats.DELETE_TABLE_STATS('SYS','X$KCCRSR'); 
exec dbms_stats.LOCK_TABLE_STATS('SYS','X$KCCRSR');
exec dbms_stats.unLOCK_TABLE_STATS('SYS','X$KCCRSR');
exec dbms_stats.gather_table_stats('SYS','X$KCCRSR');

alter system flush shared_pool;</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8970964322742957805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/05/oracle-enterprise-manager-dbconsole.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8970964322742957805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8970964322742957805'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/05/oracle-enterprise-manager-dbconsole.html' title='Oracle Enterprise Manager dbconsole slow'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9159489307106205437</id><published>2011-05-15T10:27:00.000-07:00</published><updated>2011-06-15T10:30:32.172-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Drop Enterprise Manager repository manually</title><summary type='text'>Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:

EXEC sysman.emd_maintenance.remove_em_dbms_jobs;
EXEC sysman.setEMUserContext('',5);

drop user sysman cascade;
drop role MGMT_USER;
drop user MGMT_VIEW cascade;
drop public synonym MGMT_TARGET_BLACKOUTS;
drop public synonym SETEMVIEWUSERCONTEXT;


Deconfig the dbcontrol 
emca -deconfig dbcontrol db -repos </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9159489307106205437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/05/drop-enterprise-manager-repository.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9159489307106205437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9159489307106205437'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/05/drop-enterprise-manager-repository.html' title='Drop Enterprise Manager repository manually'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5412992294622502481</id><published>2011-05-15T09:40:00.000-07:00</published><updated>2011-06-03T09:57:11.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Oracle Enterprise Manager 11g Installation.</title><summary type='text'>Configure your XWindows system if you are installing on Unix/Linux
export DISPLAY=your.machine.ip:0.0

1. Install WebLogic Server
  export JAVA_HOME=/path/to/jdk-1.6
  $JAVA_HOME/bin/java -d64 -jar wls1032_generic.jar 

2. Setup Database for the Grid Control
  alter system set session_cached_cursors=250 scope=spfile ; 
  alter system set log_buffer=10489999 scope=spfile ; 
  alter system set </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5412992294622502481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/05/oracle-enterprise-manager-11g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5412992294622502481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5412992294622502481'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/05/oracle-enterprise-manager-11g.html' title='Oracle Enterprise Manager 11g Installation.'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7900948746379068849</id><published>2011-04-25T10:34:00.000-07:00</published><updated>2011-06-15T10:36:00.251-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Enterprise Manager Grid Control'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Enterprise Manager dbcontrol for RAC</title><summary type='text'>emca -config dbcontrol db -cluster -EM_NODE node01 -EM_SID_LIST mydb
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7900948746379068849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/04/enterprise-manager-dbcontrol-for-rac.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7900948746379068849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7900948746379068849'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/04/enterprise-manager-dbcontrol-for-rac.html' title='Enterprise Manager dbcontrol for RAC'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3896160881035974634</id><published>2011-04-10T09:36:00.000-07:00</published><updated>2011-06-03T09:38:27.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='RAC'/><title type='text'>Oracle RAC useful commands</title><summary type='text'>1. Find the Cluster name of the RAC 
$CRS_HOME/bin/cemutlo -n 


</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3896160881035974634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/04/oracle-rac-useful-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3896160881035974634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3896160881035974634'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/04/oracle-rac-useful-commands.html' title='Oracle RAC useful commands'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7264218102921034940</id><published>2011-04-03T09:33:00.000-07:00</published><updated>2011-06-03T09:34:06.728-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Oracle Metadata - Script Creation</title><summary type='text'>1. Create users tablespace script
select dbms_metadata.get_ddl('TABLESPACE','USERS' ) from dual ;

2. Create user creation script 
select dbms_metadata.get_ddl('USER','SCOTT' ) from dual ;

3. User privs 
--SYSTEM PRIVS 
select 'GRANT ' ||PRIVILEGE ||'  TO XXX ; ' from dba_sys_privs  where grantee='AAA';
--ROLE PRIVS
select 'GRANT '||GRANTED_ROLE ||' TO XXX ; ' from dba_role_privs where grantee='</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7264218102921034940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/oracle-metadata-script-creation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7264218102921034940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7264218102921034940'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/oracle-metadata-script-creation.html' title='Oracle Metadata - Script Creation'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-81550643735199784</id><published>2011-03-21T08:46:00.000-07:00</published><updated>2011-06-15T09:15:07.588-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>bash shell programing</title><summary type='text'>bash 3.2
bash shell builtin commands           bash reserved words
.                                     !
:                                     [[
[                                     ]] 
alias                                 {
bg                                    }
bind                                  case
break                                 do
builtin                               done</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/81550643735199784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/03/bash-shell-programing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/81550643735199784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/81550643735199784'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/03/bash-shell-programing.html' title='bash shell programing'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2155500372610799382</id><published>2011-03-03T09:24:00.000-08:00</published><updated>2011-06-15T08:45:48.747-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Using ssh on *nix</title><summary type='text'>1. Executing sql script on remote host 
serv1&gt; cat local.sql | ssh oracle@serv2 '. ~/.profile; cat|sqlplus -s / ' 2&gt;/dev/null

2. Generating ssh kesy
serv1&gt; ssh-keygen -t dsa 
# the public and private keys will be created in the ~/.ssh  directory

3. Configuring autologin (ssh) to the remote server
serv1&gt; cd ~/.ssh ; cat id_dsa.pub | ssh oracle@serv2 'cat &gt;&gt; ~/.ssh/authorized_keys'
#This is </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2155500372610799382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/05/using-ssh-on-nix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2155500372610799382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2155500372610799382'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/05/using-ssh-on-nix.html' title='Using ssh on *nix'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8749213946472285635</id><published>2011-02-15T08:32:00.000-08:00</published><updated>2011-06-15T08:37:28.665-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Migrate Dictionary managed Tablespaces to locally managed</title><summary type='text'>Users tablespace should be online.

SQL&gt; execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL ('USERS');

Temporary Tablespaces cannot be migrated to locally managed. 


Special for SYSTEM tablespace
SQL&gt; shutdown immediate
SQL&gt; startup restrict
SQL&gt; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;
SQL&gt; alter tablespace SYSAUX offline;
SQL&gt; alter tablespace USERS read only; -- and other users </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8749213946472285635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/01/migrate-dictionary-managed-tablespaces.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8749213946472285635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8749213946472285635'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/01/migrate-dictionary-managed-tablespaces.html' title='Migrate Dictionary managed Tablespaces to locally managed'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9032644233907659687</id><published>2011-02-01T07:42:00.000-08:00</published><updated>2011-06-01T07:54:28.205-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>How to generate XML file and save in Oracle Directory</title><summary type='text'>Method 1
~~~~~~~~~

declare
        refc sys_refcursor;
        xdoc DBMS_XMLDOM.DOMDocument;
begin
   open refc for
      select rownum from dual connect by level &lt; 10 ;
      xdoc := DBMS_XMLDOM.NewDOMDocument(xmltype( refc ));
      DBMS_XMLDOM.WRITETOFILE(xdoc, 'XML_DOCS/xml1.xml');
end;

Method 2 
~~~~~~~~~
declare
 refc  sys_refcursor;
 BEGIN
   open refc FOR
      SELECT rownum FROM dual </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9032644233907659687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/02/how-to-generate-xml-file-and-save-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9032644233907659687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9032644233907659687'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/02/how-to-generate-xml-file-and-save-in.html' title='How to generate XML file and save in Oracle Directory'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2903333241011028870</id><published>2011-01-27T08:44:00.000-08:00</published><updated>2011-06-27T08:54:22.409-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Using Crontab Quick Reference</title><summary type='text'>Crontab commands 
List the jobs in crontab
crontab -l 

Edit the jobs in crontab 
crontab -e 

Delete all the jobs in crontab **carefully use this command** 
crontab -r 

Always save the jobs in a file crontab.file 
crontab -l &gt; crontab.file 

Edit jobs in crontab.file and  create jobs using this file 
crontab &lt; crontab.file

Crontab file format 

*     *     *   *    *        "command to be </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2903333241011028870/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/01/using-crontab-quick-reference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2903333241011028870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2903333241011028870'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/01/using-crontab-quick-reference.html' title='Using Crontab Quick Reference'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-1639737384628519548</id><published>2011-01-18T09:29:00.000-08:00</published><updated>2011-06-17T07:38:46.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Useful unix/Linux Commands</title><summary type='text'>tar cvf - foodir  | gzip -9c &gt; foo.tar.gz 
gunzip -c foo.tar.gz | tar xvf -

</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/1639737384628519548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/06/useful-unixlinux-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1639737384628519548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1639737384628519548'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/06/useful-unixlinux-commands.html' title='Useful unix/Linux Commands'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-364439803951100427</id><published>2011-01-11T13:23:00.000-08:00</published><updated>2011-02-10T13:39:21.243-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Wait Events in Oracle</title><summary type='text'>Wait Event: db file scattered read   Wait Class: User I/O
Too many user are requesting data blocks at once.
Too many full table scans at the time.
Solutions: 
Reducing parameter multi_block_read_count may help
Using faster disks and IO Distribution
Avoiding ful table scans
Placing small table in Cache.


Wait Event: db file sequential read  Wait  Class: User I/O
Index scans are occuring and </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/364439803951100427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/01/wait-events-in-oracle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/364439803951100427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/364439803951100427'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/01/wait-events-in-oracle.html' title='Wait Events in Oracle'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2556586855662065899</id><published>2011-01-11T07:32:00.000-08:00</published><updated>2011-02-11T08:02:17.670-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Online Table Re-defination of a table</title><summary type='text'>--Example 1
-- Create a test table
create table sstmp AS SELECT * from dba_objects where object_id is not null ;
--Add a primary key 
alter table sstmp add constraint sstmp_pk primary key (object_id) ;
-- Check table can be redefined
EXEC Dbms_Redefinition.Can_Redef_Table('SANJ', 'SSTMP')
--Create a temporary staging table create table sstmp2 as select * from sstmp ;


--Start the redefination
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2556586855662065899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2011/01/online-table-re-defination-of-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2556586855662065899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2556586855662065899'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2011/01/online-table-re-defination-of-table.html' title='Online Table Re-defination of a table'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4051388653687793227</id><published>2010-12-23T13:46:00.000-08:00</published><updated>2011-02-10T13:47:09.180-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Renaming Tablespace</title><summary type='text'>alter tablespace users1 rename to users</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4051388653687793227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/12/renaming-tablespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4051388653687793227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4051388653687793227'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/12/renaming-tablespace.html' title='Renaming Tablespace'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-91223635411668023</id><published>2010-12-10T13:40:00.000-08:00</published><updated>2011-02-10T13:43:39.540-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Adding ssh keys on server for automatic login</title><summary type='text'>Generate rsa key on local server 
ssh-keygen -t rsa


Adding the public key on remoteServer for auto login
cat id_dsa.pub 

ssh oracle@remoteServer 'cat &gt;&gt; ~/.ssh/authorized_keys' 
 </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/91223635411668023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/12/adding-ssh-keys-on-server-for-automatic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/91223635411668023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/91223635411668023'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/12/adding-ssh-keys-on-server-for-automatic.html' title='Adding ssh keys on server for automatic login'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8046886237097862771</id><published>2010-11-08T13:21:00.000-08:00</published><updated>2011-02-10T13:22:19.874-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Running AWR Report from Command line SQLPlus</title><summary type='text'>cd $ORACLE_HOME/rdbms/admin

sqlplus @awrrpt.sql</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8046886237097862771/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/11/running-awr-report-from-command-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8046886237097862771'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8046886237097862771'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/11/running-awr-report-from-command-line.html' title='Running AWR Report from Command line SQLPlus'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-214535241139421789</id><published>2010-10-15T13:16:00.000-07:00</published><updated>2011-02-10T13:19:25.988-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Changing attributes of a partitioned table</title><summary type='text'>Changing Attributes of a partitioned table 

Modifying Table Attribute
alter table sales.sales_detail modify default attributes tablespace sales_data ;


Modifying Table partition Attribute
alter table sales.sales_detail modify default attributes for partition Sales_2010_Jan tablespace sales_data ; 
 </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/214535241139421789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/10/changing-attributes-of-partitioned.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/214535241139421789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/214535241139421789'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/10/changing-attributes-of-partitioned.html' title='Changing attributes of a partitioned table'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7557763592458119194</id><published>2010-09-10T13:11:00.000-07:00</published><updated>2011-02-10T13:14:54.909-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>HTML report from sqlplus</title><summary type='text'>Generating HTML Report from SQLPlus.


SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON -

HEAD "&lt; TITLE&gt;Department Report&lt; /TITLE&gt; -
&lt; STYLE type='text/css'&gt; -
&lt; !-- BODY {background: #FFFFC6} --&gt; -
&lt; /STYLE&gt;" -
BODY "TEXT='#EEFFGG'" -
TABLE "WIDTH='90%' BORDER='5'"</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7557763592458119194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/09/html-report-from-sqlplus.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7557763592458119194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7557763592458119194'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/09/html-report-from-sqlplus.html' title='HTML report from sqlplus'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4625203283153776681</id><published>2010-08-01T12:59:00.000-07:00</published><updated>2011-02-10T13:11:06.000-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Sending HTML mail from Unix</title><summary type='text'>Sending HTML mail from Unix
#Script 
#!/usr/bin/ksh
MAILER=/usr/lib/sendmail
VERSION=1.0
{
(
cat  &lt;&lt; EOF
From: Sanjay 
To: oracleDBA@myCompany.net
Subject: test HTML output from Unix
X-Mailer: htmlmail $VERSION
Mime-Version: 1.0
Content-Type: text/html; charset=US-ASCII
&lt; center &gt; &lt; h1&gt; Test Center Report &lt; /h1&gt; &lt; /center &gt;

EOF
cat t.log
)
} 
eval $MAILER oracleDBA@myCompany.net

##End of Script</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4625203283153776681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/08/sending-html-mail-from-unix.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4625203283153776681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4625203283153776681'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/08/sending-html-mail-from-unix.html' title='Sending HTML mail from Unix'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5874922387135026329</id><published>2010-07-10T12:46:00.000-07:00</published><updated>2011-02-10T12:58:37.449-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Getting Metadata for Oracle Objects</title><summary type='text'>Getting User Creation
select dbms_metadata.get_ddl('USER','SANJ') from dual; 
Getting Tablespace Creation
select dbms_metadata.get_ddl('TABLESPACE','SYSTEM' ) from dual ;
Getting Table Creation
select dbms_metadata.get_ddl('TABLE','SOME_SUMMARY','PAYROL' ) from dual ;</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5874922387135026329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/07/getting-metadata-for-oracle-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5874922387135026329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5874922387135026329'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/07/getting-metadata-for-oracle-objects.html' title='Getting Metadata for Oracle Objects'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4771055733227964850</id><published>2010-06-08T15:17:00.000-07:00</published><updated>2010-10-08T15:32:25.288-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unix/Linux/OSX'/><title type='text'>Hostname Change in Redhat</title><summary type='text'>cd /etc/sysconfig
vi network
Change  HOSTNAME in network file

vi /etc/hostsChange or add host in the hosts file
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4771055733227964850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/06/hostname-change-in-redhat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4771055733227964850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4771055733227964850'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/06/hostname-change-in-redhat.html' title='Hostname Change in Redhat'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4354626654127743862</id><published>2010-06-08T09:04:00.000-07:00</published><updated>2011-06-01T09:21:06.540-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Creating Database on Windows system</title><summary type='text'>Creating Database on Windows system 

Create directories if not present
mkdir C:\app\Oracle\admin\test11g\adump
mkdir C:\app\Oracle\admin\test11g\dpdump
mkdir C:\app\Oracle\admin\test11g\pfile
mkdir C:\app\Oracle\cfgtoollogs\dbca\test11g
mkdir C:\app\Oracle\flash_recovery_area
mkdir C:\app\Oracle\oradata\test11g
mkdir C:\app\Oracle\product\11.1.0\db_1\database

Set Env Variables 
set ORACLE_SID=</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4354626654127743862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/07/creating-database-on-windows-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4354626654127743862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4354626654127743862'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/07/creating-database-on-windows-system.html' title='Creating Database on Windows system'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8548177318994450329</id><published>2010-05-06T10:52:00.000-07:00</published><updated>2010-05-06T10:57:56.742-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>ORA-00845: MEMORY_TARGET not supported on this system - Linux Servers</title><summary type='text'>Increase the size of /dev/shm 
Edit the /etc/fstab
tmpfs                   /dev/shm                tmpfs   defaults,size=1024M 0 0
...

OR 
tmpfs                   /dev/shm                tmpfs   defaults,size=1G 0 0

M -&gt; Megabytes
G -&gt; Gigabytes

mount -o remount /dev/shm 

man mount for help 
</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8548177318994450329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/05/ora-00845-memorytarget-not-supported-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8548177318994450329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8548177318994450329'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/05/ora-00845-memorytarget-not-supported-on.html' title='ORA-00845: MEMORY_TARGET not supported on this system - Linux Servers'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4056119506319141770</id><published>2010-04-12T06:50:00.000-07:00</published><updated>2010-05-13T06:53:51.789-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Sending email with UTL_SMTP</title><summary type='text'>Using UTL_SMTP to send email from PL/SQL 
DECLARE
 c utl_smtp.connection;
PROCEDURE send_header(name VARCHAR2, header VARCHAR2) AS
BEGIN
  utl_smtp.write_data(c,name ||':'|| header || UTL_TCP.CRLF);
END;
BEGIN
  c := utl_smtp.open_connection('myserver.local');
  utl_smtp.helo(c, 'myserver.local');
  utl_smtp.mail(c, 'sanjay@myserver.local');
  utl_smtp.rcpt(c, 'sanjay@myserver.local');
  </summary><link rel='related' href='http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_smtp.htm#CHDCFFDI' title='Sending email with UTL_SMTP'/><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4056119506319141770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/04/sending-email-with-utlsmtp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4056119506319141770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4056119506319141770'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/04/sending-email-with-utlsmtp.html' title='Sending email with UTL_SMTP'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4938479927454179923</id><published>2010-03-23T13:26:00.000-07:00</published><updated>2010-03-25T13:29:57.821-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Managing Scheduler Jobs</title><summary type='text'>Creating, viewing and dropping Scheduler Jobs
--View jobs created by SYSTEM user 
select * from dba_scheduler_jobs where owner='SYSTEM' ;
--Create a Job
BEGIN
dbms_scheduler.create_job(
  job_name =&gt; 'TEST',
  schedule_name =&gt;'sys.MAINTENANCE_WINDOW_GROUP',
  job_type  =&gt;'PLSQL_BLOCK',
  job_action=&gt; 'begin dbms_stats.gather_DATABASE_stats( options=&gt; ''GATHER AUTO'');end; ',
  enabled =&gt; TRUE,
  </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4938479927454179923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/03/managing-scheduler-jobs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4938479927454179923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4938479927454179923'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/03/managing-scheduler-jobs.html' title='Managing Scheduler Jobs'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2058386535071760396</id><published>2010-03-20T12:23:00.000-07:00</published><updated>2010-03-25T12:39:10.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Managing Optimizer Statistics</title><summary type='text'>Create scheduler jobs 
Database Statistics 
Gathers statistics for all objects in the database.
begin
dbms_stats.gather_database_stats(options=&gt; 'GATHER AUTO');
end;Dictionary Statistics 
Objects in 'SYS', 'SYSTEM' and all non-user defined schemas.
begin
dbms_stats.gather_dictionary_stats(options=&gt; 'GATHER AUTO');
end;Fixed Objects Statistics
In-memory structures/variables of the RDBMS that are </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2058386535071760396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/03/managing-optimizer-statistics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2058386535071760396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2058386535071760396'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/03/managing-optimizer-statistics.html' title='Managing Optimizer Statistics'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8784237018390523328</id><published>2010-03-20T08:59:00.000-07:00</published><updated>2010-03-25T11:07:27.177-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Oracle 11g R1 11.1.0.6 patch installation Single Instance</title><summary type='text'>Oracle 11g R1 11.1.0.6 patch installation Single InstanceUpgrade from  11.1.0.6  to 11.1.0.7 ***set ORACLE_HOME and ORACLE_SID Stop All Services for a Single Instance Installation OracleServiceSIDOracleDBConsoleSIDOracle...TNSListenerLISTNER..Note:The patch installer made me stop "Distriuted Transaction Coordinator" also which isone of the Service in Windows.***Backup your system Oracle Inventory</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8784237018390523328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/03/oracle-11g-r1-11106-patch-installation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8784237018390523328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8784237018390523328'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/03/oracle-11g-r1-11106-patch-installation.html' title='Oracle 11g R1 11.1.0.6 patch installation Single Instance'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2628083093326115064</id><published>2010-03-13T12:46:00.000-08:00</published><updated>2010-03-23T12:57:54.896-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-600'/><title type='text'>ORA-00600: internal error code, arguments: [prshntcb-1], [990], ...</title><summary type='text'>ORA-00600: internal error code, arguments: [prshntcb-1], [990], ...This error is cause by INCORRECT HINT SYNTAX for sql statemtments. Incorrect PARALLEL Hint in the sql.Encountered this error in Version 11.1.0.6 &amp; 11.1.0.7. Apply patch 8705594 if available to your system.See Document ID:975081.1ORA-600</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2628083093326115064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/03/ora-00600-internal-error-code-arguments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2628083093326115064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2628083093326115064'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/03/ora-00600-internal-error-code-arguments.html' title='ORA-00600: internal error code, arguments: [prshntcb-1], [990], ...'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7466084819288174078</id><published>2010-03-03T11:49:00.000-08:00</published><updated>2010-03-23T12:42:46.756-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='DOS/Windows'/><title type='text'>ORA-28056: Writing audit records to Windows Event Log failed</title><summary type='text'>ORA-28056: Writing audit records to Windows Event Log failedc:\&gt; sqlplus / as sysdbaSQL*Plus: Release 11.1.0.7.0 - Production on .......Copyright (c) 1982, 2008, Oracle.  All rights reserved.ERROR:ORA-28056: Writing audit records to Windows Event Log failedOSD-1627319533: Message 1627319533 not found;  product=RDBMS; facility=SOSDO/S-Error: (OS 1502) The event log file is full.ORA-28056: Writing </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7466084819288174078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/03/ora-28056-writing-audit-records-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7466084819288174078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7466084819288174078'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/03/ora-28056-writing-audit-records-to.html' title='ORA-28056: Writing audit records to Windows Event Log failed'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-152585555187995036</id><published>2010-02-10T12:09:00.000-08:00</published><updated>2010-03-19T12:12:11.077-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RESIZE REDO LOGFILE</title><summary type='text'>RESIZE REDO LOGFILE Resize Redo Logfile Alter database add logfile group 4 'D:\Oradata\mydb\REDO04.log' size 1000M reuse;Alter database add logfile group 5 'D:\Oradata\mydb\REDO05.log' size 1000M reuse;Alter database add logfile group 6 'D:\Oradata\mydb\REDO06.log' size 1000M reuse;alter system switch logfile ;alter system switch logfile ;alter system switch logfile ;alter system checkpoint ;</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/152585555187995036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/02/resize-redo-logfile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/152585555187995036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/152585555187995036'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/02/resize-redo-logfile.html' title='RESIZE REDO LOGFILE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5578659148155470581</id><published>2010-02-02T06:13:00.000-08:00</published><updated>2010-07-20T19:17:30.457-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Configuring 9i Database with 11g LISTENER</title><summary type='text'>Configuring 9i Database To Listen to 11g LISTENER

Add SID_LIST_LISTENER entry in the listener.ora file with the respective ORACLE_HOME, SID_NAME and SERVICE_NAME 
# listener.ora Network Configuration File: D:\app\ORACLE\product\11.1.0\mydb\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = D:\oracle\</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5578659148155470581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/02/configuring-9i-database-to-11g-listener.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5578659148155470581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5578659148155470581'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/02/configuring-9i-database-to-11g-listener.html' title='Configuring 9i Database with 11g LISTENER'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5818676020006257970</id><published>2010-01-16T06:43:00.000-08:00</published><updated>2010-02-26T07:48:41.189-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='Export Import'/><title type='text'>Multivolume Export and Import in 9i,10g and 11g</title><summary type='text'>Multivolume Export and Import in 9i,10g and 11gUsing FILESIZE=10m for 10 Megabytesexp scott/tiger file=part1,part2,part3 filesize=10m      10,485,760 part1.DMP      10,485,760 part2.DMP         843,776 part3.DMPUsing FILESIZE=10240k  for 10240 Kilobytesexp scott/tiger file=part1,part2,part3 filesize=10240k      10,485,760 part1.DMP      10,485,760 part2.DMP         843,776 part3.DMPUsing FILESIZE</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5818676020006257970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/01/multivolume-export-file-in-9i10g-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5818676020006257970'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5818676020006257970'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/01/multivolume-export-file-in-9i10g-and.html' title='Multivolume Export and Import in 9i,10g and 11g'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4391466325541579213</id><published>2010-01-05T06:27:00.000-08:00</published><updated>2010-02-05T07:10:33.830-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='Export Import'/><title type='text'>Data Pump</title><summary type='text'>PLSQL for DATA Pump Job in Job Scheduler. declareh1 NUMBER;  dmp_file varchar2(100) ;  log_file varchar2(100) ;begin  select 'QA_SCOTT_'||to_char(sysdate,'yyyymmdd_hhmm')        ||'_%U.dmp' , 'QA_SCOTT_'||to_char(sysdate,'yyyymmdd_hhmm')        ||'.log'    into dmp_file, log_file  from dual ;  h1 := dbms_datapump.open (operation =&gt; 'EXPORT',         job_mode =&gt; 'SCHEMA', job_name =&gt; 'SCOTTEXP',</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4391466325541579213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2010/01/data-pump.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4391466325541579213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4391466325541579213'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2010/01/data-pump.html' title='Data Pump'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-553756414193757262</id><published>2009-12-06T07:25:00.000-08:00</published><updated>2010-01-06T07:29:41.157-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>MONITORING OBJECTS</title><summary type='text'>MONITORING INDEX--Turn ON monitoringalter index PK_LOCATION_CODE monitoring usage ;--Run various processes using the table related to the index.--Turn OFF monitoringalter index PK_LOCATION_CODE nomonitoring usage ;--Query to see if the index is being used. SELECT table_name,       index_name,       monitoring,       used,       start_monitoring,       end_monitoringFROM   v$object_usageWHERE  </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/553756414193757262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/12/monitoring-objects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/553756414193757262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/553756414193757262'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/12/monitoring-objects.html' title='MONITORING OBJECTS'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4224486385866310055</id><published>2009-10-19T07:47:00.000-07:00</published><updated>2009-11-13T07:52:46.761-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>SWITCH TO A NEW UNDO TABLESPACE</title><summary type='text'>SWITCH TO A NEW UNDO TABLESPACE AND DROP OLD UNDO TABLESPACEsqlplus "/ as sysdba"SQL&gt; show parameter undo_tablespaceNAME                                 TYPE        VALUE------------------------------------ ----------- ------------------------------undo_tablespace                      string      UNDOTBS1SQL&gt; create undo tablespace undo2  2  datafile 'c:\oracle\oradata\ORCL\undo2.dbf'  3  size </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4224486385866310055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/10/switch-to-new-undo-tablespace.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4224486385866310055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4224486385866310055'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/10/switch-to-new-undo-tablespace.html' title='SWITCH TO A NEW UNDO TABLESPACE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9046663593478250274</id><published>2009-10-11T07:07:00.000-07:00</published><updated>2009-11-13T06:08:58.927-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>CONFIGURE APEX 3.0 ON ORACLE 11g</title><summary type='text'>CONFIGURE APEX 3.0 ON ORACLE 11g1) cd $ORACLE_HOME/apex2) sqlplus / as sysdba 3) @apxconf4) Enter Admin password5) Alter user anonymous account unlock;CONFIGURE the HTTP port 1) Connect as sys and CALL dbms_xdb.setHttpPort(80) ; 2) ALTER SYSTEM REGISTER ; OTHERS1) Look of the port for HTTP    SELECT dbms_xdb.getHttpPort FROM DUAL ;OR 2) lsnrctl status </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9046663593478250274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/10/configure-apex-30-on-oracle-11g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9046663593478250274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9046663593478250274'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/10/configure-apex-30-on-oracle-11g.html' title='CONFIGURE APEX 3.0 ON ORACLE 11g'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-443997402818999064</id><published>2009-10-05T09:34:00.000-07:00</published><updated>2009-11-05T09:42:02.699-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>RETURNING Clause with  BULK COLLECT</title><summary type='text'>DECLARE  TYPE Table_Emp_t IS TABLE OF Emp%ROWTYPE;  Emp_Pltbl Table_Emp_t;BEGIN  DELETE FROM Emp2;  COMMIT;  DELETE FROM Emp RETURNING     Empno,     Ename,     Job,     Mgr,     Hiredate,     Sal,     Comm,     Deptno       BULK COLLECT INTO Emp_Pltbl;  ROLLBACK;  Dbms_Output.Put_Line(Emp_Pltbl.COUNT);  FORALL i IN 1 .. Emp_Pltbl.COUNT    INSERT INTO Emp2 VALUES Emp_Pltbl (i);  COMMIT;END;/</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/443997402818999064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/10/returning-clause-with-bulk-collect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/443997402818999064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/443997402818999064'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/10/returning-clause-with-bulk-collect.html' title='RETURNING Clause with  BULK COLLECT'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9220715177931122620</id><published>2009-08-07T09:53:00.000-07:00</published><updated>2009-08-07T10:04:41.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>CONNECT BY in Oracle 9i and 10g</title><summary type='text'>CONNECT BY in Oracle 9i and 10g SQL&gt; select * from v$version;BANNER----------------------------------------------------------------Oracle9i Enterprise Edition Release 9.2.0.8.0 - ProductionPL/SQL Release 9.2.0.8.0 - ProductionCORE    9.2.0.8.0       ProductionTNS for 32-bit Windows: Version 9.2.0.8.0 - ProductionNLSRTL Version 9.2.0.8.0 - Production5 rows selected.SQL&gt; -- In Oracle 9i Expecting 4</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9220715177931122620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/08/connect-by-in-oracle-9i-and-10g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9220715177931122620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9220715177931122620'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/08/connect-by-in-oracle-9i-and-10g.html' title='CONNECT BY in Oracle 9i and 10g'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8940181155686846569</id><published>2009-08-03T09:46:00.000-07:00</published><updated>2009-08-07T09:53:08.840-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RMAN Recovery</title><summary type='text'>Complete recovery run{shutdown immediate;startup mount;restore database;recover database;alter database;}Incomplete recovery until time run{shutdown abort; # Or shutdown immediate startup mount;set until time "to_date('06-AUG-2009 14:22:33' , 'dd-MON-yyyy hh24:mi:ss')";restore database;recover database;alter database open resetlogs;}Incomplete recovery until scnrun{shutdown abort; # Or shutdown </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8940181155686846569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/08/rman-recovery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8940181155686846569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8940181155686846569'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/08/rman-recovery.html' title='RMAN Recovery'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3718030862313017595</id><published>2009-07-26T05:59:00.000-07:00</published><updated>2009-07-26T06:08:38.111-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Renaming Datafile or Moving Datafile</title><summary type='text'>Renaming Datafile or Moving Datafile involving non-system tablespace related.1) Taking Tablespace offline method.SQL&gt; create tablespace test datafile 'c:\test.dbf' size 1m ;Tablespace created.SQL&gt; select name from v$datafile ;NAME--------------------------------------------------C:\ORACLEXE\ORADATA\XE\SYSTEM.DBFC:\ORACLEXE\ORADATA\XE\UNDO.DBFC:\ORACLEXE\ORADATA\XE\SYSAUX.DBFC:\ORACLEXE\ORADATA\XE</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3718030862313017595/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/07/renaming-datafile-or-moving-datafile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3718030862313017595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3718030862313017595'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/07/renaming-datafile-or-moving-datafile.html' title='Renaming Datafile or Moving Datafile'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7792256766004748998</id><published>2009-07-08T11:07:00.000-07:00</published><updated>2009-07-09T17:40:18.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RMAN Scripts</title><summary type='text'>Some RMAN Backup ScriptsORACLE 10g -Full Backup Online with Archive Loggging~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~CONFIGURE RETENTION POLICY TO REDUNDANCY 7;configure channel device type disk format 'c:\oracle\local\RMAN\RMAN_BKP_%d_DB_%u_%s_%p';CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7792256766004748998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/07/rman-scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7792256766004748998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7792256766004748998'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/07/rman-scripts.html' title='RMAN Scripts'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2437035795226784025</id><published>2009-07-07T18:37:00.000-07:00</published><updated>2009-07-08T22:26:29.390-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>CREATING USER CONTEXT</title><summary type='text'>CREATING USER CONTEXTcreate or replace context emp_context using sys.dbms_session / exec sys.dbms_session.set_context('emp_context', 'name_var', 'SCOTT')/ select sys_context('emp_context', 'name_var') name_var from dual/ create view scott_emp as select  * from  emp where  ename = sys_context('emp_context', 'name_var')/select * from scott_emp /CREATING A PACKAGE FOR MANAGING CONTEXT.create or </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2437035795226784025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/07/creating-user-context.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2437035795226784025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2437035795226784025'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/07/creating-user-context.html' title='CREATING USER CONTEXT'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8917703310081721002</id><published>2009-06-28T19:09:00.000-07:00</published><updated>2009-07-01T11:35:30.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>STRING TO ROWS</title><summary type='text'>with t1 as (select level l from dual       connect by level &lt;= length(','||'SCOTT,ALLEN,KING')-length(replace('SCOTT,ALLEN,KING',','))),    t2 as  (select 'SCOTT,ALLEN,KING'||',' c from dual)select regexp_substr(','||c,'[^,]+',1,l) dyn_empfrom t1,t2/DYN_EMP------------------SCOTTALLENKING</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8917703310081721002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/string-to-rows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8917703310081721002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8917703310081721002'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/string-to-rows.html' title='STRING TO ROWS'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6247659920652857780</id><published>2009-06-27T19:21:00.000-07:00</published><updated>2009-06-27T19:23:36.247-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>PASSING ARRAY TO PROCEDURE</title><summary type='text'>PASSING ARRAY TO PROCEDURESQL&gt; create or replace PROCEDURE my_proc(  2          p_variable      IN      sys.ODCIVarchar2List,  3          p_cursor        OUT     SYS_REFCURSOR) AS  4  BEGIN  5  for r in p_variable.first..p_variable.last loop  6          dbms_output.put(r);  7          dbms_output.put_line('=&gt;'||p_variable(r));  8  end loop;  9 10      OPEN p_cursor FOR 11        select * from </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6247659920652857780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/passing-array-to-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6247659920652857780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6247659920652857780'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/passing-array-to-procedure.html' title='PASSING ARRAY TO PROCEDURE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4611223657669279173</id><published>2009-06-22T11:31:00.000-07:00</published><updated>2010-03-23T12:58:28.380-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-600'/><title type='text'>ORA-00600: internal error code, arguments: [4194]</title><summary type='text'>Oracle version 9.2.0.8ORACLE 600 ERROR~~~~~~~~~~~~~~~~ORA-01595: error freeing extent (6) of rollback segment (2))ORA-00607: Internal error occurred while making a change to a data blockORA-00600: internal error code, arguments: [4194], [6], [6], [], [], [], [], []Resolved using Recreation of UNDO tablespace UNDO Tablespace Creation and Switching of Undo Tablespace -- Create a new undo tablespace</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4611223657669279173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/ora-00600-internal-error-code-arguments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4611223657669279173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4611223657669279173'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/ora-00600-internal-error-code-arguments.html' title='ORA-00600: internal error code, arguments: [4194]'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7998295468573014635</id><published>2009-06-21T18:34:00.000-07:00</published><updated>2009-06-21T18:34:01.136-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>ROWS TO COLUMN</title><summary type='text'>STRING AGGREGATION OR ROWS TO COLUMN~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~USING XMLAGG~~~~~~~~~~~~SELECT  deptno        ,TRIM (XMLAGG(XMLELEMENT(a,ename||',').extract('//text()'))) col_name FROM  empGROUP BY  deptno/    DEPTNO COL_NAME---------- -------------------------------------------------        10 CLARK,KING,MILLER,        20 SMITH,FORD,ADAMS,SCOTT,JONES,        30 ALLEN,BLAKE,MARTIN,TURNER</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7998295468573014635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/rows-to-column.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7998295468573014635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7998295468573014635'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/rows-to-column.html' title='ROWS TO COLUMN'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7139427274269962069</id><published>2009-06-18T17:47:00.000-07:00</published><updated>2009-06-18T18:25:05.478-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>WHERE CLAUSE Queries</title><summary type='text'>WHERE CLAUSE Queries1) Value Entered is two or three name 'NAME1','NAME2','NAME3',  then show records matching the names2) Value Entered is one name 'NAME1',  then show record matching the name3) Value Entered is blank, then show all recordsA) Handles case 1 and 2select * from empwhere regexp_like(q'[&amp;nm]',ename) ;Enter value for nm: 'ADAMS','KING','KINGDOM'    EMPNO ENAME      JOB              </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7139427274269962069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/where-clause-queries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7139427274269962069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7139427274269962069'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/where-clause-queries.html' title='WHERE CLAUSE Queries'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3486184035993736517</id><published>2009-06-16T08:33:00.000-07:00</published><updated>2009-06-16T08:33:00.498-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>SYS_CONTEXT options</title><summary type='text'>SYS_CONTEXTSELECT SYS_CONTEXT('USERENV', 'TERMINAL') terminal,       SYS_CONTEXT('USERENV', 'LANGUAGE') LANGUAGE,       SYS_CONTEXT('USERENV', 'SESSIONID') sessionid,       SYS_CONTEXT('USERENV', 'INSTANCE') instance,       SYS_CONTEXT('USERENV', 'ENTRYID') entryid,       SYS_CONTEXT('USERENV', 'ISDBA') isdba,       SYS_CONTEXT('USERENV', 'NLS_TERRITORY') nls_territory,       SYS_CONTEXT('USERENV</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3486184035993736517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/syscontext-options.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3486184035993736517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3486184035993736517'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/syscontext-options.html' title='SYS_CONTEXT options'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2411868121499581391</id><published>2009-06-15T06:27:00.000-07:00</published><updated>2009-06-15T10:26:00.341-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>ORACLE regexp_like, regexp_instr, regexp_replace, regexp_substr, regexp_count</title><summary type='text'>Function Name   Description~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~REGEXP_LIKE    Similar to the LIKE operator, but performs   regular expression matching instead of   simple pattern matchingREGEXP_INSTR    Searches for a given string for a regular   expression pattern and returns the position   were the match is foundREGEXP_REPLACE    Searches for a </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2411868121499581391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/oracle-regexplike-regexpinstr.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2411868121499581391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2411868121499581391'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/oracle-regexplike-regexpinstr.html' title='ORACLE regexp_like, regexp_instr, regexp_replace, regexp_substr, regexp_count'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8562979109878545663</id><published>2009-06-11T08:22:00.001-07:00</published><updated>2011-08-30T11:59:19.862-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>COUNT ALL ROWS IN A SCHEMA</title><summary type='text'>COUNT ALL THE ROWS IN A SCHEMA 
SELECT table_name,
CAST(extractvalue(xmltype(dbms_xmlgen.getxml('select count(*) kount 
from '||owner||'.' || table_name)),
'/ROWSET/ROW/KOUNT') AS NUMBER) COUNT
FROM all_tables
WHERE owner = 'SCOTT'
/

TABLE_NAME                          COUNT
------------------------------ ----------
DEPT                                    4
BONUS</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8562979109878545663/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/count-all-rows-in-schema.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8562979109878545663'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8562979109878545663'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/count-all-rows-in-schema.html' title='COUNT ALL ROWS IN A SCHEMA'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3944180089875888935</id><published>2009-06-08T06:30:00.000-07:00</published><updated>2009-06-10T10:17:58.246-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>ALL ABOUT NULLS AND NULL VALUE</title><summary type='text'>ALL ABOUT NULLS AND NULL VALUESQL&gt; --Displaying NULL ValuesSQL&gt; select ename, sal,comm from emp  ;ENAME             SAL     COMM                                                                                                      ---------- ---------- --------                                                                                                      SMITH             800</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3944180089875888935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/all-about-nulls-and-null-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3944180089875888935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3944180089875888935'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/all-about-nulls-and-null-value.html' title='ALL ABOUT NULLS AND NULL VALUE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8472771187474729477</id><published>2009-06-05T17:44:00.000-07:00</published><updated>2009-06-06T18:27:45.168-07:00</updated><title type='text'>DYNAMIC IN CLAUSE</title><summary type='text'>DYNAMIC IN CLAUSEUSING LIKEdeclare myvar varchar2(30):='SCOTT,ALLEN,KINGDOM' ;  v_count number:=0;BEGINselect count(*) into v_countfrom  emp where ','||myvar||','  LIKE '%,'||ename||',%' ;dbms_output.put_line('V_COUNT is :'|| v_count);end;/ V_COUNT is :2 ---Select exampleselect *from  emp where ','||:myvar||','  LIKE '%,'||ename||',%' /       EMPNO ENAME      JOB              MGR HIREDATE</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8472771187474729477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/dynamic-in-clause.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8472771187474729477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8472771187474729477'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/dynamic-in-clause.html' title='DYNAMIC IN CLAUSE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5652889574838552670</id><published>2009-06-01T11:55:00.000-07:00</published><updated>2009-06-01T11:55:01.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>XML and SQL</title><summary type='text'>1. xmlelementselect xmlelement("name",ename) from emp/XMLELEMENT("NAME",ENAME)--------------------------&lt;name&gt;SMITH&lt;/name&gt;&lt;name&gt;ALLEN&lt;/name&gt;...2. Insert xml Datacreate table pages( id number, content xmltype)/INSERT INTO pages VALUES(1,  xmltype.createxml( '&lt;?xml version="1.0"?&gt;   &lt;Book&gt;     &lt;name&gt;Oracle 10g&lt;/name&gt;      &lt;title&gt;Oracle Database Administration&lt;/title&gt;  '))/select EXTRACTVALUE(</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5652889574838552670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/06/xml-and-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5652889574838552670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5652889574838552670'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/06/xml-and-sql.html' title='XML and SQL'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5915685532606775104</id><published>2009-05-15T20:55:00.000-07:00</published><updated>2009-05-17T10:18:37.086-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Install Oracle 10g with ASM Storage</title><summary type='text'>Windows --Add CSS Service localconfig add--Create ASM Disk using asmtool asmtool -create E:\ASM\disk1 1024asmtool -create E:\ASM\disk2 1024asmtool -create E:\ASM\disk3 1024--Create ASM instance --init+ASM.ora file INSTANCE_TYPE=ASM_ASM_ALLOW_ONLY_RAW_DISKS = FALSEDB_UNIQUE_NAME = +ASMASM_DISKSTRING ='C:\ASM\*'LARGE_POOL_SIZE = 16MBACKGROUND_DUMP_DEST ='c:\oracle\admin\+ASM\bdump'USER_DUMP_DEST = </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5915685532606775104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/install-oracle-10g-with-asm-storage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5915685532606775104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5915685532606775104'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/install-oracle-10g-with-asm-storage.html' title='Install Oracle 10g with ASM Storage'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6147030193153558683</id><published>2009-05-15T18:55:00.000-07:00</published><updated>2009-06-10T15:55:08.578-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>HIRERCHIAL QUERIES COLLECTION</title><summary type='text'>CONNECT STRING TO ROWS======================var myvar varchar2(30);exec :myvar:='SCOTT,ALLEN,KINGDOM,CLARK' ;with t1 as (select level l from dual connect by level &lt; length(:myvar) - length(replace(:myvar,','))+2), t2 as (select :myvar||',' c from dual)select regexp_substr(c,'[^,]+',1,l) empnamefrom t1,t2/EMPNAME---------------SCOTTALLENKINGDOMCLARKwith t1 as (select level l from dual connect by </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6147030193153558683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/hirerchial-queries-collection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6147030193153558683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6147030193153558683'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/hirerchial-queries-collection.html' title='HIRERCHIAL QUERIES COLLECTION'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5954597189878314770</id><published>2009-05-10T17:16:00.000-07:00</published><updated>2009-06-08T18:20:22.136-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>MERGE Statement</title><summary type='text'>drop table emp2 purge; create table emp2 as select * from employees where rownum &lt;35 ;MERGE INTO emp2 a USING  employees b ON (a.employee_id=b.employee_id)WHEN MATCHED THEN UPDATE SET a.salary = b.salaryWHEN NOT MATCHED THEN INSERT ( EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL   ,PHONE_NUMBER,HIRE_DATE,JOB_ID,SALARY   ,COMMISSION_PCT,MANAGER_ID,DEPARTMENT_ID) VALUES ( b.EMPLOYEE_ID,b.FIRST_NAME,</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5954597189878314770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/merge-statement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5954597189878314770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5954597189878314770'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/merge-statement.html' title='MERGE Statement'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4025084494102593108</id><published>2009-05-07T16:53:00.000-07:00</published><updated>2009-06-08T18:20:44.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>INSERT ALL</title><summary type='text'>drop table emp2 purge ;drop table emp3 purge ;Create table emp2 as select employee_id,first_name,last_name,salary from employees where 1=2;Create table emp3 as select employee_id,salary from employees where 1=2;-- Insert each row in emp2 and emp3 INSERT ALL  INTO emp2 VALUES(employee_id,First_name,Last_name,salary)  INTO emp3 VALUES(employee_id,salary) SELECT employee_id, first_name,last_name,</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4025084494102593108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/insert-all.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4025084494102593108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4025084494102593108'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/insert-all.html' title='INSERT ALL'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9093899638997138366</id><published>2009-05-04T13:21:00.000-07:00</published><updated>2009-05-08T17:57:07.126-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>Passing Arrays from Java</title><summary type='text'>create or replace type NUM_ARRAY as table of number;/create or replace and compile java source named "ArrayDemo"    as    import java.io.*;    import java.sql.*;    import oracle.sql.*;    import oracle.jdbc.driver.*;        public class ArrayDemo   {   public static void passArray() throws SQLException   {       Connection conn =           new OracleDriver().defaultConnection();          int </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9093899638997138366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/passing-arrays-from-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9093899638997138366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9093899638997138366'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/passing-arrays-from-java.html' title='Passing Arrays from Java'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2078189694214978868</id><published>2009-04-27T11:08:00.000-07:00</published><updated>2009-05-08T17:58:02.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Export Import'/><title type='text'>DATAPUMP export</title><summary type='text'>CONN sys/password@db10g AS SYSDBAGRANT CREATE ANY DIRECTORY TO scott;Create the directory from scott loginCREATE DIRECTORY exp_dir as 'e:\exp\';expdp SYSTEM/pwd  dumpfile=scott.dmp directory=exp_dir schemas=SCOTT job_name=scottexp logfile=scottexp.log</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2078189694214978868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/datapump-export.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2078189694214978868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2078189694214978868'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/datapump-export.html' title='DATAPUMP export'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6778884412392011441</id><published>2009-04-20T11:05:00.000-07:00</published><updated>2009-05-08T17:58:20.493-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Export Import'/><title type='text'>EXPORT script</title><summary type='text'>@echo offREM get the date and time stampfor /f "tokens=2-9 delims=:.-/ " %%a in ('date/t') do (         set dates=%%c%%a%%b)for /f "tokens=1-9 delims=:.-/ " %%a in ('time/t') do (         set time=%%a%%b%%c)REM set charactersetset NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P15exp system/pwd file=E:\exp\exp_%dates%.%time%.dmp owner=scott log=E:\exp_%dates%.%time%.log</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6778884412392011441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/export-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6778884412392011441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6778884412392011441'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/export-script.html' title='EXPORT script'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5108865250395303939</id><published>2009-04-14T17:53:00.000-07:00</published><updated>2009-05-23T17:54:53.213-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>EXECUTE OS command from PL/SQL</title><summary type='text'>EXECUTE OS command from PL/SQLJava ProcedureCREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "OSCommand" ASimport java.io.*;public class OSCommand{public static String Run(String Command){try{Runtime.getRuntime().exec(Command);return("0");}catch (Exception e){System.out.println("Error running command: " + Command +"\n" + e.getMessage());return(e.getMessage());}SQL&gt; CREATE or REPLACE FUNCTION </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5108865250395303939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/04/execute-os-command-from-plsql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5108865250395303939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5108865250395303939'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/04/execute-os-command-from-plsql.html' title='EXECUTE OS command from PL/SQL'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2562254515335604222</id><published>2009-04-13T10:07:00.000-07:00</published><updated>2009-05-08T17:58:41.502-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>DATAFILE operations</title><summary type='text'>Adding a DatafileALTER TABLESPACE usersDATAFILE 'C:\ORACLE\ORADATA\ORCL\USER2.DBF'SIZE 20M;----------------Resizing a DatafileALTER DATABASE DATAFILE 'C:\ORACLE\ORADATA\ORCL\USER2.DBF'RESIZE 50M;----------------Drop a DatafileALTER DATABASE DATAFILE 'C:\ORACLE\ORADATA\ORCL\USER2.DBF'OFFLINE DROP;----------------Auto extending ON OFFALTER DATABASE DATAFILE  'C:\ORACLE\ORADATA\ORCL\USER2.DBF' </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2562254515335604222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/datafile-operations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2562254515335604222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2562254515335604222'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/datafile-operations.html' title='DATAFILE operations'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6804984399712167902</id><published>2009-04-06T09:44:00.000-07:00</published><updated>2009-06-15T06:01:11.412-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>Configure Listener to connect to local database with IPC protocol</title><summary type='text'>Configure Listener.ora LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))    )    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = myhost )(PORT = 1521))    )  )Tnsnames.oraLO =  (DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))    )    (CONNECT_DATA =      (SERVICE_NAME = LOC)    )  )</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6804984399712167902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/configure-listener-to-connect-to-local.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6804984399712167902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6804984399712167902'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/configure-listener-to-connect-to-local.html' title='Configure Listener to connect to local database with IPC protocol'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4995514276227310518</id><published>2009-03-30T09:06:00.000-07:00</published><updated>2010-03-23T12:58:48.538-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-600'/><title type='text'>ORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [],</title><summary type='text'>ERROR drop user usera cascade;*ERROR at line 1:ORA-01001: invalid cursorORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [],[], [], []SOLUTIONsqlplus / as sysdbaSQL&gt; shutdown immmediate ;SQL&gt; startup MIGRATESQL&gt; @?/rdbms/admin/catpatch.sql....SQL&gt; shutdown immediate ;SQL&gt; startupORA-600</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4995514276227310518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/05/ora-00600-internal-error-code-arguments.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4995514276227310518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4995514276227310518'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/05/ora-00600-internal-error-code-arguments.html' title='ORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [],'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-1176621827247951136</id><published>2009-03-23T07:53:00.000-07:00</published><updated>2009-07-09T17:41:29.800-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RECOVER TABLE from Block Corruption</title><summary type='text'>MOS 33405.1Connect as a SYSDBA user and mark the table as needing to skip corrupt blocksexecute DBMS_REPAIR.SKIP_CORRUPT_BLOCKS('SCOTT','EMP2');CREATE TABLE recover_emp AS SELECT * FROM EMP2;To clear the attribute for a table useexecute DBMS_REPAIR.SKIP_CORRUPT_BLOCKS('SCOTT,'EMP2', flags=&gt;dbms_repair.noskip_flag);</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/1176621827247951136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/04/recover-table-from-block-corruption.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1176621827247951136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1176621827247951136'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/04/recover-table-from-block-corruption.html' title='RECOVER TABLE from Block Corruption'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5455052108983477813</id><published>2009-03-16T07:57:00.000-07:00</published><updated>2009-05-08T18:03:45.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>GENERATE Sequential Number Dates Alphabets etc</title><summary type='text'>Generate Sequential numbersSQL&gt; l1 select n2 from (3* select level n from dual connect by level &lt;= 20 )SQL&gt; /N----------123456789101112131415161718192020 rows selected.Generate One Year of DateSQL&gt; l1 select dt2 from (3 select to_date('31-Dec-2007') + level dt4 from dual5* connect by level &lt;= to_date('31-Dec-2008') - to_date('31-Dec-2007') )SQL&gt;/DT---------01-JAN-0802-JAN-0803-JAN-0804-JAN-0805-</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5455052108983477813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/04/generate-sequential-number-dates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5455052108983477813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5455052108983477813'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/04/generate-sequential-number-dates.html' title='GENERATE Sequential Number Dates Alphabets etc'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6236891009560883272</id><published>2009-03-09T07:54:00.000-07:00</published><updated>2009-05-08T18:04:04.458-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>RETURN ARRAY from function</title><summary type='text'>RETURN ARRAY from Functioncreate or replace type tarr is varray(20000) of number(10) ;/show errorcreate or replace  function f_array return tarr as  arr tarr:=tarr() ;   begin    for r in ( select empno from emp2 ) loop      arr.extend() ;      arr(arr.count()):=r.empno ;    end loop ;   return arr;  end f_array;/show errorsSQL&gt; select * from table(f_array()) ;COLUMN_VALUE------------</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6236891009560883272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/04/return-array-from-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6236891009560883272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6236891009560883272'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/04/return-array-from-function.html' title='RETURN ARRAY from function'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-1132636511999964688</id><published>2009-02-12T19:25:00.000-08:00</published><updated>2009-05-08T19:38:30.439-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>SPECIAL:BULT-IN Functions</title><summary type='text'>bfilename( 'directory', 'filename' )CREATE DIRECTORY ExpDir AS 'd:\export\';SELECT bfilename('ExpDir', 'logo.gif')FROM dual;cardinality( nested table column )    CASE  [ expression ]      WHEN condition_1 THEN result_1      WHEN condition_2 THEN result_2      ...      WHEN condition_n THEN result_n      ELSE result    ENDcoalesce( expr1, expr2, ... expr_n )function returns the first non-null </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/1132636511999964688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/02/specialbult-in-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1132636511999964688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1132636511999964688'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/02/specialbult-in-functions.html' title='SPECIAL:BULT-IN Functions'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5628078542962821677</id><published>2009-02-03T07:57:00.000-08:00</published><updated>2009-07-09T17:41:49.215-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RMAN Basics</title><summary type='text'>SHOW RMAN Configurationc:\&gt;rmanRecovery Manager: Release 10.2.0.1.0 - Production on Sat May 2 13:12:16 2009Copyright (c) 1982, 2005, Oracle. All rights reserved.RMAN&gt; connect target /connected to target database (not started)RMAN&gt; startupOracle instance starteddatabase mounteddatabase openedTotal System Global Area 146800640 bytesFixed Size 1286220 bytesVariable Size 96473012 bytesDatabase </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5628078542962821677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/02/rman-basics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5628078542962821677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5628078542962821677'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/02/rman-basics.html' title='RMAN Basics'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-856854119897502342</id><published>2009-01-09T07:58:00.000-08:00</published><updated>2009-06-24T19:28:33.981-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>DYNAMIC IN list from string</title><summary type='text'>WHEN the value is eg. 'SCOTT,ALLEN,KINGDOM,CLARK'Convert the STRING TO ROWS and use in like a tablevar myvar varchar2(30);exec :myvar:='SCOTT,ALLEN,KINGDOM,CLARK' ;with t1 as (select level l from dual connect by level &lt; length(:myvar) - length(replace(:myvar,','))+2), t2 as (select :myvar||',' c from dual)select regexp_substr(c,'[^,]+',1,l) empnamefrom t1,t2/EMPNAME---------------</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/856854119897502342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/01/dynamic-in-list-from-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/856854119897502342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/856854119897502342'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/01/dynamic-in-list-from-string.html' title='DYNAMIC IN list from string'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3718299224970431756</id><published>2009-01-02T07:59:00.000-08:00</published><updated>2009-05-07T08:08:45.737-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>GROUPING SETS - Add 01 02 .. after every 5 rows</title><summary type='text'>ADD 01 02 03 ... after ever 5 rows.WITH t AS(select chr(ascii('a') + rownum - 1) cfrom dualconnect by level &lt; 27)SELECT decode(grouping_id(c),1,to_char(gr + 1, 'fm09'),c)from (select c, trunc((row_number() over (order by c) - 1) / 5) grpfrom t)GROUP BY GROUPING SETS ((gr, c), (gr))ORDER BY grp, decode(grouping_id(c), 1, chr(0), c)/DEC---01abcde02fghij03klmno04pqrst05uvwxy06z32 rows selected.</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3718299224970431756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2009/01/grouping-sets-add-01-02-after-every-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3718299224970431756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3718299224970431756'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2009/01/grouping-sets-add-01-02-after-every-5.html' title='GROUPING SETS - Add 01 02 .. after every 5 rows'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5911176065656750097</id><published>2008-12-08T08:00:00.000-08:00</published><updated>2009-07-08T10:01:27.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>PLSQL Profiler usage</title><summary type='text'>Connect as SYSSQL&gt; connect sys/***** as sysdbaCreate Profiler Packages etc.SQL&gt;@?rdbms\admin\profload.sqlCreate tables for the schemaSQL&gt; connect scott/tigerSQL&gt; @?rdbms\admin\proftab.sqlthe script creates PLSQL_PROFILER_DATA, PLSQL_PROFILER_RUNS,PLSQL_PROFILER_UNITSSQL&gt; create table testemp(emp number);SQL&gt;CREATE OR REPLACE PROCEDURE testprocISi NUMBER := 0;vempno NUMBER;BEGINWHILE i &lt; </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5911176065656750097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/12/plsql-profiler-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5911176065656750097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5911176065656750097'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/12/plsql-profiler-usage.html' title='PLSQL Profiler usage'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6265419421647914097</id><published>2008-12-08T07:59:00.000-08:00</published><updated>2009-07-04T20:09:54.306-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>PLSQL Associative arrays</title><summary type='text'>Associative array is the new name for index-by tableDeclarationPrior 9.2.0type my_tab_t is table of number index by binary_integer;Post 9.2.0type my_tab_t is table of number index by pls_integer;type my_tab_t is table of number index by varchar2(4000); -- varchar2 can be max 32767General codeidx := the_table.First;while idx is not nullloop-- do somethingidx := the_table.Next(idx);end loop;</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6265419421647914097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/12/plsql-associative-arrays.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6265419421647914097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6265419421647914097'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/12/plsql-associative-arrays.html' title='PLSQL Associative arrays'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5265979580881557426</id><published>2008-12-03T21:51:00.000-08:00</published><updated>2009-05-30T21:57:16.211-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>MANUALLY CONFIGURE DBCONSOLE</title><summary type='text'>Enterprise Manager Configuration Agentemca -repos drop (if existing)emca -repos createemca -config dbcontrol dbemca -deconfig dbcontrol db -repos dropemca -config dbcontrol db -repos createemca -config dbcontrol db -repos recreateEnterprise Manager Controlemctl start dbconsoleemctl stop dbconsoleemctl status dbconsole</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5265979580881557426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/12/manually-configure-dbconsole.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5265979580881557426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5265979580881557426'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/12/manually-configure-dbconsole.html' title='MANUALLY CONFIGURE DBCONSOLE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-7802043123637472088</id><published>2008-11-15T08:01:00.000-08:00</published><updated>2009-05-07T08:08:45.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>FUNCTION Returning plsql table type</title><summary type='text'>create or replace type typRecord as object (inum number,vchr varchar2(30));/create or replace type typNestedTab as table of typRecord;/create or replace function fnMyEmp return typNestedTab asvRet typNestedTab;beginvRet := typNestedTab();for x in ( select empno, ename from emp ) loopvRet.extend;vRet(vRet.count) := typRecord(x.empno ,x.ename );end loop ;return vRet;end fnMyEmp;/</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/7802043123637472088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/11/function-returning-plsql-table-type.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7802043123637472088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/7802043123637472088'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/11/function-returning-plsql-table-type.html' title='FUNCTION Returning plsql table type'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2204956436578163287</id><published>2008-11-08T08:01:00.000-08:00</published><updated>2009-06-25T06:19:12.156-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>TIMESTAMPS AND TIMEZONES</title><summary type='text'>The Time zone session timestamp and system timestampSQL&gt; select sessiontimezone, current_timestamp, systimestamp from dual;SESSIONTIMEZONE---------------------------------------------------------------------------CURRENT_TIMESTAMP---------------------------------------------------------------------------SYSTIMESTAMP----------------------------------------------------------------------------04:</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2204956436578163287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/11/timestamps-and-timezones.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2204956436578163287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2204956436578163287'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/11/timestamps-and-timezones.html' title='TIMESTAMPS AND TIMEZONES'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4421876293014123377</id><published>2008-10-10T08:03:00.000-07:00</published><updated>2009-05-07T08:03:55.742-07:00</updated><title type='text'>RECREATING DATABASE CONTROL dbcontrol</title><summary type='text'>Dropping the dbcontrolD:\&gt;emca -deconfig dbcontrol db -repos dropSTARTED EMCA at Apr 09, 2008 10:08:31 AMEM Configuration Assistant, Version 10.2.0.1.0 ProductionCopyright (c) 2003, 2005, Oracle. All rights reserved.Enter the following information:Database SID: ORCLListener port number: 1521Password for SYS user:MANAGERPassword for SYSMAN user:MANAGERCreating the dbcontrolD:\&gt;emca -config </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4421876293014123377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/10/recreating-database-control-dbcontrol.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4421876293014123377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4421876293014123377'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/10/recreating-database-control-dbcontrol.html' title='RECREATING DATABASE CONTROL dbcontrol'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8862807573128068484</id><published>2008-10-10T08:02:00.000-07:00</published><updated>2009-05-07T08:08:45.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>BILL OF MATERIALS (BOM)</title><summary type='text'>Bill of Materials using connect bySQL&gt; create table bill_of_materials2 (3 assembly_id number,4 assembly_name varchar2(30),5 parent_assembly number6 ) ;Table created.SQL&gt;SQL&gt; insert all2 into bill_of_materials values (100,'Pen',null)3 into bill_of_materials values (101,'Refil',100)4 into bill_of_materials values (102,'Ink',100)5 into bill_of_materials values (103,'Tip',101)6 select * from dual;4 </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8862807573128068484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/10/bill-of-materials-bom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8862807573128068484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8862807573128068484'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/10/bill-of-materials-bom.html' title='BILL OF MATERIALS (BOM)'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8769514883337395734</id><published>2008-09-14T08:03:00.000-07:00</published><updated>2011-08-08T10:50:38.817-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>SUPERFAST CLONING</title><summary type='text'>1. TAKING BACKUP
1. a. If your database is not in ARCHIVE LOG mode, take an off-line database
backup.

1. b. If in ARCHIVELOG MODE, you can either take an on-line or off-line
database backup.

2. CREATING A CONTROLFILE FOR CLONE
2. On production database, connect to "SYS AS SYSDBA"

SQL&gt; alter database backup controlfile to trace;

3. Edit the controlfile trace 
[from $ORACLE_BASE/</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8769514883337395734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/09/superfast-cloning.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8769514883337395734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8769514883337395734'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/09/superfast-cloning.html' title='SUPERFAST CLONING'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-5306873340060127863</id><published>2008-09-10T08:04:00.000-07:00</published><updated>2009-05-07T08:05:00.849-07:00</updated><title type='text'>SECURING dbconsole ENABLING https</title><summary type='text'>Securing dbconsole1) Set the environment variable ORACLE_SID to ORCLD:\&gt;set ORACLE_SID=ORCL2) emctl stop dbconsoleD:\&gt;emctl stop dbconsoleOracle Enterprise Manager 10g Database Control Release 10.2.0.4.0Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.http://myhost:5500/em/console/aboutApplicationThe OracleDBConsoleORCL service is stopping.........The OracleDBConsoleORCL service </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/5306873340060127863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/09/securing-dbconsole-enabling-https.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5306873340060127863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/5306873340060127863'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/09/securing-dbconsole-enabling-https.html' title='SECURING dbconsole ENABLING https'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6554111321751211594</id><published>2008-08-15T07:47:00.000-07:00</published><updated>2009-06-14T20:10:43.069-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>ANALYTIC FUNCTIONS</title><summary type='text'>--GET THE FIRST SALARY WITHIN A DEPARTMENT ORDERED BY ASCENDING SALARYselect deptno, ename, sal,first_value(sal) over ( partition by deptno order by deptno) Firstfrom emp/    DEPTNO ENAME             SAL      FIRST---------- ---------- ---------- ----------        10 MILLER           1300       1300        10 CLARK            2450       1300        10 KING             5000       1300        20 </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6554111321751211594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/08/analytic-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6554111321751211594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6554111321751211594'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/08/analytic-functions.html' title='ANALYTIC FUNCTIONS'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-8793243069469541828</id><published>2008-08-14T07:48:00.000-07:00</published><updated>2009-05-07T08:10:46.006-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>CHANGE LOST SYS PASSWORD</title><summary type='text'>WINDOWS1. Backup the %ORACLE_HOME%/database/PWD.ora2. Create new password fileorapwd file=%ORACLE_HOME%/database/PWD.ora password= entries=103. Stop and Start the Oracle service using service controller to take new passwordsc stop OracleServicewait till the service is stopped.sc start OracleSerivcewait till the service is started.4. Login sqlplus with /nologsqlplus /nologSQL&gt; connect sys as </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/8793243069469541828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/08/change-lost-sys-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8793243069469541828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/8793243069469541828'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/08/change-lost-sys-password.html' title='CHANGE LOST SYS PASSWORD'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3106154592248465533</id><published>2008-08-08T12:36:00.000-07:00</published><updated>2009-06-25T19:09:58.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>DATE:BULT-IN Functions</title><summary type='text'>add_months( date1, n ) where n is months, -n to minus monthsALTER SESSION SET TIME_ZONE = '-2:0';current_date shows the time from the time zone set.current_timestamp shows the timestampdbtimezone shows database timezonelocaltimestamp local timestampfrom_tz( timestamp_value, time_zone_value )select from_tz(TIMESTAMP '2007-09-11 01:20:42', '5:00')from dual;last_day( date ) shows last day of the </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3106154592248465533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2007/08/bult-in-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3106154592248465533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3106154592248465533'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2007/08/bult-in-functions.html' title='DATE:BULT-IN Functions'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-6407417193912501533</id><published>2008-07-08T17:40:00.001-07:00</published><updated>2009-06-25T19:09:33.079-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RDBMS'/><title type='text'>SQLite Commands</title><summary type='text'>SQL commands list     * ALTER TABLE --- rename table and add columns     * ANALYZE --- generate statistics for index and tables.     * ATTACH DATABASE --- can attach to 10 database files.     * BEGIN TRANSACTION  ---  begin , end , commit , rollback and sql statements can be used.     * comment -- /* this is a multiline comment */    * COMMIT TRANSACTION --     * CREATE INDEX -- Create unique and</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/6407417193912501533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2007/07/sqlite-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6407417193912501533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/6407417193912501533'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2007/07/sqlite-commands.html' title='SQLite Commands'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-9187194136660867605</id><published>2008-07-08T17:40:00.000-07:00</published><updated>2009-06-25T19:09:00.479-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RDBMS'/><title type='text'>SQLite</title><summary type='text'>Create table   CREATE TABLE t1(  a INTEGER,  b INTEGER, c VARCHAR(200) ); Create table with autoincrement primary key    CREATE TABLE t1(  a INTEGER PRIMARY KEY,  b INTEGER, c VARCHAR(200) );Insert rows in the table ( insert null in primary key to insert the next number and autoincrement)   INSERT INTO TABLE t1(NULL, 1234,'abcde'); Datatype used in SQLITE   NULL. The value is a NULL value.  </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/9187194136660867605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2007/07/sqlite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9187194136660867605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/9187194136660867605'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2007/07/sqlite.html' title='SQLite'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-4366894647206391416</id><published>2008-07-07T07:47:00.000-07:00</published><updated>2009-07-09T17:42:07.738-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Backup and Recovery'/><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>RECOVERY from ORA-01157 errors</title><summary type='text'>Resolve Errors: ORA-01157: cannot identify/lock data file 14 - see DBWR trace fileDatabase may be in Archivelog or Noarchive log modeSome data may be lost in Noarchive log mode.Lost datafile C:\ORACLE\ORADATA\ORCL\TEST.DBFRE-CREATE a datafile for RECOVERYSQL&gt; select * from v$recover_file;FILE# ONLINE ONLINE_ ERROR CHANGE# TIME---------- ------- ------- ------------------ ---------- ---------14 </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/4366894647206391416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/07/recovery-from-ora-01157-errors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4366894647206391416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/4366894647206391416'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/07/recovery-from-ora-01157-errors.html' title='RECOVERY from ORA-01157 errors'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-1745880980612407911</id><published>2008-07-07T07:46:00.000-07:00</published><updated>2009-06-12T08:29:37.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Admin / Config'/><title type='text'>CHANGING modes of DATABASE</title><summary type='text'>Archivelog to NoArchiveLogLOG_ARCHIVE_START parameter is obsolete in 10g and aboveSHUTDOWN ;STARTUP MOUNT EXCLUSIVE;ALTER DATABASE NOARCHIVELOG ;ALTER DATABASE OPEN ;select log_mode from v$database ;NoArchivelog to ArchiveLogSHUTDOWN ;STARTUP MOUNT EXCLUSIVE;ALTER DATABASE ARCHIVELOG ;ALTER DATABASE OPEN ;select log_mode from v$database ;TO Delete LOG_ARCHIVE_START parameter SQL&gt; alter system </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/1745880980612407911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/07/changing-modes-of-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1745880980612407911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/1745880980612407911'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/07/changing-modes-of-database.html' title='CHANGING modes of DATABASE'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2478958922450916126</id><published>2008-06-08T17:35:00.000-07:00</published><updated>2009-06-25T19:08:37.975-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RDBMS'/><title type='text'>Microsoft SQL Server 2005</title><summary type='text'>Aggregate - CREATE AGGREGATE          - DROP AGGREGATE Application Role - CREATE APPLICATION ROLE                 - ALTER APPLICATION ROLE                 - DROP APPLICATION ROLEAssembly - CREATE ASSEMBLY         - ALTER ASSEMBLY         - DROP ASSEMBLYALTER AUTHORIZATIONBACKUPBACKUP CERTIFICATEBEGIN [DIALOG [CONVERSATION]]Certificate - ALTER CERTIFICATE            - CREATE CERTIFICATE</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2478958922450916126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2007/06/microsoft-sql-server-2005.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2478958922450916126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2478958922450916126'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2007/06/microsoft-sql-server-2005.html' title='Microsoft SQL Server 2005'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-3898215180715875876</id><published>2008-06-07T07:45:00.000-07:00</published><updated>2009-05-07T08:09:17.563-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>REFCURSOR example</title><summary type='text'>--REFCURSOR examplecreate or replace package typesastype cursorType is ref cursor;end ;/create or replace function fempCreturn types.cursortypeasl_cursor types.cursorType;beginopen l_cursor for select * from emp ;return l_cursor;end ;/declarel_cursor types.cursorType;my_emp emp%rowtype;beginl_cursor := fempC();loopfetch l_cursor into my_emp ;exit when l_cursor%notfound;dbms_output.put_line(</summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/3898215180715875876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/06/refcursor-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3898215180715875876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/3898215180715875876'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/06/refcursor-example.html' title='REFCURSOR example'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5335252535709464945.post-2913910950019590231</id><published>2008-06-07T07:44:00.000-07:00</published><updated>2009-05-07T08:09:17.563-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sql Plus/ PLSQL'/><title type='text'>DATABASE level Triggers</title><summary type='text'>ON SHUTDOWNcreate or replace trigger tr_on_shutdownbefore shutdown on databasebegin--- do something send message etc...--- EXECUTE IMMEDIATE ....end;/CREATE ON DATABASECREATE OR REPLACE TRIGGER SYSTEM.tr_db_objs AFTER CREATE ON DATABASEDECLARE....BEGIN--- do something send message etc...--- EXECUTE IMMEDIATE ....END ;/LOGON DATABASECREATE OR REPLACE lo_tr AFTER LOGON DATABASEdeclare.....BEGIN--- </summary><link rel='replies' type='application/atom+xml' href='http://db-oracl.blogspot.com/feeds/2913910950019590231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://db-oracl.blogspot.com/2008/06/database-level-triggers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2913910950019590231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5335252535709464945/posts/default/2913910950019590231'/><link rel='alternate' type='text/html' href='http://db-oracl.blogspot.com/2008/06/database-level-triggers.html' title='DATABASE level Triggers'/><author><name>Sänjay</name><uri>http://www.blogger.com/profile/15098473404164706487</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
