<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-2026515676381158946</atom:id><lastBuildDate>Thu, 09 Sep 2010 00:32:31 +0000</lastBuildDate><title>TroyGeek Blog</title><description>Thoughts on Software Development, Database Development, and the business of IT.</description><link>http://www.troygeek.com/</link><managingEditor>troygeek@gmail.com (TroyGeek)</managingEditor><generator>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-7012405197253156774</guid><pubDate>Tue, 11 Aug 2009 23:48:00 +0000</pubDate><atom:updated>2009-08-11T18:55:05.366-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Google</category><title>First Look at Google Chrome OS</title><description>&lt;a href="http://www.engadget.com/"&gt;Engadget&lt;/a&gt; has a sneak peak at what appears to be the Google Chrome Operating System. Looks like it's a version of the Chrome web browser but with more features.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.engadget.com/photos/alleged-chrome-os-screenshots/2140342/"&gt;http://www.engadget.com/photos/alleged-chrome-os-screenshots/2140342/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-7012405197253156774?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/first-look-at-google-chrome-os.html</link><author>troygeek@gmail.com (TroyGeek)</author><thr:total>33</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-1220059312325754468</guid><pubDate>Tue, 11 Aug 2009 09:27:00 +0000</pubDate><atom:updated>2009-08-12T04:35:55.736-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Living Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Google</category><category domain='http://www.blogger.com/atom/ns#'>BlackBerry</category><title>Google Talk on the BlackBerry</title><description>Here's how you can install gTalk (Google Talk), a Google Instant Messaging client for gChat on the BlackBerry. Google doesn't appear to have its own instant messaging client for mobile devices but Research in Motion created one for the BlackBerry (available on the BlackBerry website).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download the Software&lt;/span&gt;&lt;br /&gt;To get a copy of gTalk, visit the following URL on your BlackBerry browser and download the software:&lt;br /&gt;&lt;a href="http://mobileapps.blackberry.com/devicesoftware/entry.do?code=gtalk"&gt;http://mobileapps.blackberry.com/devicesoftware/entry.do?code=gtalk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once installed, you'll need to reboot your BlackBerry:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDLfDsLNI/AAAAAAAAChw/ka_-a0CSJHk/s1600-h/Capture5_55_16.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDLfDsLNI/AAAAAAAAChw/ka_-a0CSJHk/s400/Capture5_55_16.jpg" alt="" id="BLOGGER_PHOTO_ID_5368646095396941010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Locate the gTalk Icon&lt;/span&gt;&lt;br /&gt;Locate the gTalk Icon on your BlackBerry:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDWZoQ7hI/AAAAAAAACiA/O3zYKmhWzgA/s1600-h/Capture14_44_15.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDWZoQ7hI/AAAAAAAACiA/O3zYKmhWzgA/s400/Capture14_44_15.jpg" alt="" id="BLOGGER_PHOTO_ID_5368646282918293010" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Log into your Google Account&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_QvfvapyNhZg/SoIQtHUTR4I/AAAAAAAAABM/f1kmBeUrZ8w/s1600-h/Capture6_30_12.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_QvfvapyNhZg/SoIQtHUTR4I/AAAAAAAAABM/f1kmBeUrZ8w/s400/Capture6_30_12.jpg" alt="" id="BLOGGER_PHOTO_ID_5368872073023408002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Finished!&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDcvpP-WI/AAAAAAAACiI/9dVBMGMbRsA/s1600-h/Capture5_25_42.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_94zmSpuRfao/SoFDcvpP-WI/AAAAAAAACiI/9dVBMGMbRsA/s400/Capture5_25_42.jpg" alt="" id="BLOGGER_PHOTO_ID_5368646391907219810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Some users complain that they've received the following error while trying to log into gTalk:&lt;br /&gt;"password and username do not match"&lt;br /&gt;&lt;br /&gt;To get by this error, visit the following page to unlock your account for gTalk:&lt;br /&gt;&lt;a href="https://www.google.com/accounts/DisplayUnlockCaptcha"&gt;https://www.google.com/accounts/DisplayUnlockCaptcha&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;...enter your username, password, and captcha and voila! your BlackBerry can now use Google Chat!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-1220059312325754468?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/google-talk-on-blackberry.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_94zmSpuRfao/SoFDLfDsLNI/AAAAAAAAChw/ka_-a0CSJHk/s72-c/Capture5_55_16.jpg' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-7577584757933434113</guid><pubDate>Tue, 11 Aug 2009 00:15:00 +0000</pubDate><atom:updated>2009-08-10T19:43:27.865-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Linux</category><category domain='http://www.blogger.com/atom/ns#'>Ubuntu</category><title>Mounting Remote Windows Shares in Ubuntu</title><description>I have a &lt;a href="https://www.amazon.com/dp/B0001FSCZO?tag=troygecom-20&amp;amp;camp=213381&amp;amp;creative=390973&amp;amp;linkCode=as4&amp;amp;creativeASIN=B0001FSCZO&amp;amp;adid=0YMBF89A4KEVSCKNYYMR&amp;amp;"&gt;Netgear NSLU2&lt;/a&gt; hooked up on my network to an external hard drive that I back up all my photos and music to. Naturally, &lt;a href="http://www.troygeek.com/2009/08/my-dell-mini-9-netbook-is-here.html"&gt;now that my new netbook is here&lt;/a&gt;, I wanted a way to access all of my photos and music from Ubuntu. Here's the steps required to set up Windows file sharing with now that my new netbook is here Ubuntu.&lt;br /&gt;1) First, you need to install smbfs:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;$ sudo apt-get install smbfs&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2) Create a directory to mount to:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;$ sudo mkdir /mnt/netdrive&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;3) Mount the remote filesystem:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;sudo mount -t cifs //{remote_ip_address}/{windows_share_drive} /mnt/netdrive -o username=YourUsername,password=YourPassword&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;4) Now, if you want this filesytem to mount each time you start Ubuntu add this entry to your /etc/fstab:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;//{remote_ip_address}/{windows_share_drive}  /mnt/netdrive  cifs exec,credentials=/etc/passwdcifs 0 0&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;5) Create a file named /etc/passwdcifs and add these entries:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;username=YourUsernamepassword=YourPassword&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;6) Secure the permissions on the password file:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;$ sudo chmod 600 /etc/passwdcifs&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now when you reboot your filesystem should automatically be mounted. It's as easy as that!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-7577584757933434113?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/mounting-remote-windows-shares-in.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-8048018477315314718</guid><pubDate>Tue, 11 Aug 2009 00:04:00 +0000</pubDate><atom:updated>2009-08-10T19:05:00.338-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Netbook</category><category domain='http://www.blogger.com/atom/ns#'>Living Mobile</category><title>Modifications Made to My Dell Mini 9 Ubuntu Setup</title><description>&lt;div&gt;Here are a few things I changed with my Dell Mini 9 Ubuntu setup to make things a little more usable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Added a 4gb SD Card&lt;/b&gt;&lt;/div&gt;&lt;div&gt;When I bought the Dell Mini 9 I also threw in a 4gb SD card, cost around $10. I left the built in solid state drive for the OS and applications and keep all of my documents on the SD card. What's great about this is I can take the SD card out, put it in another computer and there's all my files.&lt;/div&gt;&lt;div&gt;&lt;a href="https://www.amazon.com/dp/B000UUBOPK?tag=troygecom-20&amp;amp;camp=213381&amp;amp;creative=390973&amp;amp;linkCode=as4&amp;amp;creativeASIN=B000UUBOPK&amp;amp;adid=0NXAVXQKEF0YYQEBHS69&amp;amp;"&gt;&lt;img src="https://images-na.ssl-images-amazon.com/images/I/31kFIO586uL._SL110_.jpg" alt="" style="cursor: pointer; width: 110px; height: 110px;" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Upgrade to Ubuntu 9.04 (jaunty jackalope)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;One of the first things I did when I got my Mini was to upgrade the OS from Ubuntu 8.04 to Ubuntu 9.04. I really liked the 9.04 interface, it boots up really fast (I think I read it boots up in 7 seconds), and it supports Firefox 3.5.&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9oA6fKAuI/AAAAAAAAChg/XzJKSoORveQ/s1600-h/Screenshot-7.png"&gt;&lt;img src="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9oA6fKAuI/AAAAAAAAChg/XzJKSoORveQ/s200/Screenshot-7.png" alt="" id="BLOGGER_PHOTO_ID_5368123645758145250" style="cursor: pointer; width: 200px; height: 117px;" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Install Chromium (Google Chrome)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Chromium, the open source version of Google Chrome, is amazingly fast on the Mini. I've used both Firefox 3.0 and Firefox 3.5 and it still amazes me on how fast Chromium is. Flash support is a little unstable (but that's OK, it's turned off  by default). The only thing I didn't like about Chromium was that it didn't support Google Gears. I mean c'mon; Google Gears is becoming one of their best products (in my opinion) and it's not supported in their own browser! Here's a great article on how to install Chromium:&lt;br /&gt;&lt;a href="http://www.ubuntumini.com/2009/07/install-chromium-with-flash-support.html"&gt;http://www.ubuntumini.com/2009/07/install-chromium-with-flash-support.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn9nDsExzoI/AAAAAAAAChY/f2IpolU4N8Y/s1600-h/Screenshot-3.png"&gt;&lt;img src="http://1.bp.blogspot.com/_94zmSpuRfao/Sn9nDsExzoI/AAAAAAAAChY/f2IpolU4N8Y/s200/Screenshot-3.png" alt="" id="BLOGGER_PHOTO_ID_5368122593917390466" style="cursor: pointer; width: 200px; height: 117px;" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Install 3rd Party Software&lt;/b&gt;&lt;/div&gt;&lt;div&gt;The default install of Ubuntu 9.04 doesn't include Flash, Java, mp3 or DVD support. Though, within a few minutes you can download all of that. Here's an article that explains how:&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.ubuntumini.com/2008/10/reinstallng-codecs.html"&gt;http://www.ubuntumini.com/2008/10/reinstallng-codecs.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Install Firefox 3.5&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Ubuntu 9.04 comes with Firefox 3.0 but that version of Firefox is slooooooow. I found Firefox 3.5 to be much faster (not as fast as Chromium, but still pretty fast). When you first install Firefox 3.5 it shows up as the Shiretoko Web Browser (the code name for the Firefox 3.5 project). Here's a good article on how to install Firefox 3.5 (Shriretoko) and the rebrand it to look like Firefox:&lt;br /&gt;&lt;a href="http://ubuntuforums.org/showthread.php?t=1225754"&gt;http://ubuntuforums.org/showthread.php?t=1225754&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Installing Google Gears in Firefox 3.5&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Some people report getting an error when trying to install Google Gears in Firefox 3.5...something about their browser version not being supported. I found trying to download the Google Gears plugin for Firefox 3.5 directly worked well:&lt;/div&gt;&lt;div&gt;&lt;a href="http://dl.google.com/gears/current/gears-linux-opt.xpi"&gt;http://dl.google.com/gears/current/gears-linux-opt.xpi&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Install Adobe Reader 9&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Here's the steps to install the real Adobe Reader 9:&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;sudo gedit /etc/apt/sources.list&lt;/li&gt;&lt;li&gt;At the below line to /etc/apt/sources.list:&lt;br /&gt;deb http://archive.canonical.com/ubuntu jaunty partner&lt;/li&gt;&lt;li&gt;sudo apt-get update&lt;/li&gt;&lt;li&gt;sudo apt-get install acroread &lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;For more information...&lt;/b&gt;&lt;/div&gt;For more info on Ubuntu tweaks, check out this great website: &lt;a href="http://www.ubuntumini.com/"&gt;UbuntuMini&lt;/a&gt;.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-8048018477315314718?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/modifications-made-to-my-dell-mini-9.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_94zmSpuRfao/Sn9oA6fKAuI/AAAAAAAAChg/XzJKSoORveQ/s72-c/Screenshot-7.png' height='72' width='72'/><thr:total>37</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-4970398055779744166</guid><pubDate>Tue, 11 Aug 2009 00:03:00 +0000</pubDate><atom:updated>2009-08-10T19:07:40.098-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Netbook</category><category domain='http://www.blogger.com/atom/ns#'>Living Mobile</category><title>My Dell Mini 9 Netbook is Here!</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8_P_fotLI/AAAAAAAACgY/CA8VOIt22A0/s1600-h/IMG_2307.JPG"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px; height: 150px;" src="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8_P_fotLI/AAAAAAAACgY/CA8VOIt22A0/s200/IMG_2307.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5368078824823633074" /&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;/span&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8_P_fotLI/AAAAAAAACgY/CA8VOIt22A0/s1600-h/IMG_2307.JPG"&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;I've been living low-tech for the last couple of years, no computer and no cell phone. I finally broke down the other month and got a cell phone and figured now is the time to get a new computer, except I really didn't want to spend much money (part of the reason I've been living so low-tech). My original goal was to find a computer for $200 to use primarily for online use, but also wanted something that was very portable. The Dell Mini 9 was exactly what I was looking for!&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Dell Mini 9 Netbook was selling for $200 for the following specs:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Processor:&lt;/b&gt; Intel® Atom Processor® N270 (1.6GHz/533Mhz FSB/512K cache)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Operating System:&lt;/b&gt; Ubuntu Linux version 8.04.1 (Hardy)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Screen: &lt;/b&gt;Glossy 8.9 inch LED display (1024X600)&lt;/li&gt;&lt;li&gt;&lt;b&gt;Memory:&lt;/b&gt; 1GB DDR2 at 533MHz&lt;/li&gt;&lt;li&gt;&lt;b&gt;Hard Drive:&lt;/b&gt; 4GB Solid State Drive&lt;/li&gt;&lt;li&gt;&lt;b&gt;Wireless:&lt;/b&gt; Wireless 802.11g Mini Card&lt;/li&gt;&lt;li&gt;&lt;b&gt;Battery:&lt;/b&gt; 32WHr Battery (4 cell)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;All of that for $200! I ended up upgrading the hard drive to a 8gb solid state drive and it all cost around $240 w/ shipping. I opted for the large hard drive because the OS takes about 4gb so it didn't leave much room for any offline files or upgrades.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Dell Mini 9 is tiny, very tiny. It's actually a little smaller than my mouse pad when it's&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8U-Vh2z_I/AAAAAAAACgQ/UDVDV_HroiI/s1600-h/IMG_2305.JPG"&gt;&lt;img src="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8U-Vh2z_I/AAAAAAAACgQ/UDVDV_HroiI/s200/IMG_2305.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5368032342012514290" style="float: right; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; cursor: pointer; width: 200px; height: 150px; " /&gt;&lt;/a&gt;&lt;div&gt; closed up. The only problem I've had with the Dell Mini 9 is the keyboard; in order for them to fit all of the keys into such a small space they had to move some keys to new locations. &lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8U-Vh2z_I/AAAAAAAACgQ/UDVDV_HroiI/s1600-h/IMG_2305.JPG"&gt;&lt;/a&gt;&lt;div&gt;Since I don't normally look at the keys when typing I'll occasionally hit a wrong key. Additionally, some of the keys that are used less often are 1/2 the size or 3/4 the size of a normal key (now that's small). I am happy though to trade the keyboard layout for portability. Additionally, you can always plug in a keyboard/mouse/monitor and use it like a normal full-size computer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Size Comparison&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Here's what the Netbook looks like compared to a normal size laptop:&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/SoC2B-j1x_I/AAAAAAAACho/UQCn2TSDhJA/s1600-h/IMG_2317.JPG"&gt;&lt;img src="http://3.bp.blogspot.com/_94zmSpuRfao/SoC2B-j1x_I/AAAAAAAACho/UQCn2TSDhJA/s200/IMG_2317.JPG" border="0" alt="" id="BLOGGER_PHOTO_ID_5368490900915079154" style="cursor: pointer; width: 200px; height: 150px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Screenshots:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Here's a few screenshots from the Netbook. (Note: I upgraded the OS to Ubuntu 9.04, so that's what you're seeing in the screenshots, not Ubuntu 8.04)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn8U-Vh2z_I/AAAAAAAACgQ/UDVDV_HroiI/s1600-h/IMG_2305.JPG"&gt;&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/Sn9CYoXhTDI/AAAAAAAACgo/GpuSJPttTys/s1600-h/Screenshot-3.2.png"&gt;&lt;img src="http://1.bp.blogspot.com/_94zmSpuRfao/Sn9CYoXhTDI/AAAAAAAACgo/GpuSJPttTys/s200/Screenshot-3.2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5368082271769283634" style="cursor: pointer; width: 200px; height: 117px; " /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_94zmSpuRfao/Sn9Cgtq4z8I/AAAAAAAACg4/xB4xquq34Ig/s1600-h/Screenshot-5.png"&gt;&lt;img src="http://4.bp.blogspot.com/_94zmSpuRfao/Sn9Cgtq4z8I/AAAAAAAACg4/xB4xquq34Ig/s200/Screenshot-5.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5368082410631647170" style="cursor: pointer; width: 200px; height: 117px; " /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9CcfVgieI/AAAAAAAACgw/YzkWp8PtSLo/s1600-h/Screenshot-3.png"&gt;&lt;img src="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9CcfVgieI/AAAAAAAACgw/YzkWp8PtSLo/s200/Screenshot-3.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5368082338064402914" style="cursor: pointer; width: 200px; height: 117px; " /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_94zmSpuRfao/Sn9Cj1AxarI/AAAAAAAAChA/zRmwwLBS7jA/s1600-h/Screenshot-6.png"&gt;&lt;img src="http://2.bp.blogspot.com/_94zmSpuRfao/Sn9Cj1AxarI/AAAAAAAAChA/zRmwwLBS7jA/s200/Screenshot-6.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5368082464142092978" style="cursor: pointer; width: 200px; height: 117px; " /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9DgUzQ67I/AAAAAAAAChQ/8U1KiM9EK5E/s1600-h/Screenshot-2.2.png"&gt;&lt;img src="http://3.bp.blogspot.com/_94zmSpuRfao/Sn9DgUzQ67I/AAAAAAAAChQ/8U1KiM9EK5E/s200/Screenshot-2.2.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5368083503467522994" style="cursor: pointer; width: 200px; height: 117px; " /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-4970398055779744166?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/my-dell-mini-9-netbook-is-here.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_94zmSpuRfao/Sn8_P_fotLI/AAAAAAAACgY/CA8VOIt22A0/s72-c/IMG_2307.JPG' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-8692044858728786193</guid><pubDate>Tue, 04 Aug 2009 10:47:00 +0000</pubDate><atom:updated>2009-08-04T05:51:51.780-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><title>Using Java's Foreach Loop on a Map</title><description>First introduced in Java 5, the foreach loop has been one of my favorite (and most used) improvements to the Java language. Here's how you can use the foreach loop over a Map:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Map&lt;string,string&gt; myMap = new HashMap&lt;string, string=""&gt;();&lt;br /&gt;&lt;br /&gt;myMap.put("person1234","Troy Campano");&lt;br /&gt;&lt;br /&gt;for(Map.Entry&lt;string, string=""&gt; myMapEntry : myMap.entrySet()) {&lt;br /&gt; &lt;br /&gt;   System.out.println("key=" + myMapEntry.getKey());&lt;br /&gt;   System.out.println("value=" + myMapEntry.getValue());&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;It's that easy!&lt;br /&gt;&lt;/string,&gt;&lt;/string,&gt;&lt;/string,string&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-8692044858728786193?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/08/using-java-5s-foreach-loop-on-maps.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-4329051419795349271</guid><pubDate>Wed, 15 Jul 2009 00:05:00 +0000</pubDate><atom:updated>2009-07-14T19:16:11.368-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Marketing</category><category domain='http://www.blogger.com/atom/ns#'>Customer Service</category><title>Delivering the WOW! in Customer Service</title><description>&lt;a href="http://www.amazon.com/gp/product/0982050739?ie=UTF8&amp;amp;tag=troygecom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0982050739"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 107px; height: 160px;" src="http://2.bp.blogspot.com/_94zmSpuRfao/Sl0fKvyIUhI/AAAAAAAACaA/2nVA15JmGmY/s200/51QUVCtNGkL._SL160_.jpg" alt="" id="BLOGGER_PHOTO_ID_5358473401126638098" border="0" /&gt;&lt;/a&gt;All too often I find that many businesses just don't focus enough on customer service. If there's one thing that matters (maybe more than all others) then it's customer service.  Glory Borgeson, author of "Catapult Your Business to New Heights: Sure-Fire Strategies to Increase Profit" has a great article on customer service and delivering the WOW! to your customer...that feeling the customer gets when they've been amazed, not just your product or service but by the entire experience. It's easy to just do the status quo and get the job done, but delivering WOW! in the work you do can take you or your business to new heights.&lt;br /&gt;&lt;br /&gt;Read more on ChangeThis:&lt;br /&gt;&lt;a href="http://changethis.com/60.06.DeliveringWow"&gt;http://changethis.com/60.06.DeliveringWow&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-4329051419795349271?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/delivering-wow-in-customer-service.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_94zmSpuRfao/Sl0fKvyIUhI/AAAAAAAACaA/2nVA15JmGmY/s72-c/51QUVCtNGkL._SL160_.jpg' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-4808172354818816733</guid><pubDate>Tue, 14 Jul 2009 00:59:00 +0000</pubDate><atom:updated>2009-07-13T20:05:11.051-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Software Development</category><title>A Review of: Lean Software Development - An Agile Toolkit</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/SlvYytq7V0I/AAAAAAAACU4/n19AigGsfKg/s1600-h/BookLeanSoftwareDevelopment.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 121px; height: 160px;" src="http://3.bp.blogspot.com/_94zmSpuRfao/SlvYytq7V0I/AAAAAAAACU4/n19AigGsfKg/s200/BookLeanSoftwareDevelopment.jpg" alt="" id="BLOGGER_PHOTO_ID_5358114547452041026" border="0" /&gt;&lt;/a&gt;&lt;a style="font-style: italic;" href="http://www.amazon.com/gp/product/0321150783?ie=UTF8&amp;amp;tag=troygecom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321150783"&gt;Lean Software Development &lt;/a&gt;describes some of the ways you can take the lean principles of the manufacturing world and apply them to the field software development. In this book Mary and Tom Poppendieck describe how various manufacturers, like Toyota, used lean processes to eliminate waste from their value stream. Even though the lean practices of manufacturing don't always make sense for software development, the Poppendieck's do a great job describing how those processes can still be used with a little bit of modification.&lt;br /&gt;&lt;br /&gt;The book focuses on seven core practices including:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Eliminate Waste&lt;/span&gt;&lt;br /&gt;Removing anything from your process that does not add direct value to the product or the customer. Writing documentation you know that no one will ever read...waste. Coding extra features in the application that is not immediately needed...waste. Switching tasks, waiting on other teams, constantly creating / working on defects....waste, waste, waste. Get creative...find ways to eliminate the overhead from your processes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Amplify Learning&lt;/span&gt;&lt;br /&gt;Increase feedback by using iterations. Work with the customer often to make sure you're on the right track. Write tests as you development the software (Test Driven Development) to quickly find defects as you create them. Capture useful metrics about the project and make sure the project is headed in the right direction. Shorten the feedback loop.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Decide as Late as Possible&lt;/span&gt;&lt;br /&gt;Don't drill down into the detail of the application too quickly. That detail is likely to change as the project progresses, causing rework. Build capacity into your process that allows for change late in the game.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Deliver as Fast as Possible&lt;/span&gt;&lt;br /&gt;Again, keep your development and feedback loops short. Design, Implement, Feedback, Improve, Rinse and Repeat. The shorter these cycles are, the less likely it is that the application will get off track.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Empower the Team&lt;/span&gt;&lt;br /&gt;Give the team the power to change the process, make it more efficient, to get the job done. Give the team access to the customers. Let the team make their own commitments.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Build Integrity In&lt;/span&gt;&lt;br /&gt;The application should have a balance of functionality, usability, reliability, and economy. Think Google...simple, functional, smooth.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;See the Whole&lt;/span&gt;&lt;br /&gt;Always remember to see the big picture. You should have collective ownership of the code...none of that "well so and so wrote that part of the application so have them fix it". The team is responsible for the code and defects. The application is not a sum of its parts, it's the product of its interactions with the outside world.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Resources: &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.amazon.com/gp/product/0321150783?ie=UTF8&amp;amp;tag=troygecom-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0321150783"&gt;Lean Software Development - An Agile Toolkit on Amazon.com&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.poppendieck.com/"&gt;http://www.poppendieck.com/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.infoq.com/interviews/poppendieck-lean-2007"&gt;Interview: Mary and Tom Poppendieck on using Lean for Competitive Advantage&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-4808172354818816733?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/review-of-lean-software-development.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_94zmSpuRfao/SlvYytq7V0I/AAAAAAAACU4/n19AigGsfKg/s72-c/BookLeanSoftwareDevelopment.jpg' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-8692044181665412033</guid><pubDate>Mon, 13 Jul 2009 00:24:00 +0000</pubDate><atom:updated>2009-07-13T20:06:13.970-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Eclipse</category><title>Using Conditional Breakpoints in Eclipse</title><description>Some times when developing in Eclipse, you only want the debugger to kick in when a certain condition has been met. For example, you're processing thousands of records in a loop but only want the debugger to pause for a certain record. That's exactly what you can do by setting your Breakpoint Properties.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_94zmSpuRfao/SlvQzbHM3pI/AAAAAAAACUg/5RLu8hpD4WU/s1600-h/BreakpointMenu.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 170px; height: 200px;" src="http://3.bp.blogspot.com/_94zmSpuRfao/SlvQzbHM3pI/AAAAAAAACUg/5RLu8hpD4WU/s200/BreakpointMenu.gif" alt="" id="BLOGGER_PHOTO_ID_5358105763557203602" border="0" /&gt;&lt;/a&gt;First, double click on the left hand side of your code editor to set a breakpoint like you normally would. Then, right click the breakpoint and choose "Breakpoint Properties..."&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_94zmSpuRfao/SlvRJ3WBX8I/AAAAAAAACUo/BDZ_NrqcT4A/s1600-h/BreakpointProperties.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 152px; height: 200px;" src="http://2.bp.blogspot.com/_94zmSpuRfao/SlvRJ3WBX8I/AAAAAAAACUo/BDZ_NrqcT4A/s200/BreakpointProperties.gif" alt="" id="BLOGGER_PHOTO_ID_5358106149092679618" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, you can tell the breakpoint when to pause the debugger. Click the "Enable Condition" checkbox and then in the textarea define your condition. You can enter some pseudo-java code here and even use cntrl-space for autocomplete. Now click 'OK' and voila! You now have a conditional breakpoint defined. You should see that your breakpoint has a question mark on it (indicating that it is a conditional breakpoint). Your breakpoint will now fire only when that condition is met.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-8692044181665412033?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/using-conditional-breakpoints-in.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_94zmSpuRfao/SlvQzbHM3pI/AAAAAAAACUg/5RLu8hpD4WU/s72-c/BreakpointMenu.gif' height='72' width='72'/><thr:total>60</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-7580862330629467065</guid><pubDate>Sat, 11 Jul 2009 18:45:00 +0000</pubDate><atom:updated>2009-07-13T20:06:31.164-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>XML</category><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Working with XML data in an Oracle Database</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Is your application using XML to store data? With Oracle 9i and above you can store your XML in the database and query it to pull out the pieces of data that you need. You need to make sure that you've installed the XDK and XML capabilities of your Oracle Database before being able to use this XML functionality.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating a table with an XMLType datatype&lt;/span&gt;&lt;br /&gt;The XMLType datatype (which is really the SYS.XMLType datatype) is basically a CLOB data type but with a some extra functions that allow the data to be made available to SQL. First create a new table like so:&lt;pre class="blogCode"&gt;&lt;code&gt;$ sqlplus scott/tiger&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE TABLE mytable&lt;br /&gt;2  (&lt;br /&gt;3   myid  number(10),&lt;br /&gt;4   myxml XMLType&lt;br /&gt;5  );&lt;br /&gt;&lt;br /&gt;Table created.&lt;/code&gt;&lt;/pre&gt;Then insert some XML data into the table.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&gt; insert into mytable values&lt;br /&gt;2  (&lt;br /&gt;3     1,&lt;br /&gt;4     XMLType('&amp;lt;users&amp;gt;&lt;br /&gt;5               &amp;lt;person&amp;gt;&lt;br /&gt;6                &amp;lt;name&amp;gt;Bruce Scott&amp;lt;/name&amp;gt;&lt;br /&gt;7                &amp;lt;email&amp;gt;Bruce@SomeWebsite.com&amp;lt;/email&amp;gt;&lt;br /&gt;8               &amp;lt;/person&amp;gt;&lt;br /&gt;9              &amp;lt;/users&amp;gt;'&lt;br /&gt;10           )&lt;br /&gt;11 );&lt;br /&gt;1 row created.&lt;/code&gt;&lt;/pre&gt;And now we can use SQL to SELECT the data out:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&gt; select extractValue(myxml, '/USERS/PERSON/EMAIL') as XmlEMail&lt;br /&gt;2  from   mytable&lt;br /&gt;3  where  existsNode(myxml, '/USERS/PERSON[NAME="Bruce Scott"]') = 1;&lt;br /&gt;&lt;br /&gt;XMLEMAIL&lt;br /&gt;-----------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Bruce@SomeWebsite.com&lt;/code&gt;&lt;/pre&gt;It's as easy as that! That's all you need to do to store and retrieve XML from an Oracle Database.&lt;br /&gt;&lt;br /&gt;If you have trouble, please post your comments on this web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-7580862330629467065?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/working-with-xml-data-in-oracle.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-6702657436381096282</guid><pubDate>Fri, 10 Jul 2009 18:35:00 +0000</pubDate><atom:updated>2009-07-13T20:06:44.699-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>UNIX</category><category domain='http://www.blogger.com/atom/ns#'>Linux</category><title>Searching for Files in UNIX and Linux</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;This article will demonstrate how to use the 'find' and 'locate' commands in UNIX and Linux to search for files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Searching for files with 'find' and 'locate'&lt;/span&gt;&lt;br /&gt;To search for files in UNIX and Linux you can use the 'find' command. The 'find' command will do a real-time search of the filesystem looking for files that you have specified. On Linux and some other systems you can use the 'locate' command to search for files based on the filename. Usually a scheduled job runs an 'updatedb' command which puts every file on the filesystem into a 'database' or 'index' file. Then when you try to search for a file using 'locate' it searches through its indexed copy of file names instead of scanning the entire filesystem. This means that the 'locate' command is very fast while the 'find' command is slower. However the index database that the locate command uses is usually run just once a day so its index can become outdated quickly. The main drawbacks from using the 'find' command is that it's slower since it's done in real-time and can be very disk intensive.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Doing a Basic Search&lt;/span&gt;&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ find . -name "*.log" -print 2&gt;/dev/null&lt;br /&gt;./logs/error.log&lt;br /&gt;./logs/access.log&lt;/code&gt;&lt;/pre&gt;In the above example, you'll see I call the 'find' command and pass it a few parameters. First, the . (dot) means do the search in my current directory and the files below. The -name option means I want to do a name pattern search. The "*.log" means look for all the filenames that end in *.log. This piece is what you are searching for. You can change it to look for myfile.txt, *someword*, or any other search string you can think of. The -print option means to print out the path of the files that are found. The 2&gt;/dev/null means take any of the errors you get and throw them away into /dev/null (think of /dev/null as a trash bin).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Searching for all the .log files on all of the filesystems&lt;/span&gt;&lt;br /&gt;To search for all of the .log files in the entire computer, you need to change the . (dot) to a / (forward slash) to tell it to look in everything under the root directory. The result would look like this:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ find / -name "*.log" -print 2&gt;/dev/null&lt;br /&gt;/var/log/mysqld.log&lt;br /&gt;/var/log/boot.log&lt;br /&gt;/var/log/prelink.log&lt;br /&gt;/var/log/yum.log&lt;br /&gt;/etc/logrotate.d/vsftpd.log&lt;br /&gt;/usr/share/doc/tux-3.2.12/sample.log&lt;br /&gt;...&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Searching through files that contain a specific string&lt;/span&gt;&lt;br /&gt;Here's how you can search through a specific directory and below for all the files that contain a certain string. In this example, I'll look in my current directory and below for all the files that contain the word 'bookmarks'. This will display the filename that contains the string and a portion of the file that contains the string you're searching for.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ find . -print|xargs grep -i "bookmarks"&lt;br /&gt;./www/index.html:&lt;b&gt;Please update your bookmarks&lt;/b&gt;.&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Searching for large files&lt;/span&gt;&lt;br /&gt;To search for large files using the 'find' command, just use the -size option and tell it the size in bytes that you're looking for. For example, here's how to search for files that are larger than 10,000 bytes (about 10 KB):&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ find . -size +10000 -print&lt;br /&gt;./troygeek_main_final.sql&lt;br /&gt;./troygeek_main_final_noweblog.sql&lt;br /&gt;./logs/access.log&lt;br /&gt;./troygeekLocal2.sql&lt;br /&gt;./mysql-connector-java-3.1.8a.tar.gz&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Searching for files that have changed in the last day&lt;/span&gt;&lt;br /&gt;To search for all the files that have changed in the last day (or any amount of days really) just use the -mtime option and pass it the amount of days like below:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ find . -mtime -1 -print&lt;br /&gt;./.bash_history&lt;br /&gt;./logs/error.log&lt;br /&gt;./logs/access.log&lt;br /&gt;./webapps/TroyGeek&lt;br /&gt;./webapps/TroyGeek/Theme/ts_header.jsp&lt;br /&gt;./webapps/TroyGeek/Pictures&lt;br /&gt;./webapps/TroyGeek/Pictures/images&lt;br /&gt;./webapps/TroyGeek/Pictures/images/1002839-R2-017-7_jpg.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/1002839-R2-033-15_jpg.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0417_JPG.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0434_JPG.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0444_JPG.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0509_JPG.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0510_JPG.jpg&lt;br /&gt;./webapps/TroyGeek/Pictures/images/100_0511_JPG.jpg&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Using 'locate' to search for files.&lt;/span&gt;&lt;br /&gt;As mentioned above the 'locate' command is usually installed on Linux systems but may also be on other flavors of UNIX. Here's how to do a simple search for all the .log files.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ locate *.log&lt;br /&gt;/var/log/prelink.log&lt;br /&gt;/var/log/yum.log&lt;br /&gt;/etc/logrotate.d/vsftpd.log&lt;br /&gt;/usr/share/doc/tux-3.2.12/sample.log&lt;br /&gt;/usr/lib/rpm/rpm.log&lt;br /&gt;/usr/local/mysql/src/mysql-4.1.12/innobase/config.log&lt;br /&gt;/usr/local/mysql/src/mysql-4.1.12/config.log&lt;/code&gt;&lt;/pre&gt;What you don't notice from the text above is that those search results were returned instantly whereas the results from the 'find' command have to search every file one by one which can take a long time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Doing a case-insensitive search with locate&lt;/span&gt;&lt;br /&gt;You may want to ignore case sensitivity when you're doing a search. To do that just use the -i option when doing a search.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;[troygeek@localhost troygeek]$ locate -i PASSWD&lt;br /&gt;/etc/passwd&lt;br /&gt;[troygeek@localhost troygeek]$ locate PASSWD&lt;br /&gt;[troygeek@localhost troygeek]$&lt;/code&gt;&lt;/pre&gt;And that's the basics of searching for files in UNIX and Linux.&lt;br /&gt;&lt;br /&gt;If you have any trouble, please post your comments on this web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-6702657436381096282?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/searching-for-files-in-unix-and-linux.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-8566086836912936243</guid><pubDate>Thu, 09 Jul 2009 18:23:00 +0000</pubDate><atom:updated>2009-07-13T20:07:01.877-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Statspack 101: Interpreting Your Statspack Report</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;In my last article, I discussed how to install Oracle's Statspack Utility; a free tool for monitoring your Oracle database instance. That article also discussed how to generate a Statspack Report. This article will help you interpret a lot of the information you will find in a statspack report.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Statspack Header&lt;/span&gt;&lt;br /&gt;The beginning of the statspack report shows you some basic information about your instance including the database name, instance name, DB ID, version, host and the start and end times of the snapshots used in your report. Here is an example:&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;STATSPACK report for&lt;br /&gt;&lt;br /&gt;DB Name         DB Id    Instance     Inst Num Release     Cluster Host&lt;br /&gt;------------ ----------- ------------ -------- ----------- ------- ------------&lt;br /&gt;ORCL          2586436430 ORCL                1 9.2.0.4.0   NO      localhost&lt;br /&gt;&lt;br /&gt; Snap Id     Snap Time      Sessions Curs/Sess Comment&lt;br /&gt; ------- ------------------ -------- --------- -------------------&lt;br /&gt;Begin Snap:    4873 13-Dec-05 05:00:05      110      37.4&lt;br /&gt;End Snap:    4875 13-Dec-05 07:00:04      651     203.7&lt;br /&gt;Elapsed:              119.98 (mins)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Cache Sizes&lt;/span&gt;&lt;br /&gt;The next section, Cache Sizes, shows you some of your instance settings including: Buffer Cache (DB_CACHE_SIZE), Standard Block Size (DB_BLOCK_SIZE), Shared Pool Size (SHARED_POOL_SIZE), and Log Buffer (LOG_BUFFER). These are all instance parameters which you can modify in your spfile/pfile. :&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Cache Sizes (end)&lt;br /&gt;~~~~~~~~~~~~~~~~~&lt;br /&gt;         Buffer Cache:     3,008M      Std Block Size:         8K&lt;br /&gt;     Shared Pool Size:     1,920M          Log Buffer:    10,240K&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Load Profile&lt;/span&gt;&lt;br /&gt;The "Load Profile" section shows you the load on your instance per second and per transaction. You can compare this section between two Statspack Reports to see how the load on your instance is increasing or decreasing over time.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Redo Size &amp;amp; Block Changes Increase: If you see an increase here then more DML statements are taking place (meaning your users are doing more INSERTs, UPDATEs, and DELETEs than before.&lt;/li&gt;&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Load Profile&lt;br /&gt;~~~~~~~~~~~~                            Per Second       Per Transaction&lt;br /&gt;                             ---------------       ---------------&lt;br /&gt;            Redo size:            352,535.71              8,517.66&lt;br /&gt;        Logical reads:            202,403.30              4,890.29&lt;br /&gt;        Block changes:              2,713.47                 65.56&lt;br /&gt;       Physical reads:                 44.22                  1.07&lt;br /&gt;      Physical writes:                 27.46                  0.66&lt;br /&gt;           User calls:                787.32                 19.02&lt;br /&gt;               Parses:                301.40                  7.28&lt;br /&gt;          Hard parses:                  0.05                  0.00&lt;br /&gt;                Sorts:                317.78                  7.68&lt;br /&gt;               Logons:                  0.10                  0.00&lt;br /&gt;             Executes:              2,975.84                 71.90&lt;br /&gt;         Transactions:                 41.39&lt;br /&gt;&lt;br /&gt;% Blocks changed per Read:    1.34    Recursive Call %:    87.43&lt;br /&gt;Rollback per transaction %:   27.56       Rows per Sort:     7.22&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Instance Efficiency Percentages&lt;/span&gt;&lt;br /&gt;The "Instance Efficiency Percentages" section is very useful. It gives you an overview of your instance health. Anytime you make instance parameter changes you should take a look to see if this affects your instance efficiency in any way. Here is a description of some of the fields (Note, as stated in the statspack report, your goal here is to have these percentages be as close to 100% as possible):&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Buffer Nowait %: This is the percentage of time that the instance made a call to get a buffer (all buffer types are included here) and that buffer was made available immediately (meaning it didn't have to wait for the buffer...hence "Buffer Nowait").&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Buffer Hit %: This means that when a request for a buffer took place, the buffer was available in memory and physical disk I/O did not need to take place.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Library Hit %: If your Library Hit percentage is low it could mean that your shared pool size is too small or that the bind variables are not being used (or at least being used properly).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Execute to Parse %: This is the formula used to get this percentage: round(100*(1-parsevalue/executevalue),2)&lt;/li&gt;&lt;br /&gt;So, if you run some SQL and it has to be parsed every time you execute it (because no plan exists for this statement) then your percentage would be 0%. The more times that your SQL statement can reuse an existing plan the higher your Execute to Parse ratio is.&lt;br /&gt;&lt;br /&gt;One way to increase your parse ratio is to use bind variables. This allows the same plan to be used for multiple SQL statements. The only thing that changes in the SQL is the parameters used in your statement's WHERE clause. For Java/JDBC Programmers that means using PreparedStatements as opposed to regular Statements.&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Parse CPU to Parse Elapsd %: Generally, this is a measure of how available your CPU cycles were for SQL parsing. If this is low, you may see "latch free" as one of your top wait events.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Redo NoWait %: You guessed it...the instance didn't have to wait to use the redo log if this is 100%.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;In-memory Sort %: This means the instance could do its sorts in memory as opposed to doing physical I/O...very good. You don't want to be doing your sorts on disk...especially in an OLTP system. Try increasing your SORT_AREA_SIZE or PGA_AGGREGATE_TARGET in your spfile/pfile to see if that helps if your in-memory sorting is not between 95% and 100%.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Soft Parse %: This is an important one...at least for OLTP systems. This means that your SQL is being reused. If this is low (not between 95% and 100%) then make sure that you're using bind variables in the application and that they're being used properly.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Latch Hit %: This should be pretty close to 100%; if it's not then check out what your top wait events are.&lt;/li&gt;&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Instance Efficiency Percentages (Target 100%)&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;      Buffer Nowait %:  100.00       Redo NoWait %:  100.00&lt;br /&gt;      Buffer  Hit   %:   99.98    In-memory Sort %:  100.00&lt;br /&gt;      Library Hit   %:  100.04        Soft Parse %:   99.98&lt;br /&gt;   Execute to Parse %:   89.87         Latch Hit %:   94.99&lt;br /&gt;Parse CPU to Parse Elapsd %:   75.19     % Non-Parse CPU:   99.46&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Top 5 Timed Events (Called "Top 5 Wait Events" in 8i)&lt;/span&gt;&lt;br /&gt;This section is crucial in determining what some of the performance drains in your database are. It will actually tell you the amount of time the instance spent waiting. Here are some common reasons for high wait events:&lt;br /&gt;&lt;br /&gt;&lt;li&gt;DB file scattered read: This can be seen fairly often. Usually, if this number is high, then it means there are a lot of full tablescans going on. This could be because you need indexes or the indexes you do have are not not being used.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;DB file sequential read: This could indicate poor joining orders in your SQL or waiting for writes to 'temp' space. It could mean that a lot of index reads/scans are going on. Depending on the problem it may help to tune PGA_AGGREGATE_TARGET and/or DB_CACHE_SIZE.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;CPU Time: This could be completely normal. However, if this is your largest wait event then it could mean that you have some CPU intensive SQL going on. You may want to examine some of the SQL further down in the Statspack report for SQL statements that have large CPU Time.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;SQL*Net more data to client: This means the instance is sending a lot of data to the client. You can decrease this time by having the client bring back less data. Maybe the application doesn't need to bring back as much data as it is.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;log file sync: A Log File Sync happens each time a commit takes place. If there are a lot of waits in this area then you may want to examine your application to see if you are committing too frequently (or at least more than you need to).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Logfile buffer space: This happens when the instance is writing to the log buffer faster than the log writer process can actually write it to the redo logs. You could try getting faster disks but you may want to first try increasing the size of your redo logs; that could make a big difference (and doesn't cost much).&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Logfile switch: This could mean that your committed DML is waiting for a logfile switch to occur. Make sure your filesystem where your archive logs reside are not getting full. Also, the DBWR process may not be fast enough for your system so you could add more DBWR processes or make your redo logs larger so log switches are not needed as much.&lt;/li&gt;&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Top 5 Timed Events&lt;br /&gt;~~~~~~~~~~~~~~~~~~                                                     % Total&lt;br /&gt;Event                                               Waits    Time (s) Ela Time&lt;br /&gt;-------------------------------------------- ------------ ----------- --------&lt;br /&gt;db file sequential read                           187,787         906    88.60&lt;br /&gt;SQL*Net more data to client                        49,707          57     5.55&lt;br /&gt;CPU time                                                           54     5.33&lt;br /&gt;log file parallel write                             1,011           2      .22&lt;br /&gt;latch free                                          6,226           2      .16&lt;br /&gt;    -------------------------------------------------------------&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;The SQL Sections (Buffer Gets, Disk Reads, Executions, and Parse Counts)&lt;/span&gt;&lt;br /&gt;The following sections show you the Top SQL (or 'worst performing' SQL) grouped by four sections: Buffer Gets, Disk Reads, Executions, and Parse Counts. You'll want to review the top SQL statements in each of these sections to see if they can be tuned better. These sections are a great way to how many times the SQL is being executed, how much CPU time is being used to execute them, and the total time for the statement to execute.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;SQL ordered by Parse Calls for DB: ORCL  Instance: ORCL  Snaps: 4873 -4875&lt;br /&gt;-&gt; End Parse Calls Threshold:      1000&lt;br /&gt;&lt;br /&gt;                     % Total&lt;br /&gt;Parse Calls  Executions   Parses  Hash Value&lt;br /&gt;------------ ------------ -------- ----------&lt;br /&gt;144,300      144,300     6.65 4199666855&lt;br /&gt;Module: JDBC Thin Client&lt;br /&gt;select parameter, value from nls_session_parameters&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Note: &lt;/span&gt;If you take the hash value for the SQL statement, then you run the ORACLE_HOME/rdbms/admin/sprepsql.sql script, and enter the hash value when it prompts you it will pull up the Execution Plan for that SQL statement. Pretty Cool!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Instance Activity Stats&lt;/span&gt;&lt;br /&gt;This section may provide some insight into some potential performance problems that were not as easily visible from previous sections in the report. This section is also useful when comparing statspack reports from the same timeframes on different days.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Tablespace and Data File I/O Statistics&lt;/span&gt;&lt;br /&gt;These sections help give you some visibility into I/O rolled up to the tablespace level and I/O stats on your data files.&lt;br /&gt;&lt;pre class="blogCode"&gt;&lt;code&gt;Tablespace IO Stats for DB: ORCL  Instance: ORCL  Snaps: 4873 -4875&lt;br /&gt;-&gt;ordered by IOs (Reads + Writes) desc&lt;br /&gt;&lt;br /&gt;Tablespace&lt;br /&gt;------------------------------&lt;br /&gt;           Av      Av     Av                    Av        Buffer Av Buf&lt;br /&gt;   Reads Reads/s Rd(ms) Blks/Rd       Writes Writes/s      Waits Wt(ms)&lt;br /&gt;-------------- ------- ------ ------- ------------ -------- ---------- ------&lt;br /&gt;UNDOTBS&lt;br /&gt;     146       0    5.8     1.0      117,119       16     50,681    1.3&lt;br /&gt;APP1&lt;br /&gt;  19,395       3   10.5     1.0       32,613        5      1,886    2.8&lt;br /&gt;INDEX1&lt;br /&gt;  36,919       5    0.7     6.3          977        0        526    5.0&lt;br /&gt;APP2&lt;br /&gt;   6,969       1   11.7     1.0       13,559        2      2,513    2.5&lt;br /&gt;SYSTEM&lt;br /&gt;  15,056       2    0.8     1.8          360        0         13    3.8&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;I hope this article helps you increase your ability to interpret Statspack Reports as it is an extremely useful tool for the Oracle DBA.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-8566086836912936243?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/statspack-101-interpreting-your.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-1363519746224561996</guid><pubDate>Wed, 08 Jul 2009 18:01:00 +0000</pubDate><atom:updated>2009-07-13T20:07:13.568-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Statspack 101: Installing Oracle's Statspack Utility</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Oracle's Statspack is a free utility that allows you to monitor and report on&lt;br /&gt;performance problems with your Oracle database. In this tutorial we will install&lt;br /&gt;Statspack on an Oracle 9i database.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating a Statspack Tablespace&lt;/span&gt;&lt;br /&gt;The first step in installing statspack is creating a tablespace for the statspack&lt;br /&gt;objects and data to reside. For our example we will call the tablespace "PERFSTAT"&lt;br /&gt;and make it 500mb in size.&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&amp;gt; CREATE TABLESPACE PERFSTAT&lt;br /&gt;&lt;br /&gt;2 DATAFILE '/path/to/my/tablespaces/perfstat.dbf' SIZE 500M AUTOEXTEND OFF&lt;br /&gt;&lt;br /&gt;3 EXTENT MANAGEMENT LOCAL AUTOALLOCATE&lt;br /&gt;&lt;br /&gt;4 LOGGING&lt;br /&gt;&lt;br /&gt;5 ONLINE&lt;br /&gt;&lt;br /&gt;6 SEGMENT SPACE MANAGEMENT AUTO&lt;br /&gt;&lt;br /&gt;7 /&lt;br /&gt;&lt;br /&gt;Tablespace created.&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Installing Statspack&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Next, we're actually going to install Statspack in the database. First you want&lt;br /&gt;to change to the ORACLE_HOME/rdbms/admin/ directory. This directory contains&lt;br /&gt;all the files needed for installing statspack.&lt;br /&gt;$&amp;gt; cd $ORACLE_HOME/rdbms/admin/&lt;br /&gt;Now that we are in the ORACLE_HOME/rdbms/admin/ directory we are going to run&lt;br /&gt;the "spcreate.sql" script from SQLPLUS. This script will create the&lt;br /&gt;statspack user, the statspack tables, and the statspack packages.&lt;pre class="blogCode"&gt;&lt;code&gt;$&amp;gt; sqlplus "/ as sysdba"&lt;br /&gt;SQL*Plus: Release 9.2.0.4.0 - Production on Mon Nov 28 18:49:51 2005&lt;br /&gt;Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;&lt;br /&gt;Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production&lt;br /&gt;&lt;br /&gt;With the Partitioning, OLAP and Oracle Data Mining options&lt;br /&gt;&lt;br /&gt;JServer Release 9.2.0.4.0 - Production&lt;br /&gt;SQL&amp;gt; @spcreate;&lt;br /&gt;&lt;br /&gt;... Installing Required Packages&lt;br /&gt;Package created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Package body created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Package created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Synonym created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Grant succeeded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Synonym created...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;...Synonym created.&lt;br /&gt;... Creating PERFSTAT user ...&lt;br /&gt;Choose the PERFSTAT user's password.&lt;br /&gt;Not specifying a password will result in the installation FAILING&lt;br /&gt;Specify PERFSTAT password&lt;br /&gt;&lt;br /&gt;Enter value for perfstat_password: perfstatpass&lt;br /&gt;&lt;br /&gt;perfstatpass&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User created....&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;....Grant succeeded.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below are the list of online tablespaces in this database.&lt;br /&gt;&lt;br /&gt;Decide which tablespace you wish to create the STATSPACK tables&lt;br /&gt;&lt;br /&gt;and indexes. This will also be the PERFSTAT user's default tablespace.&lt;br /&gt;Specifying the SYSTEM tablespace will result in the installation FAILING, as using SYSTEM for performance data is not supported.&lt;br /&gt;&lt;br /&gt;TABLESPACE_NAME CONTENTS&lt;br /&gt;&lt;br /&gt;------------------------------ ---------&lt;br /&gt;&lt;br /&gt;DRSYS PERMANEN&lt;br /&gt;&lt;br /&gt;PERFSTAT PERMANENT&lt;br /&gt;&lt;br /&gt;TEMP TEMPORARY&lt;br /&gt;&lt;br /&gt;TOOLS PERMANENT&lt;br /&gt;&lt;br /&gt;UNDOTBS UNDO&lt;br /&gt;&lt;br /&gt;USERS PERMANENT&lt;br /&gt;&lt;br /&gt;XDB PERMANENT&lt;br /&gt;7 rows selected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Specify PERFSTAT user's default tablespace&lt;br /&gt;&lt;br /&gt;Enter value for default_tablespace: perfstat&lt;br /&gt;&lt;br /&gt;Using perfstat for the default tablespace&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User altered.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Choose the PERFSTAT user's temporary tablespace.&lt;br /&gt;Specifying the SYSTEM tablespace will result in the installation&lt;br /&gt;&lt;br /&gt;FAILING, as using SYSTEM for the temporary tablespace is not recommended.&lt;br /&gt;Specify PERFSTAT user's temporary tablespace.&lt;br /&gt;&lt;br /&gt;Enter value for temporary_tablespace: temp&lt;br /&gt;&lt;br /&gt;Using temp for the temporary tablespace&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User altered.....&lt;br /&gt;Creating Package STATSPACK...&lt;br /&gt;Package created.&lt;br /&gt;No errors.&lt;br /&gt;&lt;br /&gt;Creating Package Body STATSPACK...&lt;br /&gt;Package body created.&lt;br /&gt;No errors.&lt;br /&gt;NOTE:&lt;br /&gt;&lt;br /&gt;SPCPKG complete. Please check spcpkg.lis for any errors.&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Review any messages and make sure you didn't receive any errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Execute a Snapshot and Generate a Statspack Report&lt;br /&gt;&lt;br /&gt;Now that you have statspack installed, let's take two snapshots and then generate&lt;br /&gt;a Statspack Report. Assuming you are still in the ORACLE_HOME/rdbms/admin/ directory&lt;br /&gt;and logged in as perfstat, run this command twice like so:&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&amp;gt; execute statspack.snap&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;SQL&amp;gt; execute statspack.snap&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;We now have two snapshots to compare in order to create a Statspack Report.&lt;br /&gt;Run the "spreport.sql" script in SQLPLUS to create a Statspack Report:&lt;br /&gt;SQL&amp;gt; @spreport&lt;br /&gt;Current Instance&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~&lt;br /&gt;DB Id DB Name Inst Num Instance&lt;br /&gt;&lt;br /&gt;----------- ------------ -------- ------------&lt;br /&gt;&lt;br /&gt;4184632401 ORCL 1 ORCL&lt;br /&gt;&lt;br /&gt;Instances in this Statspack schema&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;DB Id Inst Num DB Name Instance Host&lt;br /&gt;&lt;br /&gt;----------- -------- ------------ ------------ ------------&lt;br /&gt;&lt;br /&gt;4184632401 1 ORCL ORCL localhost&lt;br /&gt;Using 4184632401 for database Id&lt;br /&gt;&lt;br /&gt;Using 1 for instance number&lt;br /&gt;Completed Snapshots&lt;br /&gt;Snap Snap&lt;br /&gt;&lt;br /&gt;Instance DB Name Id Snap Started Level Comment&lt;br /&gt;&lt;br /&gt;------------ ------------ ----- ----------------- ----- ----------------------&lt;br /&gt;&lt;br /&gt;ORCL ORCL 1 28 Nov 2005 20:00 5&lt;br /&gt;&lt;br /&gt;2 28 Nov 2005 20:04 5&lt;br /&gt;&lt;br /&gt;Specify the Begin and End Snapshot Ids&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;Enter value for begin_snap: 1&lt;br /&gt;&lt;br /&gt;Begin Snapshot Id specified: 1&lt;br /&gt;Enter value for end_snap: 2&lt;br /&gt;&lt;br /&gt;End Snapshot Id specified: 2&lt;br /&gt;Specify the Report Name&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;The default report file name is sp_1_2. To use this name,&lt;br /&gt;&lt;br /&gt;press to continue, otherwise enter an alternative.&lt;br /&gt;&lt;br /&gt;Enter value for report_name: myStatspackReport.txt&lt;br /&gt;-- a bunch of the report flies by the screen here,&lt;br /&gt;&lt;br /&gt;-- but don't worry we saved a copy to look at afterwards.&lt;br /&gt;End of Report&lt;br /&gt;SQL&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here I saved my Statspack Report under the name "myStatspackReport.txt".&lt;br /&gt;You can exit SQLPLUS and open the file in a text editor to view the report.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Scheduling the Statspack Report&lt;/span&gt;&lt;br /&gt;Now that you have statspack up and running, lets schedule it to run at an automatic&lt;br /&gt;interval. Again, assuming you are in the ORACLE_HOME/rdbms/admin/ directory&lt;br /&gt;and logged in as perfstat, run the "spauto.sql" script:&lt;pre class="blogCode"&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt; @spauto&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Job number for automated statistics collection for this instance&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;Note that this job number is needed when modifying or removing&lt;br /&gt;&lt;br /&gt;the job:&lt;br /&gt;JOBNO&lt;br /&gt;&lt;br /&gt;----------&lt;br /&gt;&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Job queue process&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;Below is the current setting of the job_queue_processes init.ora&lt;br /&gt;&lt;br /&gt;parameter - the value for this parameter must be greater&lt;br /&gt;&lt;br /&gt;than 0 to use automatic statistics gathering:&lt;br /&gt;NAME TYPE&lt;br /&gt;&lt;br /&gt;------------------------------------ --------------------------------&lt;br /&gt;&lt;br /&gt;VALUE&lt;br /&gt;&lt;br /&gt;------------------------------&lt;br /&gt;&lt;br /&gt;job_queue_processes integer&lt;br /&gt;&lt;br /&gt;2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next scheduled run&lt;br /&gt;&lt;br /&gt;~~~~~~~~~~~~~~~~~~&lt;br /&gt;&lt;br /&gt;The next scheduled run for this job is:&lt;br /&gt;JOB NEXT_DATE NEXT_SEC&lt;br /&gt;&lt;br /&gt;---------- --------------- ------------------------&lt;br /&gt;&lt;br /&gt;1 28-NOV-05 21:00:00&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The "spauto.sql" script, by default, schedules the statspack job&lt;br /&gt;to take a snapshot every hour. If you want a statspack snapshot to be taken&lt;br /&gt;more often than that then make a copy of the spauto.sql file and edit it. You&lt;br /&gt;want to change the section that says:&lt;pre class="blogCode"&gt;&lt;code&gt;&lt;br /&gt;variable jobno number;&lt;br /&gt;&lt;br /&gt;variable instno number;&lt;br /&gt;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt;select instance_number into :instno from v$instance;&lt;br /&gt;&lt;br /&gt;dbms_job.submit(:jobno, 'statspack.snap;',&lt;br /&gt;&lt;br /&gt;trunc(sysdate+1/24,'HH'), 'trunc(SYSDATE+1/24,''HH'')', TRUE, :instno);&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;/&lt;/code&gt;&lt;/pre&gt;If you want the statspack to run every 10 minutes then change it to say this:&lt;pre class="blogCode"&gt;&lt;code&gt;variable jobno number;&lt;br /&gt;&lt;br /&gt;variable instno number;&lt;br /&gt;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt;select instance_number into :instno from v$instance;&lt;br /&gt;&lt;br /&gt;dbms_job.submit(:jobno, 'statspack.snap;',&lt;br /&gt;&lt;br /&gt;trunc(sysdate+1/144,'MI'), 'trunc(SYSDATE+1/144,''MI'')', TRUE, :instno);&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;/&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Issue your copy of the spauto.sql script and it will schedule a snapshot to&lt;br /&gt;be taken every 10 minutes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Check the job_queue_processes parameter&lt;/span&gt;&lt;br /&gt;Make sure that you have the job_queue_processes parameter set higher than zero&lt;br /&gt;or you will not be able to use the auto snapshot feature to take statspack snapshots&lt;br /&gt;at a given interval.&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&amp;gt; set linesize 150;&lt;br /&gt;&lt;br /&gt;SQL&amp;gt; show parameter job_queue_processes&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;&lt;br /&gt;------------------------------------ -------------------------------- -----&lt;br /&gt;&lt;br /&gt;job_queue_processes integer 0&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Here I don't have job_queue_processes set above zero so I issue a ALTER SYSTEM&lt;br /&gt;command to increase it to 2:&lt;pre class="blogCode"&gt;&lt;code&gt;SQL&amp;gt; ALTER SYSTEM SET job_queue_processes = 2 SCOPE=BOTH;&lt;br /&gt;System altered.&lt;br /&gt;SQL&amp;gt; SHOW PARAMETER job_queue_processes&lt;br /&gt;NAME TYPE VALUE&lt;br /&gt;&lt;br /&gt;------------------------------------ -------------------------------- -----&lt;br /&gt;&lt;br /&gt;job_queue_processes integer 2&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to Uninstall Statspack&lt;/span&gt;&lt;br /&gt;To uninstall Statspack from an Oracle database running Oracle 8.1.7 and above,&lt;br /&gt;you just need to run the ORACLE_HOME/rdbms/admin/spdrop.sql script. This will&lt;br /&gt;get rid of the user, tables, and procedures.&lt;br /&gt;To uninstall Statspack from an Oracle database running Oracle 8.1.6, you just&lt;br /&gt;need to run the ORACLE_HOME/rdbms/admin/spdrp.sql&lt;br /&gt;In a future article I hope to cover how to interpret your StatsPack Reports.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-1363519746224561996?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/statspack-101-installing-oracles.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-3715824779407243865</guid><pubDate>Tue, 07 Jul 2009 17:50:00 +0000</pubDate><atom:updated>2009-07-13T20:07:28.516-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>MySQL</category><title>Importing and Exporting data in MySQL</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;In my spare time I like to take photos...lots of photos. I put together a little PHP/MySQL app to host all the photos over a TroyGeek.com (http://www.troygeek.com/). Usually I do my PHP development on my Windows computer and then upload the code to my UNIX web host. I also run a copy of MySQL on my Windows computer and before I start my development I like to get a copy of what my 'production' database looks like and load it into my Mysql database on my Windows machine. This article will describe how to do this using the mysqldump and mysql command line utilities to import and export data to/from a MySQL database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Setting Your Path&lt;/span&gt;&lt;br /&gt;First what I like to do is to put the mysql and mysqldump programs in my command line path so I don't need to use the full path when calling the them. To do this on Windows XP, right click your 'My Computer' icon and go to properties. Under the Advanced tab you should see a button for 'Environment Variables'. Click that button and a new window should pop up showing two menu lists. The top menu is for 'user' environment variables, meaning only the user currently logged on to Windows can use these environment variables and the second menu list is for 'System' environment variables which are variables made available to anyone on the computer.&lt;br /&gt;&lt;br /&gt;Under the System environment variables, look for a variable called 'Path'. Highlight that variable and click the 'Edit Variable' button. At the very of end the 'Variable Value' field add ;c:\mysql\bin assuming that c:\mysql is where you have MySQL installed. Note the semi-colon at the beginning...that seperates this statement from the one before it. Now you should be able to call the mysqladmin and mysql tools from a command prompt.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Getting the Data Out With Mysqldump&lt;/span&gt;&lt;br /&gt;The main utility used to get data out of mysql is called mysqldump. It's a command line utility that works the same way on Windows, UNIX, Linux, etc. and is fairly easy to use. In the following example the mysqldump utility will take in your username, password, computer name, and dump the DDL and data from your database to a text file. Open up a command prompt (for Windows, go to Start &gt; Run &gt; and type in 'cmd'). Now type in the below statement.&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;mysqldump -u myUsername -p --host=localhost myDatabase &gt; someTextFile.sql&lt;/code&gt;&lt;/pre&gt;If you hadn't added c:\mysql\bin to your path you would need to run this command:&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;c:\mysql\bin\mysqldump -u myUsername -p --host=localhost myDatabase &gt; someTextFile.sql&lt;/code&gt;&lt;/pre&gt;...assuming c:\mysql is where you have installed MySQL.&lt;br /&gt;&lt;br /&gt;In the example above the username to the database was myUsername, the computer that the MySQL database runs on goes after --host (in this case we used localhost though it could be your unix server name) , the database name is myDatabase and we sent all the data we get to a file called sometextFile.sql. If you were to open up the someTextFile.sql file you should see all the CREATE and INSERT statements needed to rebuild your database. You can find more options with the mysqldump command here in the MySQL Manual (http://dev.mysql.com/doc/mysql/en/mysqldump.html)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Putting the Data Back&lt;/span&gt;&lt;br /&gt;Now that you've gotten the data out, how do you get it back in? You can actually use the mysql command line utility you would normally use to run queries with. Make sure that any tables you want to create do not already exist. To create the tables and load data back into mysql you would run this command:&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;mysql -u myUsername -p myDatabase &lt;&gt;&lt;/pre&gt;...where someTextFile.sql is the export you took in the previous example. Basically what this does is opens a connnection to mysql and then runs all the commands that are in the .sql file.&lt;br /&gt;&lt;br /&gt;And that's about all you need to do to take exports/imports in MySQL!&lt;br /&gt;As always, if you have trouble, please post your comments on this web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-3715824779407243865?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/importing-and-exporting-data-in-mysql.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-359027969315331045</guid><pubDate>Mon, 06 Jul 2009 17:40:00 +0000</pubDate><atom:updated>2009-07-13T20:07:45.271-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>How Oracle Searches for Configuration Files</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Do you have trouble finding which tnsnames.ora or listener.ora is the one on your&lt;br /&gt;computer that Oracle is actually looking at? There's a few places that Oracle&lt;br /&gt;looks for its configuration files (tnsnames.ora, sqlnet.ora, listener.ora, and&lt;br /&gt;oratab).&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Where does Oracle search for these files?&lt;/span&gt;&lt;br /&gt; Oracle will search for these configuration files in the following locations&lt;br /&gt; in the following order:&lt;br /&gt;&lt;br /&gt; &lt;span style="font-family:Courier New, Courier, mono;font-size:85%;color:#556699;"&gt;1. $TNS_ADMIN&lt;br /&gt; 2. /etc (or /var/opt/oracle on Solaris)&lt;br /&gt; 3. $ORACLE_HOME/network/admin&lt;/span&gt;&lt;br /&gt;&lt;p&gt;The TNS_ADMIN (&lt;span style="font-family:Courier New, Courier, mono;font-size:85%;color:#556699;"&gt;$TNS_ADMIN&lt;/span&gt; in Unix/Linux and &lt;span style="font-family:Courier New, Courier, mono;font-size:85%;color:#556699;"&gt;%TNS_ADMIN%&lt;/span&gt;&lt;br /&gt; in Windows) environment variable allows you to point to any directory you wish&lt;br /&gt; the files to be located at. By default the files get installed to&lt;span style="font-family:Courier New, Courier, mono;font-size:85%;color:#556699;"&gt;&lt;br /&gt; &amp;lt;ORACLE_HOME&amp;gt;/network/admin/&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/2026515676381158946-359027969315331045?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/how-oracle-searches-for-configuration.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-3760877024398554006</guid><pubDate>Mon, 06 Jul 2009 17:09:00 +0000</pubDate><atom:updated>2009-07-13T20:08:00.208-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Extracting Oracle DDL from a SQL Command Line</title><description>&lt;span style="font-weight: bold; color: rgb(85, 102, 153);"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Need to extract DDL from a table in an Oracle database but don't have a tool to&lt;br /&gt;do so? Don't fret, you can query Oracle's Metadata API to retrieve the DDL or&lt;br /&gt;even XML on the given object. This works with oracle 9i and above.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(85, 102, 153);"&gt;Extracting the DDL from the 'DEPT' table in the 'SCOTT' schema&lt;/span&gt;&lt;br /&gt;First, you need a schema/object to extract DDL from. For this example, I ran&lt;br /&gt;the 'demo' schema creation script located here: &amp;lt;ORACLE_HOME&amp;gt;/rdbms/admin/utlsampl.sql.&lt;br /&gt;This sets up a few example schemas including the SCOTT schema. I want to now&lt;br /&gt;extract DDL for the SCOTT.DEPT table. You do this using the DBMS_METADATA.GET_DDL()&lt;br /&gt;function. The DBMS_METADATA.GET_DDL() function takes in a few parameters: Object&lt;br /&gt;Type, Name, and Schema. Here is how we extract the DDL for the SCOTT.DEPT table:&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt; set pagesize 0&lt;br /&gt;SQL&amp;gt; set long 90000&lt;br /&gt;SQL&amp;gt; SELECT dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') FROM dual;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;  ...where 'TABLE' is the type of object, 'DEPT' is the name of the object, and&lt;br /&gt;'SCOTT' is the schema that the object resides in. The above statement would&lt;br /&gt;then return this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;CREATE TABLE "SCOTT"."DEPT"&lt;br /&gt;( "DEPTNO" NUMBER(2,0),&lt;br /&gt;"DNAME" VARCHAR2(14),&lt;br /&gt;"LOC" VARCHAR2(13),&lt;br /&gt;CONSTRAINT "PK_DEPT" PRIMARY KEY ("DEPTNO")&lt;br /&gt;USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS" ENABLE&lt;br /&gt;) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS"&lt;/code&gt;&lt;/pre&gt;  If you wanted to extract the DDL for an index in the SCOTT schema you would&lt;br /&gt;then replace 'TABLE' with 'INDEX' and 'DEPT' with the name of the index.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(85, 102, 153);"&gt;Extracting DDL for an entire schema&lt;/span&gt;&lt;br /&gt;Now that we know how to extract DDL for a individual object, we'll now look&lt;br /&gt;at how to extract DDL for all the tables in the entire SCOTT schema. You can&lt;br /&gt;do this by combining the dbms_metadata.get_ddl() function with one of the Oracle&lt;br /&gt;System Views like ALL_TABLES. Here is an example of extracting all the DDL for&lt;br /&gt;the tables in the SCOTT schema:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;SQL&amp;gt; set pagesize 0&lt;br /&gt;SQL&amp;gt; set long 90000&lt;br /&gt;SQL&amp;gt; SELECT dbms_metadata.get_ddl('TABLE', table_name, 'SCOTT')&lt;br /&gt;2 FROM ALL_TABLES WHERE OWNER = 'SCOTT';&lt;br /&gt;CREATE TABLE "SCOTT"."DEPT"&lt;br /&gt;( "DEPTNO" NUMBER(2,0),&lt;br /&gt;"DNAME" VARCHAR2(14),&lt;br /&gt;"LOC" VARCHAR2(13),&lt;br /&gt;CONSTRAINT "PK_DEPT" PRIMARY KEY ("DEPTNO")&lt;br /&gt;USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS" ENABLE&lt;br /&gt;) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS"&lt;br /&gt;&lt;br /&gt;CREATE TABLE "SCOTT"."EMP"&lt;br /&gt;( "EMPNO" NUMBER(4,0),&lt;br /&gt;"ENAME" VARCHAR2(10),&lt;br /&gt;"JOB" VARCHAR2(9),&lt;br /&gt;"MGR" NUMBER(4,0),&lt;br /&gt;"HIREDATE" DATE,&lt;br /&gt;"SAL" NUMBER(7,2),&lt;br /&gt;"COMM" NUMBER(7,2),&lt;br /&gt;"DEPTNO" NUMBER(2,0),&lt;br /&gt;CONSTRAINT "PK_EMP" PRIMARY KEY ("EMPNO")&lt;br /&gt;USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS" ENABLE,&lt;br /&gt;CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO")&lt;br /&gt;REFERENCES "SCOTT"."DEPT" ("DEPTNO") ENABLE&lt;br /&gt;) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS"&lt;br /&gt;&lt;br /&gt;CREATE TABLE "SCOTT"."BONUS"&lt;br /&gt;( "ENAME" VARCHAR2(10),&lt;br /&gt;"JOB" VARCHAR2(9),&lt;br /&gt;"SAL" NUMBER,&lt;br /&gt;"COMM" NUMBER&lt;br /&gt;) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS"&lt;br /&gt;CREATE TABLE "SCOTT"."SALGRADE"&lt;br /&gt;( "GRADE" NUMBER,&lt;br /&gt;"LOSAL" NUMBER,&lt;br /&gt;"HISAL" NUMBER&lt;br /&gt;) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING&lt;br /&gt;STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645&lt;br /&gt;PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)&lt;br /&gt;TABLESPACE "USERS"&lt;/code&gt;&lt;/pre&gt;  Now you have a the DDL for all the tables in the SCOTT schema.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(85, 102, 153);"&gt;Extracting XML Metadata&lt;/span&gt;&lt;br /&gt;If you like, you can also extract XML formatted metadata from objects using&lt;br /&gt;the DBMS_METADATA.GET_XML() function. Here's an example how:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt; SELECT dbms_metadata.get_xml('TABLE','DEPT','SCOTT') FROM dual;&lt;br /&gt;&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;ROWSET&amp;gt;&amp;lt;ROW&amp;gt;&lt;br /&gt;&amp;lt;TABLE_T&amp;gt;&lt;br /&gt;&amp;lt;VERS_MAJOR&amp;gt;1&amp;lt;/VERS_MAJOR&amp;gt;&lt;br /&gt;&amp;lt;VERS_MINOR&amp;gt;0 &amp;lt;/VERS_MINOR&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;SCHEMA_OBJ&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;DATAOBJ_NUM&amp;gt;45084&amp;lt;/DATAOBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NUM&amp;gt;49&amp;lt;/OWNER_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NAME&amp;gt;SCOTT&amp;lt;/OWNER_NAME&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DEPT&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;NAMESPACE&amp;gt;1&amp;lt;/NAMESPACE&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;2&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NAME&amp;gt;TABLE&amp;lt;/TYPE_NAME&amp;gt;&lt;br /&gt;&amp;lt;CTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/CTIME&amp;gt;&lt;br /&gt;&amp;lt;MTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/MTIME&amp;gt;&lt;br /&gt;&amp;lt;STIME&amp;gt;2005-06-12:18:21:30&amp;lt;/STIME&amp;gt;&lt;br /&gt;&amp;lt;STATUS&amp;gt;1&amp;lt;/STATUS&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;0&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;6&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;1&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;/SCHEMA_OBJ&amp;gt;&lt;br /&gt;&amp;lt;STORAGE&amp;gt;&lt;br /&gt;&amp;lt;FILE_NUM&amp;gt;4&amp;lt;/FILE_NUM&amp;gt;&lt;br /&gt;&amp;lt;BLOCK_NUM&amp;gt;11&amp;lt;/BLOCK_NUM&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;5&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;TS_NUM&amp;gt;4&amp;lt;/TS_NUM&amp;gt;&lt;br /&gt;&amp;lt;BLOCKS&amp;gt;8&amp;lt;/BLOCKS&amp;gt;&lt;br /&gt;&amp;lt;EXTENTS&amp;gt;1&amp;lt;/EXTENTS&amp;gt;&lt;br /&gt;&amp;lt;INIEXTS&amp;gt;8&amp;lt;/INIEXTS&amp;gt;&lt;br /&gt;&amp;lt;MINEXTS&amp;gt;1&amp;lt;/MINEXTS&amp;gt;&lt;br /&gt;&amp;lt;MAXEXTS&amp;gt;2147483645&amp;lt;/MAXEXTS&amp;gt;&lt;br /&gt;&amp;lt;EXTSIZE&amp;gt;128&amp;lt;/EXTSIZE&amp;gt;&lt;br /&gt;&amp;lt;EXTPCT&amp;gt;0&amp;lt;/EXTPCT&amp;gt;&lt;br /&gt;&amp;lt;USER_NUM&amp;gt;49&amp;lt;/USER_NUM&amp;gt;&lt;br /&gt;&amp;lt;LISTS&amp;gt;1&amp;lt;/LISTS&amp;gt;&lt;br /&gt;&amp;lt;GROUPS&amp;gt;1&amp;lt;/GROUPS&amp;gt;&lt;br /&gt;&amp;lt;BITMAPRANGES&amp;gt;0&amp;lt;/BITMAPRANGES&amp;gt;&lt;br /&gt;&amp;lt;CACHEHINT&amp;gt;0&amp;lt;/CACHEHINT&amp;gt;&lt;br /&gt;&amp;lt;SCANHINT&amp;gt;0&amp;lt;/SCANHINT&amp;gt;&lt;br /&gt;&amp;lt;HWMINCR&amp;gt;45084&amp;lt;/HWMINCR&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;131329&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;/STORAGE&amp;gt;&lt;br /&gt;&amp;lt;TS_NAME&amp;gt;USERS&amp;lt;/TS_NAME&amp;gt;&lt;br /&gt;&amp;lt;BLOCKSIZE&amp;gt;8192&amp;lt;/BLOCKSIZE&amp;gt;&lt;br /&gt;&amp;lt;DATAOBJ_NUM&amp;gt;45084&amp;lt;/DATAOBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COLS&amp;gt;3&amp;lt;/COLS&amp;gt;&lt;br /&gt;&amp;lt;PCT_FREE&amp;gt;10&amp;lt;/PCT_FREE&amp;gt;&lt;br /&gt;&amp;lt;PCT_USED&amp;gt;40&amp;lt;/PCT_USED&amp;gt;&lt;br /&gt;&amp;lt;INITRANS&amp;gt;1&amp;lt;/INITRANS&amp;gt;&lt;br /&gt;&amp;lt;MAXTRANS&amp;gt;255&amp;lt;/MAXTRANS&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;1073741825&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;AUDIT_VAL&amp;gt;--------------------------------------&amp;lt;/AUDIT_VAL&amp;gt;&lt;br /&gt;&amp;lt;INTCOLS&amp;gt;3&amp;lt;/INTCOLS&amp;gt;&lt;br /&gt;&amp;lt;KERNELCOLS&amp;gt;3&amp;lt;/KERNELCOLS&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;536870912&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;XMLSCHEMACOLS&amp;gt;N&amp;lt;/XMLSCHEMACOLS&amp;gt;&lt;br /&gt;&amp;lt;TRIGFLAG&amp;gt;0&amp;lt;/TRIGFLAG&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;736&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE6&amp;gt;12-JUN-05&amp;lt;/SPARE6&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL_NUM&amp;gt;1&amp;lt;/COL_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;1&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;1&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;0&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DEPTNO&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;2&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;LENGTH&amp;gt;22&amp;lt;/LENGTH&amp;gt;&lt;br /&gt;&amp;lt;PRECISION_NUM&amp;gt;2&amp;lt;/PRECISION_NUM&amp;gt;&lt;br /&gt;&amp;lt;SCALE&amp;gt;0&amp;lt;/SCALE&amp;gt;&lt;br /&gt;&amp;lt;NOT_NULL&amp;gt;1&amp;lt;/NOT_NULL&amp;gt;&lt;br /&gt;&amp;lt;CHARSETID&amp;gt;0&amp;lt;/CHARSETID&amp;gt;&lt;br /&gt;&amp;lt;CHARSETFORM&amp;gt;0&amp;lt;/CHARSETFORM&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;0&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;0&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;SPARE3&amp;gt;0&amp;lt;/SPARE3&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL_NUM&amp;gt;2&amp;lt;/COL_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;2&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;2&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;0&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DNAME&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;1&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;LENGTH&amp;gt;14&amp;lt;/LENGTH&amp;gt;&lt;br /&gt;&amp;lt;NOT_NULL&amp;gt;0&amp;lt;/NOT_NULL&amp;gt;&lt;br /&gt;&amp;lt;CHARSETID&amp;gt;178&amp;lt;/CHARSETID&amp;gt;&lt;br /&gt;&amp;lt;CHARSETFORM&amp;gt;1&amp;lt;/CHARSETFORM&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;0&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;0&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;SPARE3&amp;gt;14&amp;lt;/SPARE3&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL_NUM&amp;gt;3&amp;lt;/COL_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;3&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;3&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;0&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;LOC&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;1&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;LENGTH&amp;gt;13&amp;lt;/LENGTH&amp;gt;&lt;br /&gt;&amp;lt;NOT_NULL&amp;gt;0&amp;lt;/NOT_NULL&amp;gt;&lt;br /&gt;&amp;lt;CHARSETID&amp;gt;178&amp;lt;/CHARSETID&amp;gt;&lt;br /&gt;&amp;lt;CHARSETFORM&amp;gt;1&amp;lt;/CHARSETFORM&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;0&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;0&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;SPARE3&amp;gt;13&amp;lt;/SPARE3&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;CON0_LIST/&amp;gt;&lt;br /&gt;&amp;lt;CON1_LIST&amp;gt;&lt;br /&gt;&amp;lt;CON1_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NUM&amp;gt;49&amp;lt;/OWNER_NUM&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;PK_DEPT&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;CON_NUM&amp;gt;4180&amp;lt;/CON_NUM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;536870912&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NUMCOLS&amp;gt;1&amp;lt;/NUMCOLS&amp;gt;&lt;br /&gt;&amp;lt;CONTYPE&amp;gt;2&amp;lt;/CONTYPE&amp;gt;&lt;br /&gt;&amp;lt;ENABLED&amp;gt;45085&amp;lt;/ENABLED&amp;gt;&lt;br /&gt;&amp;lt;INTCOLS&amp;gt;1&amp;lt;/INTCOLS&amp;gt;&lt;br /&gt;&amp;lt;MTIME&amp;gt;12-JUN-05&amp;lt;/MTIME&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;4&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;OID_OR_SETID&amp;gt;0&amp;lt;/OID_OR_SETID&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;CON_NUM&amp;gt;4180&amp;lt;/CON_NUM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;1&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;POS_NUM&amp;gt;1&amp;lt;/POS_NUM&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;0&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;OID_OR_SETID&amp;gt;0&amp;lt;/OID_OR_SETID&amp;gt;&lt;br /&gt;&amp;lt;COL&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL_NUM&amp;gt;1&amp;lt;/COL_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;1&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;1&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;0&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DEPTNO&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;2&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;/COL&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;IND&amp;gt;&lt;br /&gt;&amp;lt;VERS_MAJOR&amp;gt;1&amp;lt;/VERS_MAJOR&amp;gt;&lt;br /&gt;&amp;lt;VERS_MINOR&amp;gt;2 &amp;lt;/VERS_MINOR&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45085&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;SCHEMA_OBJ&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45085&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;DATAOBJ_NUM&amp;gt;45085&amp;lt;/DATAOBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NUM&amp;gt;49&amp;lt;/OWNER_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NAME&amp;gt;SCOTT&amp;lt;/OWNER_NAME&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;PK_DEPT&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;NAMESPACE&amp;gt;4&amp;lt;/NAMESPACE&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;1&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NAME&amp;gt;INDEX&amp;lt;/TYPE_NAME&amp;gt;&lt;br /&gt;&amp;lt;CTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/CTIME&amp;gt;&lt;br /&gt;&amp;lt;MTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/MTIME&amp;gt;&lt;br /&gt;&amp;lt;STIME&amp;gt;2005-06-12:18:21:30&amp;lt;/STIME&amp;gt;&lt;br /&gt;&amp;lt;STATUS&amp;gt;1&amp;lt;/STATUS&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;0&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;0&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;65535&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;/SCHEMA_OBJ&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45085&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;BO_NUM&amp;gt;45084&amp;lt;/BO_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;1&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;COL_NUM&amp;gt;1&amp;lt;/COL_NUM&amp;gt;&lt;br /&gt;&amp;lt;INTCOL_NUM&amp;gt;1&amp;lt;/INTCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;1&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;0&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DEPTNO&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;2&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;/COL&amp;gt;&lt;br /&gt;&amp;lt;POS_NUM&amp;gt;1&amp;lt;/POS_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOL_NUM&amp;gt;0&amp;lt;/SEGCOL_NUM&amp;gt;&lt;br /&gt;&amp;lt;SEGCOLLEN&amp;gt;0&amp;lt;/SEGCOLLEN&amp;gt;&lt;br /&gt;&amp;lt;OFFSET&amp;gt;0&amp;lt;/OFFSET&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;0&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;0&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;/COL_LIST&amp;gt;&lt;br /&gt;&amp;lt;TS_NAME&amp;gt;USERS&amp;lt;/TS_NAME&amp;gt;&lt;br /&gt;&amp;lt;BLOCKSIZE&amp;gt;8192&amp;lt;/BLOCKSIZE&amp;gt;&lt;br /&gt;&amp;lt;STORAGE&amp;gt;&lt;br /&gt;&amp;lt;FILE_NUM&amp;gt;4&amp;lt;/FILE_NUM&amp;gt;&lt;br /&gt;&amp;lt;BLOCK_NUM&amp;gt;19&amp;lt;/BLOCK_NUM&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;6&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;TS_NUM&amp;gt;4&amp;lt;/TS_NUM&amp;gt;&lt;br /&gt;&amp;lt;BLOCKS&amp;gt;8&amp;lt;/BLOCKS&amp;gt;&lt;br /&gt;&amp;lt;EXTENTS&amp;gt;1&amp;lt;/EXTENTS&amp;gt;&lt;br /&gt;&amp;lt;INIEXTS&amp;gt;8&amp;lt;/INIEXTS&amp;gt;&lt;br /&gt;&amp;lt;MINEXTS&amp;gt;1&amp;lt;/MINEXTS&amp;gt;&lt;br /&gt;&amp;lt;MAXEXTS&amp;gt;2147483645&amp;lt;/MAXEXTS&amp;gt;&lt;br /&gt;&amp;lt;EXTSIZE&amp;gt;128&amp;lt;/EXTSIZE&amp;gt;&lt;br /&gt;&amp;lt;EXTPCT&amp;gt;0&amp;lt;/EXTPCT&amp;gt;&lt;br /&gt;&amp;lt;USER_NUM&amp;gt;49&amp;lt;/USER_NUM&amp;gt;&lt;br /&gt;&amp;lt;LISTS&amp;gt;1&amp;lt;/LISTS&amp;gt;&lt;br /&gt;&amp;lt;GROUPS&amp;gt;1&amp;lt;/GROUPS&amp;gt;&lt;br /&gt;&amp;lt;BITMAPRANGES&amp;gt;0&amp;lt;/BITMAPRANGES&amp;gt;&lt;br /&gt;&amp;lt;CACHEHINT&amp;gt;0&amp;lt;/CACHEHINT&amp;gt;&lt;br /&gt;&amp;lt;SCANHINT&amp;gt;0&amp;lt;/SCANHINT&amp;gt;&lt;br /&gt;&amp;lt;HWMINCR&amp;gt;45085&amp;lt;/HWMINCR&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;131329&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;/STORAGE&amp;gt;&lt;br /&gt;&amp;lt;DATAOBJ_NUM&amp;gt;45085&amp;lt;/DATAOBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;BASE_OBJ_NUM&amp;gt;45084&amp;lt;/BASE_OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;BASE_OBJ&amp;gt;&lt;br /&gt;&amp;lt;OBJ_NUM&amp;gt;45084&amp;lt;/OBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;DATAOBJ_NUM&amp;gt;45084&amp;lt;/DATAOBJ_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NUM&amp;gt;49&amp;lt;/OWNER_NUM&amp;gt;&lt;br /&gt;&amp;lt;OWNER_NAME&amp;gt;SCOTT&amp;lt;/OWNER_NAME&amp;gt;&lt;br /&gt;&amp;lt;NAME&amp;gt;DEPT&amp;lt;/NAME&amp;gt;&lt;br /&gt;&amp;lt;NAMESPACE&amp;gt;1&amp;lt;/NAMESPACE&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;2&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NAME&amp;gt;TABLE&amp;lt;/TYPE_NAME&amp;gt;&lt;br /&gt;&amp;lt;CTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/CTIME&amp;gt;&lt;br /&gt;&amp;lt;MTIME&amp;gt;2005-06-12:18:21:30&amp;lt;/MTIME&amp;gt;&lt;br /&gt;&amp;lt;STIME&amp;gt;2005-06-12:18:21:30&amp;lt;/STIME&amp;gt;&lt;br /&gt;&amp;lt;STATUS&amp;gt;1&amp;lt;/STATUS&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;0&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;SPARE1&amp;gt;6&amp;lt;/SPARE1&amp;gt;&lt;br /&gt;&amp;lt;SPARE2&amp;gt;1&amp;lt;/SPARE2&amp;gt;&lt;br /&gt;&amp;lt;/BASE_OBJ&amp;gt;&lt;br /&gt;&amp;lt;INDMETHOD_NUM&amp;gt;0&amp;lt;/INDMETHOD_NUM&amp;gt;&lt;br /&gt;&amp;lt;COLS&amp;gt;1&amp;lt;/COLS&amp;gt;&lt;br /&gt;&amp;lt;PCT_FREE&amp;gt;10&amp;lt;/PCT_FREE&amp;gt;&lt;br /&gt;&amp;lt;INITRANS&amp;gt;2&amp;lt;/INITRANS&amp;gt;&lt;br /&gt;&amp;lt;MAXTRANS&amp;gt;255&amp;lt;/MAXTRANS&amp;gt;&lt;br /&gt;&amp;lt;TYPE_NUM&amp;gt;1&amp;lt;/TYPE_NUM&amp;gt;&lt;br /&gt;&amp;lt;FLAGS&amp;gt;0&amp;lt;/FLAGS&amp;gt;&lt;br /&gt;&amp;lt;PROPERTY&amp;gt;4097&amp;lt;/PROPERTY&amp;gt;&lt;br /&gt;&amp;lt;INTCOLS&amp;gt;1&amp;lt;/INTCOLS&amp;gt;&lt;br /&gt;&amp;lt;NUMCOLSDEP&amp;gt;1&amp;lt;/NUMCOLSDEP&amp;gt;&lt;br /&gt;&amp;lt;SPARE6&amp;gt;12-JUN-05&amp;lt;/SPARE6&amp;gt;&lt;br /&gt;&amp;lt;FOR_PKOID&amp;gt;0&amp;lt;/FOR_PKOID&amp;gt;&lt;br /&gt;&amp;lt;/IND&amp;gt;&lt;br /&gt;&amp;lt;/CON1_LIST_ITEM&amp;gt;&lt;br /&gt;&amp;lt;/CON1_LIST&amp;gt;&lt;br /&gt;&amp;lt;CON2_LIST/&amp;gt;&lt;br /&gt;&amp;lt;/TABLE_T&amp;gt;&lt;br /&gt;&amp;lt;/ROW&amp;gt;&amp;lt;/ROWSET&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt; You may have noticed that I'm using SQLPLUS to run this SQL and so it's&lt;br /&gt;important to set the PAGESIZE and LONG variables, otherwise the DDL returned&lt;br /&gt;may be truncated.&lt;br /&gt;And that's all you need to do to extract object DDL from a SQL command prompt.&lt;br /&gt;If you have trouble, please post your comments on this web page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-3760877024398554006?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/extracting-oracle-ddl-from-sql-command.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-955614050932358930</guid><pubDate>Sun, 05 Jul 2009 15:32:00 +0000</pubDate><atom:updated>2009-07-13T20:08:12.951-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Editing Your Oracle spfile</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;This article will describe how to modify your Oracle spfile configuration file in Oracle 9i. It assumes that you are currently running your database using your spfile and not your pfile.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating a Pfile from your Spfile&lt;/span&gt;&lt;br /&gt;First, if you want, copy your file in &lt;oracle_home&gt;/dbs/init&lt;sid&gt;.ora (where &lt;sid&gt; is your oracle instance name) which will be overwritten by this process. Then log into your oracle database as sysdba. Usually from a privileged operating system account you can do this like this:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;[oracle@mynode oracle]$ sqlplus /nolog&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; connect / as sysdba;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;Once connected, it's time to create a pfile, which you can edit with a text editor, from your current spfile. You can do this like this:&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE pfile FROM spfile;&lt;br /&gt;&lt;br /&gt;File created.&lt;br /&gt;&lt;br /&gt;SQL&gt; quit;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Modifying Your Pfile&lt;/span&gt;&lt;br /&gt;This created a pfile called init&lt;sid&gt;.ora in &lt;oracle_home&gt;/dbs/, which in my case was called initORCL.ora. Now you can edit your init&lt;sid&gt;.ora file with a plain text editor like VI or Notepad. Once you're done editing the pfile, it's recommended that you start the database with the pfile to make sure it works and that the syntax is correct before making a spfile from it:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;[oracle@mynode oracle]$ sqlplus /nolog&lt;br /&gt;&lt;br /&gt;SQL&gt; connect / as sysdba;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; startup pfile=initORCL.ora;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  404194808 bytes&lt;br /&gt;Fixed Size                   742904 bytes&lt;br /&gt;Variable Size             201326592 bytes&lt;br /&gt;Database Buffers          201326592 bytes&lt;br /&gt;Redo Buffers                 798720 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;&lt;br /&gt;SQL&gt; shutdown immediate;&lt;br /&gt;Database closed.&lt;br /&gt;Database dismounted.&lt;br /&gt;ORACLE instance shut down.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-weight: bold;"&gt;Creating Your New Spfile&lt;/span&gt;&lt;br /&gt;If all went well, then your database started up with the pfile. Next, we want to create the spfile from the pfile. Leaving your sqlplus session open you can create the new spfile, shutdown the database, and then bring it back up without the pfile parameter so that it uses the spfile like so:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; connect / as sysdba;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; CREATE spfile FROM pfile;&lt;br /&gt;&lt;br /&gt;File created.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; startup;&lt;br /&gt;ORACLE instance started.&lt;br /&gt;&lt;br /&gt;Total System Global Area  404194808 bytes&lt;br /&gt;Fixed Size                   742904 bytes&lt;br /&gt;Variable Size             201326592 bytes&lt;br /&gt;Database Buffers          201326592 bytes&lt;br /&gt;Redo Buffers                 798720 bytes&lt;br /&gt;Database mounted.&lt;br /&gt;Database opened.&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Your oracle instance should now be running with your new spfile. Check out your database to make sure that the changes you made took effect.&lt;br /&gt;&lt;br /&gt;As always, if you have trouble, please post your comments on this web page.&lt;/sid&gt;&lt;/oracle_home&gt;&lt;/sid&gt;&lt;/sid&gt;&lt;/sid&gt;&lt;/oracle_home&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-955614050932358930?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/editing-your-oracle-spfile.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-240389213584399792</guid><pubDate>Sat, 04 Jul 2009 15:10:00 +0000</pubDate><atom:updated>2009-07-13T20:08:26.269-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Dropping Your Default Oracle Temporary Tablespace</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Dropping your default oracle temporary tablespace can be tricky. You cannot simply issue a drop tablespace command because oracle does not allow it. This article will cover the steps needed to drop and recreate your default temporary tablespace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How To Drop Your Default Temporary Tablespace&lt;/span&gt;&lt;br /&gt;If you've tried dropping your default temporary tablespace by just issuing a DROP TABLESPACE command you've probably noticed that Oracle won't let you.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; DROP TABLESPACE temp;&lt;br /&gt;DROP TABLESPACE temp&lt;br /&gt;*&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-12906: cannot drop default temporary tablespace&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Because this is the default temporary tablespace Oracle won't let you drop it. Here are the steps needed to drop your default temporary tablespace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1) Create a New Temporary Tablespace&lt;/span&gt;&lt;br /&gt;First, you will need to create a new temporary tablespace...in this example I've called the tablespace "TEMPX". Note that I purposefully made the tablespace small in size (10mb). This is because we will drop this tablespace at the end of this process.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; CREATE TEMPORARY TABLESPACE TEMPX&lt;br /&gt;  2 TEMPFILE '/data/tempx.dbf' SIZE 10M AUTOEXTEND OFF&lt;br /&gt;  3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1024K&lt;br /&gt;  4 SEGMENT SPACE MANAGEMENT MANUAL&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Tablespace created.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2) Make Your New Temporary Tablespace the Default Temporary Tablespace&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tempx;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3) Drop Your Original Temporary Tablespace&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; DROP TABLESPACE temp INCLUDING CONTENTS AND DATAFILES;&lt;br /&gt;&lt;br /&gt;Tablespace dropped.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4) Recreate Your 'TEMP' Tablespace&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; CREATE TEMPORARY TABLESPACE TEMP&lt;br /&gt;  2 TEMPFILE '/data/temp.dbf' SIZE 1000M AUTOEXTEND OFF&lt;br /&gt;  3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1024K&lt;br /&gt;  4 SEGMENT SPACE MANAGEMENT MANUAL&lt;br /&gt;/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5) Make Your 'TEMP' Tablespace the Default Temporary Tablespace Again&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp;&lt;br /&gt;&lt;br /&gt;Database altered.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6) Drop Your 'TEMPX' Tablespace Now That It Is Not Needed&lt;/span&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; DROP TABLESPACE tempx INCLUDING CONTENTS AND DATAFILES;&lt;br /&gt;&lt;br /&gt;Tablespace dropped.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;And that is all that is needed to recreate your default temporary tablespace. It would be nice if Oracle supplied a command to do this for us, but if you want to go really crazy I'm sure you could script up your own procedure to perform the same functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-240389213584399792?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/dropping-your-default-oracle-temporary.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-5445917454093307946</guid><pubDate>Fri, 03 Jul 2009 15:04:00 +0000</pubDate><atom:updated>2009-07-13T20:08:39.870-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>JNDI</category><category domain='http://www.blogger.com/atom/ns#'>Java</category><category domain='http://www.blogger.com/atom/ns#'>Active Directory</category><title>Connecting to LDAP/Active Directory using JNDI (Java)</title><description>LDAP (Lightweight Directory Access Protocol) has become a standard in most companies for storing hierarchical data. Some of the more common uses are storing employee and customer data. It is very similar to a database (in fact most LDAP implementations tend to have an underlying database in which the data is stored) with the main difference being that the data is in a hierarchy (think folders within folders). Java provides an API for communicating with directories like LDAP called JNDI (Java Naming and Directory Interface). Here is a basic example on how to search for a few common attributes using JNDI:&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(251, 249, 228); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;import java.util.Hashtable;&lt;br /&gt;&lt;br /&gt;import javax.naming.Context;&lt;br /&gt;&lt;br /&gt;import javax.naming.NamingEnumeration;&lt;br /&gt;&lt;br /&gt;import javax.naming.NamingException;&lt;br /&gt;&lt;br /&gt;import javax.naming.directory.Attributes;&lt;br /&gt;&lt;br /&gt;import javax.naming.directory.DirContext;&lt;br /&gt;&lt;br /&gt;import javax.naming.directory.SearchControls;&lt;br /&gt;&lt;br /&gt;import javax.naming.directory.SearchResult;&lt;br /&gt;&lt;br /&gt;import javax.naming.ldap.InitialLdapContext;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class DirectorySearch {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public static void main(String[] args) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // Define object to hold environmental properties&lt;br /&gt;&lt;br /&gt; Hashtable&lt;string, string=""&gt; env = new Hashtable&lt;string, string=""&gt;();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // My username, password, and URL for LDAP&lt;br /&gt;&lt;br /&gt; String username = "uid=myusername,ou=Users,o=MyCompany";&lt;br /&gt;&lt;br /&gt; String password = "myPassword";&lt;br /&gt;&lt;br /&gt; String url = "ldap://localhost:389";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // Define connection properties.&lt;br /&gt;&lt;br /&gt; env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");&lt;br /&gt;&lt;br /&gt; env.put(Context.SECURITY_AUTHENTICATION, "simple");&lt;br /&gt;&lt;br /&gt; env.put(Context.SECURITY_PRINCIPAL, username);&lt;br /&gt;&lt;br /&gt; env.put(Context.SECURITY_CREDENTIALS, password);&lt;br /&gt;&lt;br /&gt; env.put(Context.PROVIDER_URL, url);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; try {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Establish the directory context&lt;br /&gt;&lt;br /&gt;  DirContext ctx = new InitialLdapContext(env, null);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Create a SearchControls object to do some filtering.&lt;br /&gt;&lt;br /&gt;  // Define what attributes I want to get back from LDAP&lt;br /&gt;&lt;br /&gt;  SearchControls searchCtls = new SearchControls();&lt;br /&gt;&lt;br /&gt;  String returnedAtts[] = { "sn", "givenName", "mail" };&lt;br /&gt;&lt;br /&gt;  searchCtls.setReturningAttributes(returnedAtts);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Specify the scope of my search (one level down,&lt;br /&gt;&lt;br /&gt;  // recursive subtree, etc.)&lt;br /&gt;&lt;br /&gt;  searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // My ldap search filter...what am I looking for?&lt;br /&gt;&lt;br /&gt;  String searchFilter = "(uid=someUserID)";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Where to start my search&lt;br /&gt;&lt;br /&gt;  String searchBase = "ou=Users,o=MyCompany";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Actually perform the search telling JNDI where to start&lt;br /&gt;&lt;br /&gt;  // the search, what to search for, what how to filter.&lt;br /&gt;&lt;br /&gt;  NamingEnumeration&lt;searchresult&gt; results = ctx.search(searchBase, searchFilter, searchCtls);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Loop through the search results&lt;br /&gt;&lt;br /&gt;  while (results.hasMoreElements()) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   SearchResult searchResult = (SearchResult) results.next();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   System.out.println("FOUND OBJECT : " + searchResult.getName());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   // Get a collection of the attributes that were returned&lt;br /&gt;&lt;br /&gt;   // from the SearchResult.&lt;br /&gt;&lt;br /&gt;   Attributes attrs = searchResult.getAttributes();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   if (attrs != null) {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    System.out.println("--&gt; LASTNAME :  " + attrs.get("sn").get());&lt;br /&gt;&lt;br /&gt;    System.out.println("--&gt; FIRSTNAME:  " + attrs.get("givenName").get());&lt;br /&gt;&lt;br /&gt;    System.out.println("--&gt; EMAIL    :  " + attrs.get("mail").get());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  ctx.close();&lt;br /&gt;&lt;br /&gt; } catch (NamingException e) {&lt;br /&gt;&lt;br /&gt;  e.printStackTrace();&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/searchresult&gt;&lt;/string,&gt;&lt;/string,&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-5445917454093307946?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2009/07/connecting-to-ldapactive-directory.html</link><author>noreply@blogger.com (Troy Campano)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-6764825184843270135</guid><pubDate>Tue, 13 Feb 2007 01:55:00 +0000</pubDate><atom:updated>2009-07-13T07:56:02.732-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle</category><title>Using SQLPLUS, Import, and Export Without a Password</title><description>&lt;span style="font-weight: bold;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;Storing passwords in plain text in your shell scripts can be a bad practice. If you need to run an export or import from a script and do not want to store your password in the script, you can perform the import/export as SYSDBA. As long as you're in the dba/oradba group and can log into Oracle as SYSDBA without a password you can perform your imports and exports without a password as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using SQLPLUS Without a Password&lt;/span&gt;&lt;br /&gt;If your UNIX / Windows account is part of the the 'dba' or 'oradba' operating system groups, you can log into SQLPLUS without a password as sysdba.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #fbf9e4;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;[troy@myserver home]$ sqlplus "/ as sysdba"&lt;br /&gt;&lt;br /&gt;SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 10 09:40:28 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to:&lt;br /&gt;Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production&lt;br /&gt;With the Partitioning, OLAP and Data Mining options&lt;br /&gt;&lt;br /&gt;SQL&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Using Import and Export (imp / exp) Without a Password&lt;/span&gt;&lt;br /&gt;The same technique can also be applied to performing imports and exports without a password.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #fbf9e4;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;[troy@myserver home]$ exp \'/ as sysdba\' file=emp.dmp OWNER=scott&lt;br /&gt;&lt;br /&gt;Export: Release 9.2.0.4.0 - Production on Tue Jan 10 08:27:49 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.&lt;br /&gt;&lt;br /&gt;Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Oracle Data Mining options&lt;br /&gt;JServer Release 9.2.0.4.0 - Production&lt;br /&gt;Export done in US7ASCII character set and AL16UTF16 NCHAR character set&lt;br /&gt;server uses UTF8 character set (possible charset conversion)&lt;br /&gt;&lt;br /&gt;About to export specified users ...&lt;br /&gt;. exporting pre-schema procedural objects and actions&lt;br /&gt;. exporting foreign function library names for user SCOTT&lt;br /&gt;. exporting PUBLIC type synonyms&lt;br /&gt;. exporting private type synonyms&lt;br /&gt;. exporting object type definitions for user SCOTT&lt;br /&gt;About to export SCOTT's objects ...&lt;br /&gt;. exporting database links&lt;br /&gt;. exporting sequence numbers&lt;br /&gt;. exporting cluster definitions&lt;br /&gt;. about to export SCOTT's tables via Conventional Path ...&lt;br /&gt;. . exporting table                          BONUS          0 rows exported&lt;br /&gt;. . exporting table                           DEPT          4 rows exported&lt;br /&gt;. . exporting table                            EMP         15 rows exported&lt;br /&gt;. . exporting table                      EMP_AUDIT          1 rows exported&lt;br /&gt;. . exporting table                       SALGRADE          5 rows exported&lt;br /&gt;. exporting synonyms&lt;br /&gt;. exporting views&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;...and the same is of course true for doing imports:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #fbf9e4;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;[troy@myserver home]$ imp \'/ as sysdba\' file=emp.dmp FROMUSER=scott TOUSER=scott&lt;br /&gt;&lt;br /&gt;Import: Release 9.2.0.4.0 - Production on Tue Jan 10 08:29:17 2006&lt;br /&gt;&lt;br /&gt;Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production&lt;br /&gt;With the Partitioning, OLAP and Oracle Data Mining options&lt;br /&gt;JServer Release 9.2.0.4.0 - Production&lt;br /&gt;&lt;br /&gt;Export file created by EXPORT:V09.02.00 via conventional path&lt;br /&gt;import done in US7ASCII character set and AL16UTF16 NCHAR character set&lt;br /&gt;import server uses UTF8 character set (possible charset conversion)&lt;br /&gt;. importing SCOTT's objects into SCOTT&lt;br /&gt;. . importing table                        "BONUS"          0 rows imported&lt;br /&gt;. . importing table                         "DEPT"          4 rows imported&lt;br /&gt;. . importing table                          "EMP"         15 rows imported&lt;br /&gt;. . importing table                    "EMP_AUDIT"          1 rows imported&lt;br /&gt;. . importing table                     "SALGRADE"          5 rows imported&lt;br /&gt;About to enable constraints...&lt;br /&gt;Import terminated successfully without warnings.&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;As you can see, using these examples in scripts can be very useful because you can avoid any type of password management since you're logging in as SYSDBA without a password.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-6764825184843270135?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2007/02/test-blog-title.html</link><author>troygeek@gmail.com (TroyGeek)</author><thr:total>15</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-2026515676381158946.post-4417410234995956141</guid><pubDate>Thu, 25 May 2006 18:48:00 +0000</pubDate><atom:updated>2009-07-13T16:00:21.627-05:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>General</category><title>My Article in SysAdmin Magazine!</title><description>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_94zmSpuRfao/SluCICpXpRI/AAAAAAAACTE/_hmRzVQlEg0/s1600-h/sysadmin.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 150px; height: 200px;" src="http://1.bp.blogspot.com/_94zmSpuRfao/SluCICpXpRI/AAAAAAAACTE/_hmRzVQlEg0/s320/sysadmin.jpg" alt="" id="BLOGGER_PHOTO_ID_5358019256348288274" border="0" /&gt;&lt;/a&gt;&lt;span class="normaltext"&gt;I have an article coming up in SysAdmin magazine that focuses on using Oracle Statspack to monitor and report on Oracle database performance.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.samag.com/articles/2006/0607/" target="_blank" class="normaltext"&gt;click here for more information&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2026515676381158946-4417410234995956141?l=www.troygeek.com' alt='' /&gt;&lt;/div&gt;</description><link>http://www.troygeek.com/2006/05/my-article-in-sysadmin-magazine.html</link><author>noreply@blogger.com (Troy Campano)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_94zmSpuRfao/SluCICpXpRI/AAAAAAAACTE/_hmRzVQlEg0/s72-c/sysadmin.jpg' height='72' width='72'/><thr:total>0</thr:total></item></channel></rss>