<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Oracle Blog</title>
	<link>http://blog.oraclecontractors.com</link>
	<description>Oracle Blog from OracleContractors.com</description>
	<pubDate>Wed, 16 Nov 2011 09:45:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>
	<language>en</language>
			<item>
		<title>Two Newly Published White Papers for November 2011!</title>
		<link>http://blog.oraclecontractors.com/?p=900</link>
		<comments>http://blog.oraclecontractors.com/?p=900#comments</comments>
		<pubDate>Wed, 16 Nov 2011 09:45:50 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=900</guid>
		<description><![CDATA[Many thanks firstly to Ahmed Jassat, author of &#8220;Cloning from 20hrs to 20mins using Oracle Dataguard&#8221; &#038; also to Alexander Reichman, author of &#8220;Interacting with BPEL/Workflow from Oracle Forms 11g&#8221;.
Ahmed is an Oracle Apps DBA based in South Africa &#038; his White Paper focuses on a client site where he has worked &#038; how implementing [...]]]></description>
			<content:encoded><![CDATA[<p>Many thanks firstly to Ahmed Jassat, author of &#8220;Cloning from 20hrs to 20mins using Oracle Dataguard&#8221; &#038; also to Alexander Reichman, author of &#8220;Interacting with BPEL/Workflow from Oracle Forms 11g&#8221;.</p>
<p>Ahmed is an Oracle Apps DBA based in South Africa &#038; his White Paper focuses on a client site where he has worked &#038; how implementing Oracle Dataguard has reduced the cloning time dramatically for them &#038; the impact this has had on the business. A must-read for any DBA/Technical Managers, DBAs, Apps DBAs &#038; disaster recovery teams.</p>
<p>Alexander is a certified Oracle DBA based in Canada &#038; his White Paper focuses on integrating Oracle Forms 11g with Oracle BPEL/Workflow included in the Fusion Middleware 11g platform. A must-read for any Oracle Forms Developers, SOA Architects &#038; Project Managers.</p>
<p>Many thanks for your contributions guys!
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=900</wfw:commentRss>
		</item>
		<item>
		<title>Is anyone actually using this database?  - How to tell whether or not you can delete an old database</title>
		<link>http://blog.oraclecontractors.com/?p=899</link>
		<comments>http://blog.oraclecontractors.com/?p=899#comments</comments>
		<pubDate>Sat, 27 Aug 2011 10:07:34 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=899</guid>
		<description><![CDATA[When you log into a database server that has been running for several years, you will often find lots of files from databases that may not have been used for some time.
The people who created them probably left the company long ago and there is little documentation on the databases. Nobody is certain whether or not [...]]]></description>
			<content:encoded><![CDATA[<p>When you log into a database server that has been running for several years, you will often find lots of files from databases that may not have been used for some time.</p>
<p>The people who created them probably left the company long ago and there is little documentation on the databases. Nobody is certain whether or not they are still being used, so they just sit around using up disk space.  If the databases are started up, then they&#8217;re also using memory, even though they may not be doing anything productive.</p>
<p>Rather than prolonging this situation, it&#8217;s a good idea to remove these databases - once you&#8217;ve confirmed that no-one uses them anymore.  Unfortunately, within a large business it may not be easy finding out who within the company is using which databases, if documentation has not been kept up to date.</p>
<p>As a starting point you can look in the following places:<br />
(i) Database alert log<br />
If the database is currently shut down, then what date was it shut down? If this was a long-time ago (i.e. more than 1 year), then the chances are that the database is no longer used, or is so out of date with current business data that it would need to be refreshed/updated before it could be of any use. </p>
<p><strong>Note:</strong> Just because things such as configuration changes (i.e. extending datafiles) are shown in the alert log, it doesn&#8217;t mean to say that it&#8217;s actually in use.  A DBA can carry out maintenance tasks on a database, whether or not there are any business users carrying out work.</p>
<p>Similarly, you may find that a backup tool such as RMAN regularly connects to the database.  This also doesn&#8217;t mean to say that the database is being used by the business - just that it&#8217;s being backed up.</p>
<p>(ii) Listener log<br />
Search in the listener log for the last entries for that database. Even if the database is shutdown, this will let you know the last time that anyone was using it.  Be careful that you don&#8217;t think that someone is using the database just because there is an automated application process or reporting tool that connects to the database regularly.  If individual users are not connecting to the database, then it may not be in use anymore. </p>
<p><strong>Note:</strong> Double-check with any reports or application support teams as well, because the database may just be a repository, in which case individual user connections could be rare.</p>
<p>(iii) Datafile timestamps<br />
If the database is shutdown, What is the last modified date shown in the filesystem for the datafiles?  I&#8217;ve come across situations where you can&#8217;t find any entries for the SID in the listener log and the alert log for the database has been removed, so this is a good way to find out when the database was last open.</p>
<p><strong>Note:</strong> This is assuming that someone hasn&#8217;t just copied the files from another location, without preserving the original file timestamps.<br />
(iv) Run AWR/ASH or Statspack reports<br />
These will let you know if anyone has been using the database within the last week or longer - depending on the retention period configured for the database.  (If performance snapshots are not configured, then you may also find useful information on long-running transactions in V$SESSION_LONGOPS).</p>
<p><strong>Note:</strong> Just because a database hasn&#8217;t been used in the last week, doesn&#8217;t mean to say it&#8217;s not required anymore.  It could be used for monthly, weekly or annual reporting, so you may not see regular activity.<br />
 (v) Database Auditing<br />
If database auditing has been enabled, it will give you an idea who has been accessing the database. (e.g. query views such as DBA_AUDIT_SESSION and DBA_AUDIT_TRAIL).<br />
(vi) Standby databases<br />
It&#8217;s worth running the query SELECT DATABASE_ROLE FROM V$DATABASE; If this returns &#8220;PHYSICAL STANDBY&#8221; or &#8220;LOGICAL STANDBY&#8221;, then it could mean that someone has deleted a primary database in the past, but neglected to remove the associated standby database. <br />
 </p>
<p>Before deleting any databases, it would be advisable to email anyone that may have an interest in the database and then ensure that a copy of the database files and configuration information is archived to tape or other storage for a pre-defined period of time.  Ensure that you have approval from all interested parties before carrying out any work like this, which could have an impact on the business.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=899</wfw:commentRss>
		</item>
		<item>
		<title>Three New free of charge Oracle White Papers released for August!!!</title>
		<link>http://blog.oraclecontractors.com/?p=898</link>
		<comments>http://blog.oraclecontractors.com/?p=898#comments</comments>
		<pubDate>Mon, 15 Aug 2011 13:14:48 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=898</guid>
		<description><![CDATA[Hi all,
Many thanks to the following authors for their White Papers, your contributions are much appreciated &#038; help to share Oracle knowledge on a global scale:
Martin Dvorak - &#8220;How to Plan &#038; Deliver Oracle eBusiness Suite Training with UPK&#8221;
Claire Aukett - &#8220;Absence Management using R12 Oracle HCM &#038; CRM&#8221;
Elwyn Lloyd Jones - &#8220;Upgrade Strategies for [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Many thanks to the following authors for their White Papers, your contributions are much appreciated &#038; help to share Oracle knowledge on a global scale:</p>
<p>Martin Dvorak - &#8220;How to Plan &#038; Deliver Oracle eBusiness Suite Training with UPK&#8221;</p>
<p>Claire Aukett - &#8220;Absence Management using R12 Oracle HCM &#038; CRM&#8221;</p>
<p>Elwyn Lloyd Jones - &#8220;Upgrade Strategies for OWB Environments&#8221;</p>
<p>If you would like a copy of any of these papers, please register with the White Paper area of our website where you can gain access to our full White Paper library &#038; if you are interested in becoming a White Paper author yourself, please contact me at: <a href="mailto:kirsten.campbell@oraclecontractors.com">kirsten.campbell@oraclecontractors.com</a></p>
<p>New papers are also being released in September too so watch this space!
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=898</wfw:commentRss>
		</item>
		<item>
		<title>To OCP or not to OCP, that is the question</title>
		<link>http://blog.oraclecontractors.com/?p=897</link>
		<comments>http://blog.oraclecontractors.com/?p=897#comments</comments>
		<pubDate>Sat, 13 Aug 2011 09:09:44 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=897</guid>
		<description><![CDATA[Over the years, the topic of whether or not to take the Oracle Certified Professional (OCP) exams has been discussed many times. A large number of clients and agencies now regularly ask for candidates who are OCP qualified.
The main arguments against the exams seem to be along the following lines:
 
The exams only deal with theoretical [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years, the topic of whether or not to take the Oracle Certified Professional (OCP) exams has been discussed many times. A large number of clients and agencies now regularly ask for candidates who are OCP qualified.</p>
<p>The main arguments against the exams seem to be along the following lines:</p>
<p> </p>
<p><strong>The exams only deal with theoretical situations. You can&#8217;t beat real-life experience. <br />
</strong>This is true, but the exams do demonstrate that you are able to understand technical issues.  In order to resolve problems, you need to know how the software works.  You also need real-life experience of using your theoretical knowledge in a practical manner, before you can become an effective DBA.</p>
<p>Outside of a test laboratory or classroom, you have real users, applications and software from multiple vendors. Once exposed to these environments you become a much better DBA.</p>
<p> <br />
<strong>The exam is just a memory test.<br />
</strong>That&#8217;s true to some extent - but you have to understand the question and which of the possible answers is the correct one. You still have to understand what you&#8217;ve remembered.  Even though you may forget the exam topics over time, at least you have positive proof that at the time you took the exam, you knew that area of Oracle in detail.</p>
<p> </p>
<p><strong>I don&#8217;t need to take the exams to show that I keep up to date.<br />
</strong>Whilst you can just read the documentation, at least the exams prove that you&#8217;ve made the effort to keep your skills current. Otherwise everyone else just has your word for it that you have.  </p>
<p>The other issue is that you can read the documentation but not understand it properly. Passing the exam is proof that you understood the concepts in sufficient depth to pass the exam.</p>
<p>Taking the exams also provides a more focused way of keeping up to date.</p>
<p> </p>
<p> <br />
<strong>Why bother learning about lots of features that you&#8217;re never going to use?<br />
</strong>There are lots of features that you may never use, but if a new problem arises - if you&#8217;ve kept up to date - then you&#8217;re are aware of all the possible solutions.  You don&#8217;t always have several days or hours to go away and research all the available options. Even having a high-level overview of a solution can mean that you not only resolve issues more quickly, but that you&#8217;re more likely to come up with the most effective solution.  If you aren&#8217;t aware of other solutions then you never will use them. You&#8217;ll just end up doing things the same way that they&#8217;ve been done for years.</p>
<p>Another reason for learning about many features is that unless you can predict the future, how do you know what features you will never use? </p>
<p>Knowledge of lots of functionality is useful when resolving issues because more options that were once separate from the main database installation are now integrated into it. Sometimes these options can cause errors even though your application isn&#8217;t actually using them.</p>
<p>The exams also demonstrate that you&#8217;re interested enough in the technology to want to keep up to date. Nobody forces you to take them.</p>
<p>Whether or not you decide to take the exams is a personal choice, but I would say that they can be useful as a starting point to differentiate between two DBA&#8217;s who have a similar level of experience.  There is still no substitute for real-world experience and just because someone passes the exam doesn&#8217;t necessarily mean that they&#8217;ll be a better DBA. </p>
<p>(In case you&#8217;re wondering, I have taken the exams!)
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=897</wfw:commentRss>
		</item>
		<item>
		<title>Tracing ODBC Connections to an Oracle Database</title>
		<link>http://blog.oraclecontractors.com/?p=896</link>
		<comments>http://blog.oraclecontractors.com/?p=896#comments</comments>
		<pubDate>Fri, 05 Aug 2011 05:06:52 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=896</guid>
		<description><![CDATA[Various applications can be configured to connect to an Oracle database using an ODBC connection. When there are problems with the connection, it can sometimes be useful to enable ODBC tracing. 
This is a pretty straightforward task and can often highlight useful information to diagnose issues such as incorrect ODBC drivers or driver versions, or attempting to [...]]]></description>
			<content:encoded><![CDATA[<p>Various applications can be configured to connect to an Oracle database using an ODBC connection. When there are problems with the connection, it can sometimes be useful to enable ODBC tracing. </p>
<p>This is a pretty straightforward task and can often highlight useful information to diagnose issues such as incorrect ODBC drivers or driver versions, or attempting to use incorrect database connection information. </p>
<p>The Scenario<br />
&#8212;&#8212;&#8212;&#8212;-<br />
To demonstrate ODBC tracing, we&#8217;ll first log into an Oracle 11.2.0.1.0 Enterprise edition database called &#8220;ORCL11&#8243; and create an account called &#8220;odbc1&#8243;:   </p>
<p><strong>create user odbc1 identified by odbc1;</strong></p>
<p>(Note: You may want to make your password more secure than this! Remember also that 11g has case-sensitive passwords by default)</p>
<p><strong>grant create session, create table to odbc1;<br />
alter user odbc1 default tablespace users;<br />
alter user odbc1 quota 10M on users;</strong></p>
<p>Next we&#8217;ll connect as our new user and create a test table with a small amount of data.</p>
<p><strong>connect  odbc1/odbc1</strong></p>
<p><strong>create table odbc_test_tab (col1 varchar2(40));<br />
insert into odbc_test_tab values (&#8217;TEST&#8217;);<br />
insert into odbc_test_tab values (&#8217;TEST2&#8242;);<br />
commit;</strong></p>
<p><strong><br />
</strong>Then we create an ODBC connection to our ORCL11 database.  Create the connection using a System DSN called &#8220;EXCEL_TEST11&#8243;. Use the Oracle ODBC Driver 11.2.00.01 and the odbc1 database account to connect.</p>
<p>The last step is to create a new Excel 2010 spreadsheet called &#8220;odbctesting.xlsx&#8221; </p>
<p>Note: To keep this post brief, I haven&#8217;t included full details of the steps to create the ODBC connection, or of setting up the connection in Excel. If anyone wants detailed instructions on how to do this, please let me know.  For the Excel connection the main steps are to go to the Data tab - &#8220;From Other Sources&#8221; - &#8220;From Data Connection Wizard&#8221; - &#8220;ODBC DSN&#8221; - Next and then select the &#8220;EXCEL_TEST11&#8243; ODBC connection.  (Even though you&#8217;ll see a large listing of database objects, the ODBC1.ODBC_TEST_TAB is in the list - near the end. All the other objects are database views and tables to which PUBLIC - i.e. all users - have been  granted access).   Don&#8217;t select the option to save the password to the file.<br />
 </p>
<p>Turning on tracing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Next we&#8217;ll turn on ODBC tracing, so that we can see what&#8217;s happening when the connection is being made. From a Windows XP client, as you need to do is:</p>
<p>Start - control panel - Administrative Tools - Data Sources (ODBC)   (or you can go  Start - run - odbcad32)</p>
<p>Then: Go to the &#8220;Tracing&#8221; tab - Click on the &#8220;Start Tracing Now&#8221; button</p>
<p>Once you&#8217;ve clicked on the &#8220;Start Tracing Now&#8221; button, you&#8217;ll notice it will change to be a &#8220;Stop Tracing Now&#8221; button - Apply - OK.   This closes the ODBC Data Source Administrator.<br />
Notes:<br />
(i) To change the location of the logfile, click on the &#8220;Browse&#8221; button on the Tracing tab. You can also change the name of the log file. Then click Save.<br />
(ii) Be aware, that this will turn on tracing for ALL ODBC connections running on this client.<br />
(iii) Tracing could have a serious performance impact on your application, so only enable it if neccessary. <br />
(iv) Microsoft support article ID: 942976 notes that 64-bit versions of windows have two versions of the ODBC Administrator tool:</p>
<p><em>%systemdrive%\Windows\SysWoW64</em> folder.   - 32-bit version of Odbcad32.exe<br />
<em>%systemdrive%\windows\System32</em> folder.   - 64-bit version - also called Odbc32.exe</p>
<p>If running odbcad32 to edit 32-bit DSN&#8217;s, then specify the full path to the executable. 32-bit System DSN&#8217;s will only appear in the 32-bit version of odbc32.exe and 64-bit System DSN&#8217;s will only appear in the 64-bit version  of odbc32.exe.  However, be aware that User DSN&#8217;s will appear in both versions. Please refer to the Microsoft support note for more details.  <br />
 </p>
<p>Viewing a successful connection<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
To see a successful connection, we can open our spreadsheet and select the &#8220;Refresh All&#8221; option on the Data tab.<br />
The ODBC tracing logfile contains a large amount of information. An extract is shown below. (I&#8217;ve added comments pre-fixed by &#8220;#&#8221;, but you obviously won&#8217;t see these in the logfile).</p>
<p>&#8230;<br />
e               8fc-dd0 EXIT  SQLAllocConnect  with return code 0 (SQL_SUCCESS)   # successfully connected to the database.<br />
&#8230;<br />
  WCHAR *             0&#215;03B9F460 [      37] &#8220;SELECT * FROM &#8220;ODBC1&#8243;.&#8221;ODBC_TEST_TAB&#8221;"  # select statement to run against our table.<br />
&#8230;</p>
<p>e               8fc-dd0 EXIT  SQLDescribeColW  with return code 0 (SQL_SUCCESS) # Description of column data within the table follows<br />
  &#8230;<br />
  WCHAR *             0&#215;0013FA20 [       4] &#8220;COL1&#8243;                # Column name<br />
&#8230;<br />
  SQLULEN *           0&#215;024FEA68 (40)                             # Column length      <br />
&#8230;<br />
e               8fc-dd0 EXIT  SQLExecDirectW  with return code 0 (SQL_SUCCESS)  # Successfully executed SQL select statement<br />
&#8230;<br />
e               8fc-dd0 EXIT  SQLFetch  with return code 0 (SQL_SUCCESS) # Successful fetch of data from the first row in our table<br />
&#8230;<br />
e               8fc-dd0 EXIT  SQLFetch  with return code 0 (SQL_SUCCESS) # Successful fetch of data from the second row in our table<br />
&#8230;<br />
e               8fc-dd0 EXIT  SQLFetch  with return code 100 (SQL_NO_DATA_FOUND) # No more data to be fetched from the table - there are only 2 rows.<br />
&#8230;<br />
e               8fc-dd0 EXIT  SQLDisconnect  with return code 0 (SQL_SUCCESS)  #Disconnect from the database<br />
 </p>
<p>Viewing an unsuccessful connection attempt due to an incorrect password<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Here we refresh our spreadsheet again, but deliberately use an incorrect password:</p>
<p>Excel error messages:</p>
<p><em>[Oracle][ODBC][Ora]ORA-01017:invalid username/password; logon denied<br />
[Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed</em></p>
<p>ODBC Trace file error messages:</p>
<p>  <em>DIAG [28000] [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied<br />
 (1017)<br />
  DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed (0)</em></p>
<p> </p>
<p>Wrong Database Service name specified<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
We refresh our connection, but put an incorrect entry in the &#8220;Service Name&#8221; box:</p>
<p>Excel error messages:</p>
<p><em>[Oracle][ODBC][Ora]ORA-12170: TNS:Connect timeout occurred<br />
[Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed</em></p>
<p>ODBC Trace file error messages:<br />
<em>  DIAG [S1000] [Oracle][ODBC][Ora]ORA-12170: TNS:Connect timeout occurred (12170)<br />
  DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed (0)</em></p>
<p><em>Listener is down<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
</em>We shut down the listener and then refresh the spreadsheet. Excel error messages:</p>
<p><em>[Oracle][ODBC][Ora]ORA-12541: TNS:no listener</em></p>
<p>ODBC Trace file error messages:</p>
<p><em>DIAG [S1000] [Oracle][ODBC][Ora]ORA-12541: TNS:no listener (12541)<br />
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed (0)</em><br />
 </p>
<p> </p>
<p>Database is down<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Startup the listener and shut down the 11g database. Refresh the Excel spreadsheet:<br />
Excel error messages:</p>
<p><em>[Oracle][ODBC][Ora]ORA-12514: TNS:listener does not currently know of service requested in connect descriptor<br />
</em></p>
<p>ODBC Trace file error messages:</p>
<p><em>DIAG [S1000] [Oracle][ODBC][Ora]ORA-12514: TNS:listener does not currently know of service requested in connect descriptor (12514)<br />
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver&#8217;s SQLSetConnectAttr failed (0)<br />
</em></p>
<p>Note: You might think, why bother tracing ODBC if you get the error messages in Excel anyway?  That&#8217;s fine, but the main purpose of this post is to illustrate that if you are using an application which doesn&#8217;t supply detailed messages, you may be able to find out the cause of any issues by turning on ODBC tracing.<br />
 </p>
<p> </p>
<p>Turning off ODBC Tracing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
To stop tracing, you can then just open up the ODBC Data Source Administrator as before - go to the &#8220;Tracing&#8221; tab and click on the &#8220;Stop Tracing Now&#8221; button - Apply - OK. <br />
Note: Don&#8217;t leave tracing turned on permanently, otherwise it could fill up the local drive on the client. ODBC tracing can generate a lot of information. Remember to delete or archive old trace files.</p>
<p>Other references:<br />
<a href="http://support.microsoft.com/kb/268591/EN-US">http://support.microsoft.com/kb/268591/EN-US</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=896</wfw:commentRss>
		</item>
		<item>
		<title>How big is my oracle database?</title>
		<link>http://blog.oraclecontractors.com/?p=895</link>
		<comments>http://blog.oraclecontractors.com/?p=895#comments</comments>
		<pubDate>Thu, 28 Jul 2011 20:50:39 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=895</guid>
		<description><![CDATA[People ask this question a lot on the internet and most of the answers just seem to focus on a query of dba_data_files, similar to that shown below:
Datafiles
select sum(bytes)/1048576 &#8220;DATAFILES_SIZE_MB&#8221; from dba_data_files;
That&#8217;s fine to start with, but you should also include tempfiles, which are used when an operation such as a large sort is too [...]]]></description>
			<content:encoded><![CDATA[<p>People ask this question a lot on the internet and most of the answers just seem to focus on a query of dba_data_files, similar to that shown below:</p>
<p><strong>Datafiles<br />
</strong>select sum(bytes)/1048576 &#8220;DATAFILES_SIZE_MB&#8221; from dba_data_files;<br />
That&#8217;s fine to start with, but you should also include tempfiles, which are used when an operation such as a large sort is too big to fit into the relevant memory allocated to the session.<br />
<strong>Tempfiles<br />
</strong>select sum(bytes)/1048576 &#8220;TEMPFILES_SIZE_MB&#8221; from dba_temp_files;<br />
 </p>
<p>Your redo logs can also use up a large amount of disk space - especially if your database has more than the minimum number of 2 redo log groups. (You may also have several members within each group).<br />
<strong> </strong></p>
<p><strong>Redologs<br />
</strong>select sum(bytes)/1048576 &#8220;REDOLOGS_SIZE_MB&#8221; from v$log;</p>
<p>The database obviously needs controlfiles to record information such as which datafiles belong to the database.  If your CONTROL_FILE_RECORD_KEEP_TIME is set to a large value, then your controlfiles can become quite large.</p>
<p><strong>Controlfiles<br />
</strong>select round(sum(block_size*file_size_blks)/1048576,2) &#8220;CONTROLFILESIZE_MB&#8221; from v$controlfile;</p>
<p>From 10g onwards, flashback database is not enabled by default, but if it is, then this area can grow rapidly over time. </p>
<p><strong>Flash Recovery Area<br />
</strong>select * from v$recovery_file_dest; <br />
select * from v$flash_recovery_area_usage;  </p>
<p>These views will show sizing details and free space available. </p>
<p>Note: If your backups are held outside of the flash recovery area, then you&#8217;ll also need to allow space for these. This will depend on your backup strategy and backup retention policy. (Export/datapump export dumpfiles also need to be planned for).</p>
<p>If you are using RMAN incremental backups and have block change tracking enabled, then include this file:</p>
<p><strong>Block change tracking file<br />
</strong>select filename, nvl(bytes/1048576,0) &#8220;BLOCK_CT_SIZE_MB&#8221; from v$block_change_tracking;<br />
<strong> </strong></p>
<p><strong>Files referenced by database directories or the utl_file_dir parameter<br />
</strong>Your application may read from, or write to external files via database directories or the utl_file_dir parameter.</p>
<p>Other examples of using external directories are for</p>
<p>(a) External tables -</p>
<p>select a.owner||&#8217;.'||a.table_name||&#8217; stored in directory &#8216;||b.directory_path &#8220;EXTERNAL_TABLES&#8221;<br />
from<br />
dba_external_locations a, dba_directories b<br />
where a.directory_owner=b.owner<br />
and a.directory_name=b.directory_name;<br />
(b) If you are storing multiple versions of the same tablespace within a file group repository. (i.e. tablespace versioning).</p>
<p>select a.tablespace_name, a.version, a.file_group_owner, a.file_group_name,<br />
b.file_name, b.file_directory<br />
from dba_file_group_tablespaces a, dba_file_group_files b<br />
where a.file_group_owner=b.file_group_owner<br />
and a.file_group_name=b.file_group_name;<br />
<strong> </strong></p>
<p><strong>Miscellaneous files<br />
</strong>There are a large number of files which you could also include in your sizing if you wanted to. Though most of these are really external to the database.<br />
Examples include:</p>
<p>(a) The spfile/pfile and any ifile referenced files.<br />
(b) Any external scheduler jobs (i.e. program_type=&#8217;EXECUTABLE&#8217; and program_action which points to a shell script).<br />
(c) Configuration files such as Oracle wallet files and database gateway/hs services files.                   </p>
<p>(d) Oracle networking files. (e.g. tnsnames.ora, sqlnet.ora, listener.ora)<br />
(e) Passwordfile.<br />
(f) Any application code that needs to be deployed to the database server.<br />
(g) Any database management or monitoring scripts that need to be on the server. <br />
(h) Files referenced by the audit_file_dest parameter, if audit_trail is set to use the &#8220;OS&#8221; or &#8220;XML&#8221; options.<br />
(i) Archived redo logs and standby redo logs. Be aware of space usage related to the workload of your database and whether or not you have multiple destinations defined.<br />
(j) Any software that needs to be deployed to the server. (e.g. The oracle software itself takes up several gigabytes of space).</p>
<p>If you wanted to be very precise, you could remove unused space from the calculations above, but I haven&#8217;t done that here, in order to keep things more straightforward. In real-life you would probably be better leaving the extra space available to allow for future growth of the database - which you should also plan into your size calculations.</p>
<p>As you can see, calculating size requirements for an Oracle database is not always as simple as you would think.  I&#8217;ve tried to include all elements in this post, though in reality a lot of them won&#8217;t apply to most databases. Please feel free to share any other items not on the list, that you feel should be included.
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=895</wfw:commentRss>
		</item>
		<item>
		<title>Database backup checks - what you could be missing</title>
		<link>http://blog.oraclecontractors.com/?p=894</link>
		<comments>http://blog.oraclecontractors.com/?p=894#comments</comments>
		<pubDate>Tue, 19 Jul 2011 22:02:09 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=894</guid>
		<description><![CDATA[If your backup scripts have been in use for several years, it is easy to become relaxed about them. You just assume that because the scripts have been around for a long time they must be fine.
Whilst in many cases this may be true, it&#8217;s always a good idea to check your scripts from time [...]]]></description>
			<content:encoded><![CDATA[<p>If your backup scripts have been in use for several years, it is easy to become relaxed about them. You just assume that because the scripts have been around for a long time they must be fine.</p>
<p>Whilst in many cases this may be true, it&#8217;s always a good idea to check your scripts from time to time.  If you don&#8217;t, then you could miss some of the following issues:<br />
 </p>
<p>Recoverability<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
1) When did you last test that you can actually restore from your backups?  (e.g. Are you running test restores, or using the RMAN validate commands?) </p>
<p>2) Does your script look for logical corruptions?  (RMAN will pick up physical corruptions by default, but you need to run specific commands to detect logical corruptions).<br />
 </p>
<p>Space Issues<br />
&#8212;&#8212;&#8212;&#8212;<br />
3) Do you review available disk space before running backups?  Do these take into account additional disk space requirements if the backup files are compressed?  (i.e. They may take up less space once compressed, but the initial compression operation will temporarily use a lot more space). <br />
4) Are you looking at the size of your backup files? (e.g. If running a cold backup have you run out of disk space?  Do any file transfer tasks complete successfully?)<br />
 </p>
<p>Backup Timings<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
5) Are your backups over-running into the on-line day and affecting database performance for business users? </p>
<p>Are they running at a time when you have an overnight batch job running? </p>
<p>As the database size and its workload increases over time, you&#8217;ll need to adjust your timings accordingly.<br />
6) If you have a backup to disk, followed by a backup to tape or a lower-level of tiered storage, is this still working correctly?  (i.e. You don&#8217;t want to have your disk backup still running when the secondary backup starts, otherwise you could experience various performance and corruption issues). </p>
<p>If your tablespaces are being put into backup mode to take a hot backup or snapshot of the database, ensure that this change is still happening at the correct point in time.<br />
 </p>
<p>Error checking<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
7) Are you searching for the correct error messages?   Is it OK to just look for ORA- errors or would it be advisable to also check for other messages such as &#8220;warning&#8221;, &#8220;unsuccessful&#8221;, &#8220;usage&#8221;, &#8220;error&#8221;, &#8220;RMAN-&#8221; etc.<br />
8) Are you aware of the date and time of your backup logs?  Just doing a tail of the last few lines of the log without checking this, could mean that you miss any new errors.<br />
 </p>
<p>Backup Options<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
9) Unless you&#8217;re using Oracle-aware software (i.e. Oracle agents) to backup an online database, then is there any point in backing up database files?  Should you just be backing up your backup files.  (If you&#8217;re not using oracle-aware software, then backups of open database files will be unusable - though you may not see any errors).</p>
<p>If you&#8217;re using a tool that is Oracle-aware, are you definitely backing up all the database files.  It&#8217;s easy to miss out a tickbox in a GUI tool and find out later that you have an incomplete backup.</p>
<p>10) Are you using the latest backup and recovery features?   Has your script been optimised in terms of performance and functionality? Could it be:</p>
<p>(a) Faster,  so that it has less of a performance impact? <br />
(b) Smaller to save on storage costs?    <br />
(c) More secure? </p>
<p>11) Would it be easier to use separate version-specific scripts, so that it&#8217;s easier to use and test new features?  One large script for all releases can become very complex over time.  Issues can take longer to resolve.</p>
<p> </p>
<p> Record Keeping<br />
&#8212;&#8212;&#8212;&#8212;&#8212;<br />
12) Are you maintaining a log or history of backups and their contents?  This is straightforward if you&#8217;re using an RMAN recovery catalog, or backing up to some storage or backup management software. Even something as simple as a spreadsheet could be used to record a history of your backups.<br />
 </p>
<p>These are just a few things to think about when checking your backups.  As a DBA, backups should be your number one priority. If you can&#8217;t restore from them in a DR situation, then you may find that your number one priority suddenly becomes finding a new job!
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=894</wfw:commentRss>
		</item>
		<item>
		<title>Dealing with multiple tnsnames.ora files on a windows client - Part 2</title>
		<link>http://blog.oraclecontractors.com/?p=893</link>
		<comments>http://blog.oraclecontractors.com/?p=893#comments</comments>
		<pubDate>Tue, 12 Jul 2011 20:43:39 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=893</guid>
		<description><![CDATA[In part 1 of this blog, we discussed how to deal with multiple tnsnames.ora files on a windows client by using the TNS_ADMIN variable. This ensures that each Oracle installation on the client uses the same central file.
Obviously there will be some users - such as developers or testers - who require connection strings that [...]]]></description>
			<content:encoded><![CDATA[<p>In part 1 of this blog, we discussed how to deal with multiple tnsnames.ora files on a windows client by using the TNS_ADMIN variable. This ensures that each Oracle installation on the client uses the same central file.</p>
<p>Obviously there will be some users - such as developers or testers - who require connection strings that shouldn&#8217;t be available to ordinary users.  One way of getting around this issue is the following:</p>
<p>(i) Point the TNS_ADMIN variable on the local client to a shared local tnsnames.ora file.<br />
(ii) Within the shared tnsnames.ora file, add an ifile entry which points to a shared location on a mapped network drive. </p>
<p>Using this method, clients have access to the shared information on the network drive, but are also able to add their own private connection strings to the local file. To create an ifile entry you just add a line similar to that shown below to your tnsnames.ora file:</p>
<p><strong>ifile=U:\SHARED_TNS\tnsnames.ora </strong></p>
<p>Note: There should be no spaces before or after the &#8220;=&#8221; sign, otherwise SQLDeveloper can have issues connecting.</p>
<p>In this example, we have specified a tnsnames.ora file on the U: drive.  The file can be called anything that you like.  It is also possible to have several ifile entries in your local tnsnames.ora file, if you want to sub-divide access to selected databases. It is advisable to set permissions on the remote file to read-only, in order to prevent clients using GUI tools such as Net Configuration Assistant or Net Manager from over-writing the file.</p>
<p>You should be aware that where you place the ifile entry is important.</p>
<p>If you place the ifile entry at the start of the local client tnsnames.ora file, then a duplicate entry in the local file would take precedence over an entry in the ifile-referenced file, as the entry in the local file would be read last.</p>
<p>If you place the ifile entry at the end of the local client tnsnames.ora file, then a duplicate entry in the ifile-referenced file would take precedence over an entry in the local tns file, as the ifile entry would be read last.<br />
 </p>
<p>Disclaimer:</p>
<p>(a) Having a central tnsnames.ora file may reduce support calls and reduce the administrative problems of maintaining several files, but some sites may view this as being a central point of failure - especially if the clients are pointing to a tnsnames.ora file on a remote network drive. To resolve this, you could have another copy on another network drive which is updated regularly.<br />
(b) Always test that the ifile setting does not have an adverse effect on client connections to the database. (Some Java clients may experience issues when using this parameter). <br />
(c) You can experience connection issues if you have a session open and you edit the ifile or tnsnames.ora file without exiting your session.<br />
(d) If a shared tnsnames.ora file is not suitable for your needs, then check the Oracle documentation for other methods to identify Oracle database services. (e.g. Oracle Names Server, Oracle Internet Directory etc.)
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=893</wfw:commentRss>
		</item>
		<item>
		<title></title>
		<link>http://blog.oraclecontractors.com/?p=892</link>
		<comments>http://blog.oraclecontractors.com/?p=892#comments</comments>
		<pubDate>Wed, 06 Jul 2011 22:17:48 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<category>Oracle Database</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=892</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=892</wfw:commentRss>
		</item>
		<item>
		<title>Dealing with multiple tnsnames.ora files on a windows client</title>
		<link>http://blog.oraclecontractors.com/?p=891</link>
		<comments>http://blog.oraclecontractors.com/?p=891#comments</comments>
		<pubDate>Wed, 06 Jul 2011 22:17:31 +0000</pubDate>
		<dc:creator>Matt Canning</dc:creator>
		
		<category>- Global Oracle Contractors Network</category>

		<guid isPermaLink="false">http://blog.oraclecontractors.com/?p=891</guid>
		<description><![CDATA[Part 1
A common problem found at many sites is having Windows clients with several Oracle products installed.
If each installation uses its own tnsnames.ora file to identify the database services that the client can connect to, then users often experience connection issues. 
If a new database service is added, it&#8217;s not always clear which tnsnames.ora file(s) need [...]]]></description>
			<content:encoded><![CDATA[<p>Part 1</p>
<p>A common problem found at many sites is having Windows clients with several Oracle products installed.</p>
<p>If each installation uses its own tnsnames.ora file to identify the database services that the client can connect to, then users often experience connection issues. </p>
<p>If a new database service is added, it&#8217;s not always clear which tnsnames.ora file(s) need to be updated.</p>
<p>Some sites get around this problem using scripts or batch files. Only one tnsnames.ora file is updated and then it is automatically copied to the other locations on the client.  Other sites just update each file manually.</p>
<p>A better method is to use the TNS_ADMIN environment variable.  Setting this variable to point to the directory of your choice ensures that all Oracle installations use the same copy of the tnsnames.ora file.</p>
<p>Note 111942.1 describes this as: </p>
<p><em>&#8220;The TNS_ADMIN parameter/environment variable is used to explicitly define the directory location for Oracle Net to resolve where to find its configuration files. TNS_ADMIN over-rides the default Oracle Net location.&#8221;</em></p>
<p>To add this setting for an Oracle 10 client running on Windows XP, all you would need to do is:</p>
<p>Right-click on &#8220;My Computer&#8221; - Properties - Advanced - Environment Variables - Under the &#8220;System variables&#8221; section - New -<br />
In the &#8220;Variable Name&#8221; box type - <strong>TNS_ADMIN<br />
</strong>For the &#8220;Variable Value&#8221; box type -  <strong>C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN</strong>  - OK - OK</p>
<p>Note: The location can be on a local or remote network drive. Just specify the directory that contains the file - not the name of the file. <br />
 </p>
<p>The Oracle client will search for the tnsnames.ora file in the following locations and order:<br />
(i) The current directory. (i.e. When running from a Windows command prompt, if there is a tnsnames.ora file in your current directory, then this will be referenced first).</p>
<p>(ii) A location specified in your session (e.g. SET TNS_ADMIN=C:\SHARED_TNS )  or within a script. </p>
<p>(iii) A global environment variable (i.e. setting TNS_ADMIN via My Computer).</p>
<p>(iv) A registry key entry. (e.g. You could use regedt32 to create a new String Value called TNS_ADMIN under the Oracle home branch. (see Note 290124.1 for further details).</p>
<p>Setting the TNS_ADMIN environment variable is a better solution to our issue than using a registry key entry, as we would need to create a registry key under every ORACLE_HOME on the client.  Note 1020336.102 mentions that</p>
<p><em>&#8220;Different versions of Oracle client software will not read a variable defined within another version&#8217;s HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE key&#8221;</em></p>
<p>(v) %ORACLE_HOME%\network\admin  (or %ORACLE_HOME%\net80\admin for an Oracle 8.0 client).</p>
<p>Once you&#8217;ve configured the TNS_ADMIN variable, you can just type tnsping service_name  (e.g. <strong>tnsping ORCL10</strong>)  and then you should see an &#8220;<em>OK</em>&#8221; message.</p>
<p>If it&#8217;s still not working then check on Oracle Support, as there are various issues which could be affecting the connection (e.g. NAMES.DIRECTORY_PATH, NAMES.DEFAULT_DOMAIN and SQLNET.AUTHENTICATION_SERVICES settings in your sqlnet.ora etc.).</p>
<p>Also check that you don&#8217;t have duplicate tns connection string entries in the file.  If you do, then the last entry in the file is the one that will be used. <br />
Note:  If you have a command prompt window open, it won&#8217;t pick up the new setting dynamically - you&#8217;ll need to close it and open up a new window. </p>
<p>Just type <strong>echo %TNS_ADMIN%</strong> and you should see the new setting.</p>
<p>You may not want all users to have access to every connection string that is available, so in part 2 of this blog, we&#8217;ll discuss how to deal with this situation.<br />
Disclaimers:</p>
<p>(a) You should double-check that each of the Oracle products installed on the client still works correctly when using a central file. Some oracle applications require their own settings, which may not be compatible with other oracle installations.  As with any changes, you should always test any changes before rolling them out to clients.</p>
<p>(b) When un-installing Oracle software, you should un-set the TNS_ADMIN variable if it points to a shared location. Some of the GUI tools (e.g. 10g Net Configuration Assistant) could remove files specified at this location.<br />
 
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.oraclecontractors.com/?feed=rss2&amp;p=891</wfw:commentRss>
		</item>
	</channel>
</rss>

