<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ask the German &#187; Operating System</title>
	<atom:link href="http://www.askthegerman.com/archives/category/operatingsystem/feed" rel="self" type="application/rss+xml" />
	<link>http://www.askthegerman.com</link>
	<description>"the owl of Minerva spreads its wings only with the falling of the dusk"</description>
	<lastBuildDate>Thu, 30 Apr 2009 10:26:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Monitor your Tomcat Servlet on a regular basis</title>
		<link>http://www.askthegerman.com/archives/274</link>
		<comments>http://www.askthegerman.com/archives/274#comments</comments>
		<pubDate>Thu, 30 Apr 2009 08:30:55 +0000</pubDate>
		<dc:creator>Volker</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TomCat]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=274</guid>
		<description><![CDATA[Lets assume you have enabled the monitoring capabilities of your tomcat. If you do not know how to achieve this see my earlier posting here about. Now it is cool to monitor your application on a regular basis. Because I&#8217;m used to shell scripting in LINUX I present you here a scripting solution within a [...]]]></description>
			<content:encoded><![CDATA[<p>Lets assume you have enabled the monitoring capabilities of your tomcat.<br />                   If you do not know how to achieve this see my earlier <a href="/archives/252" title="Enabling tomcat monitoring capabilities">posting</a> here about.</p>
<p>Now it is cool to monitor your application on a regular basis. <br />                   Because I&#8217;m used to shell scripting in LINUX I present you here a scripting solution within a bash shell. But I&#8217;m sure you can do the same in Windows. <br />                   The idea is to set up a cron job ( for windows use the scheduler) and get the statuspage from your tomcat every &#8211; lets say &#8211; five minutes.<br />                   Get some of the interesting values out of this page and save them in a csv &#8211; File.<br />                   Create a new file every day. Perhaps you want to use this files as input for a spreadsheet program to create some nice charts.</p>
<p>But to be honest &#8211; this is a very special script &#8211; you have to adopt it to your needs.<br />                   This are the basic prerequisites:</p>
<ul>
<li>you need linux to run it (this script is developed on a SUSE &#8211; Distribution)</li>
<li>eventually you need to install some tools (I think the w3m tool is not bundled with every linux distribution)</li>
<li>this script only! works correct with a tomcat 6.0 version</li>
</ul>
<p><font face="Courier" size="1"><span style="color: #006600">#!/bin/bash<br />                   # -configure below-</span><br />                   HTTPPORT=&quot;8080&quot; &nbsp;&nbsp; <span style="color: #0066ff"># The http Port of your tomcat</span><br />                   JKPORT=&quot;8709&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0066ff"># The Modjk Port of your tomcat (if your tomcat should be reachable from a apache webserver)</span><br />                   SERVER=&quot;localhost:$HTTPPORT&quot; <span style="color: #0066ff"># you can even monitor a tomcat on another server!</span><br />                   USER=&quot;tomcat-oper&quot; <span style="color: #0066ff"># the account and</span><br />                   PW=&quot;IwantItAll&quot;&nbsp;&nbsp;&nbsp; <span style="color: #0066ff"># password you have defined in tomcat-users.xml</span><br />                   APPL=&quot;CoolAppl&quot; &nbsp;&nbsp; <span style="color: #0066ff"># The name of your application</span><br />     <span style="color: #006600"># -configure above-</span><br />                   TODAY=`date &#8216;+%m-%d-%y&#8217;`<br />                   TIME=`date &#8216;+%H:%M:%S&#8217;`<br />                   OUTFILE=&quot;tomcat-stats-${TODAY}.csv&quot;<br />     <span style="color: #006600">#</span><br />     <span style="color: #006600">#set -x</span>&nbsp;&nbsp; <span style="color: #0066ff"># uncomment if you want to improve the script or if you are searching for a bug</span><br />     <span style="color: #006600">#</span><br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># If there is no csv-file create one and put a headerline in</span><br />                   if !(test -e $OUTFILE) then<br />          &nbsp; echo &quot;Time,FreeMemory,UsedMemory,MaxMemory,HttpThreadsMax,<br />      &nbsp; HttpThreadsBusy,ModJKThreads,ModJKThreadsBusy,Sessions&quot; &gt; $OUTFILE<br />                   fi<br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># get the statuspage from tomcat &#8211; filter it for the wanted informations &#8211; and create a temporary file</span><br />                   &nbsp;  w3m -dump http://${USER}:${PW}@${SERVER}/manager/status/all| \<br />                   &nbsp;  egrep &quot;(memory|thread|Active sessions|<br />        &nbsp; ^JVM|$HTTPPORT|$JKPORT|${APPL})&quot; &gt;/tmp/tomcat-status<br />     <span style="color: #006600">#<br />                   #</span> <span style="color: #0066ff"># put the values in variables / uncomment to get a better understanding of the process</span><br />     <span style="color: #006600">#</span><br />                   while read line<br />                   &nbsp;&nbsp;    do<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      case $line in<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           JVM)   read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  JVM_VALUE=`echo $line | awk &#8216;{print($3 &quot;,&quot; $7 &quot;,&quot; $11)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug</span></font><font face="Courier" size="1"><span style="color: #006600"><br />            #&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;JVM_VALUE: &lt;$JVM_VALUE&gt;&quot;</span><span style="color: #0066ff"></span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            *${HTTPPORT}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HTTP_MAX_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #006600"></span> <span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;HTTP_MAX_THREADS: &lt;$HTTP_MAX_THREADS&gt;&quot;</span><span style="color: #0066ff"></span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  HTTP_BSY_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $11)}&#8217;`<br />     <span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug</span><br />     <span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                echo &quot;HTTP_BSY_THREADS: &lt;$HTTP_BSY_THREADS&gt;&quot;</span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           *${JKPORT}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  MODJK_MAX_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; echo &quot;MODJK_MAX_THREADS: &lt;$MODJK_MAX_THREADS&gt;&quot;</span><br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  MODJK_BSY_THREADS=`echo $line |awk &#8216;{print(&quot;,&quot; $11)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment </span></font><font face="Courier" size="1"><span style="color: #0066ff">below </span></font><font face="Courier" size="1"><span style="color: #0066ff">if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                echo &quot;MODJK_BSY_THREADS: &lt;$MODJK_BSY_THREADS&gt;&quot;</span><span style="color: #0066ff"></span><br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;           *${APPL}) read line<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                  SESSION_CNT=`echo $line |awk &#8216;{print(&quot;,&quot; $3)}&#8217;`<br />     <span style="color: #006600"></span></font><font face="Courier" size="1"><span style="color: #0066ff">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uncomment below if you want to debug<br />     </span></font><font face="Courier" size="1"><span style="color: #006600"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;               echo &quot;SESSION_CNT: &lt;$SESSION_CNT&gt;&quot;</span><span style="color: #0066ff"></span><br />            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                         ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *) ;;<br />                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;      esac<br />                   &nbsp;&nbsp;&nbsp;    done &lt; /tmp/tomcat-status<br />     <span style="color: #006600">#</span> <span style="color: #0066ff"># Now is the time to write the data to the csv-file</span><br />           &nbsp; echo &quot;${TIME},${JVM_VALUE}${HTTP_MAX_THREADS}${HTTP_BSY_THREADS}<br />      &nbsp; ${MODJK_MAX_THREADS}${MODJK_BSY_THREADS}${SESSION_CNT}&quot; &gt;&gt;$OUTFILE<br />                   exit</font></p>
<p><em>*) be aware that based on word wrapping this script might not work instantly</em> </p>
<p>Create a scriptfile (e.g. tomcat-check.sh) and apply the script to your tomcat. Then edit your crontab.                </p>
<p>There should be a line like:<br />     <strong>&quot;*/5 * * * * cd ~/statistics; ./tomcat-check.sh  1&gt;tomcat-check.log 2&gt;&amp;1&quot;</strong></p>
<p>And then the script should create the csv-files. I&#8217;m not used to excel &#8211; but even I managed to create a more or less interesting diagram from this data. Note how regular the memory behaves while there is no user session.</p>
<p><img alt="Tomcat Monitoring Graphic" title="Tomcat Monitoring Graphic" src="/wp-content/uploads/tomcat/tomcat-graphic-small.jpg" />&nbsp;</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F274';
  addthis_title  = 'Monitor+your+Tomcat+Servlet+on+a+regular+basis';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/274/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Password Protect Webfolders</title>
		<link>http://www.askthegerman.com/archives/227</link>
		<comments>http://www.askthegerman.com/archives/227#comments</comments>
		<pubDate>Sun, 14 Dec 2008 11:55:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[.htpasswd]]></category>
		<category><![CDATA[htpasswd2]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[protect]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[webfolder]]></category>
		<category><![CDATA[webroot]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=227</guid>
		<description><![CDATA[Sometimes we have to place content on our webserver we want to protect and only accessed by privileged users. A basic security can be established by a password restricted folder access, enforced by the Apache Webserver itself. This can be done by some simple instructions added to our .htaccess file: (In case you haven&#8217;t already [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes we have to place content on our webserver we want to protect and only accessed by privileged users.</p>
<p>A basic security can be established by a password restricted folder access, enforced by the Apache Webserver itself.</p>
<p>This can be done by some simple instructions added to our .htaccess file:<br />     (In case you haven&#8217;t already a .htaccess file, just create a new file calling it .htaccess and locating it in the folder you want to protect.) </p>
<p><em>AuthType Basic<br />     AuthName &quot;Protected Area&quot;<br />     AuthUserFile FILE<br />     require valid-user</em></p>
<p>These commands will tell the Apache webserver that the folder in question (and all below) are now protected and it needs a valid combination of username/password to access it.</p>
<ul>
<li><em>AuthName</em> is some free form text you can specify, telling the visitor what you are asking for and Apache Webserver will show in it&#8217;s dialog box.</li>
</ul>
<ul>
<li><em>AuthUserFile</em> is the reference to the stored .htpasswd file containing all valid username/password combinations to access the folder in question (ususally and best located out of the protected directory tree).</li>
</ul>
<p>Having that done we now need to create the necessary .htpasswd file which we can do interactive on our server with the command:</p>
<p><em>htpasswd2 -c FILE USER</em></p>
<p>Assuming html is your webroot, a valid example, for protecting a folder called images below our webroot and using demouser/demopassword as user credentials, would be:</p>
<p><strong>.htaccess:</strong><br />     (Locate this file within the folder images and be aware to use an absolute path for <em>AuthUserFile, </em>as for <em>www.domain.com</em> would be wrong!)</p>
<p><em>AuthUserFile /home/username/html/.htpasswd<br />     AuthType Basic<br />     AuthName &quot;Login for Secure Area&quot;<br />     require valid-user</em> </p>
<p><strong>.htpasswd</strong><br />     (Create a new file called .htpasswd and locate this file within the folder you&#8217;ve specified within <em>AuthUserFile </em>path<em>.</em>)</p>
<p><em>demouser:$1$OHq3K5v3$pvFrGsHjWwYjpkZhc70T9. </em> </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F227';
  addthis_title  = 'Password+Protect+Webfolders';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/227/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transportable Tablespaces</title>
		<link>http://www.askthegerman.com/archives/210</link>
		<comments>http://www.askthegerman.com/archives/210#comments</comments>
		<pubDate>Wed, 10 Dec 2008 12:34:28 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[converting]]></category>
		<category><![CDATA[endianness Big]]></category>
		<category><![CDATA[endianness Little]]></category>
		<category><![CDATA[exp]]></category>
		<category><![CDATA[imp]]></category>
		<category><![CDATA[plattform]]></category>
		<category><![CDATA[RMAN]]></category>
		<category><![CDATA[transportable Tablespaces]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=210</guid>
		<description><![CDATA[Since Oracle Version 10G ist is possible to transfer tablespaces no longer only between platforms of the same architecture. Now in 10G it also possible to transport from any platform to any platform, provided the platforms belong to the list below: SQL&#62;&#160; select * from v$transportable_platform; &#160;&#160; PLATFORM_ID PLATFORM_NAME&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ENDIAN_FORMAT &#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 1 Solaris[tm] OE [...]]]></description>
			<content:encoded><![CDATA[<p>Since Oracle Version 10G ist is possible to transfer tablespaces no longer only between platforms of the same architecture. Now in 10G it also possible to transport from any platform to any platform, provided the platforms belong to the list below:</p>
<p><em><font face="Courier">SQL&gt;&nbsp; select * from v$transportable_platform;</font></em></p>
<p><em><font face="Courier">&nbsp;&nbsp; PLATFORM_ID PLATFORM_NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDIAN_FORMAT<br />        &nbsp;&nbsp; <br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 Solaris[tm] OE (32-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2 Solaris[tm] OE (64-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7 Microsoft Windows NT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10 Linux IA (32-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 6 AIX-Based Systems (64-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 HP-UX (64-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5 HP Tru64 UNIX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4 HP-UX IA (64-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11 Linux IA (64-bit)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15 HP Open VMS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 8 Microsoft Windows IA (64-bit)&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 9 IBM zSeries Based Linux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13 Linux 64-bit for AMD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Little<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 16 Apple Mac OS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Big<br />        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 12 Microsoft Windows 64-bit for AMD Little</font></em> </p>
<p><strong><span>But be aware that depending on which plattforms we deal with there might be some converting necessary or not<font face="courier">!</font></span></strong></p>
<p>To help you with that, I have carried together the little cook book about &quot;How to do&quot; below:</p>
<p><u>1. Set the tablespace to READ ONLY</u></p>
<p><em>SQL&gt; alter tablespace USERS read only;<br />       Tablespace altered.</em>&nbsp;</p>
<p>2. Export metadata</p>
<p><em>exp userid=\&#8217;/ as sysdba\&#8217; transport_tablespace=y<br />       tablespaces=users<br />       file=users_tts.dmp log=exp_users_tts.log<br />       statistics=none</em></p>
<p><u>3. Converting tablespace if necessary</u> </p>
<p>Depending on we have to convert the file between <strong>endianness Little</strong> and <strong>endianness Big</strong> (forward or backward) we can do that with RMAN:</p>
<p><em>rman target=/</em></p>
<p><em>Recovery Manager: Release 10.2.0.3.0 &#8211; Production on Wed Dec 10 13:10:57 2008<br />       connected to target database: orav10 (DBID=1953618181)</em></p>
<p><em>RMAN&gt; convert tablespace &#8216;USERS&#8217;<br />       2&gt;&nbsp; to platform=&quot;Linux IA (32-bit)&quot;<br />       3&gt;&nbsp; db_file_name_convert=&#8217;/database/orav10/datafiles/users.dbf&#8217;,<br />       4&gt;&nbsp; &#8216;/tmp/users.dbf&#8217;;</em></p>
<p><u>4. Move datafiles and export dump file</u></p>
<p><em>$ftp users_tts.dmp</em> </p>
<p>and <em>/database/orav10/datafiles/users.dbf</em> (no conversion)<br />   or <em>/tmp/users.dbf</em> (converted file if conversion had been required)</p>
<p><u>5. Import metadata</u> </p>
<p><em>imp userid=\&#8217;/ as sysdba\&#8217; TRANSPORT_TABLESPACE=Y <br />       datafiles=</em><em>/database/orav10/datafiles/users.dbf<br />       (or </em><em>/tmp/users.dbf )<br />       file=users_tts.dmp log=imp_users_tts.log</em> </p>
<p><u>6. Set the tablespace to READ WRITE</u></p>
<p><em>SQL&gt; alter tablespace USERS read write;<br />       Tablespace altered.</em>  </p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F210';
  addthis_title  = 'Transportable+Tablespaces';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/210/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changed File-Permissions in Oracle 10g Release 2 (10.2.0.2)</title>
		<link>http://www.askthegerman.com/archives/181</link>
		<comments>http://www.askthegerman.com/archives/181#comments</comments>
		<pubDate>Wed, 26 Nov 2008 09:01:44 +0000</pubDate>
		<dc:creator>Ralf</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[Message file not found]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[SP2-0750]]></category>
		<category><![CDATA[SQLPLUS]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=181</guid>
		<description><![CDATA[When you want to use SQL*Plus or exp/imp on the same server on which you have installed your database you might get errors like these: sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory or Error 6 initializing SQL*Plus Message file sp1us.msb not found SP2-0750: You may [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to use SQL*Plus or exp/imp on the same server on which you have installed your database you might get errors like these:</p>
<p><font face="Courier">sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory</font></p>
<p>or</p>
<p><font face="Courier">Error 6 initializing SQL*Plus<br />  Message file sp1us.msb not found<br />  SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory</font></p>
<p><font face="Courier">Syntax:<br />  $ sqlplus username/password</font></p>
<p>You get this error only when you execute &#8216;sqlplus&#8217; as a user outside of the dba or Oracle group, because in Oracle Database 10g Release 2 the Oracle Home was locked down by setting umask to 007 prior to installation, so that the files that sqlplus needs to execute do not have read/execute permissions for group &quot;others&quot; and some directories under $ORACLE_HOME have no world read nor execute permission (rwxr-x&#8212;)</p>
<p>Warning , don&#8217;t use the following command to lower the permissions, this may corrupt your Oracle-Installation:<br />  <font face="Courier">chmod -R 755 $ORACLE_HOME/</font></p>
<p>The better way is to use an script which is provided by oracle:<br />  <font face="Courier">$ORACLE_HOME/install/changePerm.sh</font></p>
<p>This script will relax the permissions on most files and directories in your Oracle Home, and allow &quot;others&quot; to execute them.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F181';
  addthis_title  = 'Changed+File-Permissions+in+Oracle+10g+Release+2+%2810.2.0.2%29';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/181/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Administration Tools</title>
		<link>http://www.askthegerman.com/archives/163</link>
		<comments>http://www.askthegerman.com/archives/163#comments</comments>
		<pubDate>Sun, 23 Nov 2008 14:13:51 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Backup]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[CocoaMySQL]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[MyDB Studio]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[phpMyBackupPro]]></category>
		<category><![CDATA[relational]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.askthegerman.com/?p=163</guid>
		<description><![CDATA[Being forced to work with MySQL Databases, not every Web Developer is familiar with databases in general. Now the good news is that when working in a LAMP (Linux, Apache, MySQL and PHP) environment you do not really need to have deep knowledge about relational databases to succeed. Most tools like CMS do a full [...]]]></description>
			<content:encoded><![CDATA[<p>Being forced to work with <a href="http://www.mysql.com/" title="MySQL, a famous relational database engine" target="_blank">MySQL Databases</a>, not every Web Developer is familiar with databases in general.</p>
<p> Now the good news is that when working in a <a href="http://en.wikipedia.org/wiki/LAMP" title="A synonym for a Linux, Apache, MySQL and PHP environment" target="_blank">LAMP</a> (Linux, Apache, MySQL and PHP) environment you do not really need to have deep knowledge about relational databases to succeed.</p>
<p> Most tools like <a href="http://en.wikipedia.org/wiki/Content_Management_System" title="Synonym for Content Management System" target="_blank">CMS</a> do a full automated setup for you and the only knowledge it needs to have starting with them, is the server and database name and finally the login credentials (username/password) to access it.</p>
<p> Just later on the one or other maintenance work will occur and you will feel the need of having some nice and neat database interface to work with. Knowing about this need today I will recommend you a few tools and you should feel free to choose one or each of them based on your platform and taste.</p>
<p>The first tool I will recommend you is called <a href="http://www.phpmyadmin.net/home_page/index.php" title="Browser base Admin tool for MySQL" target="_blank">phpMyAdmin</a>. It is written in <a href="http://www.php.net" title="Hypertext PreProcessor" target="_blank">PHP</a> and as a so called browser tool it works platform independent and flawless in all common browsers. Very often being offered by hosting providers it is mostly already part of your hosting package and easy to access and use. Coming along with all necessary options like browsing and navigating through your databases, it also offers a SQL interface and the often necessary export/import options. Personally it is my favorite tool to work with.</p>
<p>Once you are familiar with phpMyAdmin, <a href="http://www.phpmybackuppro.net/" title="Browser based Export/Import tool for MySQL" target="_blank">phpMyBackupPro</a> is another very similar tool you might find it worth to look at. Also browser based it is mainly written for interactive exports and imports, but can get also use for scheduled automatic backups.</p>
<p> For Windows platform only I would like to recommend you a tool called <a href="http://www.mydb-studio.com/" title="Windows base Admin tool for MySQL">MyDB Studio</a>. Coming along with a well designed interface it offers all features you need and the license it needs is given away for free in case you only use it for private and non commercial interests. It just needs you to give them a valid email address and the key is emailed to you quickly after.</p>
<p>And now finally and last in case you are such a Macintosh guru, I would like to recommend you <a href="http://cocoamysql.sourceforge.net" title="Macintosh based Admin tool for MySQL " target="_blank">CocoaMySQL</a>. It does a similar great job like the others and can get used right away after the installation has taken place. What I like is the console view of is, showing you all command issued during the past and looking at it you might even learn some <a href="http://en.wikipedia.org/wiki/SQL" title="Structured Query Language" target="_blank">SQL</a> (Structured Query Language).</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fwww.askthegerman.com%2Farchives%2F163';
  addthis_title  = 'MySQL+Administration+Tools';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://www.askthegerman.com/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
