tag:blogger.com,1999:blog-18356394150637783892024-03-13T22:47:53.411-07:00Oracle Database FlavoursVenkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-1835639415063778389.post-48836262085977573372015-12-17T01:21:00.001-08:002015-12-17T01:21:17.483-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
<b><span style="font-size: large;"> ORA-00600: internal error code, arguments: [kck_rls_check must use (11,0,0,0,0) or lower], [kdt.c]</span></b><br />
<b><span style="font-size: large;"><br /></span></b>
I faced ORA-600 error when I am trying to duplicate the production database.<br />
<br />
Error:<br />
-------<br />
connected to auxiliary database (not started)<br />
RMAN-00571: ===========================================================<br />
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br />
RMAN-00571: ===========================================================<br />
RMAN-03002: failure of Duplicate Db command at 12/17/2015 04:58:33<br />
RMAN-06403: could not obtain a fully authorized session<br />
RMAN-04006: error from auxiliary database: ORA-01034: ORACLE not available<br />
ORA-27101: shared memory realm does not exist<br />
Linux-x86_64 Error: 2: No such file or directory<br />
RMAN-03015: error occurred in stored script Memory Script<br />
RMAN-04014: startup failed: ORA-00600: internal error code, arguments: [kck_rls_check must use (11,0,0,0,0) or lower], [kdt.c], [9576], [11.2.0.2.0], [], [], [], [], [], [], [], []<br />
RMAN-04017: startup error description: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance<br />
<br />
RMAN><br />
<br />
<br />
Solution:<br />
-----------<br />
<br />
It is a reported <b>Bug</b> in Oracle. There is a workaround to resolve this issue.<br />
<br />
1. Shutdown the auxiliary database<br />
2. Remove the control files and the spfile of the auxiliary instance created while duplication process.<br />
3. Edit the pfile and add the parameter "_compression_compatibility"="11.2.0"<br />
4. Start the auxiliary instance to nomount state and start the duplication process.<br />
<br /></div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-63344378805020091692014-08-04T02:07:00.000-07:002014-08-04T02:48:18.800-07:00What to do if some archivelog is missing<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="background: white; line-height: 18.75pt; margin-bottom: 2.25pt; mso-outline-level: 3;">
<span style="font-family: "Arial","sans-serif"; font-size: 15.0pt; mso-fareast-font-family: "Times New Roman";">RMAN Backup error: What to do if
some archivelog is missing or datafile is offline during RMAN backup?<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; mso-outline-level: 4;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br /><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN> crosscheck archivelog all;</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">and
then follwoing to delete expired archivelog.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN> delete expired archive log;</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">Also
refer to the skip inaccessible clause of the backup command. for example...<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN> backup archivelog all skip inaccessible delete
input;</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN>
change archivelog all validate;</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
because without it "skip inaccessible" will be needed any time You
will start backup of archs.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">Moreover,
it can be done with following way also:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">for
the missing archive logs... u can do the following<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">connect target /</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">connect
catalog rman/pwd@rmancatalog</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">run
{</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">change
archivelog from logseq = xxx until logseq =</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">yyy
unavailable;</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">}</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">xxx
and yyy are the logseg numbers, the one's you are missing.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN> RUN</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">{</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SET
MAXCORRUPT FOR DATAFILE 1 TO 10;</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">BACKUP
DATABASE</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SKIP
INACCESSIBLE</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SKIP
READONLY</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SKIP
OFFLINE;</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">}</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">To
back up the database while skipping offline and read-only tablespaces, you can
run the following command:<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">RMAN> BACKUP DATABASE</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SKIP
READONLY</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><br />
</span></b><b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: "Times New Roman";">SKIP
OFFLINE;</span></b><span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: 13.5pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;">
<span style="font-family: "Arial","sans-serif"; font-size: 9.0pt; mso-fareast-font-family: "Times New Roman";">Above
discussion include other file types also if they are not available during
backup and backup is generating exception<span style="color: #555555;">.<o:p></o:p></span></span></div>
<div class="MsoNormal">
<br /></div>
</div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-75841028473967032252014-07-04T00:17:00.003-07:002014-07-04T00:18:09.639-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<h2 style="text-align: left;">
<span style="font-size: x-large;">Issue while trying to tnsping or connecting to database:</span></h2>
<br />
<span style="color: red;"><span style="font-size: large;">TNS-12543: TNS:destination host unreachable</span></span><br />
<br />
There was a request from the client to create a new empty database for testing. We just created the database and provided<br />
the users with the user details. He revert back with a connection error and we tried to connect tnsping the database from a different server, There was<br />
a host unreachable error. It was strange that I can able to ping the host and also login using ssh. Checked if the port was not opened and found its opened.<br />
<br />
The problem is with the firewall was enabled. So just disabled the firewall with the below command:<br />
<br />
<br />
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ********)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SAM)))<br />
<span style="color: red;">TNS-12543: TNS:destination host unreachable </span><br />
<br />
<br />
<b>Turn off the firewall:</b><br />
---------------------<br />
chkconfig iptables off (as a root) or<br />
service iptables stop (as a root)<br />
<br />
<br />
<b>To check the firewall is running or not:</b><br />
---------------------------------------<br />
service iptables status</div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-4956885090901197412012-09-18T09:59:00.001-07:002015-12-17T01:13:11.253-08:00<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
</div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-size: 20pt; line-height: 115%;">Data guard configuration using RMAN backup</span><br />
<br />
<o:p></o:p></div>
<div class="MsoNormal" style="margin-left: .5in;">
<span style="font-family: "arial" , sans-serif;">Versions:</span><br />
CentOs-5.5<br />
Oracle 10.2.0<br />
<br />
<b><span style="font-size: 12pt; line-height: 115%;">Databases information:</span></b><span style="font-size: 12pt; line-height: 115%;"><br />
Primary database name:ACDBP<br />
Primary db unique_name=ACDBP<br />
Standby database name=ACDBP<br />
Standby db_unique_name=ACDBS</span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt; line-height: 115%;">1.<span style="font-size: 7pt; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 115%;">Create the primary database</span><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt; line-height: 115%;">2.<span style="font-size: 7pt; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 115%;">Set the parameter file for the primary database:</span><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<b><u><span style="font-size: 12pt; line-height: 115%;">initACDBP.ora</span></u></b><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: .2in; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 5.0in;" width="480"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">db_cache_size=125M</span><o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">java_pool_size=8M</span><br />
<span style="font-size: 10pt;">large_pool_size=8M</span><br />
<span style="font-size: 10pt;">shared_pool_size=100M</span><br />
<span style="font-size: 10pt;">streams_pool_size=20M</span><br />
<span style="font-size: 10pt;">audit_file_dest='/opt/app/oracle/admin/ACDBP/adump'</span><br />
<span style="font-size: 10pt;">background_dump_dest='/opt/app/oracle/admin/ACDBP/bdump'</span><br />
<span style="font-size: 10pt;">compatible='10.2.0'</span><br />
<span style="font-size: 10pt;">control_files='/opt/app/oracle/oradata/ACDBP/control01.ctl','/opt/app/oracle/admin/ACDBP/controlfile/control02.ctl'</span><br />
<span style="font-size: 10pt;">core_dump_dest='/opt/app/oracle/admin/ACDBP/cdump'</span><br />
<span style="font-size: 10pt;">db_block_size=8192</span><br />
<span style="font-size: 10pt;">db_domain=''</span><br />
<span style="font-size: 10pt;">db_file_multiblock_read_count=16</span><br />
<span style="font-size: 10pt;">db_name='ACDBP'</span><br />
<span style="font-size: 10pt;">db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'</span><br />
<span style="font-size: 10pt;">db_recovery_file_dest_size=2048M</span><br />
<span style="font-size: 10pt;">job_queue_processes=10</span><br />
<span style="font-size: 10pt;">open_cursors=100</span><br />
<span style="font-size: 10pt;">pga_aggregate_target=70M</span><br />
<span style="font-size: 10pt;">processes=50</span><br />
<span style="font-size: 10pt;">remote_login_passwordfile='EXCLUSIVE'</span><br />
<span style="font-size: 10pt;">sga_target=536M</span><br />
<span style="font-size: 10pt;">undo_management='AUTO'</span><br />
<span style="font-size: 10pt;">undo_tablespace='UNDOTBS1'</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
<div class="MsoListParagraph" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="font-size: 10pt;">user_dump_dest='/opt/app/oracle/admin/ACDBP/udump'</span><br />
<span style="font-size: 10pt;">service_names=ACDBP</span><br />
<span style="color: red; font-size: 10pt;">#data guard parameters</span><br />
<span style="font-size: 10pt;">db_unique_name='ACDBP'</span><br />
<span style="font-size: 10pt;">fal_client='ACDBP'</span><br />
<span style="font-size: 10pt;">fal_server='ACDBS'</span><br />
<span style="font-size: 10pt;">log_archive_config='DG_CONFIG=(ACDBP,ACDBS)'</span><br />
<span style="font-size: 10pt;">log_archive_dest_1='LOCATION=/opt/app/oracle/admin/ACDBP/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ACDBP'</span><br />
<span style="font-size: 10pt;">log_archive_dest_2='SERVICE=ACDBS
LGWR ASYNC VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBS'</span><br />
<span style="font-size: 10pt;">#log_archive_dest_2='SERVICE=ACDBS
lgwr sync affirm reopen=10 #VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=ACDBS'</span><br />
<span style="font-size: 10pt;">log_archive_dest_state_1='ENABLE'</span><br />
<span style="font-size: 10pt;">log_archive_dest_state_2='ENABLE'</span><br />
<span style="font-size: 10pt;">log_archive_format='%t_%s_%r.dbf'</span><br />
<span style="font-size: 10pt;">log_archive_max_processes=2</span><br />
<span style="font-size: 10pt;">ACDBP.standby_archive_dest='/opt/app/oracle/admin/ACDBP/arch'</span><br />
<span style="font-size: 10pt;">standby_file_management='AUTO'</span><span style="font-family: "courier new";"><br />
<br />
</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<br />
<br />
<span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<span style="font-size: 12pt; line-height: 115%;">Create the appropriate directories for
the stand by database and set the <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<span style="font-size: 12pt; line-height: 115%;">parameter file for the standby database.</span><br />
<br />
<b><u><span style="font-size: 12pt; line-height: 115%;">initACDBS.ora</span></u></b><br />
<br />
<span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 9.9pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 5.25in;" width="504"><div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
db_cache_size=125M<br />
java_pool_size=8M<br />
large_pool_size=8M<br />
shared_pool_size=100M<br />
streams_pool_size=20M<br />
audit_file_dest='/opt/app/oracle/admin/ACDBS/adump'<br />
background_dump_dest='/opt/app/oracle/admin/ACDBS/bdump'<br />
compatible='10.2.0'<br />
control_files='/opt/app/oracle/oradata/ACDBS/standby1.ctl'<br />
core_dump_dest='/opt/app/oracle/admin/ACDBS/cdump'<br />
db_block_size=8192<br />
db_domain=''<br />
db_file_multiblock_read_count=16<br />
db_name='ACDBP'<br />
db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'<br />
db_recovery_file_dest_size=2048M<br />
job_queue_processes=10<br />
open_cursors=100<br />
pga_aggregate_target=70M<br />
processes=50<br />
remote_login_passwordfile='EXCLUSIVE'<br />
sga_target=536M<br />
undo_management='AUTO'<br />
undo_tablespace='UNDOTBS1'<br />
user_dump_dest='/opt/app/oracle/admin/ACDBS/udump'<br />
service_names=ACDBS<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="color: red;">#data guard
parameters</span><br />
db_unique_name='ACDBS'<br />
fal_client='ACDBS'<br />
fal_server='ACDBP'<br />
log_archive_config='DG_CONFIG=(ACDBS,ACDBP)'<br />
log_archive_dest_1='LOCATION=/opt/app/oracle/admin/ACDBS/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ACDBS'<br />
#log_archive_dest_2='SERVICE=ACDBS LGWR ASYNC
VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) #DB_UNIQUE_NAME=ACDBS'<br />
log_archive_dest_2='SERVICE=ACDBP LGWR ASYNC
VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBP'<br />
log_archive_dest_state_1='ENABLE'<br />
log_archive_dest_state_2='ENABLE'<br />
log_archive_format='%t_%s_%r.dbf'<br />
db_file_name_convert='/opt/app/oracle/oradata/ACDBP/datafile','/opt/app/oracle/oradata/ACDBS/datafile'<br />
log_file_name_convert='/opt/app/oracle/oradata/ACDBP/logfile','/opt/app/oracle/oradata/ACDBS/logfile','/opt/app/oracle/admin/ACDBP/logfile','/opt/app/oracle/admin/ACBS/logfile'<br />
log_archive_max_processes=2<br />
standby_archive_dest='/opt/app/oracle/admin/ACDBS/arch'<br />
standby_file_management='AUTO'<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br />
<br />
<span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt; line-height: 115%;">3.<span style="font-size: 7pt; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 115%;">Configure the listener and tns entries on both
primary and standby database </span><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<span style="font-size: 12pt; line-height: 115%;">servers:</span><br />
<br />
<span style="font-size: 12pt; line-height: 115%;">Primary listener.ora and tnsnames.ora:</span><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<b><u><span style="color: red; font-size: 12pt; line-height: 115%;">listener.ora:</span></u></b><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: "courier new"; font-size: 10pt;">LISTENER =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = IPC)(KEY = ACDBP))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> )</span><span style="font-size: 10pt;"><br />
<br />
</span><span style="font-family: "courier new"; font-size: 10pt;">SID_LIST_LISTENER
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SID_DESC =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ORACLE_HOME
= /opt/app/oracle/product/10.2.0)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_NAME
= ACDBP)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SID_DESC =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ORACLE_HOME
= /opt/app/oracle/product/10.2.0)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_NAME
= PLSExtProc)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(PROGRAM = extproc)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<b><br />
</b><b><u><span style="color: red; font-size: 12pt; line-height: 115%;">tnsnames.ora:<o:p></o:p></span></u></b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: "courier new"; font-size: 10pt;">ACDBS =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.211)(PORT = 1521))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (CONNECT_DATA
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SERVER = DEDICATED)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SERVICE_NAME
= ACDBS)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> )</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br />
<span style="font-size: 12pt; line-height: 115%;">Standby listener .ora and tnsnames.ora:</span><br />
<b><u><span style="color: red; font-size: 12pt; line-height: 115%;">listener.ora:<o:p></o:p></span></u></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: "courier new"; font-size: 10pt;">LISTENER =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = IPC)(KEY = ACDBS))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = TCP)(HOST = 192.168.1.211)(PORT = 1521))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> )</span><span style="font-size: 10pt;"><br />
<br />
</span><span style="font-family: "courier new"; font-size: 10pt;">SID_LIST_LISTENER
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SID_DESC =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ORACLE_HOME
= /opt/app/oracle/product/10.2.0)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_NAME
= ACDBS)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> </span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SID_DESC =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ORACLE_HOME
= /opt/app/oracle/product/10.2.0)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SID_NAME
= PLSExtProc)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(PROGRAM = extproc)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br />
<b><u><span style="color: red; font-size: 12pt; line-height: 115%;">tnsnames.ora:</span></u></b><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<span style="font-family: "courier new"; font-size: 10pt;">ACDBP =</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (DESCRIPTION
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (ADDRESS_LIST
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521))</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (CONNECT_DATA
=</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
(SERVER = DEDICATED)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> (SERVICE_NAME
= ACDBSP)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;">
)</span><span style="font-size: 10pt;"><br />
</span><span style="font-family: "courier new"; font-size: 10pt;"> )</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt; line-height: 115%;">4.<span style="font-size: 7pt; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 115%;">Enable
the archive for the primary database.</span><br />
<span style="font-size: 10pt; line-height: 115%;">SQL>shut
immediate;</span><span style="font-size: 10pt; line-height: 115%;"><br />
SQL>startup mount;<br />
SQL>alter database archivelog;<br />
SQL>alter database open;</span><br />
<br />
<span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 53.75pt; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt; line-height: 115%;">5.<span style="font-size: 7pt; line-height: normal;"> </span></span><span style="font-size: 12pt; line-height: 115%;">Create the standby logfiles in the primary database.</span><br />
<br />
<span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
ALTER DATABASE ADD STANDBY LOGFILE GROUP 3
('/opt/app/oracle/admin/ACDBP/logfile/redo_stand_1a.log','/opt/app/oracle/oradata/ACDBP/logfile/redo_stand_1b.log')
size 10M;<br />
/<br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 ('/opt/app/oracle/admin/ACDBP/logfile/redo_stand_1a.log','/opt/app/oracle/oradata/ACDBP/logfile/redo_stand_1b.log')
size 10M;<br />
/<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt; text-indent: -0.25in;">
<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="_Toc201741127"><span style="font-size: 10pt;">6.<span style="font-size: 7pt;">
</span></span><span style="font-size: 12pt;">Creating a Standby Database from the Primary via
RMAN</span></a><span style="font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 53.75pt;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="apple-style-span">a.<span style="font-size: 7pt;"> </span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">Launch RMAN
to connect to the ACDBP database and check the current </span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">RMAN
configuration(</span></span><span class="apple-style-span"><span style="color: red; font-size: 12pt; line-height: 115%;">On production server</span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">)</span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-style-span">$</span><span class="apple-style-span">rman
target /<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-style-span">RMAN>show all;</span><span class="apple-style-span"><span style="font-family: "arial" , sans-serif; font-size: 7pt;"><o:p></o:p></span></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;">
<span style="font-family: "arial" , sans-serif;">b.<span style="font-family: "times new roman"; font-size: 7pt;">
</span></span><span style="font-family: "times new roman" , serif; font-size: 7pt;"> </span><span style="font-family: "times new roman" , serif; font-size: 7pt;"> </span><span style="font-family: "arial" , sans-serif; font-size: 10pt;">Backup the current
production database to create a standby database:</span><span style="font-family: "arial" , sans-serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 37.35pt; margin-right: 0in; margin-top: 0in; text-indent: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 37.35pt; margin-right: 0in; margin-top: 0in; text-indent: 0.25in;">
<span style="font-size: 10pt;">RMAN> backup database include current
controlfile for standby plus archivelog;<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="apple-converted-space">c.<span style="font-size: 7pt;">
</span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">Manually copy the backup sets from</span></span><span class="apple-converted-space"><span style="font-size: 12pt; line-height: 115%;"> production
to the standby database <o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<span class="apple-converted-space"><span style="font-size: 12pt; line-height: 115%;">server.</span></span><b><span style="color: red; font-size: 12pt; line-height: 115%;"> <span class="apple-style-span">(Location
of backups must match on both production and DR).</span></span></b><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-converted-space"><span style="font-size: 10pt;">$cd
/u01/opt/app/oracle/flash_recovery_area/ACDBP/backupsets/date<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-converted-space"><span style="font-size: 10pt;">$mkdir –p /u01/opt/app/oracle/flash_recovery_area/ACDBP/backupsets/date
(</span></span><span class="apple-converted-space"><span style="color: red; font-size: 10pt;">on standby
server</span></span><span class="apple-converted-space"><span style="font-size: 10pt;">)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-converted-space"><span style="font-size: 10pt;">$scp *
oracle@192.168.1.211:
/u01/opt/app/oracle/flash_recovery_area/ACDBP/backupsets/date<o:p></o:p></span></span></div>
<div class="MsoListParagraph" style="margin-bottom: 0.0001pt; margin-left: 0in; margin-right: 0in; margin-top: 0in;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="apple-style-span">d.<span style="font-size: 7pt;"> </span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">On Standby database server startup ACDBS database
in nomount </span></span><span class="apple-style-span"><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 55.35pt; mso-add-space: auto;">
<span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">mode( <span style="color: red;">standby server</span>)</span></span><span style="font-size: 9pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">$export ORACLE_SID=ACDBS<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">$sqlplus / as sysdba<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL>startup nomount<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL>exit</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span class="apple-style-span">e.<span style="font-size: 7pt;"> </span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">Create the
standby database using RMAN (</span></span><span class="apple-style-span"><span style="color: #00b050; font-size: 12pt; line-height: 115%;">This assumes the database file </span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<span class="apple-style-span"><span style="color: #00b050; font-size: 12pt; line-height: 115%;">structures
will be identical on both servers</span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">)(<span style="color: red;">Standby server</span>):</span></span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-style-span"><span style="font-size: 10pt;">$</span></span><span class="apple-style-span"><span style="font-size: 10pt;">RMAN target ‘sys/abacus@ACDBP’ auxiliary /<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span class="apple-style-span"><span style="font-size: 10pt;">RMAN>duplicate target database for
standby nofilenamecheck dorecover;</span></span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 55.35pt; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
f.<span style="font-size: 7pt;">
</span><span class="apple-style-span"><span style="font-size: 12pt; line-height: 115%;">Put the ACDBS database into managed standby mode:</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL> shutdown immediate;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL> startup nomount;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL> alter database mount standby
database;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL> alter database recover
managed standby database disconnect;</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in; text-indent: -0.25in;">
<span class="apple-style-span">g.<span style="font-size: 7pt;"> </span></span><span class="apple-style-span"><span style="font-size: 12pt;">On the production database switch logs
to initiate replication:</span></span><span class="apple-style-span"><span style="font-size: 12pt;"><o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 53.75pt; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 5.4pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" width="522"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-size: 10pt;">SQL> alter system switch logfile;</span><span style="font-size: 9pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<span style="font-size: 12pt;">The configuration of Dataguard is now complete.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<span style="color: red; font-size: 12pt;">Note:</span><span style="font-size: 12pt;"> Monitor the alertlog file of the production for the
redolog shipping <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<span style="font-size: 12pt;">status and the heartbeat status.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 55.35pt; mso-add-space: auto;">
<span class="apple-style-span"><span style="color: red; font-size: 12pt; line-height: 115%;">nofilenamecheck:</span></span><span class="apple-style-span"><span style="font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="font-size: 10pt; line-height: 115%;">The</span></span><span class="apple-converted-space"><span style="font-size: 10pt; line-height: 115%;"> </span></span><code><span style="font-family: "calibri" , sans-serif; font-size: 10pt; line-height: 115%;">NOFILENAMECHECK</span></code><span class="apple-converted-space"><span style="font-size: 10pt; line-height: 115%;"> </span></span><span class="apple-style-span"><span style="font-size: 10pt; line-height: 115%;">option is required when
the standby and primary datafiles and logs have the same names.<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<span style="color: red; font-size: 12pt; line-height: 115%;">Dorecover:</span><span style="color: red; font-size: 10pt; line-height: 115%;"> </span><span style="font-size: 10pt; line-height: 115%;">By default, RMAN does not recover the standby
database after creating it. If you do not specify the </span><span style="font-size: 10pt; line-height: 115%;">DORECOVER</span><span style="font-size: 10pt; line-height: 115%;"> option of the </span><span style="font-size: 10pt; line-height: 115%;">DUPLICATE</span><span style="font-size: 10pt; line-height: 115%;"> command, then RMAN
automates these steps of the standby creation procedure during duplication:<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000871"></a><span style="font-size: 8pt;">A.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">RMAN
establishes connections both to the primary and standby databases, and the
recovery catalog (if used).<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000872"></a><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<span style="font-size: 8pt;">B.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">RMAN
queries the repository, which is either the primary control file or the
recovery catalog, to identify the backups of primary database datafiles and the
standby control file.<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000873"></a><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<span style="font-size: 8pt;">C.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">If you use
a media manager, then RMAN contacts the media manager on the standby host to
request the backup data.<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000874"></a><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<span style="font-size: 8pt;">D.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">RMAN
restores the standby control file to the standby host, thereby creating the
standby control file.<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000875"></a><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<span style="font-size: 8pt;">E.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">RMAN
restores the primary datafile backups and copies to the standby host, thereby
creating the standby database datafiles.<a href="http://www.blogger.com/blogger.g?blogID=1835639415063778389" name="1000876"></a><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 73.35pt; margin-top: 6pt; text-indent: -0.25in;">
<span style="font-size: 8pt;">F.<span style="font-size: 7pt;">
</span></span><span style="font-size: 10pt;">RMAN
leaves the standby database mounted, but does <i>not</i> place the
standby database in manual or managed recovery mode. RMAN disconnects and does
not perform media recovery of the standby database. Note that you should <i>not</i> register
the standby database in the recovery catalog.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: 0.0001pt; margin-left: 55.35pt; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 55.35pt; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br />
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 11px; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 55pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 15px; vertical-align: baseline;"> </span></div>
<span style="font-family: "arial"; font-size: 15px; vertical-align: baseline;"></span></div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-77903624362472460982012-09-18T09:59:00.000-07:002012-09-18T09:59:22.392-07:00ORA-29833: indextype does not exist<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNoSpacing">
<b><span style="color: red; font-size: 16.0pt;">ORA-29833: indextype does not exist<o:p></o:p></span></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
Environment: </div>
<div class="MsoNoSpacing">
Oracle version: Oracle <b>10gR2 (</b><b><span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: 'Courier New';">10.2.0.4.0</span> )</b></div>
<div class="MsoNoSpacing">
OS version: <b>RHEL
6.2</b> </div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
In my environment, there was a
database migration as the hardware and OS is upgraded. So I installed Oracle 10g in the new server
and created a database with the same name(as existing database). I tried to
export the existing database and imported in the new database. While comparing
the new database schemas with the existing schemas, there are some indexes missing
in the new database schema.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
I
tried to import that schema again, but it is of no use. I tried to create them
manually. Then I encountered with the below error:</div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638">
<div class="MsoNoSpacing">
SQL> CREATE INDEX CPSI.TRACKS$TRACK_NAME ON
CPSI.TRACKS</div>
<div class="MsoNoSpacing">
2 (TRACK_NAME)</div>
<div class="MsoNoSpacing">
3 INDEXTYPE IS CTXSYS.CONTEXT</div>
<div class="MsoNoSpacing">
4 PARAMETERS('sync');</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: #c00000;">ERROR at line 2:<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: #c00000;"> ORA-29833: indextype does not exist<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;">
<div class="MsoNoSpacing" style="border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in;">
Cause:</div>
</div>
<div class="MsoNoSpacing">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial;">There is no index type by the specified name.</span> and my
database is not installed with Oracle Text. We can find this by checking if the
database has CTXSYS default user.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<a href="http://docs.oracle.com/cd/E11882_01/text.112/e24436/csql.htm#CCREF0105">More
info about text index</a></div>
<div class="MsoNoSpacing">
<br /></div>
<div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;">
<div class="MsoNoSpacing" style="border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-padding-alt: 0in 0in 1.0pt 0in; padding: 0in;">
Solution</div>
</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
This can be resolved by installing Oracle Text.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
Issue:</div>
<div class="MsoNoSpacing">
------</div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 1:</span> Ensure the schema CTXSYS does not exist, if
exists ignore the execution of “step 2”. </div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 2:</span> Add the below mentioned statement above the
existing statement(also mentioned below) in the catctx.sql file which is in the
$ORACLE_HOME/ctx/admin" location. </div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
Existing statement : Rem
CTXDEF.sql - ctx default object creation</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
Statement to be added: grant
execute on CTX_DDL to ctxsys ;</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
In SYS user login, execute the
script to create CTXSYS schema and its related objects after confirming below
parameters to this script</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
ctxsys - password of CTXSYS
schema</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
SYSAUX - default tablespace </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
TEMP - default temp tablespace
(Replace if your database default temporary tablespace is different)</div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing" style="text-align: justify;">
SQL>@$ORACLE_HOME/ctx/admin/catctx.sql
ctxsys SYSAUX TEMP NOLOCK</div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 3:</span> In SYS user login execute the below script to
recompile user objects</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing">
SQL>@$ORACLE_HOME/rdbms/admin/utlrp.sql<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 4: </span>In CTXSYS user login, execute the below script to
create default preference for language ENGLISH</div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing">
SQL>@$ORACLE_HOME/ctx/admin/defaults/drdefus.sql<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 5</span> : In SYS User login ,execute the below script to
give grant permission</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing">
SQL>grant ctxapp to DBusername identified by
Password; --( username CPSI in my case)</div>
<div class="MsoNoSpacing">
SQL>grant select on ctxsys.dr$preference to
DBusername; --( username CPSI in my case)</div>
<div class="MsoNoSpacing">
SQL>grant execute on CTX_DDL to DBusername; --(
username CPSI in my case)<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 6: </span>Login as DB user and execute the below drop index
script if any already exists in same name</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing">
SQL>DROP INDEX LEI_CATALOG_SEARCH_SFIELD<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Step 7:</span> Login as DB user and create the below domain
index</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; margin-left: 45.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 391.5pt;" valign="top" width="522">
<div class="MsoNoSpacing">
SQL> CREATE INDEX CPSI.TRACKS$TRACK_NAME ON
CPSI.TRACKS</div>
<div class="MsoNoSpacing">
2 (TRACK_NAME)</div>
<div class="MsoNoSpacing">
3 INDEXTYPE IS CTXSYS.CONTEXT</div>
<div class="MsoNoSpacing">
4 PARAMETERS('sync');<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
Make sure that you should get the following output if you
run the below queries(if your version is <span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: 'Courier New';">10.2.0.4.0</span>
)</div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #BFBFBF; border: solid black 1.0pt; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638">
<div class="MsoNoSpacing">
<span style="background-position: initial initial; background-repeat: initial initial;">SQL> select comp_name, status, substr(version,1,10) as version from
dba_registry where comp_id = 'CONTEXT';</span><br />
<br />
COMP_NAME
STATUS VERSION<br />
---------------------------- -------- ----------<br />
Oracle Text
VALID 10.2.0.4.0<br />
<br />
SQL><br />
SQL> select * from ctxsys.ctx_version;<span style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><br />
<br />
</span><span style="background-position: initial initial; background-repeat: initial initial;">VER_DICT
VER_CODE<br />
---------- ----------<br />
10.2.0.4.0 10.2.0.4.0</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><br />
<br />
</span><span style="background-position: initial initial; background-repeat: initial initial;">SQL><br />
SQL> select substr(ctxsys.dri_version,1,10)
VER_CODE from dual;</span><span style="background-color: white; background-position: initial initial; background-repeat: initial initial;"><br />
</span><br />
<span style="background-position: initial initial; background-repeat: initial initial;">VER_CODE<br />
----------<br />
10.2.0.4.0<br />
<br />
SQL> select count(*) from dba_objects where
owner='CTXSYS';<br />
<br />
COUNT(*)<br />
----------<br />
313</span><span style="background: white; mso-shading-themecolor: background1;"><br />
<br />
</span><span style="background-position: initial initial; background-repeat: initial initial;">SQL><br />
SQL> -- Get a summary count<br />
SQL> select object_type, count(*) from
dba_objects where owner='CTXSYS' group by object_type order by 1;</span><br />
<br />
<span style="background-position: initial initial; background-repeat: initial initial;">OBJECT_TYPE
COUNT(*)<br />
------------------- ----------<br />
FUNCTION
2<br />
INDEX
46<br />
INDEXTYPE
4<br />
LIBRARY
1<br />
LOB
1<br />
OPERATOR
6<br />
PACKAGE
67<br />
PACKAGE
BODY
56<br />
PROCEDURE
2<br />
SEQUENCE
3<br />
TABLE
37<br />
TYPE
27<br />
TYPE
BODY
7<br />
VIEW
54</span><br />
<br />
<span style="background-position: initial initial; background-repeat: initial initial;">14 rows selected.<br />
<br />
SQL> -- Any invalid objects<br />
SQL> select object_name, object_type, status
from dba_objects where owner='CTXSYS' and status != 'VALID' order by
object_name;<br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="background-position: initial initial; background-repeat: initial initial;">no rows selected</span><br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--><o:p></o:p></div>
<div class="MsoNoSpacing">
<span style="background-position: initial initial; background-repeat: initial initial;">SQL></span><br />
SQL> spool off</div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Tahoma, sans-serif; font-size: 10.5pt;">Refer <a href="https://support.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?_afrLoop=242404746425858&id=979705.1&_afrWindowMode=0&_adf.ctrl-state=17387aq2r0_136">DOC
ID:979705.1</a> for more info in metalink</span></div>
<div class="MsoNoSpacing">
<br /></div>
</div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com2tag:blogger.com,1999:blog-1835639415063778389.post-38722773766214809262012-06-25T06:37:00.002-07:002012-06-25T06:37:51.135-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<span class="MsoSubtleEmphasis"><b><span style="font-size: 22.0pt; line-height: 115%;">Oracle Enterprise
Manager Configuration<o:p></o:p></span></b></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><b><span style="font-size: 12.0pt; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-no-proof: yes;">1.<span style="font-size: 7pt; font-weight: normal;">
</span></span></b><!--[endif]--><b><span style="font-size: 12.0pt; mso-no-proof: yes;">create the repository<o:p></o:p></span></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .25in;">
<span style="color: #0070c0; mso-no-proof: yes;">$ emca -config dbcontrol db -repos create<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .25in;">
<span style="color: #0070c0; mso-no-proof: yes;"><br /></span></div>
<div class="MsoNoSpacing" style="text-indent: .25in;">
</div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> <o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #92CDDC; border-collapse: collapse; border: none; mso-background-themecolor: accent5; mso-background-themetint: 153; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-table-layout-alt: fixed; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 369.9pt;" width="493">
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;">Dec 2, 2005 7:35:01 PM
oracle.sysman.emcp.EMReposConfig createRepository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Creating the EM repository (this may take a while) ...<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec
2, 2005 7:35:01 PM oracle.sysman.emcp.EMReposConfig createRepository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> CONFIG:
ORA-20001: SYSMAN already exists..<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> ORA-06512:
at line 17<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<br /></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in;">
<span style="color: red; font-size: 9.0pt; mso-no-proof: yes;">oracle.sysman.assistants.util.sqlEngine.SQLFatalErrorException:
ORA-20001: SYSMAN already exists..<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="color: red; font-size: 9.0pt; mso-no-proof: yes;"> ORA-06512:
at line 17<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<br /></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeImpl(SQLEngine.java:1474)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.assistants.util.sqlEngine.SQLEngine.executeScript(SQLEngine.java:848)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:267)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in; text-indent: .5in;">
<span style="font-size: 9.0pt; mso-no-proof: yes;">at
oracle.sysman.assistants.util.sqlEngine.SQLPlusEngine.executeScript(SQLPlusEngine.java:308)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMReposConfig.createRepository(EMReposConfig.java:422)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:192)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:134)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfig.perform(EMConfig.java:171)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec
2, 2005 7:35:01 PM oracle.sysman.emcp.EMReposConfig invoke<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> SEVERE:
Error creating the repository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec
2, 2005 7:35:01 PM oracle.sysman.emcp.EMReposConfig invoke<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in;">
<span style="font-size: 9.0pt; mso-no-proof: yes;">INFO: Refer to the log file at
/opt/app/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/emca/DBACLASS/emca_repos_create_<date>.log
for more details.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec
2, 2005 7:35:01 PM oracle.sysman.emcp.EMConfig perform<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> SEVERE:
Error creating the repository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 30.6pt; margin-top: 0in;">
<span style="font-size: 9.0pt; mso-no-proof: yes;">Refer to the log file at
/opt/app/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/emca/DBACLASS/emca_2005-12-02_07-34-42-PM.log
for more details.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec
2, 2005 7:35:01 PM oracle.sysman.emcp.EMConfig perform<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> CONFIG:
Stack Trace:<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> oracle.sysman.emcp.exception.EMConfigException:
Error creating the repository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:204)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMReposConfig.invoke(EMReposConfig.java:134)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfig.perform(EMConfig.java:171)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> at
oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-right: 30.6pt;">
<br /></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><br />2.<span style="font-size: 7pt;">
</span><!--[endif]-->As the database
is created manually, the SYSMAN user and some other users like MGMT_USER and
synonyms already exists in the database. So, they should be dropped before the repository is created. If the
user is not dropped the previous error will occur.<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
Drop the SYSMAN user along with the other user
and roles as follows:<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #92CDDC; border: solid black 1.0pt; mso-background-themecolor: accent5; mso-background-themetint: 153; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.15in;" width="590">
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> SQL> drop user sysman cascade;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> User dropped.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> SQL> DROP USER mgmt_view;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> User dropped.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> SQL> DROP PUBLIC SYNONYM
mgmt_target_blackouts;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> Synonym dropped.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> SQL> DROP ROLE mgmt_user;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> Role dropped.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> SQL> DROP PUBLIC SYNONYM
setemviewusercontext;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 10.0pt; mso-no-proof: yes;"> Synonym dropped.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
3.<span style="font-size: 7pt;">
</span><!--[endif]-->Now create the
repository and configure the database control at a time with the below command.<o:p></o:p></div>
<div class="MsoNoSpacing">
It
prompts for the passwords. The passwords should be given in the double quotes.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="color: #0070c0; mso-no-proof: yes;">$ emca -config dbcontrol db -repos create<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<o:p> </o:p><span style="background-color: white;"> </span></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #92CDDC; border: solid black 1.0pt; mso-background-themecolor: accent5; mso-background-themetint: 153; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" width="638">
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;">STARTED
EMCA at Dec 2, 2005 9:21:32 PM<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> EM Configuration Assistant,
Version 10.2.0.1.0 Production<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Copyright (c) 2003, 2005,
Oracle. All rights reserved.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Enter the following
information:<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Database SID: DBACLASS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Database Control is already
configured for the database DBACLASS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> You have chosen to configure
Database Control for managing the database DBACLASS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> This will remove the existing
configuration and the default settings and perform a fresh configuration<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Do you wish to continue?
[yes(Y)/no(N)]: y<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Listener port number: 1521<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Password for SYS user: <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Password for DBSNMP user: <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Password for SYSMAN user: <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Email address for
notifications (optional): venkat.tadi@abacus-concepts.com<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Outgoing Mail (SMTP) server
for notifications (optional): <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> -----------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> You have specified the
following settings<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Database
ORACLE_HOME ................ /opt/app/oracle/oracle/product/10.2.0/db_1<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<br /></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Database
hostname ................ dg2.abacus.com<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Listener
port number ................ 1521<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Database
SID ................ DBACLASS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Email
address for notifications ............... venkat.tadi@abacus-concepts.com<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Outgoing
Mail (SMTP) server for notifications ............... <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<br /></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> -----------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Do you
wish to continue? [yes(Y)/no(N)]: y<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:22:26 PM oracle.sysman.emcp.EMConfig perform<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
This operation is being logged at
/opt/app/oracle/oracle/product/10.2.0/db_1/cfgtoollogs/emca/DBACLASS/emca_2005-12-02_09-21-32-PM.log.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:22:27 PM oracle.sysman.emcp.util.DBControlUtil stopOMS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Stopping Database Control (this may take a while) ...<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:22:30 PM oracle.sysman.emcp.EMReposConfig createRepository<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Creating the EM repository (this may take a while) ...<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:24:14 PM oracle.sysman.emcp.EMReposConfig invoke<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Repository successfully created<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:24:18 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Securing Database Control (this may take a while) ...<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:26:50 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Database Control secured successfully.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:26:50 PM oracle.sysman.emcp.util.DBControlUtil startOMS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Starting Database Control (this may take a while) ...<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:28:28 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
Database Control started successfully<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Dec 2,
2005 9:28:28 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> INFO:
>>>>>>>>>>> The Database Control URL is
https://dg2.abacus.com:1158/em
<<<<<<<<<<<<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Enterprise
Manager configuration completed successfully<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="background-position: initial initial; background-repeat: initial initial;">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> FINISHED
EMCA at Dec 2, 2005 9:28:28 PM<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<div class="MsoNoSpacing">
<span style="background-color: white; text-indent: -0.25in;">4.</span><span style="background-color: white; font-size: 7pt; text-indent: -0.25in;">
</span><span style="background-color: white; text-indent: -0.25in;">Now the OEM is
successfully installed and configured. To check status of the dbconsole:</span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<o:p> </o:p><span style="background-color: white;"> </span><span style="background-color: white; color: #0070c0;">$ emctl status dbconsole</span><span style="background-color: white;"> </span></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="background: #92CDDC; border: solid black 1.0pt; mso-background-themecolor: accent5; mso-background-themetint: 153; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" width="638">
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> TZ set to Asia/Calcutta<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Oracle Enterprise Manager 10g
Database Control Release 10.2.0.4.0 <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Copyright (c) 1996, 2007
Oracle Corporation. All rights
reserved.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> https://dg2.abacus.com:1158/em/console/aboutApplication<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Oracle Enterprise Manager 10g
is running. <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> ------------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> Logs are generated in
directory /opt/app/oracle/oracle/product/10.2.0/db_1/dg2.abacus.com_DBACLASS/sysman/log
<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 9.0pt; mso-no-proof: yes;"> It shows that the OEM is
running. We can check it from the client machine.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]-->5.<span style="font-size: 7pt;">
</span><!--[endif]-->Open the browser
in the client system. and <a href="https://hostname:port/em/%20">https://hostname:port/em/</a> in our case it is <a href="https://dg2.abacus.com:1158/em">https://dg2.abacus.com:1158/em</a><o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing">
<span style="background-color: white;">Screen1—log in page</span><span style="background-color: white;"> </span></div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQKSPuCoKvL7RUF4qXIVuOYczJiltiDQcv_iCShsStWI8ofq99NQLbMLWP-o0krd9aCEG68xa976nryvUyGZ32wDFt1vY3Py0_iBkLqCKZzPR-eDOFJrKG0WQ27Gg2APG-QbOZWsa5t_I/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"> <img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQKSPuCoKvL7RUF4qXIVuOYczJiltiDQcv_iCShsStWI8ofq99NQLbMLWP-o0krd9aCEG68xa976nryvUyGZ32wDFt1vY3Py0_iBkLqCKZzPR-eDOFJrKG0WQ27Gg2APG-QbOZWsa5t_I/s640/1.bmp" width="640" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="MsoNormal">
<o:p> Screen2—license agreement.
</o:p></div>
<div class="MsoNormal">
<o:p> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRBre36dVW4TpvGXRyONjlAuM6f4K06m3T5OUnJJhsvpSHPvmInv1Xolm-I24XPpccNr2Sh2UUckr8Vy1w2fAD9mvBrUVNngeCXZB6IlGp7lx3xQadqUBGyhnGDyooxU4iBKEHBpEwZw4/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRBre36dVW4TpvGXRyONjlAuM6f4K06m3T5OUnJJhsvpSHPvmInv1Xolm-I24XPpccNr2Sh2UUckr8Vy1w2fAD9mvBrUVNngeCXZB6IlGp7lx3xQadqUBGyhnGDyooxU4iBKEHBpEwZw4/s640/2.bmp" width="640" /></a>
</o:p></div>
<div class="MsoNormal">
<span style="background-color: white;">Click on the I agree button</span></div>
<div class="MsoNormal">
<span style="background-color: white;"><br /></span></div>
<div class="MsoNormal">
Screen3—
</div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjlPyioGOpoZLV0SkSWRfWM2h2gRDjazYUYqRs2lIx_Xr7Fpa7jZy58KDs6UpKARY29s4YaQN2fdmLqQeAN0_5ycDl_EwN4XyuK7ruh_9PEhOdCtN51KKUSLZhxQY_QvY0YHbrPDUCUE/s1600/3.bmp" imageanchor="1" style="background-color: white; margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZjlPyioGOpoZLV0SkSWRfWM2h2gRDjazYUYqRs2lIx_Xr7Fpa7jZy58KDs6UpKARY29s4YaQN2fdmLqQeAN0_5ycDl_EwN4XyuK7ruh_9PEhOdCtN51KKUSLZhxQY_QvY0YHbrPDUCUE/s640/3.bmp" width="640" /></a><br />
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /><!--[endif]--></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com1tag:blogger.com,1999:blog-1835639415063778389.post-70939723592716511322012-04-12T09:29:00.001-07:002014-08-04T02:08:18.664-07:00What happens when the database is in Begin backup mode?<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="font-size: 18.0pt; line-height: 115%;">What happens when the database is in
Begin backup mode?<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">When a
hot backup runs in the oracle, first we will make the database in begin backup
mode and then we copy the database files to tape or disk. The question that
most of us will have is: what happens to the datafiles when the database is in </span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">begin backup</span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;"> </span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">mode</span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">? <o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">Offline?
Or frozen? Answer is </span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">No</span></span><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in; text-indent: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">“Some of the Oracle books contains that the
database files are not writable during the backup mode and the changes are
stored in the SGA, redo logs and Rollback segments. And these changes will be
the written into the data files when the database is taken out of begin backup
mode. “<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">But the
above predictions are opposed. It does not stop writing to the data files. The
database almost works in normal way when the database in the backup mode. It
can be summarized in as follows:<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-family: Symbol; font-size: 12pt; line-height: 115%;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">DBWn process
writes out all the dirty blocks of a
particular SCN, i.e. when a check point process runs, the DBWn process writes all
the blocks related to that SCN generated.<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-family: Symbol; font-size: 12pt; line-height: 115%;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">CKPT
process stops updating the checkpoint SCN field in the data files headers
and begins updating the Hot backup
checkpoint SCN field in the data files headers.<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<!--[if !supportLists]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-family: Symbol; font-size: 12pt; line-height: 115%;">·<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;">
</span></span></span><!--[endif]--><span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt; line-height: 115%;">LGWR
process begins logging of the changed blocks.<o:p></o:p></span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">By freezing the checkpoint SCN in the data file headers, any subsequent
recovery on that particular hot backup will know that it must commence at that
SCN. </span></span><span style="font-size: 12.0pt; mso-bidi-font-family: Helvetica; mso-fareast-font-family: "Times New Roman";">Having an old SCN in the file header tells
recovery that the file is an old one, and that it should look for the
archivelog containing that SCN, and applies recovery starting there.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<br /></div>
<div class="MsoNormal" style="line-height: 13.5pt; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in; vertical-align: baseline;">
<span style="font-size: 12.0pt; mso-bidi-font-family: Helvetica; mso-fareast-font-family: "Times New Roman";">Here we need to know that in hot backup mode the <b><i>checkpoints
to data files are not suppressed</i>. </b>The <b>main checkpoint flag is frozen</b>, but the <b><i>hot backup Checkpoint SCN</i></b>
will be updated in the file header. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> create table student(name
varchar(20));<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">Table created.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> select * from tab;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">TNAME TABTYPE CLUSTERID<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">------------------------------ -------
----------<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">DEPT TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">EMP TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">BONUS TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SALGRADE TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">T1 TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; mso-themecolor: background1; mso-themeshade: 128;">STUDENT TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">RAMA TABLE<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">7 rows selected.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Insert some values into the
student table:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> insert into student values('venkat');
<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">1 row created.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> commit;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">Commit complete.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> alter system checkpoint;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">System altered.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Check the block number and
the datafile in which the data is stored.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> select
dbms_rowid.rowid_relative_fno(rowid)
file_num,dbms_rowid.rowid_block_number(rowid) block_num, name from
student; <o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">
FILE_NUM BLOCK_NUM NAME<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">---------- ---------- --------------------<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">
4 68 venkat<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Check the data in the block
number 68 with the dd command:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">[oracle@dg2 ~]$ dd bs=8k skip=68 count=1
if=/u02/oradata/DBACLASS/users01.dbf |strings<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">1+0 records in<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">1+0 records out<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">8192 bytes (8.2 kB) copied, 6.9861e-05
seconds, 117 MB/s<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Insert another row, commit
the transaction and check the block and file information:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> insert into student values('ram');<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">1 row created.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> commit;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">Commit complete.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> select
dbms_rowid.rowid_relative_fno(rowid) "file num",
dbms_rowid.rowid_block_number(rowid) "block num",name from student;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;"> file
num block num NAME<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">----------
---------- --------------------<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">
4 68 venkat<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">
4 68 ram<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Make the database in Backup
mode:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">SQL> alter tablespace users begin backup;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey;">Tablespace altered.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Update the record in the
student table:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">SQL> update student set
name='rama krishna' where name='ram';<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">1 row updated.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">[oracle@dg2 ~]$ dd bs=8k
skip=68 count=1 if=/u02/oradata/DBACLASS/users01.dbf |strings<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">1+0 records in<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">1+0 records out<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">8192 bytes (8.2 kB) copied,
6.5554e-05 seconds, 125 MB/s<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">ram,<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">venkat<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Run the checkpoint process
which creates an SCN and invoke the DBWn process to write the changed blocks to
the datafiles:<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">SQL> alter system
checkpoint;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">System altered.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">Now extract the information
in the 68 block of that particular data file. We can observe that the changes
made to the table (database) are written into the data file during the backup
mode.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">[oracle@dg2 ~]$ dd bs=8k
skip=68 count=1 if=/u02/oradata/DBACLASS/users01.dbf |strings<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">1+0 records in<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">1+0 records out<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">8192 bytes (8.2 kB) copied,
7.0099e-05 seconds, 117 MB/s<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">rama krishna,<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">ram,<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">venkat<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">So, it is clear that the
data files can be writable during the hot backup mode.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: windowtext; font-size: 12pt;">End the tablespace backup
mode.<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">SQL> alter tablespace
users end backup;<o:p></o:p></span></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span class="MsoIntenseEmphasis"><span style="color: grey; font-size: 12pt;">Tablespace altered.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
</div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com2tag:blogger.com,1999:blog-1835639415063778389.post-23668720436015996222012-03-28T07:02:00.000-07:002012-03-28T07:15:01.645-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<h2>
<span style="color: windowtext; font-family: Verdana, sans-serif; font-size: 14pt; font-weight: normal; line-height: 115%;">Buffer Cache Hit
Ratio goes down to Negative values<o:p></o:p></span></h2>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12pt; line-height: 115%;">Today I faced an interesting issue
in my production database. Daily we check the Buffer Cache Hit Ratio of the
database. Today I got the negative value for the hit ratio. <o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12pt; line-height: 115%;">I am using the below formula for
calculating the buffer cache hit ratio</span><span style="font-size: 12pt; line-height: 115%;">.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNoSpacing">
PHYSICAL_READS</div>
<div class="MsoNoSpacing">
1 - ------------------------------------------------------</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
DB_BLOCK_GETS
+ CONSISTENT_GETS</div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNormal" style="text-align: justify;">
<span style="font-size: 12pt; line-height: 115%;">I tried with different formulae
that I got from the google. But it is of no use. The I searched it in the
metalink and I got the answer in it. It was a bug </span><b><i><span style="font-size: 12pt; line-height: 115%;">2645071 </span></i></b><span style="font-size: 12pt; line-height: 115%;">stated in the </span><b><span style="font-size: 12pt; line-height: 115%;">'Oracle Database Performance Tuning
Guide 10g Release 1 (10.1)'</span></b><span style="font-size: 12pt; line-height: 115%;"> and found the
correct formula to calculate the Buffer Cache Hit Ratio<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Arial, sans-serif; font-size: 10.5pt;">
'physical reads cache'</span><span style="font-family: Arial, sans-serif; font-size: 10.5pt;"><br />
</span><span style="font-family: Arial, sans-serif; font-size: 10.5pt;">
1 - -----------------------------------------------------------------------------</span><span style="font-family: Arial, sans-serif; font-size: 10.5pt;"><br />
</span><span style="font-family: Arial, sans-serif; font-size: 10.5pt;"> 'consistent gets from
cache' + 'db block gets from cache'</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.5in;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<span style="font-family: Arial, sans-serif; font-size: 10.5pt; line-height: 115%;">.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-size: 12pt; line-height: 115%;">Where,<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-size: 12pt; line-height: 115%;">‘<b>physical reads cache’=’physical reads’-‘physical reads direct’-‘physical
reads direct(lob)’<o:p></o:p></b></span></div>
<div class="MsoNormal">
<b><span style="font-size: 12pt; line-height: 115%;">‘consistent gets from cache’= ‘consistent
gets’<o:p></o:p></span></b></div>
<div class="MsoNormal">
<b><span style="font-size: 12pt; line-height: 115%;">‘db block gets from cache’= ‘db block
gets’<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-size: 12pt; line-height: 115%;">physical reads direct:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="text-align: justify; text-indent: .5in;">
<b><span style="font-size: 12pt; line-height: 115%;"> </span></b><span style="font-size: 12pt; line-height: 115%;">This Oracle metric is the number of reads directly from the
disk bypassing the buffer cache. For example if there is any request for large
data, </span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-size: 12pt; line-height: 115%;">data-intensive operations such as parallel
query</span>, reads of the disk blocks bypass the buffer cache to maximize the
transfer rates.<o:p></o:p></div>
<div class="MsoNormal">
<span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-size: 12pt; line-height: 115%;">High disk reads indicates the small db
buffer cache size.<o:p></o:p></span></div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-59368103755661754752012-03-27T09:44:00.000-07:002012-03-28T07:11:46.161-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNoSpacing">
ORA-00202: control file: ''</div>
<div class="MsoNoSpacing">
ORA-27036: translation error, unable to expand file name</div>
<div class="MsoNoSpacing">
ORA-205 signalled during: ALTER DATABASE MOUNT...</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
I have an issue in my development database today.
Suddenly client ping me and told that he cannot able to access the database. He got the below error.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<a href="file:///C:/DOCUME~1/Venkat/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="188" src="file:///C:/DOCUME~1/Venkat/LOCALS~1/Temp/msohtmlclip1/01/clip_image001.jpg" v:shapes="Picture_x0020_4" width="388" /></a></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
I checked the database is in archive log mode and the archive
log destination is used 100%(Disk space). This database was created
using the RMAN duplication technique. To make the database in noarchive log mode
I shutdown the database and tried to up database in mount state.</div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNoSpacing">
SQL>startup nomount;</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: #c00000;">ORA-205 signalled during:
ALTER DATABASE MOUNT...<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
SQL>select instance_name, status from v$instance;</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
INSTANCE_NAME
STATUS</div>
<div class="MsoNoSpacing">
---------------- ------------</div>
<div class="MsoNoSpacing">
RCKDEV1 STARTED</div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
I checked the alert_log file of the database. In that I
observed that the control_files parameter is set to nothing. i.e.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Control_files=<o:p></o:p></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
And I observed the command <b>ALTER SYSTEM SET control_files='' SCOPE=SPFILE;</b> that was done by
the previous DBA. And the database is using the omf feature(ORACLE MANAGED
FILES)</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
The database is using spfile. So, I created a pfile from
the spfile:</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial;">SQL>create
pfile from spfile;</span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
Added the control_files parameter in the pfile and
started the database.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 6.65in;" valign="top" width="638"><div class="MsoNoSpacing">
control_files=’/u02/ RCKDEV1/controlfile/o1_mf_7mpsghnh_.ctl’,’
/u01/ RCKDEV1</div>
<div class="MsoNoSpacing">
/controlfile/o1_mf_7mpsghln_.c
tl’</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
SQL>startup mount;</div>
<div class="MsoNoSpacing">
SQL>alter database noarchivelog;</div>
<div class="MsoNoSpacing">
SQL>alter database open;</div>
<div class="MsoNoSpacing">
SQL>select
instance_name,status from v$instance;</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
INSTANCE_NAME
STATUS</div>
<div class="MsoNoSpacing">
---------------- ------------</div>
<div class="MsoNoSpacing">
RCKDEV1 OPEN</div>
<div class="MsoNoSpacing">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com1tag:blogger.com,1999:blog-1835639415063778389.post-75641546902801198332012-03-27T09:14:00.000-07:002012-03-27T09:14:03.517-07:00<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNoSpacing" style="text-align: justify;">
</div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div style="border-bottom: solid windowtext 1.0pt; border: none; mso-border-bottom-alt: solid windowtext .75pt; mso-element: para-border-div; padding: 0in 0in 1.0pt 0in;">
<div class="MsoNoSpacing" style="border-bottom-style: none; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in;">
<span style="font-family: "Times New Roman","serif"; font-size: 24.0pt;">Insatallation of
Cassandra database<o:p></o:p></span></div>
</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;">Note:</span>
To Install the cassandra database, the server should be installed with JDK 1.6
or later version.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">1.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Download
the cassandra software from the website <span style="color: #548dd4; mso-themecolor: text2; mso-themetint: 153;">http://cassandra.apache.org.</span> It will be named
as apache-cassandra-x.x.x-bin.tar.gz, where
x.x.x is the release of the product<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">
<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]-->2.<span style="font-size: 7pt;">
</span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Unzip
and untar the file using the below command</span>.</div>
<div class="MsoNoSpacing" style="margin-left: 0.5in;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 41.2pt; width: 534px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 400.7pt;" valign="top" width="534">
<div class="MsoNoSpacing" style="text-align: justify;">
#tar
-zxvf apache-cassandra-1.0.8-src.tar.gz<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">3.<span style="font-size: 7pt;"> </span></span><!--[endif]--> <span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Create the below directories.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 41.4pt; width: 534px;">
<tbody>
<tr style="height: 67.5pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 67.5pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 400.5pt;" valign="top" width="534">
<div class="MsoNoSpacing" style="text-align: justify;">
* cd apache-cassandra-$VERSION<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
* sudo mkdir -p /var/log/cassandra<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
* sudo chown -R `whoami` /var/log/cassandra<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
* sudo mkdir -p /var/lib/cassandra<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
* sudo chown -R `whoami` /var/lib/cassandra<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">4.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Download the Apache ant software to build
scripting language and Ivy plugin for dependancy management. </span><span style="font-size: 12pt;">The Apache ant software can be downloaded
from the <span style="color: #6fa8dc;">http://ant.apache.org</span> website</span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">
<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">5.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Extract
the zip file as below.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<table align="left" border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 6.75pt; margin-right: 6.75pt; width: 509px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 5.3in;" valign="top" width="509">
<div class="MsoNoSpacing" style="mso-element-anchor-horizontal: margin; mso-element-anchor-vertical: paragraph; mso-element-frame-hspace: 9.0pt; mso-element-left: center; mso-element-top: 7.15pt; mso-element-wrap: around; mso-element: frame; mso-height-rule: exactly; text-align: justify;">
#unzip
apache-ant-1.8.3-bin.zip<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">6.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Download
the Ivy plugin software from the <span style="color: #548dd4; mso-themecolor: text2; mso-themetint: 153;">http://ant.apache.org/ivy/download.cgi</span> website.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">7.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Extract the zip file.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
#unzip
apache-ivy-2.2.0-bin-with-deps.zip<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red;"> Note:</span>There
is no need to download the ivy software(6&7 steps) seperately.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">8.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Navigate
to apache-ant-1.8.3 and fire the below command.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing">
#cd apache-ant-1.8.3 <o:p></o:p></div>
<div class="MsoNoSpacing">
#svn co
https://svn.apache.org/repos/asf/ant/ivy/core/trunk ivy<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing" style="margin-left: 0.5in;">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">The
above step is building from the source, here we get the latest sources from the
subversions.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">
<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">9.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Navigate to the Cassandra source directory (Cassandra
home) i.e. /root/apache-cassandra-1.0.8-src in this example and fire the below
command:<o:p></o:p></span></div>
<div class="MsoNoSpacing">
</div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
#cd
/root/apache-cassandra-1.0.8-src<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in;">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">run
the ant command which in the ant extracted software location-->bin directory
from the Cassandra source directory<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
#/root/apache-ant-1.8.3/bin/ant
(in this example) <o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Because Ivy takes care of all the
dependencies, it’s easy to build Cassandra once you have the source. Just make
sure you’re in the root directory of your source download and execute the ant program, which will look
for a file called build.xml in the current directory and execute the default
build target. Ant and Ivy take care of the rest. To execute the Ant program and
start compiling the source, just type above </span><span style="font-size: 10.0pt; mso-bidi-font-family: Arial;">c</span><span style="font-size: 10.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Arial; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">ommand:<o:p></o:p></span></div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">10.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> At last you will see <b>BUILD SUCCESSFUL</b> message appeared on the screen and the location of
the new property file which is similar to below.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
createVersionPropFile:<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
[propertyfile] Creating new property
file:
/root/apache-cassandra-1.0.8-src/build/classes/main/org/apache/cassandra/config/version.properties<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">11.<span style="font-size: 7pt;"> </span></span><!--[endif]--> <span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Now we can start the cassandra database using
the below command from the CASSANDRA_HOME.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
#cd apache-cassandra-1.0.8-src/<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
#bin/cassandra<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<o:p> </o:p> <span style="font-size: 12pt;">In the end of the process, it is similar to
the below message:</span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 546px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 409.5pt;" valign="top" width="546">
<div class="MsoNoSpacing" style="text-align: justify;">
INFO 14:38:02,250 Using
synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
INFO 14:38:02,254 Listening for thrift
clients...<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: 0.5in;">
<span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">Now
the cassandra is up and running <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: 0.5in; text-indent: -0.25in;">
<!--[if !supportLists]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;">12.<span style="font-size: 7pt;"> </span></span><!--[endif]--><span style="font-size: 12.0pt; mso-ascii-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: Calibri; mso-hansi-theme-font: minor-latin;"> Start the cassandra client.<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
#bin/cassandra-cli<o:p></o:p></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing">
<b>o/p:<o:p></o:p></b></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 36.9pt; width: 540px;">
<tbody>
<tr style="height: 22.45pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 22.45pt; mso-border-alt: solid black .5pt; padding: 0in 5.4pt 0in 5.4pt; width: 405.0pt;" valign="top" width="540">
<div class="MsoNoSpacing" style="text-align: justify;">
Welcome
to Cassandra CLI version 1.0.8-SNAPSHOT<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
<br /></div>
<div class="MsoNoSpacing" style="text-align: justify;">
Type
'help;' or '?' for help. Type 'quit;'
or 'exit;' to quit.<o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
[default@unknown] <o:p></o:p></div>
<div class="MsoNoSpacing" style="text-align: justify;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
</div>
<br />
<br />
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com1tag:blogger.com,1999:blog-1835639415063778389.post-14011105433708337842012-03-04T08:30:00.000-08:002012-03-04T19:19:10.439-08:00Migrating file system database to ASM using RMAN<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="MsoListParagraph" style="margin-left: .75in; mso-add-space: auto; mso-list: l0 level1 lfo1; text-align: justify; text-indent: -.25in;">
<br />
<div class="MsoListParagraph" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Wingdings; font-size: 10pt;"><br /></span></div>
<div class="MsoListParagraph" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Wingdings; font-size: 10pt;"><br /></span></div>
<div class="MsoListParagraph" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Create the
database in a regular file system with
name SRSPASM(archivelog and spfile)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 0.75in; text-indent: -0.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Prepare the database for migration<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<div class="MsoNormal" style="margin-left: 0.75in;">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;">Before the database is migrated to
ASM, the below database information should be collected.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: 0.5in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><b><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Store the DBID</span></b><span style="font-family: Verdana, sans-serif; font-size: 10pt;">: <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1in; text-indent: 0.5in;">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;">If
the database doesn’t have the recovery catalog, then the DBID may be used
during the control file restore while migration(we need to set the DBID when we
restore the controlfile).<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 1.0in; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="height: 57.05pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 57.05pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 360.6pt;" width="481"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>SELECT
DBID FROM V$DATABASE;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;">DBID</span><span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;"><br />
----------<br />
2839631796</span><span style="font-family: 'Courier New'; font-size: 11pt;"><o:p></o:p></span></div>
<div class="MsoListParagraph" style="margin-left: 0in; mso-add-space: auto;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><b><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Make a note of the
datafiles:<o:p></o:p></span></b></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-left: 1.0in; mso-add-space: auto;">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;">Make a
note of the datafiles which may use in the future if the database is to be
reverted back to normal filesystem.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background: #BFBFBF; border-collapse: collapse; border: none; margin-left: 1.0in; mso-background-themecolor: background1; mso-background-themeshade: 191; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr style="height: 38.05pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 38.05pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 359.95pt;" valign="top" width="480"><div class="MsoNormal">
<span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;">SQL>SELECT NAME FROM V$DATAFILE;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;">SQL>SELECT NAME FROM
V$CONTROLFILES;</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoListParagraph" style="margin-left: 0in; mso-add-space: auto;">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraphCxSpFirst" style="margin-left: 1.0in; mso-add-space: auto;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin-left: .75in; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Switch the logfile.<o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 64.85pt; width: 490px;">
<tbody>
<tr style="height: 15.25pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 15.25pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 367.35pt;" valign="top" width="490"><div class="MsoNormal" style="margin-right: 2.9pt;">
<span style="background-attachment: initial; background-clip: initial; background-color: silver; background-image: initial; background-origin: initial; font-family: 'Courier New'; font-size: 10pt;">SQL> ALTER
SYSTEM SWITCH LOGFILE;</span><span style="font-size: 11pt;"><o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: .75in; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Connect to rman and backup the
database files to the ASM diskgroups.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 54.7pt; width: 504px;">
<tbody>
<tr style="height: 59.8pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 59.8pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 378.25pt;" valign="bottom" width="504"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">[oracle@srspasm
~]$ rman target /<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
BACKUP AS COPY DATABASE FORMAT='+dg1';<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
BACKUP CURRENT CONTROLFILE FORMAT='/u01/oracle/srspasm/contbk.ctl'; <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>SHUT
IMMEDIATE;<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-left: .75in;">
<b><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">Note</span></b><span style="color: red; font-family: 'Courier New'; font-size: 10pt;">:</span><span style="font-family: 'Courier New'; font-size: 10pt;"> It is better to take the
backup when no users are connected to the database(Off hours). So there is no
need to recover the database. If the backup is done during the working hours
then the database has to be recovered after the migration.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: .75in; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Modify the server parameter file:
change the control file parameter.</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 47.2pt; width: 544px;">
<tbody>
<tr style="height: 33.9pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 33.9pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 408.1pt;" width="544"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">oracle@system8
~]$ vi /u01/oracle/product/10.2.0/db_1/dbs/initsrspasm.ora<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 9pt;">modify the control file <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">control_files='+DG1',’+FRA’<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="margin-left: .75in; mso-add-space: auto; mso-list: l1 level1 lfo3; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Shutdown the database, startup in nomount
state and restore the controlfile.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast">
<br /></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 47.2pt; width: 550px;">
<tbody>
<tr style="height: 128.4pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 128.4pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 412.2pt;" valign="top" width="550"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">[oracle@system8
~]$ sqlplus / as sysdba<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">STARTUP
NOMOUNT<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 9pt;">CONNECT TO RMAN<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
RESTORE CONTROLFILE FROM ‘/u01/oracle/srspasm/contbk.ctl';<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
ALTER DATABASE MOUNT;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
SWITCH DATABASE TO COPY;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
RECOVER DATABASE;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">RMAN>
ALTER DATABASE OPEN RESETLOGS;<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraph" style="mso-list: l3 level1 lfo4; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Datafiles and control files are in
disk groups. Now convert log files and sp file and archive logs to disk groups.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraph" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><b><u><span style="font-family: Verdana, sans-serif; font-size: 10pt;">spfile convertion:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 66.9pt; width: 518px;">
<tbody>
<tr style="height: 127.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 127.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 388.4pt;" valign="top" width="518"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
CREATE SPFILE='+DG1' FROM PFILE;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">[oracle@system8
dbs]$ vi initsrspasm.ora<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;">remove all parameters and set<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">spfile='+DG1/srspasm/parameterfile/spfile.273.685995011'<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">[oracle@system8
dbs]$ rm spfilesrspasm.ora<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
shut immediate<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
startup<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORACLE
instance started.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">Database
opened.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoListParagraph" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><b><u><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Convert log files to disk groups:<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="text-indent: .5in;">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 10pt;"> <o:p></o:p></span></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 64.75pt; width: 533px;">
<tbody>
<tr style="height: 131.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 131.0pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 399.85pt;" valign="top" width="533"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
ALTER DATABASE ADD LOGFILE GROUP 3 ('+DG1') SIZE 10M, GROUP 4 ('+DG1') SIZE 10M,GROUP
5 ('+DG1') SIZE 10M;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">DATABASE
ALTERED.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: Verdana, sans-serif; font-size: 9pt;">Drop the groups which are in non asm
diskgroups first make it inactive.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>SELECT
GROUP#,STATUS FROM V$LOG;<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
ALTER DATABASE DROP LOGFILE GROUP 1;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">database
altered.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
ALTER DATABASE DROP LOGFILE GROUP 2;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">database
altered.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
SELECT MEMBER FROM V$LOGFILE;<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">MEMBER<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">-----------------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">+DG1/srspasm/onlinelog/group_3.274.686047325<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">+DG1/srspasm/onlinelog/group_4.275.686047325<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">+DG1/srspasm/onlinelog/group_5.276.686047325<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraph" style="margin-left: 1.0in; mso-add-space: auto; mso-list: l2 level1 lfo2; text-indent: -.25in;">
<span style="font-family: Symbol; font-size: 10pt;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><b><u><span style="font-family: Verdana, sans-serif; font-size: 10pt;">convert archive logfiles to disk
groups:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="background-attachment: initial; background-clip: initial; background-color: #bfbfbf; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-style: none; border-collapse: collapse; border-color: initial; border-image: initial; border-left-style: none; border-right-style: none; border-top-style: none; border-width: initial; margin-left: 65.55pt; width: 541px;">
<tbody>
<tr style="height: 262.2pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0; mso-yfti-lastrow: yes;">
<td style="border: solid black 1.0pt; height: 262.2pt; mso-border-alt: solid black .5pt; mso-border-themecolor: text1; mso-border-themecolor: text1; padding: 0in 5.4pt 0in 5.4pt; width: 406.05pt;" valign="top" width="541"><div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
SHO PARAMETER LOG_ARCHIVE_DEST_1<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">NAME TYPE VALUE<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">------------------------------------
----------- ------------------------------<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">log_archive_dest_1 string location=/u01/oracle/srspasm/a<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">
rch<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">log_archive_dest_10 string<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='location=+DG1';<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">System
altered.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
SHO PARAMETER LOG_ARCHIVE_DEST_1<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">NAME TYPE VALUE<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">------------------------------------
----------- ------------------------------<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">log_archive_dest_1 string location=+DG1<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">log_archive_dest_10 string<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>!<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
</td>
</tr>
</tbody></table>
<div class="MsoNormal">
<br /></div>
<div class="MsoListParagraph" style="mso-list: l3 level1 lfo4; text-indent: -.25in;">
<span style="font-family: Wingdings; font-size: 10pt;">Ø<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: Verdana, sans-serif; font-size: 10pt;">Take a fresh full database backup using
RMAN<o:p></o:p></span></div>
</div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-79877105575117838942012-01-10T19:31:00.000-08:002012-01-11T06:44:50.463-08:00Export and importing the metadata<div dir="ltr" style="text-align: left;" trbidi="on">
<span id="internal-source-marker_0.9674885263463631" style="background-color: transparent; color: #4f81bd; font-family: Cambria; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span> <span style="background-color: transparent; color: black; font-family: Cambria; font-size: 24px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"></span><span style="background-color: transparent; color: #4f81bd; font-family: Cambria; font-size: 16px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;">
<br /></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Our
ETL team requested us to create the table structures in a test database
from the production database. The table names ends with the “DIM” which
are in the SRMA schema. There are almost 75 tables with names ended
with “DIM” .So it is a very difficult task to create a master slave
script in the production database to get the create statement code of
the table structures. To make this task very easy, there is an option in
the expdp utility to export and import only the structure, storage
etc.(metadata) of the segments. Below are the steps to export and import
the metadata:</span></div>
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Production database schema : SRMA</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Tables: %_DIM</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Test database schema: DMDB</span></div>
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;"></span><br />
<ol>
<li style="background-color: transparent; color: black; font-family: Times New Roman; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Export the tables using the below statement in the production database.</span></li>
</ol>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">export:</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">-------- </span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">expdp dumpfile=expdp.struct.dmp directory=dpump logfile=expdp.struct.log tables=SRMA.%_DIM content=metadata_only</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<ol start="2">
<li style="background-color: transparent; color: black; font-family: Times New Roman; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Import the above dump file in the test database as below.</span></li>
</ol>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">import:</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">-------</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">impdp dumpfile=expdp.struct.dmp directory=dpump logfile=impdp.struct.log remap_schema=srma:DMDB</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<ol start="3">
<li style="background-color: transparent; color: black; font-family: Times New Roman; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Check the test database for the tables if they are created. And we can see that there will be no data found in those tables. </span></li>
</ol>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">test after import:</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">------------------</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SQL> conn DMDB/DMDB</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Connected.</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SQL> select * from tab;</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">TNAME TABTYPE CLUSTERID</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">------------------------------ ------- ----------</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PRODUCT_FAMILY_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">AUDIT_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PRODUCTS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PRODUCT_TYPES_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SPNL_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SALES_DIVISION_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PRODUCT_CONFIGURATIONS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">OWNED_DISTRIB_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">LABELS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">FRCST_PROD_TYPE_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DISTRIBUTION_CHANNELS_DIM TABLE</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">TNAME TABTYPE CLUSTERID</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">------------------------------ ------- ----------</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DATES_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CURRENCY_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ARTISTS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SALES_TYPE_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">REPORTING_LABEL_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CALENDARS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">PROJECTS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CUSTOMERS_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CUSTOMER_DIGITAL_DIM TABLE</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CUSTOMER_PHYSICAL_DIM TABLE</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">21 rows selected.</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SQL> select count (*) from CUSTOMER_PHYSICAL_DIM;</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> COUNT(*)</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">----------</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> 0</span></div>
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">content</span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> parameter in export:</span><br />
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">content parameter is used to filter the export if only data is loaded or only definition.</span></div>
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">syntax</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">CONTENT={ALL | DATA_ONLY | METADATA_ONLY}</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">ALL</span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> unloads both data and metadata. This is the default.</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">DATA_ONLY</span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> unloads only table row data; no database object definitions are unloaded.</span></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">METADATA_ONLY</span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> unloads only database object definitions; no table row data is unloaded.</span></div>
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<div dir="ltr" style="margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">Ref:</span><span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"> </span><a href="http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_export.htm"><span style="background-color: transparent; color: blue; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;">http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_export.htm</span></a></div>
<a href="http://docs.oracle.com/cd/B19306_01/server.102/b14215/dp_export.htm"><span style="background-color: transparent; color: blue; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;"></span></a><br />
<span style="background-color: transparent; color: red; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">Note:</span><br />
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">We can do the same task in another simple way by creating the tables in the test database using the database links. </span><br />
<span style="background-color: transparent; color: black; font-family: Calibri; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">For example:</span><br />
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;">SQL>create table CUSTOMER_PHYSICAL_DIM as select * from CUSTOMER_PHYSICAL_DIM@HQ.ACE.COM where 1=2;</span><br />
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span><br />
<span style="background-color: transparent; color: black; font-family: 'Courier New'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;"></span></div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-50367323677416544192011-12-30T09:26:00.000-08:002012-01-01T08:30:27.813-08:00CREATING A USER IN ORACLE<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div align="center" class="MsoNormal" style="tab-stops: 131.5pt; text-align: center;">
<br /></div>
<div align="center" class="MsoNormal" style="text-align: left;">
<span style="font-family: Calibri, sans-serif;"><span style="font-size: x-small;"> </span> Here is an example for simple creation of a user in oracle 10g.</span></div>
<div align="center" class="MsoNormal" style="text-align: left;">
<span style="font-family: Calibri, sans-serif; font-size: x-small;"><br /></span></div>
<div class="MsoNormal">
<b><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Purpose:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Create the user by using the CREATE USER statement. It is an account through
which the user can login to the database and access the data by the privileges
he has.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">SYNTAX:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">SQL> CERATE USER username [IDENTIFIED BY
password |EXTERNALLY]<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;"> DEFAULT
TABLESPACE tablespace <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">TEMPORARY TABLESPACE [tablespace|tablespace_group_name] <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">QUOTA [UNLIMITED|value] ON tablepsace PROFILE
profile_name <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">PASSWORD EXPIRE <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">ACCOUNT
[UNLOCK|UNLOCK];<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Username:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It specifies the name of the user account
which is to be created. <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">IDENTIFIED
BY:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It is that how the user will be identified
i.e. how the oracle database authenticates the user account.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">BY password:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It specifies that the user is a local
database user, who can login into the database directly using the password<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">EXERNALLY:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It specifies that the user created as an
external user. In this the user is authenticated by the operating system
password file.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">DEFAULT
TABLESPACE:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">This clause specifies the default storage of
the objects created and owned by that user. If the default tablespace is not
specified, then the objects that are owned by the user defaultly stored in the
default tablespace of the database.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">TEMPORARY
TABLEPSACE:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It specifies the default temporary tablepsace
storage. It is used to store the temporary(sorted) data during the sql
operations done by the user. A singe tablespace or tablespace group can be
assigned to the user.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">QUOTA:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">This clause specifies allocating specific
amount of the space(quota) on different tablespaces. So, the user is restricted
to use more than this quota size on that particular tablepsace.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">PROFILE:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;"> This
clause specifies to set the resource limits to the user such as database
resources, password limits and OS resources.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">PASSWORD
EXPIRE:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It is to specify that the password created by
the DBA in the identified clause expires. So that when the user login to the
database, then he is prompted to give the new password to that account.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">ACCOUNT:<o:p></o:p></span></u></b></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">It specifies the user account to unlock or
lock. The user unable to access the account if the UNLOCK parameter is used for
this. If the user <o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Example for creating a user:<o:p></o:p></span></u></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">SQL> CREATE USER sample IDENTIFIED BY
sample <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">DEFAULT TABLESPACE TBL_SAMPLE_DATA <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">QUOTA UNLIMITED ON IDX_SAMPLE_DATA <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">PROFILE default<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">PASSWORD EXPIRE<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">ACCOUNT UNLOCK;<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<u><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Example for
creating an <b>external user:<o:p></o:p></b></span></u></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">In this example the authentication
of the user is done by using the password file.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<ol start="1" style="margin-top: 0in;" type="1">
<li class="MsoNormal"><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">The
password file should be created in the $ORACLE_HOME/dbs location<o:p></o:p></span></li>
</ol>
<div class="MsoNormal" style="margin-left: .5in; tab-stops: 131.5pt;">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">$ cd $ORACLE_HOME/dbs<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-left: .5in; tab-stops: 131.5pt;">
<span lang="EN-GB" style="font-family: 'Courier New'; font-size: 9pt;">$ orapwd
file=orapwd<SID> password=<password> entries=<max_users></span><span style="font-family: Calibri, sans-serif; font-size: 10pt;"> </span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 10pt;"> Ex: $ orapwd file=orapwdACDB2
password=oracle entries=5<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<ol start="2" style="margin-top: 0in;" type="1">
<li class="MsoNormal"><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Set
the initialization parameter</span><span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 10pt;"> </span><span lang="EN-GB" style="font-family: 'Courier New'; font-size: 10pt;">REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE</span></li>
<li class="MsoNormal"><span style="font-family: Calibri, sans-serif; font-size: 11pt;">Create
the user sample</span></li>
</ol>
<div>
<span style="font-family: 'Courier New'; font-size: 12px;"> SQL> CREATE USER SAMPLE IDENTIFIED EXTERNALLY;</span>
</div>
<div class="MsoNormal">
<span lang="EN-GB" style="font-family: Calibri, sans-serif; font-size: 11pt;">Note: The password file users information can
be viewed in the v$pwd_users view.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-30321895741314484792011-12-28T11:11:00.000-08:002011-12-28T11:17:31.899-08:00TABLESPACE POINT IN TIME RECOVERY<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
</div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
I have a table in my production database which
is being updated every week. By mistake one of the developers dropped that
table yesterday(Monday) morning around 10 am. So, my manager asked me to get
the table back into the database as that table is very important for some
transactions. Now I have two options to get the table back into the database.<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 0.5in; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in;">
a.<span style="font: normal normal normal 7pt/normal 'Times New Roman';"> </span>Duplicate the database in
the stage server using the Sunday night full backup and recover it until the morning 10am using the archive logs and export the table and import the table
in the production database.<o:p></o:p></div>
<div class="MsoListParagraphCxSpLast" style="text-indent: -0.25in;">
b.<span style="font: normal normal normal 7pt/normal 'Times New Roman';"> </span>Tablespace point in time
recovery on the production database itself.<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.25in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.25in;">
If there is enough space in
the stage server to duplicate the database and if the database is small,we can
choose the option <b>a</b>.If the database
is large it takes more time as it needs to duplicate all the tablespaces.
But I did not have enough time and space in the stage server to choose the
option <b>a</b>.<o:p></o:p></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; margin-left: 0.5in; margin-right: 0in; margin-top: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-indent: 0.25in;">
If there is enough space in
the production server and if you have given some maintenance window to recover
the tablespace, we can choose the option <b>b</b>.
I have enough space in the production server and the tablespace was a small
one. So, I opted the <b>b</b> option. </div>
<div class="MsoNoSpacing">
<o:p></o:p></div>
<div class="MsoNoSpacing">
Here is the process I followed:<br />
<br /></div>
<div class="MsoNoSpacing">
<b>Target database:</b>DBACLASS</div>
<div class="MsoNoSpacing">
<b>Auxiliary
database:</b> AUX</div>
<div class="MsoNoSpacing">
<b>Version:</b>10.2.0</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
1.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Create the pfile for an auxiliary instance from
the target database in which we want to do the tablespace point in time
recovery.</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
SQL>create pfile from spfile;</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
2.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Modify the pfile for the auxiliary database.</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">InitAUX.ora<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">----------------<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">large_pool_size=150M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">shared_pool_size=150M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">compatible='10.2.0.1.0'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">control_files='/u02/oradata/AUX/control01.ctl','/u02/oradata/AUX/control02.ctl','/u02/oradata/AUX/control03.ctl'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">db_block_size=8192<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">db_name='DBACLASS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">remote_login_passwordfile='EXCLUSIVE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">#db_unique_name='DBACLASS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">DB_FILE_NAME_CONVERT=
('/u02/oradata/DBACLASS/DBACLASS/','/u02/oradata/AUX/')<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">LOG_FILE_NAME_CONVERT= ('/u02/oradata/DBACLASS/DBACLASS/','/u02/oradata/AUX/')<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">LOG_ARCHIVE_DEST_1='LOCATION=/u02/oradata/AUX/arch'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">LOG_ARCHIVE_FORMAT=%r_%t_%s.arc<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">service_names='AUX'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">LOCK_NAME_SPACE ='DBACLASS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>db_name:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
The
database name of the auxiliary database should be same as that of the target
database.<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>LOCK_NAME_SPACE:</b><o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
When
the primary database and auxiliary database (cloned database) is in the same
server with the same name, then <b>LOCK_NAME_SPACE
</b>parameter has to be added in the auxiliary parameter file. Because Oracle
check for something unique to differ among the databases when the two databases
have same name. Distributed lock manager generates the lock names by using this
parameter.<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b> DB_FILE_NAME_CONVERT:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
This
parameter is used to create the database files in the specified location for
clone database.<span style="font-size: x-small;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
3.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Export the oracle_sid for the auxiliary
database.</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">$ORACLE_SID=AUX</span><span style="font-family: 'Courier New';"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
4.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Create the password file for the auxiliary
database in $ORACLE_HOME/dbs.</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">$$ORACLE_HOME/dbs /orapwd file=orapwAUX
password=abacus entries=5<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
5.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Configure
the listener and tnsnames for the AUX database.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>Listener:</b> </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SID_LIST_AUX =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (SID_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (SID_DESC
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(SID_NAME = PLSExtProc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(SID_NAME = AUX)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(ORACLE_HOME = /opt/app/oracle/product/10.2.0)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (PROGRAM
= extproc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )</span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">AUX =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (DESCRIPTION_LIST
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(DESCRIPTION =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = IPC)(KEY = EXTPROC1))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (ADDRESS
= (PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )</span><span style="font-family: 'Courier New';"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>Tnsnames:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">AUX =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (DESCRIPTION
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (ADDRESS =
(PROTOCOL = TCP)(HOST = 192.168.1.210)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(CONNECT_DATA =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (SERVER
= DEDICATED)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">
(SERVICE_NAME = AUX)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> (UR = A)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> )</span><span style="font-size: 10pt;"> </span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
6.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Create table TABLE1 in the users tablespace in
the Primary database (DBACLASS).</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>create table TABLE1(num number, tname
varchar2(20));<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">Table created.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
<span style="font-family: 'Times New Roman', serif; font-size: 10pt;">7.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span>Insert some rows in the table TABLE1.<span style="font-family: 'Times New Roman', serif; font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>select count(*) from TABLE1;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">Count(*)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">---------<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">6</span> </div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
8.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Connect to the rman and take the backup of the
database.(dg2.abacus.com)</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">$rman catalog rmn/rmn target sys/abacus@DBACLASS</span><span style="font-family: 'Courier New'; font-size: 10pt;"> </span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">Rman>backup database;</span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
<span style="font-size: 10pt;">9.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span>Now drop the table TABLE1 in the users
tablespace(DBACLASS).<span style="font-size: 10pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SYS>set time on;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">09:47:41 SQL> drop table table1;</span> </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
Now if you want the table TABLE1
to be restored into the database. TABLESPACE point in time recovery has to be
done until 9:47.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
10.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span> Now start
up the AUX database in nomount state.</div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>startup nomount;</span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
11.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Now connect to the rman catalog and run the
tspitr.rmn( RMAN server)</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
tspitr.rmn <o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
------------<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';"> </span><span style="font-family: 'Courier New'; font-size: 10pt;">CONNECT AUXILIARY sys/****@aux<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">CONNECT TARGET sys/****@dbaclass<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">CONNECT CATALOG rmn/***@acdbrmn<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> run{<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> allocate
auxiliary channel c1 device type disk;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> recover
tablespace users until time "TO_DATE('2011-DEC-22:21:47:45','yyyy-mon-dd:hh24:mi:ss')";<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;"> }<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">$rman catalog rmn/rmn target sys/abacus@DBACLASS auxiliary
sys/abacus@AUX</span><span style="font-family: 'Courier New'; font-size: 10pt;"> </span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">Rman>@tspitr.rmn</span> </div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo2; text-indent: -.25in;">
12.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>After that check the tablespace <b>USERS </b> is in offline mode. Make it as online and
check for the table <b>TABLE1 </b>in the
primary database(DBACLASS)<b>.</b><b><span style="font-family: 'Times New Roman', serif; font-size: 10pt;"><o:p> </o:p></span></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>alter tablespace users online;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>select count(*) from table1;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Mechanism that
follows by TSPITR:</b><b><o:p> </o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
1.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Makes the tablespace offline in the target
database which is to recovered.</div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
2.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Restores the control file from the rman database
backup <b>before the target time specified
in the recover until time statement</b> for clone database.</div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
3.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Restores the db files for the auxiliary database
to the specified location in the DB_FILE_NAME_CONVERT.</div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
4.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Then it recover the database files until the
specified time in the tablespace recovery statement and the database opened
with reset logs option.</div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
5.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Exports the meta data of the tablespace which has to be recovered and the
auxiliary database is shut down.</div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>Eg:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New'; font-size: 9pt;">'exp userid =\"sys/abacus@aux as sysdba\"
point_in_time_recover=y tablespaces=USERS file=tspitr_a.dmp';<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
6.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Imports the metadata into the target database from
the auxiliary database. And removes the auxiliary database files.</div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l1 level1 lfo3; text-indent: -.25in;">
7.<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span>Makes the recovered tablespace offline. </div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Objects to check
after the TSPITR:</b><b><o:p> </o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
When the tablespace is recovered upto a
certain time <b>t</b>, then the objects
those are created after the time <b>t</b>
will be lost. So, we need to take the backup of those tables before the TSPITR.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="tab-stops: 328.7pt; text-indent: .5in;">
Check the
objects that created after time t by using the below query: </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">select
<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">OWNER,NAME,
CREATION_TIME, TABLESPACE_NAME <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">from
TS_PITR_OBJECTS_TO_BE_DROPPED<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';"> where tablespace_name=’****’ and creation_time >= to_date(********);<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<o:p> </o:p><b>Issues may face:</b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>---------------------</b> </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-size: 10pt;">If
$ORACLE_HOME/dbs/lk$ORACLE_SID is existed, then remove it. If it is not removed an error occurs while
opening the auxiliary database that don’t open database in exclusive mode.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<b> <o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>Note:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b>-------</b> </div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif; font-size: 10pt;">The AUX database is cloned into the
directory specified in the DB_FILE_NAME_CONVERT. After the TSPITR is completed,
automatically rman deletes the db files,redo logs, controfiles , temp files of
the AUX database(auxiliary).<o:p></o:p></span></div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-64671838698997661562011-12-16T10:58:00.000-08:002012-03-30T05:53:56.570-07:00Dataguard configuration using cold backup<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div style="border-bottom: solid #4F81BD 1.0pt; border: none; mso-border-bottom-themecolor: accent1; mso-element: para-border-div; padding: 0in 0in 4.0pt 0in;">
<div class="MsoTitle">
</div>
<div style="border-bottom: solid #4F81BD 1.0pt; border: none; mso-border-bottom-themecolor: accent1; mso-element: para-border-div; padding: 0in 0in 4.0pt 0in;">
<div class="MsoTitle">
</div>
<div style="border-bottom: solid #4F81BD 1.0pt; border: none; mso-border-bottom-themecolor: accent1; mso-element: para-border-div; padding: 0in 0in 4.0pt 0in;">
<div class="MsoTitle">
<span style="font-size: 20pt;">Dataguard configuration using
cold backup <o:p></o:p></span></div>
</div>
<div class="MsoSubtitle">
<br /></div>
<div class="MsoSubtitle">
<b>Versions:</b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">CentOs-5.5<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">Oracle
10.2.0<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoSubtitle">
<b>Databases information:</b><span style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">Primary
database name:ACDBP<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">Primary
db unique_name=ACDBP<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">Standby database name=ACDBP<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">Standby
db_unique_name=ACDBS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>1.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Create
the primary database<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>2.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Set
the parameter file for the primary database:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .25in; text-indent: .5in;">
<u><span style="color: red; font-family: 'Times New Roman', serif;">initACDBP.ora</span></u></div>
<div class="MsoNoSpacing" style="margin-left: .25in; text-indent: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_cache_size=125M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">java_pool_size=8M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">large_pool_size=8M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">shared_pool_size=100M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">streams_pool_size=20M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">audit_file_dest='/opt/app/oracle/admin/ACDBP/adump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">background_dump_dest='/opt/app/oracle/admin/ACDBP/bdump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">compatible='10.2.0'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">control_files='/opt/app/oracle/oradata/ACDBP/control01.ctl','/opt/app/oracle/admin/ACDBP/controlfile/control02.ctl'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">core_dump_dest='/opt/app/oracle/admin/ACDBP/cdump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_block_size=8192<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_domain=''<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_file_multiblock_read_count=16<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_name='ACDBP'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_recovery_file_dest_size=2048M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">job_queue_processes=10<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">open_cursors=100<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">pga_aggregate_target=70M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">processes=50<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">remote_login_passwordfile='EXCLUSIVE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">sga_target=536M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">undo_management='AUTO'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">undo_tablespace='UNDOTBS1'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">user_dump_dest='/opt/app/oracle/admin/ACDBP/udump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">service_names=ACDBP<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">#data
guard parameters<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">db_unique_name='ACDBP' <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">fal_client='ACDBP'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">fal_server='ACDBS' <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_config='DG_CONFIG=(ACDBP,ACDBS)'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_1='LOCATION=/opt/app/oracle/admin/ACDBP/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ACDBP'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_2='SERVICE=ACDBS LGWR ASYNC
VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">#log_archive_dest_2='SERVICE=ACDBS lgwr sync affirm reopen=10
VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_state_1='ENABLE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_state_2='ENABLE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_format='%t_%s_%r.dbf'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">ACDBP.log_archive_format='%t_%s_%r.dbf'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_max_processes=2 <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">ACDBP.standby_archive_dest='/opt/app/oracle/admin/ACDBP/arch'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">standby_file_management='AUTO' <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_min_succeed_dest=1 <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>3.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Create
the appropriate directories for the stand by database and prepare the parameter
file for the standby database.<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<u><span style="color: red; font-family: 'Times New Roman', serif;">initACDBS.ora<o:p></o:p></span></u></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_cache_size=125M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">java_pool_size=8M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">large_pool_size=8M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">shared_pool_size=100M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">streams_pool_size=20M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">audit_file_dest='/opt/app/oracle/admin/ACDBS/adump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">background_dump_dest='/opt/app/oracle/admin/ACDBS/bdump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">compatible='10.2.0'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">control_files='/opt/app/oracle/oradata/ACDBS/standby1.ctl'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">core_dump_dest='/opt/app/oracle/admin/ACDBS/cdump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_block_size=8192<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_domain=''<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_file_multiblock_read_count=16<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_name='ACDBP'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_recovery_file_dest='/opt/app/oracle/flash_recovery_area'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">db_recovery_file_dest_size=2048M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">job_queue_processes=10<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">open_cursors=100<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">pga_aggregate_target=70M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">processes=50<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">remote_login_passwordfile='EXCLUSIVE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">sga_target=536M<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">undo_management='AUTO'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">undo_tablespace='UNDOTBS1'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">user_dump_dest='/opt/app/oracle/admin/ACDBS/udump'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">service_names=ACDBS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span class="Apple-style-span" style="font-family: 'Times New Roman', serif;">#data
guard parameters</span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span class="Apple-style-span" style="color: red; font-family: 'Times New Roman', serif;">db_unique_name='ACDBS'</span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">fal_client='ACDBS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">fal_server='ACDBP' <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_config='DG_CONFIG=(ACDBS,ACDBP)'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_1='LOCATION=/opt/app/oracle/admin/ACDBS/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=ACDBS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">#log_archive_dest_2='SERVICE=ACDBS LGWR ASYNC
VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBS'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_2='SERVICE=ACDBP <span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial;">LGWR
ASYNC </span>VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=ACDBP'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_state_1='ENABLE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_dest_state_2='ENABLE'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_format='%t_%s_%r.dbf'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">db_file_name_convert='/opt/app/oracle/oradata/ACDBP/datafile','/opt/app/oracle/oradata/ACDBS/datafile'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_file_name_convert='/opt/app/oracle/oradata/ACDBP/logfile','/opt/app/oracle/oradata/ACDBS/logfile','/opt/app/oracle/admin/ACDBP/logfile','/opt/app/oracle/admin/ACBS/logfile'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_max_processes=2 <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">standby_archive_dest='/opt/app/oracle/admin/ACDBS/arch'<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">standby_file_management='AUTO' <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="color: red; font-family: 'Times New Roman', serif;">log_archive_min_succeed_dest=1 </span><span style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>4.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></b><b>Configure
the listener and tns entries on both primary and standby database servers:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoSubtitle" style="text-indent: .5in;">
<span style="font-size: 11pt; line-height: 115%;">Primary listener .ora and tnsnames.ora:<o:p></o:p></span></div>
<div class="MsoSubtitle" style="text-indent: .5in;">
<u><span style="color: red; font-family: 'Times New Roman', serif; font-size: 11pt; line-height: 115%;">listerner.ora</span></u><span style="font-family: 'Times New Roman', serif; font-size: 11pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">LISTENER
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = IPC)(KEY =
ACDBP))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.1.210)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">SID_LIST_LISTENER
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_DESC =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ORACLE_HOME =
/opt/app/oracle/product/10.2.0)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_NAME = ACDBP)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_DESC =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ORACLE_HOME =
/opt/app/oracle/product/10.2.0)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_NAME = PLSExtProc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (PROGRAM = extproc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<u><span style="color: red; font-family: 'Times New Roman', serif;">tnsnames.ora: <o:p></o:p></span></u></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">ACDBS
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.1.211)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (CONNECT_DATA =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SERVER = DEDICATED)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SERVICE_NAME = ACDBS)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoSubtitle" style="text-indent: .5in;">
<span style="font-size: 11pt; line-height: 115%;">Standby listener .ora and tnsnames.ora:<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<u><span style="color: red; font-family: 'Times New Roman', serif;">listerner.ora<o:p></o:p></span></u></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">LISTENER
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = IPC)(KEY =
ACDBS))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.1.211)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">SID_LIST_LISTENER
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_DESC =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ORACLE_HOME =
/opt/app/oracle/product/10.2.0)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_NAME = ACDBS)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_DESC =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ORACLE_HOME =
/opt/app/oracle/product/10.2.0)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SID_NAME = PLSExtProc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (PROGRAM = extproc)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<u><span style="color: red; font-family: 'Times New Roman', serif;">tnsnames.ora:<o:p></o:p></span></u></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';">ACDBP
=<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (DESCRIPTION =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS_LIST =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (ADDRESS = (PROTOCOL = TCP)(HOST =
192.168.1.210)(PORT = 1521))<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (CONNECT_DATA =<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SERVER = DEDICATED)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> (SERVICE_NAME = ACDBSP)<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Courier New';"> )<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>5.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>Enable
the archive log mode for the primary database.<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>shut immediate;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>startup mount;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>alter
database archivelog;<br />
SQL>alter database open;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>6.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>Create
the standby logfiles in the primary database.<o:p></o:p></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">ALTER DATABASE ADD STANDBY LOGFILE GROUP 3
('/opt/app/oracle/admin/ACDBP/logfile/redo_stand_1a.log',<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">'/opt/app/oracle/oradata/ACDBP/logfile/redo_stand_1b.log')
size 10M;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"> / <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"><br />
ALTER DATABASE ADD STANDBY LOGFILE GROUP
4 ('/opt/app/oracle/admin/ACDBP/logfile/redo_stand_1a.log',<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">'/opt/app/oracle/oradata/ACDBP/logfile/redo_stand_1b.log')
size 10M;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"> / <o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>7.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>Backup
the database(cold) and scp the files to the standby server:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL>shut immediate;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$cd opt/app/oracle/oradata/ACDBP/datafile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$scp * oracle@192.168.1.211:/opt/app/oracle/oradata/ACDBS/datafile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$cd opt/app/oracle/oradata/ACDBP/logfile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$scp *
oracle@192.168.1.211:/opt/app/oracle/oradata/ACDBS/logfile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$cd opt/app/oracle/admin/ACDBP/logfile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$scp * oracle@192.168.1.211:/opt/app/oracle/
admin/ACDBS/logfile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>8.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>Create
the passwordfile for the primary database and scp the file to standby database
to $ORACLE_HOME/dbs location.<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">cd $ORACLE_HOME/dbs<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">$orapwd file=orapwd$ORACLE_SID password=abacus
enties=5<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">$cp orapwACDBP orapwACDBS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">$scp orapwACDBP
oracle@192.168.1.211:$ORACLE_HOME/dbs<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">$rm orapwACDBS<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<b><i><span style="color: red; font-family: 'Times New Roman', serif;">Note:</span></i></b><span style="font-family: 'Times New Roman', serif;"> scp
the orapwdACDBP</span><span style="font-family: 'Times New Roman', serif;"> file
of the primary to the same location on the standby with the name of orapwACDBS.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>9.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>create
the standby controlfile and scp the file to standby server:<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL> shut immediate;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL>startup mount;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL> alter database create standby controlfile as
‘/opt/app/oracle/admin/ACDBP/controlfile/stndby01.ctl’;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL>exit<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$cd /opt/app/oracle/admin/ACDBP/controlfile/<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">$scp stndby01.ctl
oracle@192.168.1.211: opt/app/oracle/admin/ACDBS/controlfile/<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<b>10.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></b><b>start
and verify the standby database (<span style="color: red;">ON STANDBY DATABASE</span>)
.<o:p></o:p></b></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>startup nomount;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>alter database mount standby database;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>archive log list;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Database log mode Archive Mode<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Automatic archival Enabled<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Archive destination /opt/app/oracle/admin/ACDBS/arch<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Oldest online log sequence 201<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Next log sequence to archive 0<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .5in;">
<span style="font-family: 'Courier New';">Current log sequence 202<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Times New Roman', serif;"> <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Times New Roman', serif;"> Check
the archive log sequence on both the databases(ACDBP AND ACDBS).<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Times New Roman', serif;"> On
ACDBP (<span style="color: red;">PRIMARY</span>):<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Times New Roman', serif;"> SQL>
archive log list<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Database log mode Archive Mode<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Automatic archival Enabled<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Archive destination /opt/app/oracle/admin/ACDBP/arch<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Oldest online log sequence 201<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Next log sequence to archive 202<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Courier New';">Current log sequence 202<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<span style="font-family: 'Times New Roman', serif;">SQL>alter database recover managed standby
database using current logfile disconnect;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="text-indent: .5in;">
<br /></div>
<div class="MsoListParagraphCxSpFirst" style="mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span style="font-family: 'Times New Roman', serif;"> 11.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;"> </span></span><b>Identify
the existing files on the standby database</b><span style="font-family: 'Times New Roman', serif;"><br />
<br />
SQL> select sequence#, first_time, next_time from v$archived_log
order by sequence#;<br />
<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span class="SubtitleChar"><span style="line-height: 115%;">Switch
a log on the primary database: <br />
</span></span><span style="font-family: 'Times New Roman', serif;"><br />
SQL></span> <span style="font-family: 'Times New Roman', serif;">alter
system switch logfile;<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="font-family: 'Times New Roman', serif;"><br />
</span><span class="SubtitleChar"><span style="line-height: 115%;">- Re-Run the same SQL to make sure
that the logs are received and applied to <br />
the standby server.</span></span><span style="font-family: 'Times New Roman', serif;"> <br />
<br />
</span><span class="SubtitleChar"><span style="line-height: 115%;">Now verify that the logs created in
the primary database were applied:</span></span><span style="font-family: 'Times New Roman', serif;"> <br />
<br />
SQL></span> <span style="font-family: 'Times New Roman', serif;">select
sequence#,applied from v$archived_log<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<span style="font-family: 'Times New Roman', serif;"> order by sequence#;<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle">
<br /></div>
<div class="MsoListParagraphCxSpLast">
<span style="color: red; font-family: 'Times New Roman', serif;">Note:</span><span style="font-family: 'Times New Roman', serif;"> Monitor the alert logfiles on both the primary and
standby databases to check the heartbeat of the databases(Redolog shipping and
sql apply).<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br />
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"><b>Issue in the primary:</b><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">Fri Jul 22 06:23:45 2011<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">Errors in file
/opt/app/oracle/admin/ACDBP/bdump/acdbp_arc0_15992.trc:<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">ORA-16191: Primary log shipping client not logged on
standby<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">PING[ARC0]: Heartbeat failed to connect to standby
'ACDBS'. Error is 16191.<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span class="Apple-style-span" style="font-family: 'Times New Roman', serif;"><br /></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"><br />
</span><span style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;"><b>Issue
in standby database:</b><o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">SQL>
alter database recover managed standby database using current logfile;<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">alter
database recover managed standby database using current logfile<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">*<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">ERROR
at line 1:<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">ORA-01093:
ALTER DATABASE CLOSE only permitted with no sessions connected<o:p></o:p></span></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .75in;">
<span style="font-family: 'Times New Roman', serif;">When
the standby database is opened in the read only mode, at that time if the
database needs to be recovered, there should be no active connections to the
standby database.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>
</div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-58774705245612597662011-12-07T11:05:00.001-08:002011-12-28T23:32:28.391-08:00Query level export using expdp utility<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal">
<span class="Apple-style-span" style="line-height: 18px;"><b><br /></b></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNoSpacing" style="text-indent: 0.5in;">
Today I used a new feature in oracle which I never used till now in my dba career that is query level export of a table using expdp utility. There is a table <b>gds_sales</b>, <b>series_cd</b> is one of the columns in that table. I need the rows with column <b>series_cd </b>value less than 9.8(<b>series_cd>9.8</b>) to be exported. I used the query level export for the data. The process is as follows:</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">Parfile<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">--------<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">tables = rtd.gds_sales<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">dumpfile= expdp.gds.qry.dmp<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">logfile= expdp.gds.qry.log<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">directory=DPUMP<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-size: 12pt;">query= rtd.gds_sales:"WHERE SERIES_CD<9.8"<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="color: red; font-size: 10pt;">Note: </span><span style="font-size: 10pt;">In the first parameter <b>tables = rtd.gds_sales</b></span><span style="font-size: 12pt;">,</span><span style="font-size: 10pt;"> rtd is the owner of the table. Since we do the export using system user, we specify the schema name before the table.</span><span style="font-size: 12pt;"><o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">[oracle@rac-a exp]$ expdp parfile=expdp.gds.qry.par<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Export: Release 10.2.0.1.0 - 64bit Production on Friday, 19 November, 2010 2:28:21<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Copyright (c) 2003, 2005, Oracle. All rights reserved.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Username: system<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Password: ******<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">With the Partitioning, OLAP and Data Mining options<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">FLASHBACK automatically enabled to preserve database integrity.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** parfile=/home/oracle/admin/ACDB2/exp/expdp.gds.qry.par<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Estimate in progress using BLOCKS method...<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/TABLE_DATA<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Total estimation using BLOCKS method: 64 MB<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/TABLE<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">. . exported "RTD"."GDS_PRODUCT" 29.16 MB 46963 rows<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">******************************************************************************<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> /home/oracle/admin/ACDB2/exp/expdp.gds.qry.dmp<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 02:28:41<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
> we need to specify the table name in the above format which is in the parfile, if not the below error arises.</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">query="where series_cd<9.8"<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: red; font-family: 'Courier New'; font-size: 10pt;">ORA-31658: specifying a schema name requires a table name<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="color: red; font-family: 'Courier New'; font-size: 10pt;"><br /></span></div>
<div class="MsoNoSpacing">
</div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com0tag:blogger.com,1999:blog-1835639415063778389.post-78937765108240962592011-11-23T08:47:00.001-08:002011-12-12T08:03:10.300-08:00ORA-20000: Insufficient privileges to analyze an object in Schema<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoSubtitle">
<b><span style="color: windowtext; font-family: Calibri, sans-serif;"><span class="Apple-style-span" style="font-size: large;">ORA-20000: Insufficient privileges to analyze an object in Schema</span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="text-align: justify;">
<br />
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-indent: .5in;">
Today I have experienced
a new error in my database. We have oracle jobs scheduled to analyze the tables
in a schema(PNYDV) , runs in frequent intervals. The job is created in the <b>system</b> schema. The code is as follows:</div>
<div class="MsoNormal">
<br />
SQL>conn system/******</div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
sho user<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">USER
is "SYSTEM"<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL> DECLARE<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 2
X NUMBER;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 3
BEGIN<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 4
SYS.DBMS_JOB.SUBMIT<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 5
( job => X <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 6
,what => 'GATHER_ PNYDV_STATS;'<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 7
,next_date => to_date('24/11/2011 07:22:18','dd/mm/yyyy hh24:mi:ss')<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 8
,interval =>
'TRUNC(SYSDATE+7)+8/24'<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 9
,no_parse => TRUE<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 10
);<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 11
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 12
END;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 13 / <o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> commit;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
We
created a procedure (GATHER_ PNYDV _STATS) to analyze the schema PNYDV in the system schema. It is
as follows<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
CREATE OR REPLACE PROCEDURE "GATHER_PNYDV_STATS" AS<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 2
BEGIN<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 3
EXECUTE IMMEDIATE 'ALTER SESSION SET HASH_AREA_SIZE=2147483647';<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 4
EXECUTE IMMEDIATE 'ALTER SESSION SET SORT_AREA_SIZE=2147483647';<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 5
DBMS_STATS.GATHER_SCHEMA_STATS(ownname => 'PNYDV',method_opt =>
'FOR ALL INDEXED COLUMNS SIZE AUTO', CASCADE => TRUE);<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 6 END;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;"> 7 /<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Procedure
created.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Error:<o:p></o:p></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="text-align: justify; text-indent: .5in;">
The job ran as per the scheduled
time. We got an alert in the logfile when the job ran as per the scheduled
time, an error occurred in the alert log file as in the below format.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-20000:
Insufficient privileges to analyze an object in Schema<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at "SYS.DBMS_STATS", line 13578<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at "SYS.DBMS_STATS", line 13937<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at "SYS.DBMS_STATS", line 14015<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at "SYS.DBMS_STATS", line 13974<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at "SYSTEM.GATHER_ PNYDV_STATS", line 5<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">ORA-06512:
at line 1<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
I
researched on the error but I did not get the result. Then I googled for the solution
and got to know that the system user should have the privilege <b><span style="color: red;">ANALYZE ANY </span></b>to
analyze the non system tables(other schema tables). I granted the ANALYZE ANY privilege to system user and rescheduled the job. It ran successfully.<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
conn / as sysdba<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Connected.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
grant ANALYZE ANY to system;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Grant
succeeded.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
conn system/*****<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">Connected.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">SQL>
exec GATHER_PNYDV_STATS;<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<span style="font-family: 'Courier New'; font-size: 10pt;">PL/SQL
procedure successfully completed.<o:p></o:p></span></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Cause: <o:p></o:p></b></div>
<div class="MsoNoSpacing">
SYSTEM user doesn’t have the
privilege to analyze any non system table(Other schema’s table). <o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<b>Solution:<o:p></o:p></b></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span style="font-family: Symbol;">·<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span>Grant
the ANALYZE ANY privilege to the SYSTEM user.<o:p></o:p></div>
<div class="MsoNoSpacing" style="margin-left: .5in; mso-list: l0 level1 lfo1; text-indent: -.25in;">
<span style="font-family: Symbol;">·<span style="font: normal normal normal 7pt/normal 'Times New Roman';">
</span></span>Create
the procedure and the job under the particular schema which has to be analyzed (<span style="color: red;">under PNYDV schema in my case</span>)<o:p></o:p></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
<br /></div>
</div>
Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com1tag:blogger.com,1999:blog-1835639415063778389.post-12486116744713617582011-11-22T09:10:00.001-08:002012-05-08T06:46:24.595-07:00ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<br />
<div class="MsoNormal">
<b><span style="font-size: 12pt; line-height: 18px;">ORA-39095 error in Datapump export when using PARALLEL option and single dumpfile<o:p></o:p></span></b></div>
<div class="MsoNoSpacing">
<b><br /></b></div>
<div class="MsoNoSpacing">
<b>Environment:<o:p></o:p></b></div>
<div class="MsoNoSpacing">
10g R2 in Linux Box</div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNormal">
I tried to export the database using the below par file, It has only single dumpfile.</div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';"><br /></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">USERID=username/*****<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">DUMPFILE=expdp.stg2514.dmp<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">FULL=y<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">DIRECTORY=DATA_PUMP_DIR1<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">JOB_NAME=expfull_stg2514_new<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<i><span style="font-family: 'Courier New';">parallel=5<o:p></o:p></span></i></div>
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNormal">
It ended up with the below error:</div>
<div class="MsoNormal">
<span style="font-family: 'Courier New'; font-size: 10pt; line-height: 14px;">Processing object type DATABASE_EXPORT/SCHEMA/TABLE/<wbr></wbr>TRIGGER<br />Processing object type DATABASE_EXPORT/SCHEMA/VIEW/<wbr></wbr>TRIGGER<br />Processing object type DATABASE_EXPORT/SCHEMA/EVENT/<wbr></wbr>TRIGGER<br />Processing object type DATABASE_EXPORT/SCHEMA/JOB<br />Processing object type DATABASE_EXPORT/SCHEMA/TABLE/<wbr></wbr>POST_INSTANCE/PROCACT_INSTANCE<br />Processing object type DATABASE_EXPORT/SCHEMA/TABLE/<wbr></wbr>POST_INSTANCE/PROCDEPOBJ<br />Processing object type DATABASE_EXPORT/SCHEMA/POST_<wbr></wbr>SCHEMA/PROCOBJ<br />Processing object type DATABASE_EXPORT/SCHEMA/POST_<wbr></wbr>SCHEMA/PROCACT_SCHEMA<br /><span style="color: red;">ORA-39095: Dump file space has been exhausted: Unable to allocate 8192 bytes</span><br />Job "SYSTEM"."EXPFULL_</span><i><span style="font-family: 'Courier New';">stg2514</span></i><span style="font-family: 'Courier New'; font-size: 10pt; line-height: 14px;">_<wbr></wbr>NEW" stopped due to fatal error at 03:46:40<o:p></o:p></span></div>
<div class="MsoNormal" style="text-align: justify; text-indent: 0.5in;">
<br /></div>
<div class="MsoNormal" style="text-align: justify; text-indent: 0.5in;">
I googled to get a good solution to overcome the above error, many suggested to remove the parallel option. Then I ran the export by removing the parallel option. It completed successfully without errors. But I did not did not understand why the error occurred if the parallel option is used. I searched many sites for the cause and at last I familiarized that it is a bug (<span style="color: red;">Bug:3328558</span>) in 10g R2, mentioned in Metalink.</div>
<div class="MsoNormal" style="text-align: justify;">
<b><br /></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b>Cause:<o:p></o:p></b></div>
<div class="MsoNormal" style="text-align: justify;">
<b><br /></b></div>
<div class="MsoNormal" style="text-align: justify;">
If the dumpfiles are less than the parallel processes, then the dumpfile may be locked by one process and the other process waits for the dumpfile to write. And sometimes the process may not release the lock even if the process finished. So the entire task will not end as the other processes are waiting for the lock.</div>
<div class="MsoNoSpacing">
<b><br /></b></div>
<div class="MsoNoSpacing">
<b>Solution:</b><br />
<b><br /></b></div>
<div class="MsoNoSpacing">
</div>
Parallelism should be less than or equal to the number of the dumpfiles. Or avoid the usage of parallel option.<br />
<ol></ol>
<br />
<div class="MsoNoSpacing">
<br /></div>
<div class="MsoNoSpacing">
</div>
</div>Venkat Lovahttp://www.blogger.com/profile/01556810139809434250noreply@blogger.com4