<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6663131843269359078</id><updated>2011-07-30T20:35:03.183+01:00</updated><title type='text'>The erratic thoughts of an over-active mind</title><subtitle type='html'>The ramblings, rants, loves, hates and moments of an over-active imagination.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-2890070515332125616</id><published>2010-08-19T10:30:00.002+01:00</published><updated>2010-08-19T10:58:18.335+01:00</updated><title type='text'>Logical Standby Dataguard Error</title><content type='html'>The following error is thrown up when any user other than sys tries to log onto the database. The third and fourth lines of the error are a red herring which made me investigate the package. After comparing the package in the reporting (logical standby) database and finding it to be exactly the same as that in the production database, I investigated the database guard error.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:78%;"  &gt;SQL&gt; conn &lt;username&gt;/&lt;password&gt;&lt;br /&gt;ERROR:&lt;br /&gt;ORA-00604: error occurred at recursive SQL level 1&lt;br /&gt;ORA-16224: Database Guard is enabled&lt;br /&gt;ORA-06512: at "OASIS.OASLOGONCHECK_PACKAGE", line 377&lt;br /&gt;ORA-06512: at line 8&lt;br /&gt;&lt;br /&gt;Warning: You are no longer connected to ORACLE.&lt;/password&gt;&lt;/username&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are three options for dataguard status - all, standby, or none.  I queried v$database to see which option was set for my logical standby:&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt; select guard_status from v$database;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;defanghtml_span    style=";font-family:'Verdana','sans-serif';font-size:10pt;color:blue;" lang="EN-US"&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="color: rgb(0, 0, 0);font-family:courier new;" &gt;GUARD_S&lt;/span&gt;&lt;o:p style="color: rgb(0, 0, 0); font-family: courier new;"&gt;&lt;/o:p&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:courier new;" &gt;-------&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:courier new;" &gt;ALL&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/defanghtml_span&gt;&lt;/p&gt;Guard_status protects the data from being changed.&lt;br /&gt;&lt;ul&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;code&gt;ALL&lt;/code&gt; - All users other than &lt;code&gt;SYS&lt;/code&gt; are prevented from making changes to any data in the database.&lt;/p&gt;&lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;code&gt;STANDBY&lt;/code&gt; - All users other than &lt;code&gt;SYS&lt;/code&gt; are prevented from making changes to any database object being maintained by logical standby.&lt;/p&gt;&lt;/li&gt;&lt;li type="disc"&gt; &lt;p&gt;&lt;code&gt;NONE&lt;/code&gt; - Indicates normal security for all data in the database.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;Therefore the users could not log onto the database because the trigger being called on logon was unable to make updates to the database. I updated the guard_status to "standby" and the issue resolved.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:78%;" &gt;SQL&gt; alter database guard standby;&lt;br /&gt;Database  altered.&lt;br /&gt;&lt;br /&gt;SQL&gt;  conn &lt;username&gt;/&lt;password&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;username&gt;&lt;password&gt;Connected.&lt;/password&gt;&lt;/username&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-2890070515332125616?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/2890070515332125616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=2890070515332125616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/2890070515332125616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/2890070515332125616'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2010/08/logical-standby-dataguard-error.html' title='Logical Standby Dataguard Error'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-2917512381115497216</id><published>2010-06-22T09:53:00.002+01:00</published><updated>2010-06-22T09:55:56.649+01:00</updated><title type='text'>Windows Scripts</title><content type='html'>&lt;strong&gt;FTP a file from the server&lt;/strong&gt;&lt;br /&gt;&gt;  Log onto the server&lt;br /&gt;&gt; $ bin&lt;br /&gt;&gt; $ hash&lt;br /&gt;&gt; $ prompt&lt;br /&gt;&gt; $ lcd &lt;file&gt;&lt;br /&gt;&gt; $ cd &lt;folder&gt;&lt;br /&gt;&gt; $ mget *&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-2917512381115497216?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/2917512381115497216/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=2917512381115497216' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/2917512381115497216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/2917512381115497216'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2010/06/windows-scripts.html' title='Windows Scripts'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-3851263481174845363</id><published>2009-05-12T12:55:00.001+01:00</published><updated>2009-05-18T17:04:59.438+01:00</updated><title type='text'>E-Business Suite Hints and Tips</title><content type='html'>&lt;h1&gt;Enabling/Disabling forms personalisation&lt;/h1&gt;  &lt;p&gt;In order to personalise the forms within e-business suite you need to perform the following:&lt;/p&gt;  &lt;p&gt;&amp;gt; Login to E-business suite as responsibility System Administrator&lt;/p&gt;  &lt;p&gt;&amp;gt; Go to Profile &amp;gt; System&lt;/p&gt;  &lt;p&gt;&amp;gt; Search for Disable Self-Service Personal&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_HC_WGfiuX04/SgljoJ1-6UI/AAAAAAAAADk/DWgxfWcPvLo/s1600-h/clip_image002%5B4%5D.jpg"&gt;&lt;img title="clip_image002" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="248" alt="clip_image002" src="http://lh6.ggpht.com/_HC_WGfiuX04/SgljogDC6GI/AAAAAAAAADo/e0yHAevHQQ0/clip_image002_thumb%5B1%5D.jpg?imgmax=800" width="428" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;gt; Change disable self-service personal to “no”&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_HC_WGfiuX04/SgljoxWdXNI/AAAAAAAAADs/Rle2Dpoytw4/s1600-h/clip_image002%5B5%5D%5B4%5D.jpg"&gt;&lt;img title="clip_image002[5]" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="212" alt="clip_image002[5]" src="http://lh4.ggpht.com/_HC_WGfiuX04/SgljpbD5EMI/AAAAAAAAADw/EkcRyOsTFgU/clip_image002%5B5%5D_thumb%5B2%5D.jpg?imgmax=800" width="438" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you need to disable forms personalisation, then set this value to “yes”&lt;/p&gt;  &lt;h1&gt;&amp;#160;&lt;/h1&gt;  &lt;h1&gt;Log Files&lt;/h1&gt;  &lt;p&gt;E-business suite log files are all stored under $LOG_HOME&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-3851263481174845363?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/3851263481174845363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=3851263481174845363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/3851263481174845363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/3851263481174845363'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2009/05/e-business-suite-hints-and-tips.html' title='E-Business Suite Hints and Tips'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_HC_WGfiuX04/SgljogDC6GI/AAAAAAAAADo/e0yHAevHQQ0/s72-c/clip_image002_thumb%5B1%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-4578035479639812421</id><published>2009-04-30T10:37:00.003+01:00</published><updated>2010-06-25T09:43:52.252+01:00</updated><title type='text'>Errors and Resolutions</title><content type='html'>&lt;h2&gt;Portal Servlet Error An Unexpected servlet error was encountered&lt;/h2&gt;&lt;h2&gt;Problem accessing Portal &lt;/h2&gt;&lt;h3&gt;Error Message:&lt;/h3&gt;&lt;p&gt;Servlet Error&lt;br /&gt;An unexpected servlet error was encountered.&lt;br /&gt;Please check the log file for more details. &lt;/p&gt;&lt;p&gt;Midtier_home/j2ee/OC4J_Portal/application-deployments/portal/OC4J_Portal_default_island/Application.log shows -&amp;gt; &lt;/p&gt;&lt;p&gt;05/07/25 21:20:25 portal: [module=PortalServlet, ecid=84136174634,1] ERROR: oracle.webdb.utils.PortalExceptionImpl: Unable to obtain Portal Repository version.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Cause:&lt;br /&gt;&lt;span style="font-family:lucida grande;font-size:85%;"&gt;This can be caused by changing the Portal schema user password using sqlplus.&lt;/span&gt;  &lt;/h3&gt;&lt;h3&gt;Resolution:&lt;/h3&gt;&lt;p&gt;1. Change the password from database again using&lt;br /&gt;SQL&amp;gt; alter user portal identified by password&lt;br /&gt;this is so you know the portal schema password. &lt;/p&gt;&lt;p&gt;2. Login to OIDADMIN and enter the password: &lt;/p&gt;&lt;p&gt;i). Navigate to this entry (ENSURE YOU HAVE THE CORRECT ORCLREFERENCENAME if you have multiple Metadata Repository registered) &lt;/p&gt;&lt;p&gt;OrclResourceName=PORTAL,orclReferenceName=asdb1.au.oracle.com,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext &lt;/p&gt;&lt;p&gt;ii).Change the value of orclpasswordttribute and Enter the Portal schema password as per step 1. &lt;/p&gt;&lt;p&gt;3. Login to EM and change the password &lt;/p&gt;&lt;h2&gt;Disco Error: No Response from Application Web Server &lt;/h2&gt;&lt;br /&gt;&lt;h3&gt;Error:&lt;/h3&gt;&lt;p&gt;When trying to access Discoverer Plus or Viewer following error message is encountered: &lt;/p&gt;&lt;p&gt;"There was no response from the application web server for the page you requested.&lt;br /&gt;Please notify the site's webmaster and try your request again later. "&lt;br /&gt;Cause:&lt;br /&gt;Not all of the iAS services were started.&lt;br /&gt;Running the /ora_home/opmn/bin/opmnctl status showed the Http server process was down. &lt;/p&gt;&lt;h3&gt;Solution: &lt;/h3&gt;&lt;p&gt;To implement the solution, please execute the following steps: &lt;/p&gt;&lt;p&gt;1. Start the Http server process using the following command:&lt;br /&gt;opmnctl startproc ias-component=XXXX (where XXXX = HTTP_Server) &lt;/p&gt;&lt;p&gt;2. Test the Viewer and Plus connections they should be working now.&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;Unable to login: &amp;amp;REASON has been detected in &amp;amp;ROUTINE &lt;/h2&gt;&lt;p&gt;On Apps 11.5.10.2 on Production, when any user attempts to login to applications,they receive the following error and are unable to login:&lt;/p&gt;&lt;h3&gt;Error:&lt;/h3&gt;&lt;p&gt;Oracle error &amp;amp;ERRNO: &amp;amp;REASON has been detected in &amp;amp;ROUTINE.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Cause:&lt;/h3&gt;&lt;p&gt;Check if you can access forms via: &lt;a href="http://host.domain:port/dev60cgi/f60cgi"&gt;http://host.domain:port/dev60cgi/f60cgi&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This will produce an error message stating which trigger has become invalid.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Solution:&lt;/h3&gt;&lt;p&gt;Try to recompile the trigger using:&lt;br /&gt;SQL&amp;gt; alter trigger compile; &lt;/p&gt;&lt;p&gt;If this fails then:&lt;br /&gt;SQL&amp;gt; alter trigger disable; &lt;/p&gt;&lt;p&gt;This should allow users to log into the application once again.&lt;br /&gt;Then investigate the trigger to find out what the problem with it is&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Changes:&lt;/h3&gt;&lt;p&gt;An event alert had been activated on the FND_USER table&lt;br /&gt;&lt;/p&gt;&lt;h2&gt;ORA-01658: unable to create INITIAL extent for segment in tablespace WAREHOUSE_DATA&lt;/h2&gt;&lt;p&gt;If this error occurs then do the following scripts to check for tablespace free space and to increase the datafile size (if the datafile is small then increase it, otherwise create a new one).&lt;/p&gt;&lt;h3&gt;Resolution:&lt;/h3&gt;&lt;p&gt;Find out how much free space the tablespace has:&lt;br /&gt;SQL&amp;gt; select tablespace_name, sum(bytes), max(bytes) from dba_free_space group by tablespace_name order by 2; &lt;/p&gt;&lt;p&gt;Find location of datafile:&lt;br /&gt;SQL&amp;gt; select file_name, bytes from dba_data_files where tablespace_name ='; &lt;/p&gt;&lt;p&gt;Increase the size of the datafile:&lt;br /&gt;SQL&amp;gt; alter database datafile '' resize 2500M; &lt;/p&gt;&lt;p&gt;Commit the changes:&lt;br /&gt;SQL&amp;gt; commit; &lt;/p&gt;&lt;h2&gt;Cannot start up the BI Scheduler - [nQSError: 46029]&lt;/h2&gt;&lt;h3&gt;Applies to:&lt;/h3&gt;&lt;p&gt;Oracle Business Intelligence Applications Foundation - Version: 10.1.3.3.2 to 10.1.3.4&lt;br /&gt;This problem can occur on any platform. &lt;/p&gt;&lt;h3&gt;Symptoms&lt;/h3&gt;&lt;p&gt;Use the following command to startup BI Scheduler:&lt;br /&gt;$ ./run-sch.sh start &lt;/p&gt;&lt;p&gt;It gives the following output:&lt;br /&gt;$ Oracle BI Scheduler startup initiated. &lt;/p&gt;&lt;p&gt;Execute the following command to check the Oracle BI Scheduler logfile and see if it started.&lt;br /&gt;$ tail -f /mnt/obiee/OracleBI/server/Log/NQScheduler.log &lt;/p&gt;&lt;p&gt;NQScheduler.log gives the following error:&lt;br /&gt;    [68008] Scheduler Error: libclntsh.so.10.1: cannot open shared object file: No such file or directory&lt;br /&gt;[nQSError: 46029] Failed to load the DLL /mnt/obiee/OracleBI/server/Bin/libnqsdbgatewayoci10g.so. Check if ‘Oracle OCI 10G’ database client is installed.&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;Cause&lt;/h3&gt;&lt;p&gt;It is unable to reference the libclntsh.so.10.1. &lt;/p&gt;&lt;h3&gt;Solution&lt;/h3&gt;&lt;p&gt;Update the db.env in the ENV_FILES to have the following line included:&lt;br /&gt;    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH:&lt;br /&gt;(where $ORACLE_HOME is the Oracle 10gR2 home) &lt;/p&gt;&lt;p&gt;Starting up BI Scheduler should now give the following message in the NQScheduler.log:&lt;br /&gt;[16020] Metadata Database Type: Oracle 10g R2 &lt;br /&gt;Data Source Name: OBIEE &lt;br /&gt;Data Source Type: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pro &lt;br /&gt;2009-04-02 10:36:08 &lt;br /&gt;[68013] Service started. &lt;br /&gt;2009-04-02 10:36:08 &lt;br /&gt;Service started. &lt;/p&gt;&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;DBCA (or other GUI's) do not launch when ssh'ing to another server in vnc&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;When ssh'ing to another server through vnc and requiring the gui interface to open, you need to ssh using the following command to enable X11 forwarding.&lt;br /&gt;$  ssh -X &lt;server&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-4578035479639812421?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/4578035479639812421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=4578035479639812421' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/4578035479639812421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/4578035479639812421'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2009/04/errors-and-resolutions.html' title='Errors and Resolutions'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-1145326172117791125</id><published>2009-04-30T10:22:00.005+01:00</published><updated>2010-06-21T10:31:26.221+01:00</updated><title type='text'>Useful Unix Scripts</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;strong&gt;How to find OPatch version&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;cd $ORACLE_HOME/OPatch&lt;br /&gt;sh opatch version&lt;/span&gt;&lt;span lang="EN-GB"  style="font-family:Verdana;"&gt;&lt;?xml:namespace prefix = o /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;strong&gt;How to find perl vesrion&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;perl -v&lt;/span&gt;&lt;b&gt;&lt;span lang="EN-GB"  style="font-family:Verdana;"&gt; &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;strong&gt;Change SYSADMIN password&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;&lt;span lang="EN-GB"&gt;FNDCPASS apps/apps 0 Y system/manager mode username new_password &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;strong&gt;Find Apps Password E-Business Suite 11i&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;If you want the apps password for an 11i environment look in $APACHE_TOP/modplsql/cfg/wdbsvr.app &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;span lang="EN-GB"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;hange ownership of a directory without unsetting the sticky tab&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;read/execute permission: chmod -R g+rx &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Find directory size&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;du -sh &lt;directory&gt;or du -sk &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Find File Sizes within Directory&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;du -sh * sort -n (sorts by file size) or du - sk sort -n&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Find files by extension&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;find . -name ".&lt;extension_type&gt;" -type f -print&lt;span style="FONT-WEIGHT: bold"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;span style="FONT-WEIGHT: bold"&gt;Create Symbolic Link&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;ln -s [source_location] [link_name] &lt;/p&gt;&lt;p&gt;&lt;/extension_type&gt;&lt;strong&gt;Create Linux User&lt;br /&gt;&lt;/strong&gt;adduser [username] -p [password] -g [initial_group]&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Delete Linux User&lt;br /&gt;&lt;/strong&gt;deluser [username]&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Change Linux User Password&lt;br /&gt;&lt;/strong&gt;passwd [username]&lt;/p&gt;&lt;p&gt;&lt;strong&gt;View Linux Groups&lt;br /&gt;&lt;/strong&gt;more /etc/group&lt;/p&gt;&lt;p&gt;&lt;strong&gt;View Linux Users&lt;br /&gt;&lt;/strong&gt;more /etc/passwd&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-1145326172117791125?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/1145326172117791125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=1145326172117791125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/1145326172117791125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/1145326172117791125'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2009/04/useful-unix-scripts.html' title='Useful Unix Scripts'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-1966081328764861583</id><published>2009-04-30T09:56:00.001+01:00</published><updated>2009-04-30T10:21:31.514+01:00</updated><title type='text'>Useful Database Scripts</title><content type='html'>&lt;style&gt; &lt;!--  /* Font Definitions */ @font-face  {font-family:"Arial Unicode MS";  panose-1:2 11 6 4 2 2 2 2 2 4;  mso-font-charset:128;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1 -369098753 63 0 4129023 0;} @font-face  {font-family:Verdana;  panose-1:2 11 6 4 3 5 4 4 2 4;  mso-font-charset:0;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:536871559 0 0 0 415 0;} @font-face  {font-family:"\@Arial Unicode MS";  panose-1:2 11 6 4 2 2 2 2 2 4;  mso-font-charset:128;  mso-generic-font-family:swiss;  mso-font-pitch:variable;  mso-font-signature:-1 -369098753 63 0 4129023 0;}  /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal  {mso-style-parent:"";  margin:0cm;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  mso-bidi-font-size:12.0pt;  font-family:Arial;  mso-fareast-font-family:"Times New Roman";  mso-bidi-font-family:"Times New Roman";  mso-ansi-language:EN-GB;} h1  {mso-style-next:Normal;  margin:0cm;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  page-break-after:avoid;  mso-outline-level:1;  font-size:14.0pt;  mso-bidi-font-size:12.0pt;  font-family:Arial;  mso-bidi-font-family:"Times New Roman";  mso-font-kerning:0pt;  mso-ansi-language:EN-GB;} h2  {mso-style-next:Normal;  margin-top:12.0pt;  margin-right:0cm;  margin-bottom:3.0pt;  margin-left:0cm;  mso-pagination:widow-orphan;  page-break-after:avoid;  mso-outline-level:2;  font-size:12.0pt;  mso-bidi-font-size:14.0pt;  font-family:Arial;  mso-ansi-language:EN-GB;  font-style:italic;} h3  {margin-right:0cm;  mso-margin-top-alt:auto;  mso-margin-bottom-alt:auto;  margin-left:0cm;  mso-pagination:widow-orphan;  mso-outline-level:3;  font-size:13.5pt;  font-family:"Arial Unicode MS";} p.MsoBodyText, li.MsoBodyText, div.MsoBodyText  {margin:0cm;  margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:10.0pt;  mso-bidi-font-size:12.0pt;  font-family:Arial;  mso-fareast-font-family:"Times New Roman";  mso-ansi-language:EN-GB;} a:link, span.MsoHyperlink  {color:blue;  text-decoration:underline;  text-underline:single;} a:visited, span.MsoHyperlinkFollowed  {color:purple;  text-decoration:underline;  text-underline:single;} @page Section1  {size:21.0cm 842.0pt;  margin:72.0pt 89.85pt 72.0pt 89.85pt;  mso-header-margin:36.0pt;  mso-footer-margin:36.0pt;  mso-paper-source:0;} div.Section1  {page:Section1;} --&gt;&lt;/style&gt;&lt;span lang="EN-GB"&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;How to revoke a privilege/role from a database user&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;SQL&gt;REVOKE CREATE TABLE, accts_rec FROM tsmith;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;span lang="EN-GB"&gt;&lt;!--[if !supportEmptyParas]--&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;How to find when a user last logged into a database&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=";font-family:Verdana;font-size:7;"   lang="EN-GB"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;SQL&gt;select username,machine,terminal,to_char(logon_time,'HH:MM :SS') from v$session where username=''; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;!--[if !supportEmptyParas]--&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;How to force a database user to change password&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span style=";font-family:Verdana;font-size:7;"   lang="EN-GB"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;SQL&gt;ALTER USER scott PASSWORD EXPIRE;&lt;span style=""&gt;  &lt;/span&gt;-- Force user to choose a new password&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span lang="EN-GB"&gt;How to unlock an account&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;ALTER USER "schema_name" IDENTIFIED BY "newpass" ACCOUNT UNLOCK;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;&lt;br /&gt;Check database for check for Default Passwords being used for some common usernames&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;select username "User(s) with Default Password!", account_status "Status"&lt;br /&gt;from dba_users&lt;br /&gt;where password in&lt;br /&gt;('E066D214D5421CCC',&lt;span style=""&gt;  &lt;/span&gt;-- dbsnmp&lt;br /&gt;'24ABAB8B06281B4C',&lt;span style=""&gt;  &lt;/span&gt;-- ctxsys&lt;br /&gt;'72979A94BAD2AF80',&lt;span style=""&gt;  &lt;/span&gt;-- mdsys&lt;br /&gt;'9AAEB2214DCC9A31',&lt;span style=""&gt;  &lt;/span&gt;-- mdsys&lt;br /&gt;'C252E8FA117AF049',&lt;span style=""&gt;  &lt;/span&gt;-- odm&lt;br /&gt;'A7A32CD03D3CE8D5',&lt;span style=""&gt;  &lt;/span&gt;-- odm_mtr&lt;br /&gt;'88A2B2C183431F00',&lt;span style=""&gt;  &lt;/span&gt;-- ordplugins&lt;br /&gt;'7EFA02EC7EA6B86F',&lt;span style=""&gt;  &lt;/span&gt;-- ordsys&lt;br /&gt;'9B616F5489F90AD7',&lt;span style=""&gt;  &lt;/span&gt;-- ordcommon&lt;br /&gt;'4A3BA55E08595C81',&lt;span style=""&gt;  &lt;/span&gt;-- outln&lt;br /&gt;'F894844C34402B67',&lt;span style=""&gt;  &lt;/span&gt;-- scott&lt;br /&gt;'3F9FBD883D787341',&lt;span style=""&gt;  &lt;/span&gt;-- wk_proxy&lt;br /&gt;'79DF7A1BD138CF11',&lt;span style=""&gt;  &lt;/span&gt;-- wk_sys&lt;br /&gt;'7C9BA362F8314299',&lt;span style=""&gt;  &lt;/span&gt;-- wmsys&lt;br /&gt;'88D8364765FCE6AF',&lt;span style=""&gt;  &lt;/span&gt;-- xdb&lt;br /&gt;'F9DA8977092B7B81',&lt;span style=""&gt;  &lt;/span&gt;-- tracesvr&lt;br /&gt;'9300C0977D7DC75E',&lt;span style=""&gt;  &lt;/span&gt;-- oas_public&lt;br /&gt;'A97282CE3D94E29E',&lt;span style=""&gt;  &lt;/span&gt;-- websys&lt;br /&gt;'AC9700FD3F1410EB',&lt;span style=""&gt;  &lt;/span&gt;-- lbacsys&lt;br /&gt;'E7B5D92911C831E1',&lt;span style=""&gt;  &lt;/span&gt;-- rman&lt;br /&gt;'AC98877DE1297365',&lt;span style=""&gt;  &lt;/span&gt;-- perfstat&lt;br /&gt;'66F4EF5650C20355',&lt;span style=""&gt;  &lt;/span&gt;-- exfsys&lt;br /&gt;'84B8CBCA4D477FA3',&lt;span style=""&gt;  &lt;/span&gt;-- si_informtn_schema&lt;br /&gt;'D4C5016086B2DC6A',&lt;span style=""&gt;  &lt;/span&gt;-- sys&lt;br /&gt;'5638228DAF52805F',&lt;span style=""&gt;  &lt;/span&gt;-- sys&lt;br /&gt;'D4DF7931AB130E37')&lt;span style=""&gt;  &lt;/span&gt;-- system&lt;br /&gt;/&lt;br /&gt;NB. does not work in 11g upwards&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;Find users in a database with password set to username&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;create or replace procedure sys.find_joes as&lt;br /&gt;-- Find users that have their password equal to their username&lt;br /&gt;hexpw varchar2(30);&lt;br /&gt;modpw varchar2(30);&lt;br /&gt;un varchar2(30);&lt;br /&gt;cursor c1 is select username,password from dba_users&lt;br /&gt;where length(trim(password)) = 16; -- only consider db authenticated&lt;br /&gt;begin&lt;br /&gt;for i in c1 loop&lt;br /&gt;hexpw := i.password;&lt;br /&gt;un := i.username;&lt;br /&gt;execute immediate 'alter user '||un||' identified by '||un;&lt;br /&gt;select password into modpw from dba_users where username = un;&lt;br /&gt;if modpw = hexpw then&lt;br /&gt;dbms_output.put_line(un);&lt;br /&gt;else&lt;br /&gt;-- change password back to what it was&lt;br /&gt;execute immediate&lt;br /&gt;'alter user '||un||' identified by values '''||hexpw||'''';&lt;br /&gt;end if;&lt;br /&gt;end loop;&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SQL&gt; set serveroutput on&lt;br /&gt;SQL&gt; exec sys.find_joes;&lt;/span&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;&lt;br /&gt;How to lock/unlock database user account&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:8;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt; ALTER USER username ACCOUNT LOCK;&lt;br /&gt;SQL&gt; ALTER USER username ACCOUNT UNLOCK;&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:8;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;How to change a database users password&lt;/span&gt;&lt;span style="font-weight: normal;font-size:7;"  lang="EN-GB"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;There are two different methods for doing so:&lt;br /&gt;SQL&gt;&lt;/span&gt;&lt;span style="font-weight: normal;font-size:10;"  lang="EN-GB"&gt;ALTER USER&lt;span style=""&gt;  &lt;/span&gt;IDENTIFIED BY ;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;Or&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt; password&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;Changing password for SCOTT&lt;br /&gt;Old password:&lt;br /&gt;New password:&lt;br /&gt;Retype new password:&lt;br /&gt;&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;How to create a new database user&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;CREATE USER scott&lt;br /&gt;&lt;span style=""&gt;     &lt;/span&gt;IDENTIFIED BY tiger&lt;span style=""&gt;  &lt;/span&gt;-- Assign password&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;DEFAULT TABLESPACE&lt;span style=""&gt;  &lt;/span&gt;tools -- Assign space for table and index segments&lt;br /&gt;&lt;span style=""&gt;      &lt;/span&gt;TEMPORARY TABLESPACE temp; -- Assign sort space&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;How to drop a database user&lt;/span&gt;&lt;span style="font-weight: normal;font-size:7;"  lang="EN-GB"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;DROP USER scott CASCADE;&lt;span style=""&gt;  &lt;/span&gt;-- Remove user&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"&gt;How to assign database user privileges&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: normal; font-style: normal;font-size:10;"  lang="EN-GB"&gt;SQL&gt;RANT CONNECT, RESOURCE TO Scott;&lt;br /&gt;SQL&gt;GRANT DBA TO scott; -- Make user a DB Administrator&lt;br /&gt;SQL&gt;ALTER USER scott QUOTA UNLIMITED ON tools;&lt;/span&gt;&lt;span  lang="EN-GB" style="font-size:7;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Verdana;font-size:7;"   lang="EN-GB"&gt;&lt;!--[if !supportEmptyParas]--&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;How to find database version&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;span  lang="EN-GB" style="font-family:Verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;SQL&gt;select * from v$version;&lt;/span&gt;&lt;b&gt;&lt;span  lang="EN-GB" style="font-family:Verdana;"&gt;&lt;br /&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;How to find all users of a database&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;span  lang="EN-GB" style="font-family:Verdana;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;SQL&gt;&lt;/span&gt;&lt;span style="color: rgb(67, 67, 67);font-family:Verdana;"  lang="EN-GB"&gt;select * from all_users;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span lang="EN-GB"&gt;Find User Responsibilities&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;SQL&gt; SELECT frt.RESPONSIBILITY_NAME, furg.end_date&lt;br /&gt;FROM&lt;br /&gt;fnd_user_resp_groups furg,&lt;br /&gt;FND_RESPONSIBILITY fr,&lt;br /&gt;fnd_responsibility_tl frt,&lt;br /&gt;fnd_user fu&lt;br /&gt;WHERE fu.user_name = 'SYSADMIN'&lt;br /&gt;AND fu.user_id = furg.user_id&lt;br /&gt;AND furg.responsibility_id = fr.RESPONSIBILITY_ID&lt;br /&gt;AND frt.responsibility_id = fr.RESPONSIBILITY_ID&lt;br /&gt;ORDER BY 1; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span lang="EN-GB"&gt;&lt;!--[if !supportEmptyParas]--&gt; &lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;To search for datafile location:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;SQL&gt; select file_name&lt;br /&gt;2 , tablespace_name&lt;br /&gt;3 , file_id&lt;br /&gt;4 from dba_data_files&lt;br /&gt;5 where tablespace_name like '';&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;To increase tablespace size, increase the datafile size:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;SQL&gt; Alter database datafile '' resize 24G;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;To add a new datafile to a tablespace:&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-GB"&gt;SQL&gt; ALTER TABLESPACE app_data&lt;br /&gt;ADD DATAFILE ''&lt;br /&gt;SIZE 200M;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span  lang="EN-GB" style="font-size:12;"&gt;To query how big a tablespace is and how much freespace it has:&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-GB"&gt;SQL&gt; SELECT * FROM (&lt;br /&gt;SELECT c.tablespace_name,&lt;br /&gt;ROUND(a.bytes/1048576,2) MB_Allocated,&lt;br /&gt;ROUND(b.bytes/1048576,2) MB_Free,&lt;br /&gt;ROUND((a.bytes-b.bytes)/1048576,2) MB_Used,&lt;br /&gt;ROUND(b.bytes/a.bytes * 100,2) tot_Pct_Free,&lt;br /&gt;ROUND((a.bytes-b.bytes)/a.bytes,2) * 100 tot_Pct_Used&lt;br /&gt;FROM (SELECT tablespace_name,&lt;br /&gt;SUM(a.bytes) bytes&lt;br /&gt;FROM sys.DBA_DATA_FILES a&lt;br /&gt;GROUP BY tablespace_name) a,&lt;br /&gt;(SELECT a.tablespace_name,&lt;br /&gt;NVL(SUM(b.bytes),0) bytes&lt;br /&gt;FROM sys.DBA_DATA_FILES a,&lt;br /&gt;sys.DBA_FREE_SPACE b&lt;br /&gt;WHERE a.tablespace_name = b.tablespace_name (+)&lt;br /&gt;AND a.file_id = b.file_id (+)&lt;br /&gt;GROUP BY a.tablespace_name) b,&lt;br /&gt;sys.DBA_TABLESPACES c&lt;br /&gt;WHERE a.tablespace_name = b.tablespace_name(+)&lt;br /&gt;AND a.tablespace_name = c.tablespace_name&lt;br /&gt;) WHERE tot_Pct_Used &gt;=0&lt;br /&gt;ORDER BY tablespace_name;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-1966081328764861583?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/1966081328764861583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=1966081328764861583' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/1966081328764861583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/1966081328764861583'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2009/04/useful-database-scripts.html' title='Useful Database Scripts'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-8372074300365646520</id><published>2008-08-12T18:54:00.005+01:00</published><updated>2008-08-13T01:01:11.531+01:00</updated><title type='text'>Farewell to Dorset</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HC_WGfiuX04/SKH3SJ9sJKI/AAAAAAAAAB0/oYDh8L41gsk/s1600-h/07082008079.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_HC_WGfiuX04/SKH3SJ9sJKI/AAAAAAAAAB0/oYDh8L41gsk/s320/07082008079.jpg" alt="" id="BLOGGER_PHOTO_ID_5233736133265597602" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKH3SY6ebbI/AAAAAAAAAB8/kEOAm8hJahs/s1600-h/07082008083.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKH3SY6ebbI/AAAAAAAAAB8/kEOAm8hJahs/s320/07082008083.jpg" alt="" id="BLOGGER_PHOTO_ID_5233736137278647730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKH3SipJ1sI/AAAAAAAAACE/D8Yt_8vOEuY/s1600-h/07082008092.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKH3SipJ1sI/AAAAAAAAACE/D8Yt_8vOEuY/s320/07082008092.jpg" alt="" id="BLOGGER_PHOTO_ID_5233736139890349762" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_HC_WGfiuX04/SKH3Sk2o9ZI/AAAAAAAAACM/LM_XYg8qRRk/s1600-h/07082008129.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_HC_WGfiuX04/SKH3Sk2o9ZI/AAAAAAAAACM/LM_XYg8qRRk/s320/07082008129.jpg" alt="" id="BLOGGER_PHOTO_ID_5233736140483786130" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_HC_WGfiuX04/SKH3S5AvG1I/AAAAAAAAACU/dY4VRuHUH2A/s1600-h/07082008139.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_HC_WGfiuX04/SKH3S5AvG1I/AAAAAAAAACU/dY4VRuHUH2A/s320/07082008139.jpg" alt="" id="BLOGGER_PHOTO_ID_5233736145894841170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHvN4Q4S6I/AAAAAAAAABM/PXElRXyLQNg/s1600-h/07082008029.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHvN4Q4S6I/AAAAAAAAABM/PXElRXyLQNg/s320/07082008029.jpg" alt="" id="BLOGGER_PHOTO_ID_5233727263701748642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_HC_WGfiuX04/SKHvOFsKvBI/AAAAAAAAABU/jyFPKxbS70A/s1600-h/07082008030.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_HC_WGfiuX04/SKHvOFsKvBI/AAAAAAAAABU/jyFPKxbS70A/s320/07082008030.jpg" alt="" id="BLOGGER_PHOTO_ID_5233727267305864210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_HC_WGfiuX04/SKHvOQcdR0I/AAAAAAAAABc/TTSjIkstErM/s1600-h/07082008042.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_HC_WGfiuX04/SKHvOQcdR0I/AAAAAAAAABc/TTSjIkstErM/s320/07082008042.jpg" alt="" id="BLOGGER_PHOTO_ID_5233727270192760642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHvO-S1bDI/AAAAAAAAABk/sBYLO-Jvbds/s1600-h/07082008066.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHvO-S1bDI/AAAAAAAAABk/sBYLO-Jvbds/s320/07082008066.jpg" alt="" id="BLOGGER_PHOTO_ID_5233727282500430898" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHvPRsetfI/AAAAAAAAABs/VQqRzGjLoos/s1600-h/07082008074.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHvPRsetfI/AAAAAAAAABs/VQqRzGjLoos/s320/07082008074.jpg" alt="" id="BLOGGER_PHOTO_ID_5233727287708268018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHuaca6pLI/AAAAAAAAAAk/kZZb-PR1NMs/s1600-h/07082008017.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHuaca6pLI/AAAAAAAAAAk/kZZb-PR1NMs/s400/07082008017.jpg" alt="" id="BLOGGER_PHOTO_ID_5233726380054324402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHuakA6wJI/AAAAAAAAAAs/CgPZm7Q1WOo/s1600-h/07082008020.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHuakA6wJI/AAAAAAAAAAs/CgPZm7Q1WOo/s400/07082008020.jpg" alt="" id="BLOGGER_PHOTO_ID_5233726382092763282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHua5yUdkI/AAAAAAAAAA0/d8sUMHDAqoE/s1600-h/07082008022.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_HC_WGfiuX04/SKHua5yUdkI/AAAAAAAAAA0/d8sUMHDAqoE/s400/07082008022.jpg" alt="" id="BLOGGER_PHOTO_ID_5233726387937113666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHubafz_-I/AAAAAAAAAA8/wtye80pNHcw/s1600-h/07082008024.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_HC_WGfiuX04/SKHubafz_-I/AAAAAAAAAA8/wtye80pNHcw/s400/07082008024.jpg" alt="" id="BLOGGER_PHOTO_ID_5233726396717858786" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_HC_WGfiuX04/SKHubh-rGsI/AAAAAAAAABE/oU30OUPJMgs/s1600-h/07082008025.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_HC_WGfiuX04/SKHubh-rGsI/AAAAAAAAABE/oU30OUPJMgs/s400/07082008025.jpg" alt="" id="BLOGGER_PHOTO_ID_5233726398726347458" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-8372074300365646520?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/8372074300365646520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=8372074300365646520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/8372074300365646520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/8372074300365646520'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2008/08/farewell-to-dorset.html' title='Farewell to Dorset'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_HC_WGfiuX04/SKH3SJ9sJKI/AAAAAAAAAB0/oYDh8L41gsk/s72-c/07082008079.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6663131843269359078.post-8139778867278696914</id><published>2008-02-28T00:47:00.001Z</published><updated>2008-02-28T03:14:06.642Z</updated><title type='text'>The Broken Puppet</title><content type='html'>I'm not like all the other puppets,&lt;br /&gt;They missed something when they made me,&lt;br /&gt;I was never made like the others,&lt;br /&gt;They forgot to give me strings.&lt;br /&gt;&lt;br /&gt;I'm not like all the other puppets,&lt;br /&gt;For when the puppet master sings,&lt;br /&gt;They go left and I go right,&lt;br /&gt;Just because I am free.&lt;br /&gt;&lt;br /&gt;I'm not like all the other puppets,&lt;br /&gt;For I'm broken for better you see,&lt;br /&gt;The other puppets they look on jealous,&lt;br /&gt;Wishing that they could be like me.&lt;br /&gt;&lt;br /&gt;The puppet master calls them,&lt;br /&gt;They dance and jump and sing,&lt;br /&gt;They bow and clap and lark around,&lt;br /&gt;All because they have strings.&lt;br /&gt;&lt;br /&gt;I'm not like all the other puppets,&lt;br /&gt;I control my actions you see,&lt;br /&gt;I choose when to jump and shout,&lt;br /&gt;You'll never fix me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6663131843269359078-8139778867278696914?l=kerrirobberts.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kerrirobberts.blogspot.com/feeds/8139778867278696914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6663131843269359078&amp;postID=8139778867278696914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/8139778867278696914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6663131843269359078/posts/default/8139778867278696914'/><link rel='alternate' type='text/html' href='http://kerrirobberts.blogspot.com/2008/02/broken-puppet.html' title='The Broken Puppet'/><author><name>Kerri</name><uri>http://www.blogger.com/profile/16356951158749031754</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://bp2.blogger.com/_HC_WGfiuX04/SIc8uCOFK_I/AAAAAAAAAAY/p5WusIl0fa8/S220/profile.jpg'/></author><thr:total>0</thr:total></entry></feed>
