<?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'><id>tag:blogger.com,1999:blog-5103795619781655202</id><updated>2009-12-29T22:52:04.742-08:00</updated><title type='text'>Rakesh Soni - DBA</title><subtitle type='html'>NOTE: I&amp;#39;m writing at my blog for future reference. I am writing Oracle related Experiences &amp;amp; stuffs.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default?start-index=26&amp;max-results=25&amp;orderby=updated'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-732440694703721868</id><published>2009-11-06T03:21:00.000-08:00</published><updated>2009-11-10T23:19:31.433-08:00</updated><title type='text'>crontab - scheduling a shell script (for oracle export)</title><content type='html'>Cron is a time-based job scheduler in Unix-like computer operating systems. 'cron' is short for Chronograph. Cron enables users to schedule jobs (commands or &lt;a title="Shell script" href="http://en.wikipedia.org/wiki/Shell_script"&gt;shell scripts&lt;/a&gt;) to run automatically at a certain time or date.&lt;br /&gt;&lt;br /&gt;&gt; connected with oracle user.&lt;br /&gt;[oracle&lt;a href="mailto:oracle@oraclelinux"&gt;@oraclelinux&lt;/a&gt; bin]$ pwd&lt;br /&gt;/bin&lt;br /&gt;&lt;br /&gt;crontab -e - opens the user's crontab file for viewing/editing&lt;br /&gt;&lt;br /&gt;crontab -l - simply lists the crontab file's contents for the user. Think of it as a "cat" function for the crontab.&lt;br /&gt;&lt;br /&gt;-------------------------------&lt;br /&gt;[oracle&lt;a href="mailto:oracle@oraclelinux"&gt;@oraclelinux&lt;/a&gt; bin]$ crontab -e&lt;br /&gt;&lt;br /&gt;SHELL=/bin/bash&lt;br /&gt;PATH=/sbin:/bin:/usr/sbin:/usr/bin&lt;br /&gt;MAILTO=oracle&lt;br /&gt;HOME=/&lt;br /&gt;*/5 * * * * sh /home/oracle/rakesh.sh&lt;br /&gt;&lt;br /&gt;-----------------------------------------&lt;br /&gt;The script will execute every five minute.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Cron"&gt;http://en.wikipedia.org/wiki/Cron&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.crontabrocks.org/"&gt;http://www.crontabrocks.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------&lt;br /&gt;rakesh.sh shell script :&lt;br /&gt;--------------------------------------------------&lt;br /&gt;#!bin/bash&lt;br /&gt;#PATH=$PATH:$HOME/bin;export PATH&lt;br /&gt;unset USERNAME&lt;br /&gt;#DISPLAY=10.142.200.141:0.0; export DISPLAY&lt;br /&gt;#Oracle Settings&lt;br /&gt;TMP=/tmp; export TMP&lt;br /&gt;TMPDIR=$TMP; export TMPDIR&lt;br /&gt;&lt;br /&gt;ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1; export ORACLE_HOME&lt;br /&gt;ORACLE_SID=jsildb; export ORACLE_SID&lt;br /&gt;ORACLE_HOME_LISTENER=LISTENER; export ORACLE_HOME_LISTENER&lt;br /&gt;ORATAB=/etc/oratab; export ORATAB&lt;br /&gt;#ORACLE_TERM=xterm; export ORACLE_TERM&lt;br /&gt;export PATH=/u01/app/oracle/product/10.2.0/db_1/bin:$PATH&lt;br /&gt;export PATH=/usr/sbin/:$PATH&lt;br /&gt;LD_LIBRARY_PATH=$ORACLE_HOME/lib:lib:usr/lib; export LD_LIBRARY_PATH&lt;br /&gt;CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH&lt;br /&gt;#LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL&lt;br /&gt;export DATE=$(date +"%m_%d_%y_%H:%M:%S_%p")&lt;br /&gt;&lt;br /&gt;exp &lt;a href="mailto:rakesh/rakesh@jsildb"&gt;rakesh/rakesh@jsildb&lt;/a&gt; file=/home/oracle/erp_backups/rakesh_$DATE.dmp log=/home/oracle/erp_backups/rakesh_$DATE.log statistics=none&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-732440694703721868?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/732440694703721868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=732440694703721868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/732440694703721868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/732440694703721868'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/11/scheduling-export-shell-script.html' title='crontab - scheduling a shell script (for oracle export)'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-7734522510143777753</id><published>2009-11-03T20:42:00.000-08:00</published><updated>2009-11-03T22:52:52.393-08:00</updated><title type='text'>export bash script in linux with timestamp...</title><content type='html'>I have created export bash script in linux operating system to export schema and attached time of export with dump &amp;amp; log file..&lt;br /&gt;&lt;br /&gt;#!bin/bash&lt;br /&gt;export DATE=$(date +"%m_%d_%y_%H:%M:%S_%p")&lt;br /&gt;/u01/app/oracle/product/10.2.0/db_1/bin/exp &lt;a href="mailto:rakesh/rakesh@rockdb"&gt;rakesh/rakesh@rockdb&lt;/a&gt; file=/home/oracle/backups/rakesh$DATE.dmp log=/home/oracle/backups/rakesh$DATE.log statistics=none&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-7734522510143777753?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/7734522510143777753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=7734522510143777753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7734522510143777753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7734522510143777753'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/11/export-bash-script-in-linux-with.html' title='export bash script in linux with timestamp...'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-7547829665221647969</id><published>2009-07-29T22:12:00.000-07:00</published><updated>2009-07-29T22:50:50.060-07:00</updated><title type='text'>ORA-00031: session marked for kill</title><content type='html'>Today, i was trying to kill a session as explained in&lt;br /&gt;&lt;a href="http://rakeshocp.blogspot.com/2009/04/kill-session.html"&gt;http://rakeshocp.blogspot.com/2009/04/kill-session.html&lt;/a&gt; but i was getting error "ORA-00031: session marked for kill" i got to know that we need to kill an OS session then. I wanted to kill "hassan's" session.&lt;br /&gt;select    spid,    osuser,    s.program from   v$process p,    v$session s where    p.addr=s.paddr;&lt;br /&gt;SPID         OSUSER                         PROGRAM&lt;br /&gt;------------ ------------------------------ ----------------&lt;br /&gt;4844         rakesh.kumar&lt;br /&gt;7168         rakesh.kumar              plsqldev.exe&lt;br /&gt;6012         Hassan                         plsqldev.exe&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\Administrator&gt;orakill icpora 6012&lt;br /&gt;Kill of thread id 6012 in instance icpora successfully signalled.&lt;br /&gt;C:\Documents and Settings\Administrator&gt;&lt;br /&gt;&lt;br /&gt;Thanks to the Don Burleson&lt;br /&gt;&lt;a href="http://www.dba-oracle.com/t_kill_process_windows.htm"&gt;http://www.dba-oracle.com/t_kill_process_windows.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-7547829665221647969?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/7547829665221647969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=7547829665221647969' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7547829665221647969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7547829665221647969'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/07/ora-00031-session-marked-for-kill.html' title='ORA-00031: session marked for kill'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-5256990779800147406</id><published>2009-06-16T20:28:00.001-07:00</published><updated>2009-06-16T20:31:14.889-07:00</updated><title type='text'>When your query takes too long</title><content type='html'>What to do when your query is too slow? Check the link below for details:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=501834&amp;amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=501834&amp;amp;tstart=0&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-5256990779800147406?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/5256990779800147406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=5256990779800147406' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5256990779800147406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5256990779800147406'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/06/when-your-query-takes-too-long.html' title='When your query takes too long'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-8202663052938112020</id><published>2007-10-27T23:04:00.000-07:00</published><updated>2009-06-12T00:21:58.255-07:00</updated><title type='text'>Data Pump</title><content type='html'>&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Oracle Data Pump &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Oracle 10g's new DataPump utility is designed as the eventual replacement for the original Oracle Import and Export utilities.&lt;br /&gt;&lt;br /&gt;Some of the drawbacks in traditional Export and Import that needed to be addressed.&lt;br /&gt;&lt;&gt; Operations are difficult to restart.&lt;br /&gt;&lt;&gt; Execution is client-side and single-threaded.&lt;br /&gt;&lt;&gt; Dump files can grow enormously.&lt;br /&gt;&lt;&gt; Tuning mechanisms are limited.&lt;br /&gt;&lt;&gt; Progress monitoring is difficult.&lt;br /&gt;&lt;&gt; Database object filtering features are limited.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Enter The DataPump: Features Overview&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Fortunately, Oracle 10g has addressed many of these issues with the DataPump, a new set of utilities that significantly expands the capabilities of the original Export and Import utilities.&lt;br /&gt;&lt;&gt; Server-side parallel execution.&lt;br /&gt;&lt;&gt; Improved control and restartability of operations.&lt;br /&gt;&lt;&gt; Simplified monitoring of operational status..&lt;br /&gt;&lt;&gt; Automated performance tuning.&lt;br /&gt;&lt;&gt; Improved database object filtering.&lt;br /&gt;&lt;&gt; Export dump file control enhancements.&lt;br /&gt;&lt;br /&gt;for details visit of above visit &lt;a href="http://www.databasejournal.com/features/oracle/article.php/3489491"&gt;http://www.databasejournal.com/features/oracle/article.php/3489491&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;DataPump 10g at Oracle Website by Arup Nanda&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/10gdba/week4_10gdba.html"&gt;http://www.oracle.com/technology/pub/articles/10gdba/week4_10gdba.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;=============================================================================&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Data Pump Export&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;First you need create a Directory for Data Pump Utility. and must grant read, write priviledges to user.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;SQL&gt; create or replace directory expdp as 'D:\expdp';&lt;br /&gt;grant read, write on directory expdp to rakesh;&lt;br /&gt;&lt;br /&gt;SQL&gt; GRANT exp_full_database to rakesh;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Exporting with DataPump&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;H:&gt;expdp erp/********@live-db tables=client_type directory=exp_dir dumpfile=datapump_erp.dmp&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Importing with DataPump&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;H:\&gt;impdp aa/********@rock tables=client_type directory=SYS_DMP REMAP_SCHEMA=erp:aa remap_tablespace=erp:users dumpfile=datapump_erp.dmp&lt;br /&gt;&lt;br /&gt;-------------------Live Database----------------------TestDatabase-----&lt;br /&gt;DB-Name----------Live-db---------------------------------rock---------&lt;br /&gt;DB-Users-------------erp------------------------------------aa----------&lt;br /&gt;Directoy-----------EXP_DIR----------------------------SYS_DMP------&lt;br /&gt;Tablespaces----------ERP---------------------------------USERS-------&lt;br /&gt;&lt;br /&gt;Above chart might help Young, novice DBA's to get any idea, how we can export from one database to another with DataPump.&lt;br /&gt;&lt;br /&gt;Note: Before importing you Manually MUST COPY dumpfile from exp_dir to sys_dir.&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;br /&gt;SQL&gt; column directory_path format a70&lt;br /&gt;SQL&gt; select * from dba_directories;&lt;br /&gt;OWNER DIRECTORY_NAME DIRECTORY_PATH&lt;br /&gt;--------------- ------------------------------ -----------------------------------&lt;br /&gt;SYS -------------EXPDP---------------------D:\expdp_dir&lt;br /&gt;SYS-------------ABC------------------------d:\abc_dir&lt;br /&gt;SYS-------------WORK_DIR----------------C:\ADE\aime_10.2_nt_push\oracle/work&lt;br /&gt;SYS-------------SYS_DMP------------------D:\exp_dir&lt;br /&gt;SYS-------------DATA_PUMP_DIR---------D:\oracle\product\10.2.0\admin\rock\dpdump\&lt;br /&gt;SYS-------------ADMIN_DIR---------------C:\ADE\aime_10.2_nt_push\oracle/md/admin&lt;br /&gt;6 rows selected.&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from dba_directories;&lt;br /&gt;&lt;br /&gt;SQL&gt; GRANT read, write ON DIRECTORY expdp TO hr;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE DIRECTORY hrdir AS 'D:\hr_dir';&lt;br /&gt;Directory created.&lt;br /&gt;&lt;br /&gt;SQL&gt; grant read, write on directory hrdir to hr;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;Exporting EMPLOYESS table...&lt;br /&gt;&lt;br /&gt;H:\&gt;expdp &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt; directory=hrdir dumpfile=hr_emptab.dmp logfile=hr_emptab.log tables=EMPLOYEES&lt;br /&gt;&lt;br /&gt;Export: Release 10.2.0.1.0 - Production on Friday, 12 June, 2009 12:02:40&lt;br /&gt;Copyright (c) 2003, 2005, Oracle. All rights reserved.&lt;br /&gt;Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;Starting "HR"."SYS_EXPORT_TABLE_01": &lt;a href="mailto:hr/********@rock"&gt;hr/********@rock&lt;/a&gt; directory=hrdir dumpfile=hr_emptab.dmp logfile=hr_emptab.log tables=EMPLOYEES&lt;br /&gt;Estimate in progress using BLOCKS method...&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TABLE_DATATotal estimation using BLOCKS method: 64 KB&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TABLE&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/COMMENT&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TRIGGER&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS. . exported "HR"."EMPLOYEES" 15.78 KB 107 rows&lt;br /&gt;Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded&lt;br /&gt;******************************************************************************&lt;br /&gt;Dump file set for HR.SYS_EXPORT_TABLE_01 is: D:\HR_DIR\HR_EMPTAB.DMP&lt;br /&gt;Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 12:03:01&lt;br /&gt;&lt;br /&gt;The above export command has also exported indexes, views, functions, packages, constraints, we need to export only TABLE EMPLOYEES, not other objects, check the below command.&lt;br /&gt;&lt;br /&gt;H:\&gt;expdp &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt; directory=hrdir dumpfile=hr_only_EMP_table.dmp logfile=hr_emp_table.log tables=EMPLOYEES exclude=index, view, REF_CONSTRAINT, function, trigger, constraint&lt;br /&gt;&lt;br /&gt;Export: Release 10.2.0.1.0 - Production on Friday, 12 June, 2009 12:17:44&lt;br /&gt;Copyright (c) 2003, 2005, Oracle. All rights reserved.&lt;br /&gt;Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;Starting "HR"."SYS_EXPORT_TABLE_01": &lt;a href="mailto:hr/********@rock"&gt;hr/********@rock&lt;/a&gt; directory=hrdir dumpfile=hr_only_EMP_table.dmp logfile=hr_emp_table.log tables=EMPLOYEES exclude=index, view, REF_CONSTRAINT, function, trigger, constraint&lt;br /&gt;Estimate in progress using BLOCKS method...&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TABLE_DATA&lt;br /&gt;Total estimation using BLOCKS method: 64 KBProcessing object type TABLE_EXPORT/TABLE/TABLE&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/COMMENT&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS. . exported "HR"."EMPLOYEES" 15.78 KB 107 rows&lt;br /&gt;Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded&lt;br /&gt;******************************************************************************&lt;br /&gt;Dump file set for HR.SYS_EXPORT_TABLE_01 is: D:\HR_DIR\HR_ONLY_EMP_TABLE.DMPJob "HR"."SYS_EXPORT_TABLE_01" successfully completed at 12:18:01&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-8202663052938112020?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/8202663052938112020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=8202663052938112020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/8202663052938112020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/8202663052938112020'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2007/10/data-pump.html' title='Data Pump'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-1657168367148462193</id><published>2009-06-02T23:41:00.000-07:00</published><updated>2009-06-04T22:27:08.024-07:00</updated><title type='text'>COLD BACKUP batch file</title><content type='html'>We have scheduled a Cold backup of DR site: check the steps below&lt;br /&gt;&lt;strong&gt;create a coldbackup.bat&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;-----------------------------&lt;/strong&gt;&lt;br /&gt;cd D:\oracle\product\10.2.0\db_1\BIN&lt;br /&gt;sqlplus "&lt;a href="mailto:sys/rock@rockstd"&gt;sys/rock@rockstd&lt;/a&gt; as sysdba" @D:\COLDBACKUP_WEEKLY\coldbackup.sql&lt;br /&gt;&lt;strong&gt;-----------------------------&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;steps for creating batch file: &lt;a href="http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html"&gt;http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html&lt;/a&gt; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;-----------------------------&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;coldbackup.sql&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;-----------------------------&lt;/strong&gt;&lt;br /&gt;ALTER DATABASE recover managed standby database cancel;&lt;br /&gt;SHUTDOWN IMMEDIATE;&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\DATAFILES&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\CONTROLFILES&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\REDOLOGS&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\ARCHIVELOGS&lt;br /&gt;host MD F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\PARAMETERFILES&lt;br /&gt;host copy D:\oracle\product\10.2.0\db_1\database\INITrockstd.ORA F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\PARAMETERFILES;&lt;br /&gt;host copy E:\DATAFILES\*.DBF F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\DATAFILES;&lt;br /&gt;host copy E:\REDOLOGS\*.LOG F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\REDOLOGS;&lt;br /&gt;host copy E:\CONTROLFILES\*.CTL F:\ROCKSTD_Coldbackup\"%DATE:/=_%"\CONTROLFILES;&lt;br /&gt;host copy E:\ARCHIVES\*.ARC F:\ROCKSTD_Coldbackup\"%DATE:/=_%\ARCHIVELOGS;&lt;br /&gt;STARTUP NOMOUNT;&lt;br /&gt;ALTER DATABASE MOUNT STANDBY DATABASE;&lt;br /&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;&lt;br /&gt;exit;&lt;br /&gt;exit&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-1657168367148462193?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/1657168367148462193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=1657168367148462193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1657168367148462193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1657168367148462193'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/06/cold-backup-batch-file.html' title='COLD BACKUP batch file'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-6947083930245216355</id><published>2008-09-10T06:36:00.000-07:00</published><updated>2009-06-02T22:29:33.624-07:00</updated><title type='text'>Scripts..</title><content type='html'>&lt;span style="color:#3333ff;"&gt;create user&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;------------&lt;/span&gt;&lt;br /&gt;create user abc&lt;br /&gt;identified by abc&lt;br /&gt;default tablespace tbs1&lt;br /&gt;temporary tablespace temp&lt;br /&gt;quota unlimited on tbs1/&lt;br /&gt;&lt;br /&gt;grant connect, create job, create operator, create snapshot, create procedure, create sequence, create synonym, create table, create trigger, create view, debug connect session to abc/&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;--------------------------------------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;only a DBA can import a file exported by another DBA&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;-------------------------------------------------------- &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#66ff99;"&gt;C:\Documents and Settings\Administrator&gt;imp userid=system file=E:\exp_full_db_Sat_26_04_2008_1100PM.dmp fromuser=sa_test touser=sa_test&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color:#66ff99;"&gt;H:\&gt;imp &lt;/span&gt;&lt;a href="mailto:userid=system@testapp"&gt;&lt;span style="color:#66ff99;"&gt;userid=system@testapp&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#66ff99;"&gt; file=D:\abamco_amc.DMP fromuser=abamco_amc touser=amcerptest&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;--------------------------&lt;br /&gt;FULL_DB_EXPORT.bat&lt;br /&gt;--------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;span style="color:#33ff33;"&gt;@echo off&lt;br /&gt;for /f "tokens=1,2,3,4 delims=/ " %%a in ('date /t') do set fdate=%%a_%%c_%%b_%%d&lt;br /&gt;&lt;br /&gt;for /f "tokens=1,2,3,4,5,6 delims=: " %%i in ('time /t') do set HHMMSS=_%%i%%j%%k%%l%%m%%n&lt;br /&gt;&lt;br /&gt;exp system/******* file=D:\Export\exp_full_db_%fdate%%HHMMSS%.dmp full=y log=D:\Export\exp_full_db_%fdate%%HHMMSS%.log &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;--------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;HOT_BACKUP.bat&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;--------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33cc00;"&gt;&lt;span style="color:#33ff33;"&gt;cd D:\oracle\product\10.2.0\db_1\BIN&lt;br /&gt;sqlplus system/***** @F:\HOT_BACKUP\hotbackup.sql &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;-------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;HOt Backup.sql&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;-------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;host MD F:\HOT_BACKUP\"%DATE:/=_%"&lt;br /&gt;host MD F:\HOT_BACKUP\"%DATE:/=_%"\ARCHIVELOGS&lt;br /&gt;alter tablespace SYSTEM begin backup;&lt;br /&gt;host copy E:\DATAFILES\SYSTEM01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\DATAFILES\SYSTEM02.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace SYSTEM end backup;&lt;br /&gt;alter tablespace UNDOTBS1 begin backup;&lt;br /&gt;host copy E:\DATAFILES\UNDOTBS01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace UNDOTBS1 end backup;&lt;br /&gt;alter tablespace SYSAUX begin backup;&lt;br /&gt;host copy E:\DATAFILES\SYSAUX01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace SYSAUX end backup;&lt;br /&gt;alter tablespace USERS begin backup;&lt;br /&gt;host copy E:\DATAFILES\USERS01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace USERS end backup;&lt;br /&gt;alter tablespace ABCD begin backup;&lt;br /&gt;host copy E:\DATAFILES\ABCD01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\DATAFILES\ABCD02.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace ABCD end backup;&lt;br /&gt;alter tablespace AXIS_ALERT begin backup;&lt;br /&gt;host copy E:\DATAFILES\AXIS_ALERT01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace AXIS_ALERT end backup;&lt;br /&gt;alter tablespace ERP begin backup;&lt;br /&gt;host copy E:\DATAFILES\ERP01.DBF F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;alter tablespace ERP end backup;&lt;br /&gt;host copy D:\oracle\product\10.2.0\db_1\database\INITDB.ora&lt;br /&gt;F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy D:\oracle\product\10.2.0\db_1\database\PWDDB.ora&lt;br /&gt;F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\REDOLOGS\REDO01.LOG F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\REDOLOGS\REDO02.LOG F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\REDOLOGS\REDO03.LOG F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\CONTROLFILES\CONTROL01.CTL F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\CONTROLFILES\CONTROL02.CTL F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\CONTROLFILES\CONTROL03.CTL F:\HOT_BACKUP\"%DATE:/=_%;&lt;br /&gt;host copy E:\ARCHIVE\*.ARC F:\HOT_BACKUP\"%DATE:/=_%\ARCHIVELOGS&lt;br /&gt;exit;&lt;br /&gt;exit&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;----------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;verify_db.bat&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;---------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;cd D:\oracle\product\10.2.0\db_1\BIN&lt;br /&gt;&lt;br /&gt;sqlplus "&lt;/span&gt;&lt;a href="mailto:sys/******@DBSTD"&gt;&lt;span style="color:#33ff33;"&gt;sys/******@DBSTD&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#33ff33;"&gt; as sysdba" @D:\verifyDBSTD.sql&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;---------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;verifyDBSTD.sql&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;col name format a70&lt;br /&gt;&lt;br /&gt;set pages 0&lt;br /&gt;&lt;br /&gt;set line 3000&lt;br /&gt;&lt;br /&gt;spool verifyDBSTD.txt&lt;br /&gt;&lt;br /&gt;select name, applied, to_char(completion_time, 'fmDD-MON-YYYY HH:MI:SS PM') from v$archived_log where completion_time &gt;= '24-MAR-2009' order by name desc;&lt;br /&gt;&lt;br /&gt;select process, status from v$managed_standby;&lt;br /&gt;&lt;br /&gt;spool off&lt;br /&gt;&lt;br /&gt;exit;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;---------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;RMAN_BACKUP.bat&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;---------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;cd D:\oracle\product\10.2.0\db_1\BIN\&lt;br /&gt;&lt;br /&gt;rman target &lt;/span&gt;&lt;a href="mailto:sys/rock@rock"&gt;&lt;span style="color:#33ff33;"&gt;sys/rock@rock&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#33ff33;"&gt; cmdfile c:\rman_backup.rcv log c:\rman_log.txt&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;-------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;c:\rman_backup.rcv&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;-------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;backup as compressed backupset incremental level 0 database plus archivelog;&lt;br /&gt;restore database validate;&lt;br /&gt;exit;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3333ff;"&gt;--------------------------&lt;br /&gt;RMAN_BACKUP_Cumulative.bat&lt;br /&gt;--------------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;backup as compressed backupset incremental level 1 cumulative database plus archivelog;&lt;br /&gt;exit;&lt;br /&gt;&lt;/span&gt;---------------------------------&lt;br /&gt;forums.oracle.com&lt;br /&gt;Thread: Incremental Backups are Cumulative Vs Differential??&lt;br /&gt;-------------------------------------------------------&lt;br /&gt;The followings are Weekly Full Backup and Daily Backup scripts:&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;--------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Weekly Full Backup &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;--------------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;{&lt;br /&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;br /&gt;CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;&lt;br /&gt;allocate channel ch1 type disk format&lt;br /&gt;'/u02/db/backup/RMAN/backup_%d_%t_%s_%p_%U.bck';&lt;br /&gt;backup incremental level 0 database plus archivelog delete all input;backup current controlfile;&lt;br /&gt;backup spfile;&lt;br /&gt;release channel ch1;&lt;br /&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;-----------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;Daily Backup:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;-----------------&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#33ff33;"&gt;{&lt;br /&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;br /&gt;CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;&lt;br /&gt;allocate channel ch1 type disk format '/u02/db/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';&lt;br /&gt;backup incremental level 1 cumulative database plus archivelog delete all input;delete noprompt obsolete;&lt;br /&gt;delete noprompt archivelog all backed up 2 times to disk;&lt;br /&gt;backup current controlfile;&lt;br /&gt;backup spfile;&lt;br /&gt;release channel ch1;&lt;br /&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-6947083930245216355?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/6947083930245216355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=6947083930245216355' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6947083930245216355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6947083930245216355'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2008/09/scripts.html' title='Scripts..'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-3407109952144671120</id><published>2009-06-01T01:36:00.000-07:00</published><updated>2009-06-01T01:42:21.652-07:00</updated><title type='text'>Failover Steps</title><content type='html'>&lt;strong&gt;Failover:&lt;br /&gt;&lt;/strong&gt;A &lt;a name="sthref94"&gt;&lt;/a&gt;failover is when the primary database is unavailable. Failover is performed only in the event of a catastrophic failure of the primary database, and the failover results in a &lt;a name="sthref95"&gt;&lt;/a&gt;&lt;a name="sthref96"&gt;&lt;/a&gt;transition of a standby database to the primary role. The database administrator can configure Data Guard to e&lt;a name="sthref97"&gt;&lt;/a&gt;nsure &lt;a name="sthref98"&gt;&lt;/a&gt;no data loss.&lt;br /&gt;&lt;br /&gt;We performed a failover in our Disastor Recovery scenario. Where the primary database was taken offline (as unavialble), and standby database was acticated as Primary Database.&lt;br /&gt;&lt;br /&gt;The Standby database will now be activated as the new Primary database.&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/****@rockstd"&gt;sys/****@rockstd&lt;/a&gt; as sysdba&lt;br /&gt;SQL&gt; alter database recover managed standby database finish force;&lt;br /&gt;SQL&gt; alter database commit to switchover to primary;&lt;br /&gt;SQL&gt; alter database open;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-3407109952144671120?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/3407109952144671120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=3407109952144671120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/3407109952144671120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/3407109952144671120'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/06/failover-steps.html' title='Failover Steps'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-2652871533918770306</id><published>2009-05-29T00:24:00.000-07:00</published><updated>2009-05-29T00:34:40.354-07:00</updated><title type='text'>Switchover Steps</title><content type='html'>Once the standby database is setup using Data Guard and is configured properly, we should test switchover and failover scenarios to be better prepared for a real life disaster situation.&lt;br /&gt;&lt;br /&gt;A switchover allows the primary database to switch roles with its standby database. There is no data loss during a switchover. We can switch back to the original Primary database later by performing another switchover. A switchover is performed on a database when the need arises to upgrade or change configuration settings on the Primary database. The Standby database can temporarily be used as the Primary database for zero downtime while the actual Primary database is being upgraded or changed.&lt;br /&gt;&lt;br /&gt;Switchover Configuration:&lt;br /&gt;--------------------------&lt;br /&gt;Database Role---------Service-----&lt;br /&gt;Primary-------------ROCKPRIM&lt;br /&gt;Standby-------------ROCKSTD&lt;br /&gt;&lt;br /&gt;Before Switchover:&lt;br /&gt;--------------------------&lt;br /&gt;&lt;br /&gt;1. Verify the primary database instance is open and the standby database instance is mounted.&lt;br /&gt;2. Verify there are no active users connected to the databases, if there are active sessions then kill active sessions.&lt;br /&gt;3. Make sure the last redo data transmitted from the Primary database was applied on the standby database. Issue the following commands on Primary database and Standby database to find out:&lt;br /&gt;&lt;br /&gt;select sequence#, applied from v$archvied_log; or select max(sequence#)&lt;br /&gt;from v$archived_log where applied = ‘YES’;&lt;br /&gt;&lt;br /&gt;4. Make sure that log_archive_dest_2 entry is specified in both databases.&lt;br /&gt;&lt;br /&gt;Switchover Steps:&lt;br /&gt;------------------&lt;br /&gt;1. Initiate the switchover on the primary database ROCKPRIM:&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/****@ROCKPRIM"&gt;sys/****@ROCKPRIM&lt;/a&gt; as sysdba&lt;br /&gt;SQL&gt; alter database commit to switchover to physical standby with session shutdown;&lt;br /&gt;&lt;br /&gt;2. After step 1 finishes, Switch the original physical standby database ROCKSTD to primary role:&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/****@ROCKSTD"&gt;sys/****@ROCKSTD&lt;/a&gt; as sysdba&lt;br /&gt;SQL&gt; alter database commit to switchover to primary;&lt;br /&gt;&lt;br /&gt;SQL&gt; select database_role from v$database;&lt;br /&gt;&lt;br /&gt;DATABASE_ROLE&lt;br /&gt;----------------&lt;br /&gt;PRIMARY&lt;br /&gt;&lt;br /&gt;3. Immediately after issuing command in step 2. Shut down and restart the former primary instance ROCKPRIM:&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/****@ROCKPRIM"&gt;sys/****@ROCKPRIM&lt;/a&gt; as sysdba&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;SQL&gt; startup nomount;&lt;br /&gt;SQL&gt; alter database mount standby database;&lt;br /&gt;SQL&gt; alter database recover managed standby database disconnect from session;&lt;br /&gt;SQL&gt; select database_role from v$database;&lt;br /&gt;&lt;br /&gt; DATABASE_ROLE                                                                  &lt;br /&gt;------------------------------------------------                               &lt;br /&gt;PHYSICAL STANDBY&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;* Connect at new primary database ROCKSTD, and perform a SWITCH LOGFILE to start sending redo data to the standby database ROCK.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-2652871533918770306?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/2652871533918770306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=2652871533918770306' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2652871533918770306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2652871533918770306'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/05/switchover-steps.html' title='Switchover Steps'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-151406754273771534</id><published>2009-05-19T02:25:00.000-07:00</published><updated>2009-05-19T21:10:31.948-07:00</updated><title type='text'>TDE - Transparent Data Encryption</title><content type='html'>&lt;strong&gt;Encrypt sensitive data transparently without writing a single line of code. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;It's your organization's worst nightmare: Someone has stolen backup tapes of your database. Sure, you built a secure system, encrypted the most sensitive assets, and built a firewall around the database servers. But the thief took the easy approach: He took the backup tapes, ostensibly to restore your database on a different server, start the database on it, and then browse the data at his leisure. Protecting the database data from such theft is not just good practice; it's a requirement for compliance with most laws, regulations, and guidelines. How can you protect your database from this vulnerability?&lt;br /&gt;&lt;br /&gt;- Encrypt the sensitive data and store encryption key in a separate location called wallet.&lt;br /&gt;- Without the keys stolen data is worthless.&lt;br /&gt;- Define a column as encrypted.&lt;br /&gt;- When user insert the data, the database transparently encrypts it and stores in the column, similarly when users select the column the database automatically decrypts it.&lt;br /&gt;- Backups and archive logs are also in encrypted format.&lt;br /&gt;- If the data on the disk is stolen, it can't be retrieved without master key, which is in the wallet not part of the stolen data.&lt;br /&gt;- Even if the wallet is stolen, the master key can't be retrieved from it without the wallet password.&lt;br /&gt;&lt;br /&gt;How does it work :&lt;br /&gt;1. Specify wallet location in sqlnet.ora D:\oracle\product\10.2.0\admin\rock and place following lines:&lt;br /&gt;ENCRYPTION_WALLET_LOCATION =(SOURCE= (METHOD=file) (METHOD_DATA= (DIRECTORY=D:\oracle\product\10.2.0\admin\rock)))&lt;br /&gt;&lt;br /&gt;2. Create the wallet&lt;br /&gt;Now you must create the wallet and set the password to access it. To do this, issue the following as a SYS user with the ALTER SYSTEM privilege:&lt;br /&gt;SQL&gt; alter system set encryption key authenticated by "soni";&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;This command&lt;br /&gt;-Creates the wallet in the location specified in Step 1&lt;br /&gt;-Sets the password of the wallet as "soni"&lt;br /&gt;-Opens the wallet for TDE to store and retrieve the master key&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Restart the database&lt;br /&gt;&lt;br /&gt;Every time you open the database, you'll have to open the wallet using the same password as follows:&lt;br /&gt;SQL&gt; alter system set encryption wallet open authenticated by "soni";&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;You can close the wallet like this:&lt;br /&gt;alter system set encryption wallet close;&lt;br /&gt;&lt;br /&gt;The wallet must be open for TDE to work. If the wallet is closed, you can access all nonencrypted columns, but not encrypted columns.&lt;br /&gt;&lt;br /&gt;On a regular schema, suppose you have a table of account holders as follows:&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;create table accounts&lt;br /&gt;(&lt;br /&gt;ACC_NO NUMBER(2),&lt;br /&gt;ACC_NAME VARCHAR2(30),&lt;br /&gt;SSN VARCHAR2(9)&lt;br /&gt;)&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Currently, the table has all data in clear text. You want to convert the column SSN, which holds the Social Security Number, to be stored as encrypted. You can issue&lt;br /&gt;&lt;br /&gt;alter table accounts modify (ssn encrypt);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; desc accounts;&lt;br /&gt;&lt;br /&gt;Name Null? Type&lt;br /&gt;&lt;br /&gt;-------------------------- -------- ----------------------------&lt;br /&gt;ACC_NO NUMBER(2)&lt;br /&gt;ACC_NAME VARCHAR2(30)&lt;br /&gt;SSN VARCHAR2(9) ENCRYPT&lt;br /&gt;&lt;br /&gt;This statement does two things:&lt;br /&gt;-It creates an encryption key for the table. If you change another column in the same table to use the encrypted format, the same table key will be used.&lt;br /&gt;-It converts all values in the column to encrypted format.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Using Data Pump with TDE&lt;br /&gt;&lt;/strong&gt;By default, if you use the Data Pump export utility (EXPDP) to export data from a table with encrypted columns, the data in the resulting dump file will be in clear text, even the encrypted column data. The following command exports the ACCOUNTS table—with its encrypted columns—and returns a warning:&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/rock@rock"&gt;sys/rock@rock&lt;/a&gt; as sysdba&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; create or replace directory expdp as 'D:\expdp_dir';&lt;br /&gt;Directory created.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; grant read, write on directory expdp to hr;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;H:\&gt;expdp &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt; directory=expdp tables=accounts&lt;br /&gt;Export: Release 10.2.0.1.0 - Production on Wednesday, 20 May, 2009 9:27:23&lt;br /&gt;Copyright (c) 2003, 2005, Oracle. All rights reserved.&lt;br /&gt;Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;Starting "HR"."SYS_EXPORT_TABLE_01": &lt;a href="mailto:hr/********@rock"&gt;hr/********@rock&lt;/a&gt; directory=expdp tables=accountsEstimate in progress using BLOCKS method...&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TABLE_DATA&lt;br /&gt;Total estimation using BLOCKS method: 64 KB&lt;br /&gt;Processing object type TABLE_EXPORT/TABLE/TABLE. . exported "HR"."ACCOUNTS" 5.585 KB 1 rows&lt;br /&gt;ORA-39173: Encrypted data has been stored unencrypted in dump file set.&lt;br /&gt;Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded&lt;br /&gt;******************************************************************************&lt;br /&gt;Dump file set for HR.SYS_EXPORT_TABLE_01 is: D:\EXPDP_DIR\EXPDAT.DMP&lt;br /&gt;Job "HR"."SYS_EXPORT_TABLE_01" completed with 1 error(s) at 09:27:48&lt;br /&gt;H:\&gt;&lt;br /&gt;&lt;br /&gt;This is just a warning, not an error; the rows will still be exported.&lt;br /&gt;To protect your encrypted column data in the data pump dump files, you can password-protect your dump file when exporting the table. This password, specified as an ENCRYPTION_PASSWORD parameter in the EXPDP command, applies to this export process only; this is not the password of the wallet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; grant read, write on directory expdp to soni;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;H:\&gt;expdp &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt; directory=expdp encryption_password=soni tables=accounts&lt;br /&gt;&lt;br /&gt;H:\&gt;impdp &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt; directory=expdp encryption_password=soni tables=accounts&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-----------------------------------------------------------------------------------------------&lt;br /&gt;for more details check the link below :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/oramag/oracle/05-sep/o55security.html"&gt;http://www.oracle.com/technology/oramag/oracle/05-sep/o55security.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-151406754273771534?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/151406754273771534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=151406754273771534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/151406754273771534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/151406754273771534'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/05/tde-transparent-data-encryption.html' title='TDE - Transparent Data Encryption'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-3252611242839944004</id><published>2009-05-12T20:44:00.000-07:00</published><updated>2009-05-12T21:36:17.857-07:00</updated><title type='text'>AUTOTRACE and TKPROF</title><content type='html'>As we have seen the result of select count(*) from cat; with TKPROF utility &lt;a href="http://rakeshocp.blogspot.com/2009/05/tkprof.html"&gt;http://rakeshocp.blogspot.com/2009/05/tkprof.html&lt;/a&gt; now we will compare the result with autotrace.&lt;br /&gt;&lt;br /&gt;SQL&gt; show user&lt;br /&gt;USER is "HR"&lt;br /&gt;SQL&gt; set autotrace on&lt;br /&gt;SP2-0618: Cannot find the Session Identifier.  Check PLUSTRACE role is enabled&lt;br /&gt;SP2-0611: Error enabling STATISTICS report&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/rock@rock"&gt;sys/rock@rock&lt;/a&gt; as sysdba&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;SQL&gt; grant plustrace to hr;&lt;br /&gt;grant plustrace to hr&lt;br /&gt;      *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01919: role 'PLUSTRACE' does not exist&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/rock@rock"&gt;sys/rock@rock&lt;/a&gt; as sysdba&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; @D:\oracle\product\10.2.0\db_1\sqlplus\admin\plustrce.sql;&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; drop role plustrace;&lt;br /&gt;drop role plustrace         &lt;br /&gt;*&lt;br /&gt;ERROR at line 1:ORA-01919: role 'PLUSTRACE' does not exist&lt;br /&gt;&lt;br /&gt;SQL&gt; create role plustrace;&lt;br /&gt;Role created.&lt;br /&gt;SQL&gt;SQL&gt; grant select on v_$sesstat to plustrace;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt; grant select on v_$statname to plustrace;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt; grant select on v_$mystat to plustrace;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt; grant plustrace to dba with admin option;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; set echo off&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; grant plustrace to hr;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt; show userUSER is "SYS"&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt;&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; set autotrace on&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select count(*) from cat;&lt;br /&gt;  COUNT(*)&lt;br /&gt;----------&lt;br /&gt;        21&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;ERROR:&lt;br /&gt;ORA-01039: insufficient privileges on underlying objects of the view&lt;br /&gt;&lt;br /&gt;SP2-0612: Error generating AUTOTRACE EXPLAIN report&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;        333  recursive calls&lt;br /&gt;          0  db block gets&lt;br /&gt;       1060  consistent gets&lt;br /&gt;          7  physical reads&lt;br /&gt;          0  redo size&lt;br /&gt;        411  bytes sent via SQL*Net to client&lt;br /&gt;        381  bytes received via SQL*Net from client&lt;br /&gt;          2  SQL*Net roundtrips to/from client&lt;br /&gt;         15  sorts (memory)&lt;br /&gt;          0  sorts (disk)&lt;br /&gt;          1  rows processed&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.&lt;br /&gt;&lt;a href="http://www.dbspecialists.com/files/presentations/use_explain.html"&gt;http://www.dbspecialists.com/files/presentations/use_explain.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-3252611242839944004?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/3252611242839944004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=3252611242839944004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/3252611242839944004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/3252611242839944004'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/05/autotrace-and-tkprof.html' title='AUTOTRACE and TKPROF'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-6696287298285575423</id><published>2009-05-11T21:53:00.000-07:00</published><updated>2009-05-12T20:26:26.492-07:00</updated><title type='text'>TKPROF</title><content type='html'>TKPROF stands for Transient Kernel PROFiler.&lt;br /&gt;&lt;br /&gt;The TKPROF program converts Oracle trace files into a more readable form. If you have a problem query you can use TKPROF to get more information. To get the most out of the utility you must enable timed statistics by setting the init.ora parameter or performing the following command:&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER SYSTEM SET TIMED_STATISTICS = TRUE;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; @D:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxplan.sql;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE PUBLIC SYNONYM PLAN_TABLE FOR SYS.PLAN_TABLE;&lt;br /&gt;Synonym created.&lt;br /&gt;&lt;br /&gt;SQL&gt; GRANT SELECT, INSERT, UPDATE, DELETE ON SYS.PLAN_TABLE TO PUBLIC;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:hr/hr@rock"&gt;hr/hr@rock&lt;/a&gt;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER SESSION SET SQL_TRACE = TRUE;&lt;br /&gt;Session altered.&lt;br /&gt;SQL&gt; select count(*) from cat;&lt;br /&gt;COUNT(*)&lt;br /&gt;----------&lt;br /&gt;20&lt;br /&gt;&lt;br /&gt;SQL&gt; ALTER SESSION SET SQL_TRACE = FALSE;&lt;br /&gt;Session altered.&lt;br /&gt;&lt;br /&gt;A trace file will be created at D:\oracle\product\10.2.0\admin\rock\udump, the new trace file is rock_ora_4844.trc. This can then be interpreted using TKPROF at the commmand prompt as follows:&lt;br /&gt;&lt;br /&gt;H:\&gt;tkprof D:\oracle\product\10.2.0\admin\rock\udump\rock_ora_4844.trc D:\oracle\product\10.2.0\admin\rock\udump\hr.txt &lt;a href="mailto:explain=hr/hr@rock"&gt;explain=hr/hr@rock&lt;/a&gt; table=sys.plan_table&lt;br /&gt;&lt;br /&gt;The resulting output file contains the following type of information for all SQL statements processed, including the ALTER SESSION commands:&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;TKPROF: Release 10.2.0.1.0 - Production on Tue May 12 11:38:44 2009&lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved.&lt;br /&gt;Trace file: D:\oracle\product\10.2.0\admin\rock\udump\rock_ora_4844.trc&lt;br /&gt;Sort options: default&lt;br /&gt;********************************************************************************&lt;br /&gt;count = number of times OCI procedure was executed&lt;br /&gt;cpu = cpu time in seconds executing&lt;br /&gt;elapsed = elapsed time in seconds executing&lt;br /&gt;disk = number of physical reads of buffers from disk&lt;br /&gt;query = number of buffers gotten for consistent read&lt;br /&gt;current = number of buffers gotten in current mode (usually for update)&lt;br /&gt;rows = number of rows processed by the fetch or execute call&lt;br /&gt;********************************************************************************&lt;br /&gt;ALTER SESSION SET SQL_TRACE = TRUE&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- --------- ---------- ---------- ----------&lt;br /&gt;Parse----0------0.00----0.00-------0-------0---------0----------0-----&lt;br /&gt;Execute--1------0.00----0.00-------0-------0---------0----------0-----&lt;br /&gt;Fetch----0------0.00----0.00-------0-------0---------0----------0-----&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ---------&lt;br /&gt;total-----1-------0.00----0.00-------0------0----------0----------0-----&lt;br /&gt;&lt;br /&gt;Misses in library cache during parse: 0&lt;br /&gt;Misses in library cache during execute: 1&lt;br /&gt;Optimizer mode: ALL_ROWS&lt;br /&gt;Parsing user id: 169 (HR)&lt;br /&gt;********************************************************************************&lt;br /&gt;select text&lt;br /&gt;from view$&lt;br /&gt;where rowid=:1&lt;br /&gt;&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- --------- ---------- ---------- ---------&lt;br /&gt;Parse----1-----0.00----0.00------0-------0----------0---------0-----&lt;br /&gt;Execute--1-----0.00----0.00------0-------0----------0---------0-----&lt;br /&gt;Fetch----1-----0.00----0.00------ 0-------2----------0---------1-----&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- --------&lt;br /&gt;total-----3-----0.00----0.00-------0-------2----------0---------1-----&lt;br /&gt;&lt;br /&gt;Misses in library cache during parse: 1&lt;br /&gt;Misses in library cache during execute: 1&lt;br /&gt;Optimizer mode: CHOOSE&lt;br /&gt;Parsing user id: SYS (recursive depth: 1)&lt;br /&gt;&lt;br /&gt;Rows Row Source Operation&lt;br /&gt;------- ---------------------------------------------------&lt;br /&gt;1 TABLE ACCESS BY USER ROWID VIEW$ (cr=1 pr=0 pw=0 time=22 us)&lt;br /&gt;********************************************************************************&lt;br /&gt;select count(*)&lt;br /&gt;from cat&lt;br /&gt;&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;Parse-----1-----0.00---0.06------0--------0---------0---------0--------&lt;br /&gt;Execute--1------0.00---0.00------0--------0---------0---------0--------&lt;br /&gt;Fetch----2------0.00---0.01------0---------968------0----------1--------&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- -----------&lt;br /&gt;total-----4------0.00----0.07-----0---------968------0----------1--------&lt;br /&gt;Misses in library cache during parse: 1&lt;br /&gt;Optimizer mode: ALL_ROWS&lt;br /&gt;Parsing user id: 169 (HR)&lt;br /&gt;&lt;br /&gt;Rows Row Source Operation&lt;br /&gt;------- ---------------------------------------------------&lt;br /&gt;1 SORT AGGREGATE (cr=968 pr=0 pw=0 time=10364 us)&lt;br /&gt;20 FILTER (cr=968 pr=0 pw=0 time=10117 us)&lt;br /&gt;45 TABLE ACCESS FULL OBJ$ (cr=920 pr=0 pw=0 time=9744 us)&lt;br /&gt;0 TABLE ACCESS CLUSTER TAB$ (cr=48 pr=0 pw=0 time=266 us)&lt;br /&gt;16 INDEX UNIQUE SCAN I_OBJ# (cr=32 pr=0 pw=0 time=126 us)(object id 3)&lt;br /&gt;&lt;br /&gt;error during execute of EXPLAIN PLAN statement&lt;br /&gt;ORA-01039: insufficient privileges on underlying objects of the view&lt;br /&gt;parse error offset: 84&lt;br /&gt;********************************************************************************&lt;br /&gt;ALTER SESSION SET SQL_TRACE = FALSE&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;Parse-----1------0.00---0.00-----0--------0---------0----------0------&lt;br /&gt;Execute---1------0.00---0.00-----0--------0---------0----------0------&lt;br /&gt;Fetch-----0------0.00---0.00-----0--------0---------0----------0------&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;total------2-------0.00---0.00-----0-------0---------0----------0-------&lt;br /&gt;Misses in library cache during parse: 1&lt;br /&gt;Optimizer mode: ALL_ROWS&lt;br /&gt;Parsing user id: 169 (HR)&lt;br /&gt;&lt;br /&gt;********************************************************************************&lt;br /&gt;OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;Parse----2-------0.00---0.06-----0--------0----------0--------0-------&lt;br /&gt;Execute--3-------0.00---0.00-----0--------0----------0--------0-------&lt;br /&gt;Fetch-----2-------0.00---0.01-----0--------968-------0---------1------&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ---------- ----------&lt;br /&gt;total------7--------0.00---0.07----0--------968--------0--------1-------&lt;br /&gt;&lt;br /&gt;Misses in library cache during parse: 2&lt;br /&gt;Misses in library cache during execute: 1&lt;br /&gt;&lt;br /&gt;OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS&lt;br /&gt;call -----count---cpu---elapsed---disk-----query----current---- rows--&lt;br /&gt;------- ------ -------- ---------- -------- ---------- -------- ----------&lt;br /&gt;Parse----1------0.00----0.00-----0--------0---------0----------0----&lt;br /&gt;Execute--1----- 0.00----0.00-----0--------0---------0----------0----&lt;br /&gt;Fetch----1------0.00----0.00-----0--------2---------0----------1-----&lt;br /&gt;------- ------ -------- ---------- ---------- ---------- ------- ----------&lt;br /&gt;total-----3------0.00----0.00-----0--------2---------0----------1------&lt;br /&gt;&lt;br /&gt;Misses in library cache during parse: 1&lt;br /&gt;Misses in library cache during execute: 1&lt;br /&gt;3 user SQL statements in session.&lt;br /&gt;1 internal SQL statements in session.&lt;br /&gt;4 SQL statements in session.&lt;br /&gt;0 statements EXPLAINed in this session.&lt;br /&gt;********************************************************************************&lt;br /&gt;Trace file: D:\oracle\product\10.2.0\admin\rock\udump\rock_ora_4844.trc&lt;br /&gt;Trace file compatibility: 10.01.00&lt;br /&gt;Sort options: default&lt;br /&gt;&lt;br /&gt;1 session in tracefile.&lt;br /&gt;3 user SQL statements in trace file.&lt;br /&gt;1 internal SQL statements in trace file.&lt;br /&gt;4 SQL statements in trace file.&lt;br /&gt;4 unique SQL statements in trace file.&lt;br /&gt;56 lines in trace file.&lt;br /&gt;7 elapsed seconds in trace file.&lt;br /&gt;&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;&lt;a href="http://www.oracle-base.com/articles/8i/TKPROFAndOracleTrace.php"&gt;http://www.oracle-base.com/articles/8i/TKPROFAndOracleTrace.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-6696287298285575423?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/6696287298285575423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=6696287298285575423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6696287298285575423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6696287298285575423'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/05/tkprof.html' title='TKPROF'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-6396668555201633687</id><published>2009-05-11T01:56:00.000-07:00</published><updated>2009-05-11T09:24:48.721-07:00</updated><title type='text'>tuning SQL statement...AUTOTRACE</title><content type='html'>I am trying to use autotrace utility to check the execution plan of table, and later I will create index to check whether the performance is improved.&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:sys/rock@rock"&gt;sys/rock@rock&lt;/a&gt; as sysdba&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; create table test as select * from all_objects;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; exec dbms_stats.gather_table_stats(ownname =&gt; 'SYS',tabname=&gt;'TEST',force=&gt;true);&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; select count (*) from test;&lt;br /&gt;COUNT(*)&lt;br /&gt;----------&lt;br /&gt;49771&lt;br /&gt;&lt;br /&gt;SQL&gt; desc test&lt;br /&gt;Name&lt;br /&gt;------------------------------------------------------------------&lt;br /&gt;OWNER&lt;br /&gt;OBJECT_NAME&lt;br /&gt;SUBOBJECT_NAME&lt;br /&gt;OBJECT_ID&lt;br /&gt;DATA_OBJECT_ID&lt;br /&gt;OBJECT_TYPE&lt;br /&gt;CREATED&lt;br /&gt;LAST_DDL_TIME&lt;br /&gt;TIMESTAMP&lt;br /&gt;STATUS&lt;br /&gt;TEMPORARY&lt;br /&gt;GENERATED&lt;br /&gt;SECONDARY&lt;br /&gt;SQL&gt;&lt;br /&gt;SQL&gt; select count (distinct(data_object_id)) from test;&lt;br /&gt;COUNT(DISTINCT(DATA_OBJECT_ID))&lt;br /&gt;-------------------------------&lt;br /&gt;3504&lt;br /&gt;&lt;br /&gt;SQL&gt; autotrace on;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from test where data_object_id=151596;&lt;br /&gt;OWNER OBJECT_NAME OBJECT_ID&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;RMAN2 TF_P 151596&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 1357081020&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;Id Operation Name Rows Bytes Cost (%CPU) Time&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;0 SELECT STATEMENT 1 93 154 (2) 00:00:02&lt;br /&gt;* 1 TABLE ACCESS FULL TEST 1 93 154 (2) 00:00:02&lt;br /&gt;--------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;1 - filter("DATA_OBJECT_ID"=151596)&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;0 recursive calls&lt;br /&gt;0 db block gets&lt;br /&gt;689 consistent gets&lt;br /&gt;0 physical reads&lt;br /&gt;0 redo size&lt;br /&gt;1202 bytes sent via SQL*Net to client&lt;br /&gt;381 bytes received via SQL*Net from client&lt;br /&gt;2 SQL*Net roundtrips to/from client&lt;br /&gt;0 sorts (memory)&lt;br /&gt;0 sorts (disk)&lt;br /&gt;1 rows processed&lt;br /&gt;&lt;br /&gt;SQL&gt; create index test_data_idx on test(data_object_id)&lt;br /&gt;Index created.&lt;br /&gt;SQL&gt; select * from test where data_object_id=151596;&lt;br /&gt;OWNER OBJECT_NAME OBJECT_ID&lt;br /&gt;------------------------------ ------------------------------&lt;br /&gt;RMAN2 TF_P 151596&lt;br /&gt;&lt;br /&gt;Execution Plan&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;Plan hash value: 2271528063&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;br /&gt;Id Operation Name Rows Bytes Cost (%CPU) Time&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;br /&gt;0 SELECT STATEMENT 1 93 2 (0) 00:00:01&lt;br /&gt;1 TABLE ACCESS BY INDEX ROWID TEST 1 93 2 (0) 00:00:01&lt;br /&gt;* 2 INDEX RANGE SCAN TEST_DATA_IDX 1 1 (0) 00:00:01&lt;br /&gt;---------------------------------------------------------------------------------------------&lt;br /&gt;Predicate Information (identified by operation id):&lt;br /&gt;---------------------------------------------------&lt;br /&gt;2 - access("DATA_OBJECT_ID"=151596)&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;149 recursive calls&lt;br /&gt;0 db block gets&lt;br /&gt;28 consistent gets&lt;br /&gt;1 physical reads&lt;br /&gt;0 redo size&lt;br /&gt;1206 bytes sent via SQL*Net to client&lt;br /&gt;381 bytes received via SQL*Net from client&lt;br /&gt;2 SQL*Net roundtrips to/from client&lt;br /&gt;3 sorts (memory) 0 sorts (disk)&lt;br /&gt;1 rows processed&lt;br /&gt;&lt;br /&gt;Conclusion: By creating index the cost of CPU is improved from 154% to 2 %, because the row was accessed by INDEX ROWID.&lt;br /&gt;----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;Explain plan Vs AUTOTRACE&lt;br /&gt;&lt;a href="http://www.oracle-base.com/articles/8i/ExplainPlanUsage.php"&gt;http://www.oracle-base.com/articles/8i/ExplainPlanUsage.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-6396668555201633687?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/6396668555201633687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=6396668555201633687' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6396668555201633687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/6396668555201633687'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/05/tuning-sql-statementautotrace.html' title='tuning SQL statement...AUTOTRACE'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-294248753238556578</id><published>2009-04-10T05:30:00.000-07:00</published><updated>2009-05-05T00:49:21.537-07:00</updated><title type='text'>Oracle Tuning..</title><content type='html'>Oracle top down tuning tips&lt;br /&gt;&lt;a href="http://www.dba-oracle.com/art_tuning1.htm"&gt;http://www.dba-oracle.com/art_tuning1.htm&lt;/a&gt;&lt;br /&gt;Oracle Database Performance Tuning FAQs &lt;a href="http://www.orafaq.com/wiki/Oracle_database_Performance_Tuning_FAQ"&gt;http://www.orafaq.com/wiki/Oracle_database_Performance_Tuning_FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle Tuning Tips&lt;br /&gt;&lt;a href="http://it.toolbox.com/blogs/all-about-dev/oracle-tuning-tips-8151"&gt;http://it.toolbox.com/blogs/all-about-dev/oracle-tuning-tips-8151&lt;/a&gt;&lt;br /&gt;What's New in Oracle Performance? (10g)&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/whatsnew.htm"&gt;http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/whatsnew.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AWR - Automatic Workload Repository &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Learn to use the new feature that collects database performance statistics and metrics for analysis and tuning, shows the exact time spent in the database, and even saves session information When you have a database performance problem, what is the first thing you do to address it? One common approach is to see if a pattern exists: Answering questions such as "Is the same problem recurrent?", "Does it occur during a specific time period?", and "Is there a link between two problems?" will almost always lead to a better diagnosis.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As a DBA you probably have invested in a third-party or homegrown tool to collect elaborate statistics during database operation and derive performance metrics from them. In a crisis, you access those metrics for comparisons to the present. Replaying these past events can shed light on current problems, so continuously capturing relevant statistics becomes important for performance analysis. For some time, Oracle's solution in this area has been its built-in tool, Statspack. While it can prove invaluable in certain cases, it often lacks the robustness required by performance troubleshooting exercises. Oracle Database 10g offers a significant improvement: the Automatic Workload Repository (AWR). The AWR installs along with the database and captures not only statistics, but the derived metrics as well.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/10gdba/week6_10gdba.html"&gt;http://www.oracle.com/technology/pub/articles/10gdba/week6_10gdba.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Database General - Oracle Performance Tuning – Part 1&lt;br /&gt;&lt;a href="http://www.databasejournal.com/features/oracle/article.php/3548291/Oracle-Performance-Tuning--Part-1.htm"&gt;http://www.databasejournal.com/features/oracle/article.php/3548291/Oracle-Performance-Tuning--Part-1.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-294248753238556578?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/294248753238556578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=294248753238556578' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/294248753238556578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/294248753238556578'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/oracle-tuning.html' title='Oracle Tuning..'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-7186105626326111340</id><published>2009-04-28T00:41:00.000-07:00</published><updated>2009-04-28T01:26:40.384-07:00</updated><title type='text'>kill session -</title><content type='html'>Killing session - I want to kill all sessions of DB user abm_test.&lt;br /&gt;&lt;br /&gt;alter system kill session 'session-id,session-serial' immediate;&lt;br /&gt;This command kills a &lt;a href="http://www.adp-gmbh.ch/ora/concepts/session.html"&gt;session&lt;/a&gt;. The session-id and session-serial parameters are found in the &lt;a href="http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html#session"&gt;v$session&lt;/a&gt; view (columns sid and serial#).&lt;br /&gt;&lt;br /&gt;SQL&gt; show user&lt;br /&gt;USER is "SYS"&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from v$session&lt;br /&gt;where username = 'ABM_TEST';&lt;br /&gt;&lt;br /&gt;SQL&gt; select SID, SERIAL#, USERNAME, osuser, PROGRAM from v$session where username = 'ABM_TEST';&lt;br /&gt;&lt;br /&gt; SID    SERIAL# USERNAME                       OSUSER                         PROGRAM&lt;br /&gt;-------- --------- --------------------- --------------------------- -------------      &lt;br /&gt;184         54            ABM_TEST                       rakesh.kumar                   sqlplus.exe&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system kill session '184,54' immediate;&lt;br /&gt;System altered.&lt;br /&gt;SQL&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-7186105626326111340?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/7186105626326111340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=7186105626326111340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7186105626326111340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/7186105626326111340'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/kill-session.html' title='kill session -'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-1418217845564680530</id><published>2009-04-26T23:28:00.000-07:00</published><updated>2009-04-26T23:43:35.066-07:00</updated><title type='text'>Auto start of cmd file after Machine Reboot</title><content type='html'>Yesterday, Systems department has restarted the machine after their activity, Databases restarted automatically but there are some other batch files &amp;amp; Authentication servers exe file which needs to be run for ERP connectivity. So I have configured for auto execution of batch files whenever the Machine is restarted, check the below steps.&lt;br /&gt;&lt;br /&gt;run &gt;&lt;br /&gt;regedit&lt;br /&gt;HKEY_LOCAL_MACHINE&gt;&lt;br /&gt;            SOFTWARE&gt;&lt;br /&gt;             MICROSOFT&gt;&lt;br /&gt;                WINDOWS&gt;&lt;br /&gt;                 CURRENVERSION&gt;&lt;br /&gt;                       RUN&gt; Then right click new&gt;&lt;br /&gt;                                       string value &gt;&lt;br /&gt;assigned a name to file,&lt;br /&gt;specified complete path of cmd file in double quotes.&lt;br /&gt;&lt;br /&gt;DONE&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-1418217845564680530?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/1418217845564680530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=1418217845564680530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1418217845564680530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1418217845564680530'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/auto-start-of-cmd-file-after-machine.html' title='Auto start of cmd file after Machine Reboot'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-4491257829327145457</id><published>2009-04-23T03:01:00.001-07:00</published><updated>2009-04-23T03:13:05.073-07:00</updated><title type='text'>RMAN - Recovery Catalog</title><content type='html'>I am trying to configure RMAN Catalog..&lt;br /&gt;target db in linux  = db name rock, db id 3304705878&lt;br /&gt;recovery cat in xp  = db name rock  db id 3255117147 (rocklinux in tns entry for accessing Linux Dabaase)&lt;br /&gt;Enter user-name: &lt;a href="mailto:sys@rock"&gt;sys@rock&lt;/a&gt; as sysdba&lt;br /&gt;Enter password:&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;1. sql&gt; create tablespace rman_ts&lt;br /&gt;datafile 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\rman_01.dbf' size 20m&lt;br /&gt;autoextend on&lt;br /&gt;&lt;br /&gt;2. create user rman1&lt;br /&gt;identified by rman1&lt;br /&gt;quota unlimited on rman_tsd&lt;br /&gt;efault tablespace rman_ts;&lt;br /&gt;&lt;br /&gt;3.SQL&gt; grant recovery_catalog_owner to rman1;&lt;br /&gt;Grant succeeded.&lt;br /&gt;SQL&gt; grant connect, resource to rman1;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;H:\&gt;rman catalog &lt;a href="mailto:rman1/rman1@rock"&gt;rman1/rman1@rock&lt;/a&gt; log=D:\catalog.log&lt;br /&gt;RMAN&gt; create catalog tablespace rman_ts;&lt;br /&gt;RMAN&gt; exit&lt;br /&gt;&lt;br /&gt;H:\&gt;rman target &lt;a href="mailto:sys/rock@rocklinux"&gt;sys/rock@rocklinux&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Recovery Manager: Release 10.2.0.1.0 - Production on Wed Apr 22 12:49:23 2009&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;connected to target database: ROCK (DBID=3304705878)&lt;br /&gt;&lt;br /&gt;RMAN&gt; connect catalog &lt;a href="mailto:rman1/rman1@rock"&gt;rman1/rman1@rock&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;connected to recovery catalog database&lt;br /&gt;&lt;br /&gt;RMAN&gt; register database;&lt;br /&gt;&lt;br /&gt;database registered in recovery catalog&lt;br /&gt;starting full resync of recovery catalog&lt;br /&gt;full resync complete&lt;br /&gt;&lt;br /&gt;SQL&gt; conn &lt;a href="mailto:rman1/rman1@rock"&gt;rman1/rman1@rock&lt;/a&gt;&lt;br /&gt;Connected.&lt;br /&gt;SQL&gt; select * from rc_database;&lt;br /&gt;&lt;br /&gt;    DB_KEY    DBINC_KEY    DBID                 NAME     RESETLOGS_CHANGE# RESETLOGS&lt;br /&gt;----------      ----------         ----------          -------- -----------------                  ---------        &lt;br /&gt;           1             2                        3304705878   ROCK                516893                       20-APR-09&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-4491257829327145457?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/4491257829327145457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=4491257829327145457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/4491257829327145457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/4491257829327145457'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/rman-recovery-catalog.html' title='RMAN - Recovery Catalog'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-5195566716129547855</id><published>2009-04-07T01:59:00.000-07:00</published><updated>2009-04-07T04:08:50.264-07:00</updated><title type='text'>Oracle 10.2 - (RMAN + SYS user Audit_Trail = XML, Extended) bug</title><content type='html'>After enabling auditing for sys users, as discussed in my below post.&lt;br /&gt;&lt;a href="http://rakeshocp.blogspot.com/2008/12/auditing-sys-user-in-10g.html"&gt;http://rakeshocp.blogspot.com/2008/12/auditing-sys-user-in-10g.html&lt;/a&gt;&lt;br /&gt;When we are trying to connect database with RMAN utility, it fails and gives below error.&lt;br /&gt;&lt;br /&gt;H:\&gt;rman&lt;br /&gt;Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 7 14:59:17 2009&lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved.&lt;br /&gt;&lt;br /&gt;RMAN&gt; connect target &lt;a href="mailto:sys/rock@rock"&gt;sys/rock@rock&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RMAN-00571: =======================================================&lt;br /&gt;RMAN-00569: ============= ERROR MESSAGE STACK FOLLOWS ==============&lt;br /&gt;RMAN-00571: =======================================================&lt;br /&gt;ORA-09817: Write to audit file failed.&lt;br /&gt;RMAN&gt;&lt;br /&gt;&lt;br /&gt;I got to know its bug in Oracle 10g Release 10.2.0.1.0. Check my post at oracle forums .&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/message.jspa?messageID=3282187#3282187"&gt;http://forums.oracle.com/forums/message.jspa?messageID=3282187#3282187&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-5195566716129547855?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/5195566716129547855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=5195566716129547855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5195566716129547855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5195566716129547855'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/oracle-102-rman-sys-user-audittrail-xml.html' title='Oracle 10.2 - (RMAN + SYS user Audit_Trail = XML, Extended) bug'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-5754629698439934646</id><published>2009-04-02T23:28:00.000-07:00</published><updated>2009-04-03T01:39:17.726-07:00</updated><title type='text'>Undo tablespace issue....</title><content type='html'>There were some issues in HARD Diskk of Test Machine, and systems department wanted to format/replace the hard disk (F Drive, where Oracle is installed). So I closed the test database, and later systems departmentd copied all folders, including Oracle folder, where all datafiles, control files, redo logs are stored. They restored all folders after completing their activity.&lt;br /&gt;&lt;br /&gt;After that the systems department wanted the Database team to verify whether the Oracle is working properly or not. When we started Oracle services, and Oracle Database, it was automatically shuting down the instance, after checking the alert.log file we got below error:&lt;br /&gt;&lt;br /&gt;DEBUG: Replaying xcb 0x4e7d126c, pmd 0x4deeb4b8 for failed op 8&lt;br /&gt;Errors in file f:\oracle\product\10.2.0\admin\icpora\udump\icpora_ora_4192.trc:&lt;br /&gt;ORA-00600: internal error code, arguments: [4194], [49], [44], [], [], [], [], []&lt;br /&gt;ORA-00600: internal error code, arguments: [4194], [49], [44], [], [], [], [], []&lt;br /&gt;&lt;br /&gt;Metalink says:&lt;br /&gt;&lt;br /&gt;A mismatch has been detected between Redo records and rollback (Undo) records.&lt;br /&gt;&lt;br /&gt;We are validating the Undo record number relating to the change being applied againstthe maximum undo record number recorded in the undo block.This error is reported when the validation fails.&lt;br /&gt;&lt;br /&gt;ARGUMENTS:&lt;br /&gt;&lt;br /&gt;Arg [a] Maximum Undo record number in Undo block&lt;br /&gt;Arg [b] Undo record number from Redo block&lt;br /&gt;&lt;br /&gt;IMPACT:PROCESS FAILUREPOSSIBLE ROLLBACK SEGMENT CORRUPTION&lt;br /&gt;&lt;br /&gt;SUGGESTIONS:This error may indicate a rollback segment corruption.This may require a recovery from a database backup depending on the situation.&lt;br /&gt;&lt;br /&gt;We deleted untobs01.dbf and created undotbs2 tablespace undotbs02.dbf&lt;br /&gt;&lt;br /&gt;1. alter database datafile '/home/u01/app/oracle/oradata/orcl/undotbs01.dbf' offline drop;&lt;br /&gt;2. create undo tablespace undotbs2 datafile '/home/u01/app/oracle/oradata/orcl/undotbs02.dbf' size 1024m;&lt;br /&gt;3. ALTER SYSTEM SET undo_tablespace='UNDOTBS2'&lt;br /&gt;&lt;br /&gt;The system started working properly, the Full Database export batch file runs in nights, when we checked the log of export file it indicated below error:&lt;br /&gt;&lt;br /&gt;EXP-00008: ORACLE error 376 encountered&lt;br /&gt;ORA-00376: file 2 cannot be read at this time&lt;br /&gt;ORA-01110: data file 2: 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ICPORA\UNDOTBS01.DBF'&lt;br /&gt;EXP-00000: Export terminated unsuccessfully&lt;br /&gt;&lt;br /&gt;when we checked the v$recover_file, data file 2 is not found for recovery. so when we issued the drop tablespace undotbs1 command, we got error&lt;br /&gt;&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01548: active rollback segment ‘_SYSSMU01$’ found, terminate dropping tablespace&lt;br /&gt;&lt;br /&gt;select segment_name,status,tablespace_name from dba_rollback_segs where status='NEEDS RECOVERY';&lt;br /&gt;&lt;br /&gt;SEGMENT_NAME STATUS TABLESPACE_NAME&lt;br /&gt;—————————— —————- —————–&lt;br /&gt;_SYSSMU01$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU02$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU03$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU04$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU05$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU06$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU07$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;_SYSSMU08$ NEEDS RECOVERY UNDOTBS1&lt;br /&gt;&lt;br /&gt;We closed the, database edited init.ora file and added parameters (comment undo_management=auto and entry for corrupted_rollback_segments&lt;br /&gt;#undo_management=AUTO&lt;br /&gt;undo_tablespace=UNDOTBS2&lt;br /&gt;_corrupted_rollback_segments =('_SYSSMU01$','_SYSSMU02$','_SYSSMU03$','_SYSSMU04$','_SYSSMU05$','_SYSSMU06$','_SYSSMU07$','_SYSSMU08$'&lt;br /&gt;&lt;br /&gt;1. STARTUP RESTRICT MOUNT pfile=C:\Oracle\init.ora&lt;br /&gt;2. Drop rollback segment "_SYSSMU01$"&lt;br /&gt;3. Droped all segments one by one that we entered in initfile. (step 2 drop command)&lt;br /&gt;4. drop TABLESPACE UNDOTBS1;&lt;br /&gt;5. shutdown&lt;br /&gt;6. deleted entry of _corrupted_rollback_segments and removed comment from undo_management&lt;br /&gt;7. STARTUP MOUNT pfile=C:\Oracle\init.ora8 and later opened the database.&lt;br /&gt;8. Taken Full database export, it was successfully exported.&lt;br /&gt;&lt;br /&gt;Speciall thanks to the writer/owner of below page, It helped me alot.&lt;br /&gt;&lt;a href="http://www.my-whiteboard.com/oracle-dba/how-to-drop-and-recreate-oracle-undo-tablespace-and-its-data-files.html"&gt;http://www.my-whiteboard.com/oracle-dba/how-to-drop-and-recreate-oracle-undo-tablespace-and-its-data-files.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-5754629698439934646?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/5754629698439934646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=5754629698439934646' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5754629698439934646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/5754629698439934646'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/04/undo-tablespace-issue.html' title='Undo tablespace issue....'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-1404029722358212562</id><published>2007-11-07T21:34:00.000-08:00</published><updated>2009-03-16T23:46:41.551-07:00</updated><title type='text'>Scenarios (My topics at Oracle Forums)</title><content type='html'>My database in ArchiveLog Mode and I created a table TEST, Later I made the whole database backup (RMAN Full DB backup). After that, I deleted the table TEST, and restored from full database backup. Surprisingly, there wasn't table TEST. Why?&lt;br /&gt;&lt;br /&gt;Read at oracle forums, and how experts helped me in recovering TEST table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=581258&amp;amp;start=0&amp;amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=581258&amp;amp;start=0&amp;amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;-----------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Recovering dropped table from Backup. (User Managed Backup &amp;amp; Recovery)&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=584733&amp;amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=584733&amp;amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Lost all Online Redo Log Files.&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.oracle.com/forums/message.jspa?messageID=3134695#3134695"&gt;http://forums.oracle.com/forums/message.jspa?messageID=3134695#3134695&lt;/a&gt;&lt;/p&gt;&lt;p&gt;---------------------------------------------&lt;br /&gt;Loss of one data file and all controlfile&lt;br /&gt;So If datafile and all controlfiles are lost, then we can recover the controlfile and database though we can not recover the lost datafile. ( HOT BACKUP Scenario)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=872397&amp;amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=872397&amp;amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(To be Continued)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-1404029722358212562?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/1404029722358212562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=1404029722358212562' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1404029722358212562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/1404029722358212562'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2007/11/scenarios-my-topics-at-oracle-forums.html' title='Scenarios (My topics at Oracle Forums)'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-2602844194345643475</id><published>2009-02-18T03:58:00.000-08:00</published><updated>2009-03-15T21:50:04.247-07:00</updated><title type='text'>creating new database from old database cold backup.</title><content type='html'>I am writing below steps that will create a new database ICPORA that will be a complete replica of old database ICPORA.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Scenario: I have new database ROCK and old database ICPORA, I have cold backup of ICPORA, and Now I want recreate ICPORA at ROCK database. I have taken backup of both database.&lt;/p&gt;&lt;p&gt;1. Copy all datafiles, controlfiles, redologs, archivelogs, init files from ICPORA to new database ROCK (oradata). Delete all files from ROCK database after backup and paste ICPORA files.&lt;/p&gt;2. Check init.ora file and modify/specify the correct paths for ArchiveLog, Controlfiles and other files.&lt;br /&gt;&lt;br /&gt;3. If you have new database with the old DB name then go to step 5 otherwise step 4. In my situation I have new database with name ROCK, so I need ICPORA service/instance to operate, for that I need to create new service ICPORA.&lt;br /&gt;&lt;br /&gt;4. create new service with old database name with ORADIM utility.&lt;br /&gt;&lt;br /&gt;H:\&gt;oradim -new -sid icpora -intpwd icpora -startmode m -pfile 'D:\oracle\product\10.2.0\oradata\icpora\INITicpora.ORA'&lt;br /&gt;&lt;br /&gt;Instance created.&lt;br /&gt;&lt;br /&gt;5.&lt;br /&gt;H:\&gt;set oracle_sid=icpora&lt;br /&gt;&lt;br /&gt;H:\&gt;sqlplus&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 18 15:19:02 2009&lt;br /&gt;Copyright (c) 1982&lt;br /&gt;&lt;br /&gt;Enter user-name: sys as sysdba&lt;br /&gt;&lt;br /&gt;Enter password:&lt;br /&gt;&lt;br /&gt;Connected to an idle instance.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup nomount pfile='D:\oracle\product\10.2.0\oradata\icpora\INITicpora.ORA';&lt;br /&gt;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 1073741824 bytes&lt;br /&gt;Fixed Size 1253124 bytes&lt;br /&gt;Variable Size 486539516 bytes&lt;br /&gt;Database Buffers 578813952 bytes&lt;br /&gt;Redo Buffers 7135232 bytes&lt;br /&gt;&lt;br /&gt;SQL&gt; startup mount pfile='D:\oracle\product\10.2.0\oradata\icpora\INITicpora.ORA';&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 1073741824 bytes&lt;br /&gt;Fixed Size 1253124 bytes&lt;br /&gt;Variable Size 486539516 bytes&lt;br /&gt;Database Buffers 578813952 bytes&lt;br /&gt;Redo Buffers 7135232 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database open;&lt;br /&gt;alter database open&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01157: cannot identify/lock data file 1 - see DBWR trace file&lt;br /&gt;ORA-01110: data file 1: 'E:\DATAFILES\SYSTEM01.DBF'&lt;br /&gt;&lt;br /&gt;Note: The above error is encountered because the contents/information stored in the control file is different from the current situation. (i.e paths of files). We need to recreate the controlfile, the below command will generate a script for recreating a controlfile in udump folder.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database backup controlfile to trace;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;6. Copy the important contents of script generated in udump folder and modify with new paths and execute it. Note execute in NOMOUNT Mode.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;ORA-01109: database not open&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup nomount pfile='D:\oracle\product\10.2.0\oradata\icpora\INITicpora.ORA';&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 1073741824 bytes&lt;br /&gt;Fixed Size 1253124 bytes&lt;br /&gt;Variable Size 486539516 bytes&lt;br /&gt;Database Buffers 578813952 bytes&lt;br /&gt;Redo Buffers 7135232 bytes&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE CONTROLFILE REUSE DATABASE "ICPORA" NORESETLOGS ARCHIVELOG&lt;br /&gt;2 MAXLOGFILES 16&lt;br /&gt;3 MAXLOGMEMBERS 3&lt;br /&gt;4 MAXDATAFILES 100&lt;br /&gt;5 MAXINSTANCES 8&lt;br /&gt;6 MAXLOGHISTORY 18688&lt;br /&gt;7 LOGFILE&lt;br /&gt;8 GROUP 1 'D:\oracle\product\10.2.0\oradata\icpora\REDO01.LOG' SIZE 100M,&lt;br /&gt;9 GROUP 2 'D:\oracle\product\10.2.0\oradata\icpora\REDO02.LOG' SIZE 100M,&lt;br /&gt;10 GROUP 3 'D:\oracle\product\10.2.0\oradata\icpora\REDO03.LOG' SIZE 100M&lt;br /&gt;11 -- STANDBY LOGFILE&lt;br /&gt;12 DATAFILE&lt;br /&gt;13 'D:\oracle\product\10.2.0\oradata\icpora\SYSTEM01.DBF',&lt;br /&gt;14 'D:\oracle\product\10.2.0\oradata\icpora\SYSTEM02.DBF',&lt;br /&gt;15 'D:\oracle\product\10.2.0\oradata\icpora\SYSAUX01.DBF',&lt;br /&gt;16 'D:\oracle\product\10.2.0\oradata\icpora\ABAMCO01.DBF',&lt;br /&gt;17 'D:\oracle\product\10.2.0\oradata\icpora\ABAMCO02.DBF',&lt;br /&gt;18 'D:\oracle\product\10.2.0\oradata\icpora\EDP01.DBF',&lt;br /&gt;19 'D:\oracle\product\10.2.0\oradata\icpora\UNDOTBS2.DBF',&lt;br /&gt;20 'D:\oracle\product\10.2.0\oradata\icpora\USERS01.DBF',&lt;br /&gt;21 'D:\oracle\product\10.2.0\oradata\icpora\AXIS_ALERT01.DBF',&lt;br /&gt;22 'D:\oracle\product\10.2.0\oradata\icpora\RISKMETER01.DBF'&lt;br /&gt;23 CHARACTER SET WE8MSWIN1252&lt;br /&gt;24 ;&lt;br /&gt;&lt;br /&gt;Control file created.&lt;br /&gt;&lt;br /&gt;SQL&gt; RECOVER DATABASE&lt;br /&gt;Media recovery complete.&lt;br /&gt;SQL&gt; -- All logs need archiving and a log switch is needed.&lt;br /&gt;SQL&gt; ALTER SYSTEM ARCHIVE LOG ALL;&lt;br /&gt;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database open;&lt;br /&gt;Database altered.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-2602844194345643475?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/2602844194345643475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=2602844194345643475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2602844194345643475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2602844194345643475'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2009/02/creating-new-database-from-old-database.html' title='creating new database from old database cold backup.'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-2484452915526170229</id><published>2007-12-04T22:50:00.000-08:00</published><updated>2009-03-15T00:36:36.002-07:00</updated><title type='text'>Creating Stand By Database (Steps)</title><content type='html'>&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;I have created standby database with following steps:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will also find Primary Database initfile and Standby Database initfile at the bottom of the page&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;PRIMARY DATABASE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;1. Change initrock.ora file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;*.log_archive_dest_1='LOCATION=D:\oracle\Archive_rock'&lt;br /&gt;*.log_archive_dest_state_1=ENABLE&lt;br /&gt;*.log_archive_dest_2='SERVICE=ROCKSTD LGWR ASYNC'&lt;br /&gt;*.log_archive_dest_state_2=ENABLE&lt;br /&gt;*.fal_server='ROCKSTD'&lt;br /&gt;*.fal_client='ROCK'&lt;br /&gt;*.db_unique_name='rock'&lt;br /&gt;&lt;br /&gt;2. Shutdown immediate;&lt;br /&gt;2.1. Startup mount;&lt;br /&gt;3. alter database create standby controlfile as 'd:\rockstd_control.ctl';&lt;br /&gt;4. alter database open;&lt;br /&gt;&lt;br /&gt;5.0 Shutdown immediate;&lt;br /&gt;5.1 Startup Nomount;&lt;br /&gt;5.2 Create Spfile from Pfile;&lt;br /&gt;5.3 D:\oracle\product\10.2.0\db_1\database\SPFILEROCK.ORA, changes are recorded in current spfile and copy pfile from (D:\oracle\product\10.2.0\db_1\database) to standby database.&lt;br /&gt;&lt;br /&gt;6. add at TNSNAMES.ora file&lt;br /&gt;&lt;br /&gt;Rockstd is service name, which will be created at Standby database.&lt;br /&gt;ABM-D0011.abamco.com is the hostname where standby database will be created.&lt;br /&gt;&lt;br /&gt;rockstd =&lt;br /&gt;(DESCRIPTION =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = ABM-D0011.abamco.com)(PORT = 1521))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVER = DEDICATED)&lt;br /&gt;(SERVICE_NAME = rockstd)&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;Copied all datafiles, archivelogFiles, redologFiles, ControlFile, Initfile to STAND BY Database...&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;-----------------------------------------------------------------------------------&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;STAND BY DATABASE&lt;br /&gt;--------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Added at TNSNAMES.ORA&lt;br /&gt;Rock is the service name of Primary Database.&lt;br /&gt;HOST = 10.142.192.28 is the IP address of Primary Database.&lt;br /&gt;&lt;br /&gt;rock =&lt;br /&gt;(DESCRIPTION =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = 10.142.192.28)(PORT = 1521))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVER = DEDICATED)&lt;br /&gt;(SERVICE_NAME = rock)&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;2. copied datafiles, redologs and rockstd_control at rock (new folder in OraData)&lt;br /&gt;&lt;br /&gt;3. copy &amp;amp; paste initrock at D:\oracle\product\10.2.0\db_1\database and rename it to initrockstd.ora&lt;br /&gt;&lt;br /&gt;4. check initrockstd file parameters and create folder (rock) and subfolders( adump, bdump, cdump, udump) in D:\oracle\product\10.2.0\admin&lt;br /&gt;&lt;br /&gt;5. create folder (flash_recovery_area) at D:\oracle\product\10.2.0\rock\flash_recovery_area. the path is defined in parameter db_recovery_file_dest in initrockstd file.&lt;br /&gt;&lt;br /&gt;6. intit file&lt;br /&gt;*.fal_server='ROCK'&lt;br /&gt;*.fal_client='ROCKSTD'&lt;br /&gt;*.db_unique_name='rockstd'&lt;br /&gt;*.standby_file_management=AUTO&lt;br /&gt;&lt;br /&gt;7. Place the initrockstd file in oracle_home database folder.&lt;br /&gt;&lt;br /&gt;8. REMOVE LOG_ARCHIVE_DEST_2 PARAMETER.&lt;br /&gt;&lt;br /&gt;9. CHANGE LOG_ARCHIVE_DEST_1 PARAMETER and specify path for archived log file destination, copy all archives and paste at specified destination. MoreOver datafiles, redologs and control file must be in same specified path in Standby database as it has been specified at Primary Database.&lt;br /&gt;&lt;br /&gt;10. create service rockstd using ORADIM Utility.&lt;br /&gt;&lt;br /&gt;H:\&gt;oradim -new -sid rockstd -syspwd rock -startmode m -pfile D:\oracle\product\10.2.0\db_1\database\initrockstd.ora&lt;br /&gt;password should be same as primary sys password.&lt;br /&gt;&lt;br /&gt;11. H:\&gt;sqlplus&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 3 12:34:46 2007&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle. All rights reserved.&lt;br /&gt;&lt;br /&gt;Enter user-name: sys@rockstd as sysdba&lt;br /&gt;Enter password:&lt;br /&gt;Connected to an idle instance.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup nomount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 167772160 bytes&lt;br /&gt;Fixed Size 1247876 bytes&lt;br /&gt;Variable Size 62915964 bytes&lt;br /&gt;Database Buffers 96468992 bytes&lt;br /&gt;Redo Buffers 7139328 bytes&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database mount standby database;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;12. Add additional Standby Redo logs&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database add standby logfile 'D:\oracle\product\10.2.0\oradata\rock\REDO04.log' size 50m;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database add standby logfile 'D:\oracle\product\10.2.0\oradata\rock\REDO05.log' size 50m;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database add standby logfile 'D:\oracle\product\10.2.0\oradata\rock\REDO06.log' size 50m;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;13. Start Recovery&lt;br /&gt;alter database recover managed standby database disconnect from session;&lt;br /&gt;&lt;br /&gt;14. Name and applied status of Archived.&lt;br /&gt;select name, applied from v$archived_log;&lt;br /&gt;&lt;br /&gt;15.&lt;br /&gt;SQL&gt; select process, status from v$managed_standby;&lt;br /&gt;&lt;br /&gt;PROCESS STATUS&lt;br /&gt;--------- ------------&lt;br /&gt;ARCH CONNECTED&lt;br /&gt;ARCH CONNECTED&lt;br /&gt;RFS IDLE&lt;br /&gt;MRP0 WAIT_FOR_LOG&lt;br /&gt;&lt;br /&gt;ARCH.... receives archives from primary db. (Maximum 30 can be enabled.)&lt;br /&gt;RFS....... applies received archives to standby db.&lt;br /&gt;MRP0....resolves gaps of archived b/w fal_server &amp;amp; fal_client.&lt;br /&gt;&lt;br /&gt;16. check alert_rockstd at D:\oracle\product\10.2.0\admin\rock\bdump for alerts.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;------------------------------------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Adding datafile or creating tablespace at Primary Database. &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;If you have not set the STANDBY_FILE_MANAGEMENT initialization parameter to auto, you must re-create the control file on the standby database.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96653/sbydb_manage_ps.htm"&gt;http://download-uk.oracle.com/docs/cd/A97630_01/server.920/a96653/sbydb_manage_ps.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have created another tablespace or added datafile to an existing tablespace at Primary Database and didn't set the STANDBY_FILE_MANAGEMENT initialization parameter to auto Then Archived at Standby database will not apply, and obviously there will be a gap between Primary &amp;amp; StandBy database archivelogs.&lt;br /&gt;I have added tablespace testing1 and added datafile testing1.dbf at Primary database. (Shown below at Primary Database Section)&lt;br /&gt;&lt;br /&gt;When you query the select name from v$datafile, you will find unnamed00004 filename instead of testing1.dbf.&lt;br /&gt;&lt;br /&gt;SQL&gt; select name from v$datafile;&lt;br /&gt;&lt;br /&gt;NAME&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM01.DBF&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\UNDOTBS01.DBF&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSAUX01.DBF&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00004&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\SYSTEM03.DBF&lt;br /&gt;D:\ORACLE\PRODUCT\10.2.0\ORADATA\ROCK\ABAMCO_TEST01.DBF&lt;br /&gt;&lt;br /&gt;6 rows selected.&lt;br /&gt;We learn that datafiles are not copid at standby database, for that one need to manually copy the datafiles.&lt;br /&gt;&lt;br /&gt;Following steps must be followed after adding tablespace/datafile at Primary Database.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;----------------------------------------------------------------------------------------&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;PRIMARY Database.&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;1. You need to manually copy datafile &amp;amp; recreate controlfile, Copy and paste both files at Standby Database.&lt;br /&gt;&lt;br /&gt;SQL&gt; create tablespace testing1&lt;br /&gt;2 datafile 'D:\oracle\product\10.2.0\oradata\rock\testing1.dbf' size 50m;&lt;br /&gt;&lt;br /&gt;Tablespace created.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter tablespace testing1 begin backup;&lt;br /&gt;&lt;br /&gt;Tablespace altered.&lt;br /&gt;&lt;br /&gt;Copy the testing1.dbf datafile at any location.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter tablespace testing1 end backup;&lt;br /&gt;&lt;br /&gt;Tablespace altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database create standby controlfile as 'd:\rockstd_control.ctl';&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;----------------------------------&lt;br /&gt;Standby Database&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; alter database recover managed standby database cancel;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;ORA-01109: database not open&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;1. Copy and paste controlfile &amp;amp; datafile at D:\oracle\product\10.2.0\oradata\rock&lt;br /&gt;2.&lt;br /&gt;SQL&gt; startup nomount;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area 167772160 bytes&lt;br /&gt;Fixed Size 1247876 bytes&lt;br /&gt;Variable Size 62915964 bytes&lt;br /&gt;Database Buffers 96468992 bytes&lt;br /&gt;Redo Buffers 7139328 bytes&lt;br /&gt;&lt;br /&gt;3.&lt;br /&gt;SQL&gt; alter database mount standby database;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;4.&lt;br /&gt;SQL&gt; alter database recover managed standby database disconnect from session;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;------------------------------------------------------&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Primary Database initrock.ora (Initfile)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;-------------------------------------------&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;rock.__db_cache_size=83886080&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__java_pool_size=4194304&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__large_pool_size=4194304&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__shared_pool_size=67108864&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__streams_pool_size=0&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.audit_file_dest='D:\oracle\product\10.2.0/admin/rock/adump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.background_dump_dest='D:\oracle\product\10.2.0/admin/rock/bdump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.compatible='10.2.0.1.0'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.control_files='D:\oracle\product\10.2.0oradata\rock\control01.ctl',&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;'D:\oracle\product\10.2.0\oradata\rock\control02.ctl',&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;'D:\oracle\product\10.2.0\oradata\rock\control03.ctl'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.core_dump_dest='D:\oracle\product\10.2.0/admin/rock/cdump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_block_size=8192&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_domain=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_file_multiblock_read_count=16&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_name='rock'&lt;/span&gt;&lt;br /&gt;*.db_unique_name='rock'&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_recovery_file_dest='D:\oracle\product\10.2.0/flash_recovery_area'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_recovery_file_dest_size=2147483648&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.dispatchers='(PROTOCOL=TCP) (SERVICE=rockXDB)'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.job_queue_processes=10&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.open_cursors=300&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.pga_aggregate_target=16777216&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.processes=150&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.remote_login_passwordfile='EXCLUSIVE'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.sga_target=167772160&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.undo_management='AUTO'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.undo_tablespace='UNDOTBS1'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.user_dump_dest='D:\oracle\product\10.2.0/admin/rock/udump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.log_archive_dest_1="location=D:\oracle\Archive_rock"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.log_archive_format='arc_%s_%t_%r.arc'&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.log_archive_dest_state_1=ENABLE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.log_archive_dest_2='SERVICE=rockstd LGWR ASYNC'&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.log_archive_dest_state_2=ENABLE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.fal_server='ROCKSTD'&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.fal_client='ROCK'&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;-------------------------------------------&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;Stnadby Database initrockstd.ora file&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__db_cache_size=83886080&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__java_pool_size=4194304&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__large_pool_size=4194304&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__shared_pool_size=67108864&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;rock.__streams_pool_size=0&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.audit_file_dest='D:\oracle\product\10.2.0/admin/rock/adump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.background_dump_dest='D:\oracle\product\10.2.0/admin/rock/bdump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.compatible='10.2.0.1.0'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.control_files='D:\oracle\product\10.2.0oradata\rock\rockstd_control.ctl'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.core_dump_dest='D:\oracle\product\10.2.0/admin/rock/cdump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_block_size=8192&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_domain=''&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_file_multiblock_read_count=16&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_name='rock'&lt;/span&gt;&lt;br /&gt;*.db_unique_name='rockstd'&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_recovery_file_dest='D:\oracle\product\10.2.0\oradata\rock\flash_recovery_area'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.db_recovery_file_dest_size=2147483648&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.dispatchers='(PROTOCOL=TCP) (SERVICE=rockXDB)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;'*.job_queue_processes=10&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.open_cursors=300&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.pga_aggregate_target=16777216&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.processes=150&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.remote_login_passwordfile='EXCLUSIVE'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.sga_target=167772160&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.undo_management='AUTO'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.undo_tablespace='UNDOTBS1'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.user_dump_dest='D:\oracle\product\10.2.0/admin/rock/udump'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.log_archive_dest_1="location=D:\oracle\product\10.2.0oradata\rock\archive"&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;*.log_archive_format='arc_%s_%t_%r.arc'&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;*.log_archive_dest_state_2=ENABLE&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;*.fal_server='ROCK'&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;span style="color:#3366ff;"&gt;*.fal_client='ROCKSTD'&lt;/span&gt; &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;*.standby_file_management=auto&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;--------------------------------------------------------------------------&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;Standby Database Maintenance&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Standby Database is maintained by setting the database in Recovery Mode. In this particular state the database is in a mount (not open) state and the database is allowed to receive the archived log files from the primary database and apply them for synchronization. In this mode the standby database is not open for any user connections and it only receives the archived logs from the primary database via the Log Transfer Services and applies the changes recorded in them through Log Apply Services.&lt;br /&gt;&lt;br /&gt;In order to put the standby database in recover mode we issue the following commands:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--Mount the standby database and makes sure that it is not open for any user connections.&lt;br /&gt;SQL&gt; ALTER DATABASE MOUNT STANDBY DATABASE;&lt;br /&gt;&lt;br /&gt;-- Put the standby database in recovery mode and ready to receive archived logs.&lt;br /&gt;SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The command above puts the database in recovery mode and ready to receive the archived logs from the primary database. It also ensures that and users cannot connect to the standby database and any previously connected users are disconnected.&lt;br /&gt;&lt;br /&gt;The standby database can also be put into read only mode for reporting purposes. This is accomplished by issuing the commands:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Cancel the recovery mode and stop the reception of applied logs.&lt;br /&gt;SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;&lt;br /&gt;&lt;br /&gt;-- Put the standby database in read only mode for reporting purposes.&lt;br /&gt;SQL&gt; ALTER DATABASE OPEN READ ONLY;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This process can also be reversed and the database can be put back into recovery mode by reissuing the command&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Put the standby database back into recovery mode.&lt;br /&gt;SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;Switchover and Failover Operations&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc123359513"&gt;Standby Database Switchover&lt;/a&gt;&lt;br /&gt;A database can be in one of two mutually exclusive modes (primary or standby). These roles can be altered at runtime without loss of data or resetting of redo logs. This process is known as a SWITCHOVER and can be performed using the following statements:&lt;br /&gt;&lt;br /&gt;-- Connect to primary database and switchover to standby&lt;br /&gt;SQL&gt; CONNECT sys/password@ICPORA AS SYSDBA&lt;br /&gt;SQL&gt; ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY;&lt;br /&gt;&lt;br /&gt;-- Shutdown the primary database&lt;br /&gt;SQL&gt; SHUTDOWN IMMEDIATE;&lt;br /&gt;&lt;br /&gt;-- Mount the old primary database as the new standby database&lt;br /&gt;SQL&gt; STARTUP NOMOUNT PFILE=C:\oracle\ora92\database\initICPORA.ora&lt;br /&gt;SQL&gt; ALTER DATABASE MOUNT STANDBY DATABASE;&lt;br /&gt;SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Convert the standby database to a primary database&lt;br /&gt;SQL&gt; CONNECT sys/password@ICPSTD AS SYSDBA&lt;br /&gt;SQL&gt; ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;&lt;br /&gt;&lt;br /&gt;-- Shutdown standby database&lt;br /&gt;SQL&gt; SHUTDOWN IMMEDIATE;&lt;br /&gt;&lt;br /&gt;-- Open old standby database as primary&lt;br /&gt;SQL&gt;STARTUP PFILE=C:\oracle\ora92\database\initICPSTD.ora&lt;br /&gt;The SWITCHOVER operation is useful in scenarios where the primary database needs to be temporarily taken offline or unavailable for user sessions for maintenance purposes. Switchover is a temporary switch from the primary database to the standby database.&lt;br /&gt;&lt;a name="_Toc123359514"&gt;Standby Database Failover&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A FAILOVER occurs when database failover causes a standby database to be converted to a primary database. This process is not temporary and the failing over to the standby database will cause the primary to be unavailable to be online again.&lt;br /&gt;&lt;br /&gt;A FAILOVER operation is initiated by issuing the following commands:&lt;br /&gt;&lt;br /&gt;-- Finish the recovery mode on the standby database&lt;br /&gt;SQL&gt;ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH;&lt;br /&gt;&lt;br /&gt;--Activate standby database as the new primary database&lt;br /&gt;SQL&gt;ALTER DATABASE ACTIVATE STANDBY DATABASE;&lt;br /&gt;&lt;br /&gt;It is important to note that one should not FAILOVER to a standby database other than in an emergency, because the failover operation is an unplanned transition that may result in the loss of application data.&lt;br /&gt;&lt;br /&gt;Once a FAILOVER operation is performed, there is no going back. This is because the original primary database is not operational anymore and the standby database that you fail over to the primary role is no longer capable of returning to being a standby database in the original configuration.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-------------&lt;br /&gt;-------------&lt;/p&gt;&lt;p&gt;When there is Link down or Network Problem, then obviously it's gonna be gap between Primary and Standby Databases Archived logs, So there are two solutions for that:&lt;br /&gt;1. Manuall resolve Gaps,&lt;br /&gt;2. Automatically&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Manual (Recommended for few logs)&lt;br /&gt;Step.1: &lt;/strong&gt;Manually copy all missing archived logs from Primary Database and paste at Standby Database Archived Log Folder. (Copy one file at a time Recommended)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step.2: Register Archived logs at Standby Database (One by One)&lt;br /&gt;&lt;/strong&gt;1. Conn &lt;a href="mailto:sys/password@standbydb"&gt;sys/password@standbydb&lt;/a&gt; as sysdba&lt;br /&gt;2. Shutdown Immediate;&lt;br /&gt;3. Startup nomount;&lt;br /&gt;4. Alter database mount Standby Database;&lt;br /&gt;5. alter database register logfile 'd:\abc\abc.log';&lt;br /&gt;6. alter database recover managed standby database disconnect from session;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2. Automatic (Recommended by large number of logs)&lt;br /&gt;&lt;/strong&gt;The Production/Primary database must be taken offline, so its required that Automatic option should be used when there is NO or LESS activity on the Primary Database.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step.1: Connect at Standby Database&lt;/strong&gt;&lt;br /&gt;conn &lt;a href="mailto:sys/password@standbydb"&gt;sys/password@standbydb&lt;/a&gt; as sysdba&lt;br /&gt;alter database recover managed standby database cancel;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step.2: Connect at Primary Database&lt;/strong&gt;&lt;br /&gt;1. Shutown immediate;&lt;br /&gt;2. Startup nomount;&lt;br /&gt;3. Alter database mount;&lt;br /&gt;4. Alter database open;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step.3: Connect at Standby database&lt;br /&gt;&lt;/strong&gt;1. Alter database recover managed standby database parrallel 8 nodelay disconnect from session;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-2484452915526170229?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/2484452915526170229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=2484452915526170229' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2484452915526170229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2484452915526170229'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2007/12/creating-stand-by-database-steps.html' title='Creating Stand By Database (Steps)'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-2773122321041169496</id><published>2007-10-03T08:41:00.000-07:00</published><updated>2009-03-08T06:10:09.400-07:00</updated><title type='text'>Oracle Interview Questions</title><content type='html'>&lt;strong&gt;These are the Oracle DBA interview Questions that were asked to me for Fresh /Assitant Oracle DBA Job.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;1-&lt;/strong&gt; You have written in your CV that As a DBA u can Test a Backup, How?&lt;br /&gt;&lt;strong&gt;2-&lt;/strong&gt; You have written in your CV, that you can monitor physical and logical backup, how?&lt;br /&gt;&lt;strong&gt;3-&lt;/strong&gt; You have written in your CV, that you can Rebuild Index to rectify segment fragmentation. (Coalesce)&lt;br /&gt;&lt;strong&gt;4-&lt;/strong&gt; You has written in your CV, that you can Automatic Schedule a logical backup. how?&lt;br /&gt;&lt;strong&gt;5-&lt;/strong&gt; HVM, when it will be decreased? How can I do it? (Truncate table)&lt;br /&gt;&lt;strong&gt;6-&lt;/strong&gt; Alert log file? What it contains?&lt;br /&gt;&lt;strong&gt;7-&lt;/strong&gt; Control file? What information it contains? When it is read?&lt;br /&gt;&lt;strong&gt;8- &lt;/strong&gt;I have lost my Control File &amp;amp; don’t have any Backup; Can I start DB &amp;amp; operate? How? (You create a control file in no mount mode.)&lt;br /&gt;&lt;strong&gt;9- &lt;/strong&gt;Mount- No Mount?&lt;br /&gt;&lt;strong&gt;10-&lt;/strong&gt; SGA? It’s Components?&lt;br /&gt;&lt;strong&gt;11-&lt;/strong&gt; Checkpoint? Why Checkpoint? Where it’s recorded? When it’s recorded?&lt;br /&gt;&lt;strong&gt;12-&lt;/strong&gt; LGWR? When it writes?&lt;br /&gt;&lt;strong&gt;13-&lt;/strong&gt; Duties of DBA?&lt;br /&gt;&lt;strong&gt;14-&lt;/strong&gt; What’s Statspack? How can I use Statspack?&lt;br /&gt;&lt;strong&gt;15-&lt;/strong&gt; Methods of Backup – (Cold &amp;amp; Hot Backup)?&lt;br /&gt;&lt;strong&gt;16 -&lt;/strong&gt;Why do you want to be DBA? Why Not a Developer?&lt;br /&gt;&lt;strong&gt;17-&lt;/strong&gt; What is RECOVERY Catalog? Why we need it? Complete command/steps of creating Recovery Catalog? How will it know about the Primary Database? -What role/Privileges are given to user when he is connected to Recovery Catalog? -How can I connect with RMAN? It’s Steps?&lt;br /&gt;&lt;strong&gt;18-&lt;/strong&gt; RMAN Incremental Backups? What are Differential &amp;amp; Cumulative Backups?&lt;br /&gt;&lt;strong&gt;19-&lt;/strong&gt; Write a statement/command for exporting all the objects of owner ‘HR’?&lt;br /&gt;&lt;strong&gt;20-&lt;/strong&gt; Direct=y&lt;br /&gt;&lt;strong&gt;21-&lt;/strong&gt; Standby Databases?&lt;br /&gt;&lt;strong&gt;22-&lt;/strong&gt; RAC?&lt;br /&gt;&lt;strong&gt;23-&lt;/strong&gt; Partitioning (List, Range, Hash)&lt;br /&gt;&lt;strong&gt;24-&lt;/strong&gt; If my application is slow, how can we make it efficient, faster? -How will you tune if application is slow?&lt;br /&gt;&lt;strong&gt;25-&lt;/strong&gt; RMAN Backups?&lt;br /&gt;&lt;strong&gt;26-&lt;/strong&gt; ADDM.&lt;br /&gt;&lt;strong&gt;27-&lt;/strong&gt; AWR.&lt;br /&gt;&lt;strong&gt;28-&lt;/strong&gt; Flashback? What is flashback in 10g?&lt;br /&gt;&lt;strong&gt;29-&lt;/strong&gt; What is command for restoring from recycle bin?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;2nd interview.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;30-&lt;/strong&gt; Difference between User &amp;amp; Schema?&lt;br /&gt;&lt;strong&gt;31-&lt;/strong&gt; Cluster key? 32- RAC?&lt;br /&gt;&lt;strong&gt;33-&lt;/strong&gt; Stand By database?&lt;br /&gt;&lt;strong&gt;33-&lt;/strong&gt; What are duties of DBA?&lt;br /&gt;&lt;strong&gt;34-&lt;/strong&gt; What is Difference among NOMOUNT &amp;amp; MOUNT &amp;amp; OPEN modes? When Database will be available for read?&lt;br /&gt;&lt;strong&gt;35-&lt;/strong&gt; What is SGA? And what are its components?&lt;br /&gt;&lt;strong&gt;36-&lt;/strong&gt; How can we allocate SGA? How we can know it proper size? How should we estimate? How can we calculate size of SGA?&lt;br /&gt;&lt;strong&gt;37-&lt;/strong&gt; If database is running 24 hours a day, 7 days a week when I come to office in morning what should I do Check? What files, views, or Services should I check?&lt;br /&gt;&lt;strong&gt;38-&lt;/strong&gt; How can you perform Fragmentation in tables?&lt;br /&gt;&lt;strong&gt;39-&lt;/strong&gt;Suppose, if I export table data and then import? Does it perform fragmentation?&lt;br /&gt;&lt;strong&gt;40-&lt;/strong&gt; Interviewer Asked from me:-”Tell me if you are DBA, u left the office at night, and when u arrive at office in the morning”, what you will check in database?&lt;br /&gt;&lt;strong&gt;41-&lt;/strong&gt; How can you schedule a job?&lt;br /&gt;&lt;strong&gt;42-&lt;/strong&gt; RAID?&lt;br /&gt;&lt;strong&gt;43-&lt;/strong&gt; New feature of 10g.&lt;br /&gt;&lt;strong&gt;44-&lt;/strong&gt; What is Database? RDBMS? Rules?&lt;br /&gt;&lt;br /&gt;HR Interview Questions?&lt;br /&gt;&lt;strong&gt;1.&lt;/strong&gt; Tell me more about yourself.&lt;br /&gt;&lt;strong&gt;2.&lt;/strong&gt; Why did you choose this career?&lt;br /&gt;&lt;strong&gt;3.&lt;/strong&gt; Why do you want to work here at ABC Inc.?&lt;br /&gt;&lt;strong&gt;4.&lt;/strong&gt; What would you say is your strength? Your weakness?&lt;br /&gt;&lt;strong&gt;5.&lt;/strong&gt; What did you learn from your last job/internship/educational experience?&lt;br /&gt;&lt;strong&gt;7.&lt;/strong&gt; Why do you want this job?&lt;br /&gt;&lt;br /&gt;= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;1- You have written in your CV that As a DBA u can Test a Backup, How? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;Regularly test the backup &amp;amp; recovery srtategy, becaue it shows the integrity of the backups, the validity of the backup and recovery method, and the reduction of the problems before the occur in a production database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Testing the backup and recovery plan ensures:&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;&gt; That the backup and recovery methods are sound&lt;br /&gt;&lt;&gt; Integrity of backups&lt;br /&gt;&lt;&gt; Ensures that the backup and recovery strategy meets business needs.&lt;br /&gt;&lt;&gt; It minimizes problems before they occur in a production environment.&lt;br /&gt;&lt;&gt; It ensures that personnel can react quickly and effectively in case any errors arise, avoiding a crisis situation.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;2- You have written in your CV, that you can monitor physical and logical backup, how? &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/deploy/availability/htdocs/BR_Overview.htm"&gt;http://www.oracle.com/technology/deploy/availability/htdocs/BR_Overview.htm&lt;/a&gt;&lt;br /&gt;A backup is a representative copy of data. This copy can include important parts of a database such as the control file, redo logs, and datafiles. A backup protects data from application error and acts as a safeguard against unexpected data loss, by providing a way to restore original data. Backups are divided into physical backups and logical backups. Physical backups are copies of physical database files. The phrase "backup and recovery" usually refers to the transfer of copied files from one location to another, along with the various operations performed on these files.&lt;br /&gt;In contrast, logical backups contain data that is exported using SQL commands and stored in a binary file. Oracle records both committed and uncommitted changes in redo log buffers. Logical backups are used to supplement physical backups. Restoring a physical backup means reconstructing it and making it available to the Oracle server. To recover a restored backup, data is updated using redo records from the transaction log. The transaction log records changes made to the database after the backup was taken.&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/deploy/availability/htdocs/BR_Overview.htm"&gt;http://www.oracle.com/technology/deploy/availability/htdocs/BR_Overview.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Types of Backup&lt;br /&gt;&lt;/strong&gt;There are two kinds of database backups available to us physical backups and logical backups.&lt;br /&gt;&lt;strong&gt;Physical Backup&lt;/strong&gt; is an actual physical copy of the files of the database copied from one location to another.&lt;br /&gt;&lt;strong&gt;Logical Backup&lt;/strong&gt; is a copy of the data in the database but not a copy of the physical files.&lt;br /&gt;&lt;br /&gt;&lt;a name="coldbackup"&gt;&lt;/a&gt;&lt;strong&gt;Cold Backup&lt;/strong&gt;&lt;br /&gt;A cold backup is a physical backup.&lt;br /&gt;During a cold backup the database is closed and not available to users. All files of the database are copied (image copy). The datafiles do not change during the copy so the database is in sync upon restore.&lt;br /&gt;Used when: Service level allows for some down time for backup&lt;br /&gt;&lt;a name="Hotbackup"&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Hot Backup&lt;/strong&gt;&lt;br /&gt;A hot backup is a physical backup. In a hot backup the database remains open and available to users. All files of the database are copied (image copy). There may be changes to the database as the copy is made and so all log files of changes being made during the backup must be saved too. Upon a restore, the changes in the log files are reapplied to bring the database in sync.&lt;br /&gt;Used when: A full backup of a database is needed Service level allows no down time for the backup&lt;br /&gt;&lt;br /&gt;&lt;a name="logicalbackup"&gt;&lt;/a&gt;&lt;strong&gt;Logical Backup&lt;br /&gt;&lt;/strong&gt;A logical backup is an extract of the database. All SQL statements to create the objects and all SQL statements to populate the objects are included in the extract. Oracle provides a utility export, to create the extract. A partner utility, import, is used to bring the data back into the database.&lt;br /&gt;A logical backup can be done at the table, schema(or proxy owner), or database level. That is, we can extract only a list of specified tables, a list of specified schemas or the full database.&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Used to:&lt;/strong&gt;&lt;br /&gt;Move or archive a database&lt;br /&gt;Move or archive a table(s)&lt;br /&gt;Move or archive a schema(s)&lt;br /&gt;Verify the structures in the database.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;3- You have written in your CV, that you can Rebuild Index to rectify segment fragmentation. (Coalesce)&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Index:&lt;/span&gt;&lt;/strong&gt; An index is a tree structure that allows direct access to a row in table.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Rebuild:&lt;/span&gt;&lt;/strong&gt; An index contains deleted entries and should be rebuild, such a case of index on Order number of an Orders tables, where completed orders are deleted &amp;amp; new orders with higher numbers are added.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;ALTER INDEX orders_index REBUILD&lt;br /&gt;TABLESPACE index02;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;&gt; Above command moves an index to a different TableSpace.&lt;br /&gt;&lt;&gt; Improve space utilization by removing deleted entries.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;COALESCE:&lt;/span&gt;&lt;/strong&gt; If you encounter index fragmentation then you can rebuild or coalesce. Coalescing an index is a block rebuild that is performed online.&lt;br /&gt;I.e. Merging B-tree index leaf blocks that can be freed for reuse.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;ALTER INDEX hr.employees_idx COALESE;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;----------------------------------------------------------&lt;br /&gt;&lt;/strong&gt;When one must rebuild Indexes, read the at the forums.oracle.com at below thread.&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=580451&amp;amp;tstart=0"&gt;&lt;strong&gt;http://forums.oracle.com/forums/thread.jspa?threadID=580451&amp;amp;tstart=0&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;4- You has written in your CV, that you can Automatic Schedule a logical backup. how?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html"&gt;http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Visit above blog page for Automatic Scheduling of logical backup.&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;5- HVM, when it will be decreased? How can I do it? (Truncate table)&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;High water mark:&lt;/span&gt;&lt;/strong&gt; The high water mark is the boundary between used and unused space in a segment. As requests for new free blocks that cannot be satisfied by existing free lists are received, the block to which the high water mark points becomes a used block, and the high water mark is advanced to the next block. In other words, the segment space to the left of the high water mark is used, and the space to the right of it is unused.&lt;br /&gt;&lt;br /&gt;The high water mark is divides a &lt;a href="http://www.adp-gmbh.ch/ora/concepts/segments.html"&gt;segment&lt;/a&gt; into &lt;a href="http://www.adp-gmbh.ch/ora/concepts/db_block.html#used_blocks"&gt;used blocks&lt;/a&gt; &lt;a href="http://www.adp-gmbh.ch/ora/concepts/db_block.html#unused_blocks"&gt;free blocks&lt;/a&gt;&lt;br /&gt;Blocks below the high water mark (&lt;a href="http://www.adp-gmbh.ch/ora/concepts/db_block.html#used_blocks"&gt;used blocks&lt;/a&gt;) have at least once contained data. This data might have been deleted.&lt;br /&gt;Since Oracle knows that blocks beyond the high water mark don't have data, it only reads blocks up to the high water mark in a &lt;a href="http://www.adp-gmbh.ch/ora/tuning/fulltablescan.html"&gt;full table scan&lt;/a&gt;.&lt;br /&gt;Oracle keeps track of the high water mark for a &lt;a href="http://www.adp-gmbh.ch/ora/concepts/segments.html"&gt;segment&lt;/a&gt; in the &lt;a href="http://www.adp-gmbh.ch/ora/concepts/segments.html#segment_header"&gt;segment header&lt;/a&gt;.&lt;br /&gt;Moving the high water mark&lt;br /&gt;In normal DB operations, the high water mark only moves upwards, not downwards. The exceptions being the &lt;a href="http://www.adp-gmbh.ch/ora/sql/truncate.html"&gt;truncate&lt;/a&gt;.&lt;br /&gt;If there is a lot of free space below the high water mark, one might consider to use alter table move statements. See &lt;a href="http://www.adp-gmbh.ch/blog/2005/july/20.html"&gt;On shrinking table sizes&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://www.adp-gmbh.ch/blog/2005/july/20.html"&gt;http://www.adp-gmbh.ch/blog/2005/july/20.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;truncate table table_name;&lt;br /&gt;truncate cluster cluster_name;&lt;br /&gt;&lt;br /&gt;A statement like delete from tablename deletes all records in the table, but it does not free any space (see &lt;a href="http://www.adp-gmbh.ch/blog/2005/april/21.html"&gt;On table sizes&lt;/a&gt;). In order to free the space as well, use truncate. However, a truncate can not be &lt;a href="http://www.adp-gmbh.ch/ora/concepts/transaction.html#rollback"&gt;rolled back&lt;/a&gt;.&lt;br /&gt;Truncate Table: Basically, a truncate statement resets the &lt;a href="http://www.adp-gmbh.ch/ora/concepts/space_management/high_water_mark.html"&gt;high water mark&lt;/a&gt; to its &lt;a href="http://www.adp-gmbh.ch/ora/concepts/space_management/high_water_mark.html#initial_position"&gt;initial position&lt;/a&gt;.&lt;br /&gt;A truncate statement cannot be used on a &lt;a href="http://www.adp-gmbh.ch/ora/concepts/synonyms.html"&gt;synonym&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Ways for reseting high water mark.&lt;br /&gt;- export/import&lt;br /&gt;-CTAS (Create table as select)&lt;br /&gt;- dbms_redefinition&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;6- Alert log file? What it contains? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Location Defined by BACKGROUND_DUMP_DEST&lt;br /&gt;Alert log file should be the 1st place when diagnosing day-to-day operations or errors.&lt;br /&gt;&lt;br /&gt;Keeps record of&lt;br /&gt;&lt;&gt; When DB was started &amp;amp; shutdown&lt;br /&gt;&lt;&gt; List of all non default initialization parameters.&lt;br /&gt;&lt;&gt; Startup of Background processes.&lt;br /&gt;&lt;&gt; Log sequence number LGWR writing to.&lt;br /&gt;&lt;&gt; Info abt log switch&lt;br /&gt;&lt;&gt; Creation of tablespace &amp;amp; undo segments&lt;br /&gt;&lt;&gt; Alter statement that has been issued.&lt;br /&gt;&lt;&gt; Information abt errors messages ora-600 &amp;amp; extent errors.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;7- Control file? What information it contains? When it is read? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Small binary file&lt;br /&gt;Defines current state of physical database.&lt;br /&gt;Required.&lt;br /&gt;&lt;&gt; At mount state during startup&lt;br /&gt;&lt;&gt;To operate the database&lt;br /&gt;Linked to a single database.&lt;br /&gt;Loss may require recovery.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Control file contains&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;&gt; Database Name &amp;amp; Identified&lt;br /&gt;&lt;&gt; Timestamp of DB creation&lt;br /&gt;&lt;&gt; Tablespace names&lt;br /&gt;&lt;&gt; Names &amp;amp; location of data files &amp;amp; online redo log files&lt;br /&gt;&lt;&gt; Current online redo log file information&lt;br /&gt;&lt;&gt; Checkpoint information&lt;br /&gt;&lt;&gt; Begin &amp;amp; end of undo segments&lt;br /&gt;&lt;&gt; Redo log archive information&lt;br /&gt;&lt;&gt; Backup Information&lt;br /&gt;Read at the Mount mode of the database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;8- I have lost my Control File &amp;amp; don’t have any Backup; Can I start DB &amp;amp; operate? How? (You create a control file in no mount mode.) &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;strong&gt;&lt;span style="color:#000000;"&gt;Yes, we can operate the database, follow the steps below:&lt;/span&gt; &lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;&gt; Start instance if necessary.&lt;br /&gt;&lt;&gt; Shut down instance if start failed.&lt;br /&gt;&lt;&gt; Start the Instance in Mount mode.&lt;br /&gt;&lt;&gt; Run the trace file script to recreate the control file.&lt;br /&gt;&lt;&gt; Determine if full back up is required and perform one if necessary.&lt;br /&gt;&lt;&gt; Ensure that instance is started &amp;amp; database is open.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.orafaq.com/wiki/Control_file_recovery"&gt;http://www.orafaq.com/wiki/Control_file_recovery&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006360"&gt;&lt;span style="color:#000000;"&gt;http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006360&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Steps for Creating New Control Files&lt;br /&gt;Complete the following steps to create a new control file.&lt;br /&gt;1. Make a list of all datafiles and redo log files of the database.&lt;br /&gt;If you follow recommendations for control file backups as discussed in &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006485#i1006485"&gt;&lt;span style="color:#000000;"&gt;"Backing Up Control Files"&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; , you will already have a list of datafiles and redo log files that reflect the current structure of the database. However, if you have no such list, executing the following statements will produce one.SELECT MEMBER FROM V$LOGFILE;SELECT NAME FROM V$DATAFILE; SELECT VALUE FROM V$PARAMETER WHERE NAME = 'control_files';&lt;br /&gt;If you have no such lists and your control file has been damaged so that the database cannot be opened, try to locate all of the datafiles and redo log files that constitute the database. Any files not specified in step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006387#i1006387"&gt;&lt;span style="color:#000000;"&gt;5&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; are not recoverable once a new control file has been created. Moreover, if you omit any of the files that make up the SYSTEM tablespace, you might not be able to recover the database.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;2. Shut down the database.&lt;br /&gt;If the database is open, shut down the database normally if possible. Use the IMMEDIATE or ABORT clauses only as a last resort.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;3. Back up all datafiles and redo log files of the database.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;4. Start up a new instance, but do not mount or open the database:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;5. STARTUP NOMOUNT&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;6.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;7. Create a new control file for the database using the CREATE CONTROLFILE statement.&lt;br /&gt;&lt;/span&gt;&lt;a name="sthref823"&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;When creating a new control file, specify the RESETLOGS clause if you have lost any redo log groups in addition to control files. In this case, you will need to recover from the loss of the redo logs (step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006408#i1006408"&gt;&lt;span style="color:#000000;"&gt;8&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;). You must specify the RESETLOGS clause if you have renamed the database. &lt;/span&gt;&lt;a name="sthref824"&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;Otherwise, select the NORESETLOGS clause.&lt;br /&gt;&lt;/span&gt;&lt;a name="i1106395"&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;8. Store a backup of the new control file on an offline storage device. See &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006485#i1006485"&gt;&lt;span style="color:#000000;"&gt;"Backing Up Control Files"&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; for instructions for creating a backup.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;9. Edit the CONTROL_FILES initialization parameter for the database to indicate all of the control files now part of your database as created in step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006387#i1006387"&gt;&lt;span style="color:#000000;"&gt;5&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; (not including the backup control file). If you are renaming the database, edit the DB_NAME parameter in your instance parameter file to specify the new name.&lt;/span&gt;&lt;a name="sthref825"&gt;&lt;/a&gt;&lt;br /&gt;&lt;a name="i1006408"&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;10. Recover the database if necessary. If you are not recovering the database, skip to step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006418#i1006418"&gt;&lt;span style="color:#000000;"&gt;9&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;.&lt;br /&gt;If you are creating the control file as part of recovery, recover the database. If the new control file was created using the NORESETLOGS clause (step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006387#i1006387"&gt;&lt;span style="color:#000000;"&gt;5&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;), you can recover the database with complete, closed database recovery.&lt;br /&gt;If the new control file was created using the RESETLOGS clause, you must specify USING BACKUP CONTROL FILE. If you have lost online or archived redo logs or datafiles, use the procedures for recovering those files.&lt;br /&gt;See Also:&lt;br /&gt;&lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm"&gt;&lt;span style="color:#000000;"&gt;Oracle Database Backup and Recovery Basics&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; and &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/toc.htm"&gt;&lt;span style="color:#000000;"&gt;Oracle Database Backup and Recovery Advanced User's Guide&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; for information about recovering your database and methods of recovering a lost control file&lt;br /&gt;&lt;/span&gt;&lt;a name="i1006418"&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;11. Open the database using one of the following methods:&lt;br /&gt;o If you did not perform recovery, or you performed complete, closed database recovery in step &lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006408#i1006408"&gt;&lt;span style="color:#000000;"&gt;8&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;, open the database normally.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;o ALTER DATABASE OPEN; &lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;o If you specified RESETLOGS when creating the control file, use the ALTER DATABASE statement, indicating RESETLOGS.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;o ALTER DATABASE OPEN RESETLOGS;&lt;br /&gt;The database is now open and available for use.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006360"&gt;&lt;span style="color:#000000;"&gt;http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/control.htm#i1006360&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;====================&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Trace File:&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;When one of the Oracle background processes (such as &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/concepts/processes/dbwr.html"&gt;&lt;span style="color:#000000;"&gt;dbwr&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/concepts/processes/lgwr.html"&gt;&lt;span style="color:#000000;"&gt;lgwr&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/concepts/processes/pmon.html"&gt;&lt;span style="color:#000000;"&gt;pmon&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/concepts/processes/smon.html"&gt;&lt;span style="color:#000000;"&gt;smon&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; and so on ) encounter an exception, they will write a trace file.&lt;br /&gt;These trace files are also recorded in the &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/concepts/alert_log.html"&gt;&lt;span style="color:#000000;"&gt;alert.log&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;.&lt;br /&gt;Trace files are also created for &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/tuning/diagnostic_events/index.html#dump_events"&gt;&lt;span style="color:#000000;"&gt;diagnostic dump events&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt;.&lt;br /&gt;An &lt;/span&gt;&lt;a href="http://www.adp-gmbh.ch/ora/err/ora_00600.html"&gt;&lt;span style="color:#000000;"&gt;ORA-00600&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; error also produces a trace file.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;9- Mount- No Mount? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;NOMOUNT:&lt;/span&gt;&lt;/strong&gt; An oracle instance can be started in NOMOUNT stage only during database creation or the recreation of control files.&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;MOUNT: &lt;/strong&gt;&lt;/span&gt;To perform specific maintenance operations, don’t open the database.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Renaming datafiles&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Enabling &amp;amp; disabling archive redo log file archiving options&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Performing full database recovery&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;10- SGA? It’s Components? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;SGA: &lt;/span&gt;&lt;/strong&gt;Shared Global Area is allocated at instance startup, and is fundamental component of Oracle Instance. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Size defined by SGA_MAX_SIZE.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Components&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• &lt;/span&gt;&lt;span style="color:#000000;"&gt;Shared Pool (SHARED_POOL_SIZE)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• &lt;/span&gt;&lt;span style="color:#000000;"&gt;Database Buffer Cache (DB_CACHE_SIZE)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Redo Log Buffer (LOG_BUFFER)Additional Components&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Large Pool&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Java Pool&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;11- Checkpoint? Why Checkpoint? Where it’s recorded? When it’s recorded? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;Database Checkpoint:&lt;/strong&gt;&lt;/span&gt; Checkpoints are you used to determine where recovery should start.&lt;br /&gt;&lt;strong&gt;Checkpoint position&lt;/strong&gt; – where recovery should start&lt;br /&gt;&lt;strong&gt;Checkpoint queue&lt;/strong&gt; – link list of dirty blocks&lt;br /&gt;The position in the redo log where recovery should start is referred as to as the checkpoint position.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Types of Checkpoint&lt;br /&gt;&lt;/span&gt;1-&lt;/strong&gt; Full check point&lt;br /&gt;&lt;&gt; All dirty buffers are written&lt;br /&gt;&lt;&gt; Shutdown normal, immediate, or transactional&lt;br /&gt;Alter System Checkpoint&lt;br /&gt;&lt;strong&gt;2-&lt;/strong&gt; Incremental Checkpoint&lt;br /&gt;&lt;strong&gt;3-&lt;/strong&gt; Partial Checkpoint&lt;br /&gt;&lt;&gt; Alter tablespace begin backup&lt;br /&gt;&lt;&gt; Alter tablespace offline normal&lt;br /&gt;&lt;br /&gt;When a checkpoint occurs, Oracle must update the headers of all datafiles to record the details of the checkpoint. This is done by the CKPT process. The CKPT process does not write blocks to disk; DBWn always performs that work.&lt;br /&gt;Every 3 seconds CKPT records the RBA from the oldest entry to in the checkpoint queue in the control file. This RBA represents the point in the redo log at which instance recovery is to begin after an instance failure. It can do this because all of the data blocks represented in prior redo records are guaranteed to have been written do disk by DBWn&lt;br /&gt;On the event on a log switch, does CKPT also write this information to the header of the datafiles.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;12- LGWR? When it writes?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;LGWR performs sequential writes from the Redo Log Buffer to the Online redo Log files under the following situations&lt;br /&gt;&lt;&gt; At Commit&lt;br /&gt;&lt;&gt; When the Redo Log Buffer is one-third full&lt;br /&gt;&lt;&gt; When there is more than 1 MB of changes recorded in the Redo Log Buffer&lt;br /&gt;&lt;&gt; Befoere DBW writes modified blocks&lt;br /&gt;&lt;&gt; Every 3 seconds&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;13- Duties of DBA?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;· To plan &amp;amp; Create Databases&lt;br /&gt;· To Manage Database Availability&lt;br /&gt;· To Manage Physical &amp;amp; Logical Structure&lt;br /&gt;· To Manage Storage based on design&lt;br /&gt;· To manage security&lt;br /&gt;· Network Administration&lt;br /&gt;· Backup &amp;amp; Recovery&lt;br /&gt;· Database Tuning&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;14- What’s Statspack? How can I use Statspack? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;STATSPACK: &lt;/strong&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;STATSPACK &lt;/span&gt;is a performance diagnosis tool, available since Oracle8i. STATSPACK can be considered BSTAT/ESTAT's successor, incorporating many new features. STATSPACK is a diagnosis tool for instance-wide performance problems; it also supports application tuning activities by providing data which identifies high-load SQL statements. STATSPACK can be used both proactively to monitor the changing load on a system, and also reactively to investigate a performance problem.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;UTLBSTAT - UTLESTAT&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;The BSTAT-ESTAT utilities capture information directly from the Oracle's in-memory structures and then compare the information from two snapshots in order to produce an elapsed-time report showing the activity of the database. If we look inside utlbstat.sql and utlestat.sql, we see the SQL that samples directly from the view: V$SYSSTAT;&lt;br /&gt;&lt;br /&gt;insert into stats$begin_stats select * from v$sysstat;&lt;br /&gt;insert into stats$end_stats select * from v$sysstat;&lt;br /&gt;&lt;br /&gt;How can I use Statspack&lt;br /&gt;Create PERFSTAT Tablespace&lt;br /&gt;The STATSPACK utility requires an isolated tablespace to obtain all of the objects and data. For uniformity, it is suggested that the tablespace be called PERFSTAT, the same name as the schema owner for the STATSPACK tables. It is important to closely watch the STATSPACK data to ensure that the stats$sql_summary table is not taking an inordinate amount of space.&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLESPACE perfstat&lt;br /&gt;DATAFILE '/u01/oracle/db/AKI1_perfstat.dbf' SIZE 1000M REUSE&lt;br /&gt;EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;PERMANENT&lt;br /&gt;ONLINE;&lt;br /&gt;Run catdbsyn.sql as SYS&lt;br /&gt;Run dbmspool.sql as SYS&lt;br /&gt;$ cd $ORACLE_HOME/rdbms/admin$ sqlplus "/ as sysdba"SQL&gt; start spcreate.sql&lt;br /&gt;Adjusting the STATSPACK Collection Level&lt;br /&gt;STATSPACK has two types of collection options, level and threshold. The level parameter controls the type of data collected from Oracle, while the threshold parameter acts as a filter for the collection of SQL statements into the stats$sql_summary table.&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT * FROM stats$level_description ORDER BY snap_level;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Level 0: &lt;/strong&gt;This level captures general statistics, including rollback segment, row cache, SGA, system events, background events, session events, system statistics, wait statistics, lock statistics, and Latch information.&lt;br /&gt;&lt;strong&gt;Level 5:&lt;/strong&gt; This level includes capturing high resource usage SQL Statements, along with all data captured by lower levels.&lt;br /&gt;&lt;strong&gt;Level 6:&lt;/strong&gt; This level includes capturing SQL plan and SQL plan usage information for high resource usage SQL Statements, along with all data captured by lower levels.&lt;br /&gt;&lt;strong&gt;Level 7:&lt;/strong&gt; This level captures segment level statistics, including logical and physical reads, row lock, itl and buffer busy waits, along with all data captured by lower levels.&lt;br /&gt;&lt;strong&gt;Level 10:&lt;/strong&gt; This level includes capturing Child Latch statistics, along with all data captured by lower levels.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;15- Methods of Backup – (Cold &amp;amp; Hot Backup)?&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;A cold backup, also called an offline backup, is a database backup when the database is offline and thus not accessible for updating. This is the safest way to back up because it avoids the risk of copying data that may be in the process of being updated. However, a cold backup involves downtime because users cannot use the database while it is being backed up.&lt;br /&gt;When system downtime must be minimized, a hot backup can provide an alternative to the cold backup. A hot backup can be done even as users access the database, but some method must be used to ensure that data being updated is noted and can be copied when the update is complete.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;16 -Why do you want to be DBA? Why Not a Developer?&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;I think being an Oracle DBA is really rewarding. It can be a highly demanding job, but I feel that this is part of the exciting challenge of being a DBA. But I choose this path for myself and I am really happy with it. It is an exciting and rewarding job.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;17- What is RECOVERY Catalog? Why we need it? Complete command/steps of creating Recovery Catalog? How will it know about the Primary Database? -What role/Privileges are given to user when he is connected to Recovery Catalog? -How can I connect with RMAN? It’s Steps? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;What is RECOVERY Catalog&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• Recovery Catalog is schema that is created in a separate tablespace.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• RMAN propagates information about the database structure, archived redo log files, and datafile copies into the recovery catalog from the control file of target database.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://www.idevelopment.info/data/Oracle/DBA_tips/RMAN_9i/RMAN9_4.shtml"&gt;&lt;span style="color:#000000;"&gt;http://www.idevelopment.info/data/Oracle/DBA_tips/RMAN_9i/RMAN9_4.shtml&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#000000;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;To use RMAN, a recovery catalog is not necessary. Remember that RMAN will always use the control file of the target database to store backup and recovery operations. To use a recovery catalog, you will first need to create a recovery catalog database and create a schema for it. The catalog (database objects) will be located in the default tablespace of the schema owner. Please note that the owner of the catalog cannot be the SYS user. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;The recovery catalog database should be created on a different host, on different disks, and in a different database from the target databse you will be backing up. If you do not, the benefits of using a recovery catalog are lost if you loose the database and need to restore. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;The first step is to create a database for the recovery catalog. For the purpose of this example, I created an Oracle 9.2.0 database named CATDB. The database has the following installed: &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• You have access to the SYS password for the database. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• A temporary tablespace named TEMP already exists. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• A normal tablespace named TOOLS exists and will be used to store the recovery catalog. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;• The database is configured in the same way as all normal databases, for example, catalog.sql and catproc.sql have been successfully run. &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Now, let's create the recovery catalog: &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;1. Start SQL*Plus and then connect with SYSDBA privileges to the database containing the recovery catalog: &lt;/span&gt;&lt;br /&gt;% sqlplus "sys/change_on_install as sysdba"&lt;br /&gt;2. Create a user and schema for the recovery catalog:&lt;br /&gt;3. SQL&gt; CREATE USER rman IDENTIFIED BY rman&lt;br /&gt;4. DEFAULT TABLESPACE tools&lt;br /&gt;5. TEMPORARY TABLESPACE temp&lt;br /&gt;6. QUOTA UNLIMITED ON tools;&lt;br /&gt;7.&lt;br /&gt;User created.&lt;br /&gt;8. Grant the RECOVERY_CATALOG_OWNER role to the schema owner. This role provides the user with privileges to maintain and query the recovery catalog: 9.&lt;br /&gt;&lt;br /&gt;SQL&gt; GRANT RECOVERY_CATALOG_OWNER TO rman;&lt;br /&gt;10. Grant succeeded.&lt;br /&gt;11. Grant other desired privileges to teh RMAN user:&lt;br /&gt;12. SQL&gt; GRANT CONNECT, RESOURCE TO rman;&lt;br /&gt;13. Grant succeeded.&lt;br /&gt;14. After creating the catalog owner you should now create the catalog itself by using the CREATE CATALOG command within the RMAN interface. This command will create the catalog in the default tablespace of the catalog owner. you will need to connect to the database that will contain the catalog as teh catalog owner as follows:&lt;br /&gt;15. % rman catalog &lt;a href="mailto:rman/rman@catdb"&gt;rman/rman@catdb&lt;/a&gt;&lt;br /&gt;16.&lt;br /&gt;17. Recovery Manager: Release 9.2.0.1.0 - Production&lt;br /&gt;18.&lt;br /&gt;19. Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.&lt;br /&gt;20.&lt;br /&gt;21. connected to recovery catalog databaserecovery catalog is not installed&lt;br /&gt;22. Now, run the CREATE CATALOG command to create the catalog. Note that this process can take several minutes to complete.&lt;br /&gt;23. RMAN&gt; create catalog;&lt;br /&gt;24. recovery catalog created&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Registering the Target Database&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Before using RMAN using a recovery catalog, you will need to register the taget database(s) in the recovery catalog. RMAN will obtain all information it needs to register the target database from the database itself.&lt;br /&gt;As long as each target database has a distinct DBID, you can register more than one target database in the same recovery catalog. Each database registered in a given catalog must have a unique database identifier (DBID), but not necessarily a unique database name.&lt;br /&gt;You can use either the command-line utilities provided by RMAN or the Oracle Enterprise Manager GUI to register the target database. For the purpose of this example, I will be using the command-line utilities. I will be registering a database named TARGDB to a recovery catalog within a database named CATDB. The target database must be either mounted or opened in order to register it.&lt;br /&gt;&lt;br /&gt;% . oraenv&lt;br /&gt;ORACLE_SID = [TARGDB] ? TARGDB&lt;br /&gt;% rman target backup_admin/backup_admin catalog &lt;a href="mailto:rman/rman@catdb"&gt;rman/rman@catdb&lt;/a&gt;&lt;br /&gt;Recovery Manager: Release 9.2.0.1.0 - Production&lt;br /&gt;Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.&lt;br /&gt;&lt;br /&gt;connected to target database: TARGDB (DBID=2457750772)&lt;br /&gt;connected to recovery catalog database&lt;br /&gt;&lt;br /&gt;RMAN&gt; register database;&lt;br /&gt;database registered in recovery catalog&lt;br /&gt;starting full resync of recovery catalog&lt;br /&gt;full resync complete&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;18- RMAN Incremental Backups? What are Differential &amp;amp; Cumulative Backups?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Incremental backup is a backup that includes only those blocks that have changed since the previous backup.&lt;/span&gt;&lt;br /&gt;click the link below for details about Differential and Cumulative Backups.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;a href="http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1005.htm"&gt;http://download-uk.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1005.htm&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;19- Write a statement/command for exporting all the objects of owner ‘HR’? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;Exp user=hr/hr full=y direct=y&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;20- Direct=y &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Determines whether to use direct or conventional path export. Direct path exports bypass the SQL command, thereby enhancing performance&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;21- Standby Databases? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;A standby database is a transactionally consistent copy of the primary database. A standby database is initially created from a backup copy of the primary database. Once created, Data Guard automatically maintains the standby database by transmitting primary database redo data to the standby system and then applying the redo logs to the standby database.&lt;br /&gt;Similar to a primary database, a standby database can be either a single-instance Oracle database or an Oracle Real Application Clusters database.&lt;br /&gt;&lt;a name="1035778"&gt;&lt;/a&gt;A standby database can be either a physical standby database or a logical standby database:&lt;br /&gt;&lt;a name="1035059"&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;Physical standby database&lt;br /&gt;&lt;/strong&gt;&lt;a name="1038226"&gt;&lt;/a&gt;Provides a physically identical copy of the primary database, with on-disk database structures that are identical to the primary database on a block-for-block basis. The database schema, including indexes, are the same. A physical standby database is kept synchronized with the primary database by recovering the redo data received from the primary database.&lt;br /&gt;&lt;a name="1038228"&gt;&lt;/a&gt;&lt;strong&gt;Logical standby database &lt;/strong&gt;&lt;br /&gt;&lt;a name="1038229"&gt;&lt;/a&gt;Contains the same logical information as the production database, although the physical organization and structure of the data can be different. It is kept synchronized with the primary database by transforming the data in the redo logs received from the primary database into SQL statements and then executing the SQL statements on the standby database. A logical standby database can be used for other business purposes in addition to disaster recovery requirements. This allows users to access a logical standby database for queries and reporting purposes at any time. Thus, a logical standby database can be used concurrently for data protection and reporting.&lt;br /&gt;&lt;br /&gt;For more details about Stand By databases visit the link below.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm"&gt;http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/concepts.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;22- RAC? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Real Application Clusters harnesses the processing power of multiple interconnected computers. Real Application Clusters software and a collection of hardware known as a cluster unite the processing power of each component to create a robust computing environment.&lt;br /&gt;&lt;br /&gt;You can use Real Application Clusters to deliver high performance, increased throughput, and high availability. Before deploying Real Application Clusters, however, you should understand Real Application Clusters processing.&lt;br /&gt;&lt;br /&gt;In Real Application Clusters environments, all active instances can concurrently execute transactions against a shared database. Real Application Clusters coordinates each instance's access to the shared data to provide data consistency and data integrity.&lt;br /&gt;&lt;br /&gt;Harnessing the power of clusters offers obvious advantages. A large task divided into subtasks and distributed among multiple nodes is completed sooner and more efficiently than if you processed the entire task on one node. Cluster processing also provides increased performance for larger workloads and for accommodating rapidly growing user populations.&lt;br /&gt;&lt;br /&gt;For more details visit the link below.&lt;br /&gt;&lt;a href="http://download-uk.oracle.com/docs/cd/B10501_01/rac.920/a96597/psintro.htm"&gt;http://download-uk.oracle.com/docs/cd/B10501_01/rac.920/a96597/psintro.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;br /&gt;23- Partitioning (List, Range, Hash) &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;More details: &lt;a href="http://www.devarticles.com/c/a/Oracle/Partitioning-in-Oracle/"&gt;http://www.devarticles.com/c/a/Oracle/Partitioning-in-Oracle/&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Partitioning provides facilities for implementing large, scalable applications. Enables control over tables &amp;amp; indexes at a lower level of granularity than is possible with basic enterprise edition.&lt;br /&gt;&lt;br /&gt;CREATE TABLESPACE part1&lt;br /&gt;DATAFILE 'c:\temp\part01.dbf' SIZE 50&lt;br /&gt;MBLOCKSIZE 8192&lt;br /&gt;EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;ONLINE;&lt;br /&gt;&lt;br /&gt;CREATE TABLESPACE part2&lt;br /&gt;DATAFILE 'c:\temp\part02.dbf' SIZE 50M&lt;br /&gt;BLOCKSIZE 8192&lt;br /&gt;EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;ONLINE;&lt;br /&gt;&lt;br /&gt;CREATE TABLESPACE part3&lt;br /&gt;DATAFILE 'c:\temp\part03.dbf' SIZE 50M&lt;br /&gt;BLOCKSIZE 8192&lt;br /&gt;EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;ONLINE;&lt;br /&gt;&lt;br /&gt;CREATE TABLESPACE part4&lt;br /&gt;&lt;br /&gt;DATAFILE 'c:\temp\part04.dbf' SIZE 50M&lt;br /&gt;BLOCKSIZE 8192&lt;br /&gt;EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K&lt;br /&gt;SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;ONLINE;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;HASH Partitioning&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Hash Partitioning, which maps data to partitions based on a hashing algorithm, evenly distributing data between the partitions. This is typically used where ranges aren't appropriate, i.e. customer number, product ID&lt;br /&gt;Enables partitioning of data that does not lend itself to range or list partitioning.To view the numbers Oracle uses for hashing:&lt;br /&gt;SELECT program, sql_hash_value, prev_hash_value FROM gv$session;&lt;br /&gt;&lt;br /&gt;CREATE TABLE hash_part (&lt;br /&gt;prof_history_id NUMBER(10),&lt;br /&gt;person_id NUMBER(10) NOT NULL,&lt;br /&gt;organization_id NUMBER(10) NOT NULL,&lt;br /&gt;record_date DATE NOT NULL,&lt;br /&gt;prof_hist_comments VARCHAR2(2000))&lt;br /&gt;PARTITION BY HASH (prof_history_id)&lt;br /&gt;PARTITIONS 3&lt;br /&gt;STORE IN (part1, part2, part3);&lt;br /&gt;&lt;br /&gt;desc prof_hist&lt;br /&gt;&lt;br /&gt;SELECT table_name, tablespace_name, partitioned&lt;br /&gt;FROM user_tables;&lt;br /&gt;&lt;br /&gt;desc user_tab_partitions&lt;br /&gt;&lt;br /&gt;SELECT partition_name, tablespace_name&lt;br /&gt;FROM user_tab_partitions;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;LIST Partitioning&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;Explicitly controls how rows map to partitions. You do this by specifying a list of discrete values for the partitioning key in the description for each partition.&lt;br /&gt;&lt;br /&gt;CREATE TABLE list_part (&lt;br /&gt;deptno NUMBER(10),&lt;br /&gt;deptname VARCHAR2(20),&lt;br /&gt;quarterly_sales NUMBER(10,2),&lt;br /&gt;state VARCHAR2(2))&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;PARTITION BY LIST&lt;/span&gt; (&lt;span style="color:#ff9900;"&gt;state&lt;/span&gt;)&lt;br /&gt;(PARTITION q1_northwest VALUES ('OR', 'WA')&lt;br /&gt;TABLESPACE part1,&lt;br /&gt;PARTITION q1_southwest VALUES ('AZ', 'CA', 'NM')&lt;br /&gt;TABLESPACE part2,&lt;br /&gt;PARTITION q1_northeast VALUES ('NY', 'VT', 'NJ')&lt;br /&gt;TABLESPACE part1,&lt;br /&gt;PARTITION q1_southeast VALUES ('FL', 'GA')&lt;br /&gt;TABLESPACE part2,&lt;br /&gt;PARTITION q1_northcent VALUES ('MN', 'WI')&lt;br /&gt;TABLESPACE part1,&lt;br /&gt;PARTITION q1_southcent VALUES ('OK', 'TX')&lt;br /&gt;TABLESPACE part2);&lt;br /&gt;&lt;br /&gt;SELECT table_name, tablespace_name, partitioned&lt;br /&gt;FROM user_tables;&lt;br /&gt;&lt;br /&gt;SELECT partition_name, tablespace_name, high_valueFROM user_tab_partitions;&lt;br /&gt;&lt;br /&gt;INSERT INTO list_part VALUES (10, 'A', 1000, 'OR');&lt;br /&gt;INSERT INTO list_part VALUES (20, 'B', 1000, 'AZ');&lt;br /&gt;INSERT INTO list_part VALUES (10, 'A', 1000, 'WA');&lt;br /&gt;INSERT INTO list_part VALUES (20, 'B', 1000, 'WA');&lt;br /&gt;INSERT INTO list_part VALUES (10, 'A', 1000, 'AZ');&lt;br /&gt;INSERT INTO list_part VALUES (20, 'B', 1000, 'CA');&lt;br /&gt;COMMIT;&lt;br /&gt;&lt;br /&gt;SELECT * FROM list_part;&lt;br /&gt;SELECT * FROM list_part PARTITION(q1_northwest);&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;RANGE Partition&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;Range Partitioning, which maps data to partitions based on a range of column values (usually a date column)&lt;br /&gt;&lt;br /&gt;CREATE TABLE range_part (prof_history_id NUMBER(10),&lt;br /&gt;person_id NUMBER(10) NOT NULL,&lt;br /&gt;organization_id NUMBER(10) NOT NULL,&lt;br /&gt;record_date DATE NOT NULL,&lt;br /&gt;ph_comments VARCHAR2(200))&lt;br /&gt;&lt;span style="color:#ff6600;"&gt;PARTITION BY RANGE&lt;/span&gt; (&lt;span style="color:#ff6600;"&gt;record_date&lt;/span&gt;) (&lt;br /&gt;PARTITION yr0&lt;br /&gt;VALUES LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))&lt;br /&gt;TABLESPACE part1,&lt;br /&gt;PARTITION yr1 VALUES LESS THAN (TO_DATE('01-JAN-2001','DD-MON-YYYY')) TABLESPACE part2,&lt;br /&gt;PARTITION yr2 VALUES LESS THAN (TO_DATE('01-JAN-2002','DD-MON-YYYY'))&lt;br /&gt;TABLESPACE part3,&lt;br /&gt;PARTITION yr9 VALUES LESS THAN (MAXVALUE)&lt;br /&gt;TABLESPACE part4);&lt;br /&gt;&lt;br /&gt;SELECT table_name, tablespace_name, partitioned&lt;br /&gt;FROM user_tables;&lt;br /&gt;&lt;br /&gt;SELECT partition_name, tablespace_name, high_value&lt;br /&gt;FROM user_tab_partitions;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;24- If my application is slow, how can we make it efficient, faster? -How will you tune if application is slow?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;25- RMAN Backups? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;RMAN 9i&lt;br /&gt;&lt;a href="http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmintro.htm"&gt;http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmintro.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;26- ADDM.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;ADDM: Automatic database diagnostic monitor. ADDM enables Oracle to diagnose its own performance problems. For example, ADDM identifies the most resource intensive SQL statements and passes that statement to the SQL tuning advisor.&lt;br /&gt;&lt;br /&gt;ADDM automatically monitors the state of the database at short, regular intervals (by default: 30 mins) which leads to database performance diagnostics. It promises that you can forget all of your scripts that link the many v$ views. ADDM can be run from Enterprise Manager or through a PL/SQL interface.&lt;br /&gt;&lt;br /&gt;SQL tuning advisor In my last column, I focused on one of Oracle Database 10g's quick wins for DBAs—using the new SQL Tuning Advisor to quickly tune poorly performing SQL statements—and touched only briefly on the new built-in diagnostic engine,&lt;br /&gt;ADDM details &lt;a href="http://www.oracle-base.com/articles/10g/AutomaticDatabaseDiagnosticMonitor10g.php"&gt;http://www.oracle-base.com/articles/10g/AutomaticDatabaseDiagnosticMonitor10g.php&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;27- AWR.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;AWR automatic workload repository looks periodically at the system performance (by default every 60 minutes) and stores the information found (by default up to 7 days). This allows retrieving information about workload changes and database usage patterns.&lt;br /&gt;This information is the basis for all self-management decisions. For example, it is thus possible to identify the SQL statements that have the&lt;br /&gt;· larges CPU consumption&lt;br /&gt;· most buffer gets&lt;br /&gt;· disk reads&lt;br /&gt;· most &lt;a href="http://www.adp-gmbh.ch/ora/misc/hard_parse_vs_soft_parse.html"&gt;parse calls&lt;/a&gt;&lt;br /&gt;· shared memory&lt;br /&gt;The data is fed from &lt;a href="http://www.adp-gmbh.ch/ora/concepts/processes/mmon.html"&gt;MMON&lt;/a&gt;.&lt;br /&gt;The information is stored in the &lt;a href="http://www.adp-gmbh.ch/ora/concepts/tablespaces.html#sysaux"&gt;sysaux&lt;/a&gt; tablespace.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;28- Flashback? What is flashback in 10g? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;With Oracle's flashback, it's possible to sort of travel back in time. That is, flashback provides a means to see data that was altered through DDL operations and the state of database objects that were changed with DML operations. Oracle subcategorises flashback into three categories: • Flashback queryGet previous data with the as of clause of a select statement. See Flashback query example 1.&lt;br /&gt;• Flashback version queryGet changes of data between a time interval using the versions between clause of a select statement. See Flashback version query example 1.&lt;br /&gt;• Flashback transaction queryFind changes of a specific transaction through the flashback_transaction_query view. See Flashback transaction version query example 1. • Flashback Table&lt;br /&gt;• Flashback dropUndrops a dropped table.&lt;br /&gt;• flashback database In order to make flashback possible, Oracle uses undo.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.adp-gmbh.ch/ora/admin/flashback/version_query_ex_1.html"&gt;http://www.adp-gmbh.ch/ora/admin/flashback/version_query_ex_1.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;29- What is command for restoring from recycle bin? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;To reinstate the table, all you have to do is use the FLASHBACK TABLE command: &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;SQL&gt; FLASHBACK TABLE RECYCLETEST TO BEFORE DROP;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;PURGE RECYCLEBIN;But what if you want to drop the table completely, without needing a flashback feature? In that case, you can drop it permanently using:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#3333ff;"&gt;&lt;span style="color:#000000;"&gt;DROP TABLE RECYCLETEST PURGE;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span color="#3333ff"&gt;&lt;span style="color:#000000;"&gt;This command will not rename the table to the recycle bin name; rather, it will be deleted permanently, as it would have been pre-10g.&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;2nd interview.&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3366ff;"&gt;30- Difference between User &amp;amp; Schema?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;A schema is a collection of database objects. A schema is owned by a database user and has the same name as that user. Schema objects are the logical structures that directly refer to the database's data. Schema objects include structures like tables, views, and indexes. (There is no relationship between a tablespace and a schema. Objects in the same schema can be in different tablespaces, and a tablespace can hold objects from different schemas.)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;31- Cluster key?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;A cluster provides an optional method of storing table data. A cluster is made up of a group of tables that share the same data blocks. The tables are grouped together because they share common columns and are often used together. For example, the emp and dept table share the deptno column. When you cluster the emp and dept tables (see &lt;a href="http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/clustrs.htm#1822"&gt;Figure 18-1&lt;/a&gt;), Oracle physically stores all rows for each department from both the emp and dept tables in the same data blocks.&lt;br /&gt;&lt;br /&gt;The cluster key is the column, or group of columns, that the clustered tables have in common. You specify the columns of the cluster key when creating the cluster. You subsequently specify the same columns when creating every table added to the cluster. Each cluster key value is stored only once each in the cluster and the cluster index, no matter how many rows of different tables contain the value.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;32- RAC? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Go to Question/Answer 22&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;33- What are duties of DBA? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;• To plan &amp;amp; Create Databases&lt;br /&gt;• To Manage Database Availability&lt;br /&gt;• To Manage Physical &amp;amp; Logical Structure&lt;br /&gt;• To Manage Storage based on design&lt;br /&gt;• To manage security&lt;br /&gt;• Network Administration&lt;br /&gt;• Backup &amp;amp; Recovery&lt;br /&gt;• Database Tuning&lt;br /&gt;• Import &amp;amp; Export&lt;br /&gt;• Creating tables&lt;br /&gt;• Creating Schemas and Objects&lt;br /&gt;&lt;br /&gt;34- What is Difference among NOMOUNT &amp;amp; MOUNT &amp;amp; OPEN modes? When Database will be available for read?&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;NOMOUNT&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;When you issue the startup command, the first thing the database will do is enter the nomount stage. During the nomount stage, Oracle first opens and reads the initialization parameter file (init.ora) to see how the database is configured. For example, the sizes of all of the memory areas in Oracle are defined within the parameter file.&lt;br /&gt;After the parameter file is accessed, the memory areas associated with the database instance are allocated. Also, during the nomount stage, the Oracle background processes are started. Together, we call these processes and the associated allocated memory the Oracle instance. Once the instance has started successfully, the database is considered to be in the nomount stage. If you issue the startup command, then Oracle will automatically move onto the next stage of the startup, the mount stage.&lt;br /&gt;The database can be configured on NOMOUNT mode&lt;br /&gt;&lt;&gt; When Creating a Database&lt;br /&gt;&lt;&gt; When re-creating Control File.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;MOUNT MODE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;When the startup command enters the mount stage, it opens and reads the control file. The control file is a binary file that tracks important database information, such as the location of the database datafiles.&lt;br /&gt;In the mount stage, Oracle determines the location of the datafiles, but does not yet open them. Once the datafile locations have been identified, the database is ready to be opened.&lt;br /&gt;Some forms of recovery require that the database be opened in mount stage.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;OPEN MODE&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;The last startup step for an Oracle database is the open stage. When Oracle opens the database, it accesses all of the datafiles associated with the database. Once it has accessed the database datafiles, Oracle makes sure that all of the database datafiles are consistent.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;35- What is SGA? And what are its components?&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#3366ff;"&gt;System Global Area: &lt;/span&gt;&lt;/strong&gt;The System Global Area (SGA) is a shared memory region that contains data and control information for one Oracle instance. Oracle allocates the SGA when an instance starts and deallocates it when the instance shuts down. Each instance has its own SGA.&lt;br /&gt;Users currently connected to an Oracle database share the data in the SGA. For optimal performance, the entire SGA should be as large as possible (while still fitting in real memory) to store as much data in memory as possible and to minimize disk I/O.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;SGA Components: &lt;/span&gt;&lt;/strong&gt;The information stored in the SGA is divided into several types of memory structures, including the database buffers, redo log buffer, and the shared pool.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Database Buffer Cache of the SGA:&lt;/span&gt;&lt;/strong&gt; Database buffers store the most recently used blocks of data. The set of database buffers in an instance is the database buffer cache. The buffer cache contains modified as well as unmodified blocks. Because the most recently (and often, the most frequently) used data is kept in memory, less disk I/O is necessary, and performance is improved.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Redo Log Buffer of the SGA:&lt;/span&gt;&lt;/strong&gt; The redo log buffer stores redo entries—a log of changes made to the database. The redo entries stored in the redo log buffers are written to an online redo log, which is used if database recovery is necessary. The size of the redo log is static.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Shared Pool of the SGA:&lt;/span&gt;&lt;/strong&gt; The shared pool contains shared memory constructs, such as shared SQL areas. A shared SQL area is required to process every unique SQL statement submitted to a database. A shared SQL area contains information such as the parse tree and execution plan for the corresponding statement. A single shared SQL area is used by multiple applications that issue the same statement, leaving more shared memory for other uses.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;36- How can we allocate SGA? How we can know it proper size? How should we estimate? How can we calculate size of SGA? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Check SGA Size Tips at following links.&lt;br /&gt;&lt;a href="http://www.dba-oracle.com/t_sga_sizing.htm"&gt;http://www.dba-oracle.com/t_sga_sizing.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;38- How can you perform Fragmentation in tables? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;(No Comments) &lt;/p&gt;&lt;p&gt;check this link for 10g Shrink. &lt;a href="http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-10.8045550726"&gt;http://www.dbazine.com/blogs/blog-cf/chrisfoot/blogentry.2005-09-10.8045550726&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;39-Suppose, if You export table data and then import? Does it perform fragmentation? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;Yes..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;40- Interviewer Asked from me:-”Tell me if you are DBA, u left the office at night, and when u arrive at office in the morning”, what you will check in database? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;(No Comments)&lt;br /&gt;I have recently joined a Company, and we have a Checklist that I used to check in the morning, that containts:&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Primary Database:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;* OracelServiceABC&lt;br /&gt;* OracleListnerABC&lt;br /&gt;* ArchivedLogSequence #&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;Backups:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;* HOT BACKUPS&lt;br /&gt;* Export Full Database&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Standby Databases:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;* OracelServiceABCYZ&lt;br /&gt;* OracleListnerABCYZ&lt;br /&gt;* ArchivedLogSequence #&lt;br /&gt;* DataGuard Status&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;41- How can you schedule a job? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;(No comments)&lt;br /&gt;You can check in my blog for schedule a batch job.&lt;br /&gt;&lt;a href="http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html"&gt;http://rakeshocp.blogspot.com/2007/09/batch-file-scripts.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;42- RAID? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;In computing, specifically computer storage, a Redundant Array of Independent Drives (or Disks), also known as Redundant Array of Inexpensive Drives (or Disks), (RAID) is an umbrella term for data storage schemes that divide and/or replicate data among multiple hard drives. &lt;strong&gt;RAID can be designed to provide increased data reliability or increased I/O performance, or both. &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Follow the links below for RAID information&lt;br /&gt;&lt;a href="http://www.ecs.umass.edu/ece/koren/architecture/Raid/raidhome.html"&gt;http://www.ecs.umass.edu/ece/koren/architecture/Raid/raidhome.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/RAID"&gt;http://en.wikipedia.org/wiki/RAID&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.dba-oracle.com/oracle_tips_raid_usage.htm"&gt;http://www.dba-oracle.com/oracle_tips_raid_usage.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;43- New feature of 10g for DBAz? &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;CHeck 10g new features for DBAz &lt;a href="http://www.oracle.com/technology/pub/articles/10gdba/index.html"&gt;http://www.oracle.com/technology/pub/articles/10gdba/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;44- What is Database? RDBMS? Rules?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;DATABASE:&lt;/span&gt;&lt;/strong&gt; A collection of information organized in such a way that a computer program can quickly select desired pieces of data.&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;strong&gt;RDBMS:&lt;/strong&gt;&lt;/span&gt; a type of database management system (DBMS) that stores data in the form of related tables. Relational databases are powerful because they require few assumptions about how data is related or how it will be extracted from the database. As a result, the same database can be viewed in many different ways. An important feature of relational systems is that a single database can be spread across several tables. This differs from flat-file databases, in which each database is self-contained in a single table.&lt;br /&gt;Almost all full-scale database systems are RDBMS's. Small database systems, however, use other designs that provide less flexibility in posing queries.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Rules:&lt;/span&gt;&lt;/strong&gt; Codd's 12 rules are a set of 12 rules proposed by Edgar F. Codd, a pioneer of the relational model for databases, designed to define what is required from a database management system in order for it to be considered relational i.e and RDBMS. visit the link below for Codd's 12 rules.&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Codd"&gt;http://en.wikipedia.org/wiki/Codd&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have tried my level best to help Fresh DBAz to get an idea of Questions that are mostly asked for fresh DBA job.&lt;br /&gt;I couldn't answer few questions thats why i have answered no comments in Answer.&lt;br /&gt;&lt;br /&gt;Regards!!&lt;br /&gt;Rakesh Kumar Soni.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-2773122321041169496?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/2773122321041169496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=2773122321041169496' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2773122321041169496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/2773122321041169496'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2007/10/oracle-interview-questions.html' title='Oracle Interview Questions'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-863556891447115275</id><published>2007-09-21T12:36:00.000-07:00</published><updated>2008-12-26T04:32:13.352-08:00</updated><title type='text'>About Mee..</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_7q_6gQX9sUQ/SVTONgppXWI/AAAAAAAAAHE/KcgqwI-o2wg/s1600-h/Photo080.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5284074994310667618" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 400px; CURSOR: hand; HEIGHT: 300px" alt="" src="http://2.bp.blogspot.com/_7q_6gQX9sUQ/SVTONgppXWI/AAAAAAAAAHE/KcgqwI-o2wg/s400/Photo080.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/SM5hfoKc-qI/AAAAAAAAAE0/sOhGqV9h22s/s1600-h/Sep--2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5246237811918305954" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/SM5hfoKc-qI/AAAAAAAAAE0/sOhGqV9h22s/s400/Sep--2008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/SM5hUxFD66I/AAAAAAAAAEs/Rd-5kRmi_bo/s1600-h/Sep---2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5246237625333050274" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/SM5hUxFD66I/AAAAAAAAAEs/Rd-5kRmi_bo/s400/Sep---2008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_7q_6gQX9sUQ/SM5hIWD7xvI/AAAAAAAAAEk/zkvlqZwUb40/s1600-h/Sep-2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5246237411922134770" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_7q_6gQX9sUQ/SM5hIWD7xvI/AAAAAAAAAEk/zkvlqZwUb40/s400/Sep-2008.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://1.bp.blogspot.com/_7q_6gQX9sUQ/SMkTPXuktgI/AAAAAAAAAEc/S9mrOZ5dVS8/s1600-h/2.jpg"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://4.bp.blogspot.com/_7q_6gQX9sUQ/SB04JyvxvpI/AAAAAAAAADE/DlkrvdZP_tA/s1600-h/rakesh2008.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5196371285947563666" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" height="391" alt="" src="http://4.bp.blogspot.com/_7q_6gQX9sUQ/SB04JyvxvpI/AAAAAAAAADE/DlkrvdZP_tA/s400/rakesh2008.jpg" width="320" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RvQdrOd04fI/AAAAAAAAAAw/9oi6NYNkR0U/s1600-h/glxx.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5112744105427132914" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RvQdrOd04fI/AAAAAAAAAAw/9oi6NYNkR0U/s320/glxx.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiH2Od04nI/AAAAAAAAABw/iS9zzwI4aBw/s1600-h/pic.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5118490342172451442" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiH2Od04nI/AAAAAAAAABw/iS9zzwI4aBw/s320/pic.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="left"&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiHrOd04mI/AAAAAAAAABo/KFYgYYuVZds/s1600-h/pic3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5118490153193890402" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiHrOd04mI/AAAAAAAAABo/KFYgYYuVZds/s320/pic3.JPG" border="0" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_7q_6gQX9sUQ/RwiHYud04lI/AAAAAAAAABg/mtY1cmS2JFE/s1600-h/pic2.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5118489835366310482" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_7q_6gQX9sUQ/RwiHYud04lI/AAAAAAAAABg/mtY1cmS2JFE/s320/pic2.JPG" border="0" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiHLOd04kI/AAAAAAAAABY/Md2WsCdB76E/s1600-h/pic1.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5118489603438076482" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_7q_6gQX9sUQ/RwiHLOd04kI/AAAAAAAAABY/Md2WsCdB76E/s320/pic1.JPG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-863556891447115275?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/863556891447115275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=863556891447115275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/863556891447115275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/863556891447115275'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2007/09/blog-post.html' title='About Mee..'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7q_6gQX9sUQ/SVTONgppXWI/AAAAAAAAAHE/KcgqwI-o2wg/s72-c/Photo080.jpg' height='72' width='72'/><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5103795619781655202.post-4520385949010861118</id><published>2008-12-25T21:21:00.000-08:00</published><updated>2008-12-26T03:57:37.498-08:00</updated><title type='text'>Auditing SYS user in 10g</title><content type='html'>There are two parameters that one need to set to audit SYS users in 10g.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;AUDIT_SYS_OPERATIONS&lt;/strong&gt; static parameter enables or disables the auditing of operations issued by users connecting with SYSDBA or SYSOPER privileges, including the SYS user. All audit records are written to the OS audit trail.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;AUDIT_FILE_DEST &lt;/strong&gt;parameter specifies the OS directory used for the audit trail when the os, xml and xml,extended options are used. It is also the location for all mandatory auditing specified by the AUDIT_SYS_OPERATIONS parameter.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AUDIT_TRAIL:&lt;/strong&gt; You can view audit information in TEXT format or in XML format depending on the parameter audit trail setting.&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter audit&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;----------------------- --------- -------------------------------------------&lt;br /&gt;&lt;br /&gt;audit_file_dest string D:\ORACLE\PRODUCT\10.2.0\DB_1&lt;br /&gt;\RDBMS\AUDIT&lt;br /&gt;audit_sys_operations boolean FALSE&lt;br /&gt;audit_trail string NONE&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;we set audit_trail parameter to value "xml, extended"&lt;br /&gt;&lt;a href="http://www.oracle-base.com/articles/10g/Auditing_10gR2.php"&gt;http://www.oracle-base.com/articles/10g/Auditing_10gR2.php&lt;/a&gt;&lt;br /&gt;SQL&gt; alter system set audit_trail=xml,extended scope=spfile;&lt;br /&gt;System altered.&lt;br /&gt;SQL&gt; show parameter audit&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter audit&lt;br /&gt;&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;&lt;br /&gt;----------------------- --------- -------------------------------------------&lt;br /&gt;audit_file_dest string D:\ORACLE\PRODUCT\10.2.0\DB_1 \RDBMS\AUDIT audit_sys_operations boolean FALSE&lt;br /&gt;&lt;br /&gt;audit_trail string NONE&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;&lt;br /&gt;SQL&gt; startup&lt;br /&gt;ORACLE instance started.&lt;br /&gt;Total System Global Area 167772160 bytes&lt;br /&gt;Fixed Size 1247876 bytes&lt;br /&gt;Variable Size 79693180 bytes&lt;br /&gt;Database Buffers 79691776 bytes&lt;br /&gt;Redo Buffers 7139328 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter audit&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------------------ ----------- ------------------------------&lt;br /&gt;audit_file_dest string D:\ORACLE\PRODUCT\10.2.0\DB_1&lt;br /&gt;\RDBMS\AUDIT&lt;br /&gt;audit_sys_operations boolean FALSE&lt;br /&gt;audit_trail string XML, EXTENDED&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system set audit_file_dest='D:\oracle\product\10.2.0\admin\rock\audit' scope=spfile;&lt;br /&gt;System altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; alter system set audit_sys_operations=true scope=spfile;&lt;br /&gt;System altered.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;shutdown &amp;amp; restart the database.&lt;br /&gt;&lt;br /&gt;SQL&gt; show parameter audit&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;------------------------ ------------ ----------- ------------------------------&lt;br /&gt;audit_file_dest string D:\ORACLE\PRODUCT\10.2.0ADMIN&lt;br /&gt;\ROCK\AUDIT&lt;br /&gt;audit_sys_operations boolean TRUE&lt;br /&gt;audit_trail string XML, EXTENDED&lt;br /&gt;&lt;br /&gt;SQL&gt; create user xyz222&lt;br /&gt;2 identified by xyz222;&lt;br /&gt;User created.&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;br /&gt;NOw we will check whether these commands are audited or not, I will run below query.&lt;br /&gt;&lt;br /&gt;set linesize 3333&lt;br /&gt;column db_user format a10&lt;br /&gt;column os_user format a24&lt;br /&gt;column os_host format a20&lt;br /&gt;column extended_timestamp format a20&lt;br /&gt;column sql_text format a300&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select db_user, os_user, os_host, TO_CHAR(EXTENDED_TIMESTAMP,'fmDd-MM-YYYY HH:MI:SS AM'), sql_text&lt;br /&gt;from v$xml_audit_trail&lt;br /&gt;where db_user in ('sys', 'SYS', '/')&lt;br /&gt;order by 4&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DB_USER OS_USER OS_HOST TO_CHAR(EXTENDED_TIMES SQL_TEXT&lt;br /&gt;---------- ------------------------ -------------------- ----------------------&lt;br /&gt;/ ABAMCO\rakesh.kumar ABAMCO\ABM-D0113 26-12-2008 3:47:23 PM select db_user, os_uSER, os_host, TO_CHAR(EXTENDED_TIMESTAMP,'fmDd-MM-YYYY HH:MI:SS AM'), sql_textfrom v$xml_audit_trailwhere db_user in ('sys', 'SYS', '/')order by 4&lt;br /&gt;&lt;br /&gt;/ ABAMCO\rakesh.kumar ABAMCO\ABM-D0113 26-12-2008 3:48:38 PM create user xyz222identified by *&lt;br /&gt;&lt;br /&gt;/ ABAMCO\rakesh.kumar ABAMCO\ABM-D0113 26-12-2008 3:48:56 PM select db_user, os_uSER, os_host, TO_CHAR(EXTENDED_TIMESTAMP,'fmDd-MM-YYYY HH:MI:SS AM'), sql_textfrom v$xml_audit_trailwhere db_user in ('sys', 'SYS', '/')order by 4&lt;br /&gt;&lt;br /&gt;Auditing other users than sys.&lt;br /&gt;&lt;a href="http://www.oracle-base.com/articles/10g/Auditing_10gR2.php"&gt;http://www.oracle-base.com/articles/10g/Auditing_10gR2.php&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5103795619781655202-4520385949010861118?l=rakeshocp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://rakeshocp.blogspot.com/feeds/4520385949010861118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=5103795619781655202&amp;postID=4520385949010861118' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/4520385949010861118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5103795619781655202/posts/default/4520385949010861118'/><link rel='alternate' type='text/html' href='http://rakeshocp.blogspot.com/2008/12/auditing-sys-user-in-10g.html' title='Auditing SYS user in 10g'/><author><name>Rakesh Kumar Soni</name><uri>http://www.blogger.com/profile/09941861995685929269</uri><email>rakesh.is.ocp@gmail.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10252894763230598410'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>