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

<channel>
	<title>database &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/database/</link>
	<description>Feed of posts on WordPress.com tagged "database"</description>
	<pubDate>Tue, 24 Nov 2009 00:23:41 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Data Dictionaries Contin.]]></title>
<link>http://fhsint2is.wordpress.com/2009/11/23/data-dictionaries-contin/</link>
<pubDate>Mon, 23 Nov 2009 22:32:32 +0000</pubDate>
<dc:creator>fhsint2is</dc:creator>
<guid>http://fhsint2is.wordpress.com/2009/11/23/data-dictionaries-contin/</guid>
<description><![CDATA[For the past three days(17th-19th) in Information Systems we have been looking at Data Dictionaries.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For the past three days(17th-19th) in Information Systems we have been looking at Data Dictionaries.</p>
<p style="text-align:left;">By now we should know that a data dictionary is a document that contains information about the different data items in a database. If you can&#8217;t remember  much,heres <a href="http://fhsint2is.wordpress.com/2009/11/17/data-dictionary/">Ewan&#8217;s post </a>.</p>
<p style="text-align:left;">We started thinking about inserting multimedia in databases such as images, sound or even a video.</p>
<p style="text-align:left;"><a href="http://fhsint2is.wordpress.com/files/2009/11/image1.png"><img class="size-medium wp-image-65 alignright" title="image" src="http://fhsint2is.wordpress.com/files/2009/11/image1.png?w=300" alt="" width="210" height="106" /></a></p>
<p style="text-align:left;">
<p style="text-align:left;"><span style="color:#3dc8fe;"><strong><em>Posted By David</em></strong></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[The Smarter Approach To Marketing]]></title>
<link>http://zainraj.wordpress.com/2009/11/23/the-smarter-approach-to-marketing/</link>
<pubDate>Mon, 23 Nov 2009 21:53:41 +0000</pubDate>
<dc:creator>Zain Raj</dc:creator>
<guid>http://zainraj.wordpress.com/2009/11/23/the-smarter-approach-to-marketing/</guid>
<description><![CDATA[Just saw a news story on Ad Age. It is titled &#8220;Will Retailers or Consumers Come Out on Top on ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Just saw a news story on <a href="http://adage.com/">Ad Age</a>. It is titled <a href="http://adage.com/article?article_id=140669">&#8220;Will Retailers or Consumers Come Out on Top on Black Friday?&#8221; </a>The story references how <a href="http://sears.com">Sears</a>, <a href="http://kmart.com">Kmart</a> and other retailers have begun holiday sales ahead of time as shoppers start early, searching for deals. According to Ad Age, Black Friday 2009 has become a massive game of chicken among retailers and consumers, as the closely watched post-Thanksgiving sales data will largely decide which succeeds at outsmarting the other.</p>
<p>Is this the right attitude? </p>
<p>As marketers, are we really trying to outsmart our customers?</p>
<p>If we are customer-centric, we would not be trying to one-up each other, but would focus our efforts on helping our customers solve their needs with relevant and differentiated offers.</p>
<p>As I defined in one of my <a href="http://zainraj.wordpress.com/2009/10/27/a-simple-equation-for-loyalty-marketing/">earlier posts</a>, providing value to customers by fulfilling their specific needs (relevance), recognizing their unique contribution to the business (recognition) and rewarding them with specific offers (reward) will create a win-win proposition. I defined the equation as 2RL + 2RC + RW = CL.</p>
<p>By doing this, the customer gets what they need from the brand and the brand gets the transactions that add strength to the business while building value in the relationship.</p>
<p>It is not about being smarter than them. It is about serving them well. </p>
<p>A simple idea. One that works</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Seputar Index Database]]></title>
<link>http://alekateepis.wordpress.com/2009/11/24/seputar-index-database/</link>
<pubDate>Mon, 23 Nov 2009 20:04:04 +0000</pubDate>
<dc:creator>ALEK</dc:creator>
<guid>http://alekateepis.wordpress.com/2009/11/24/seputar-index-database/</guid>
<description><![CDATA[Kebetulan hari ini sedang membaca buku Wrox Beginning Database Design. Hal satu hal yang saya ingin ]]></description>
<content:encoded><![CDATA[Kebetulan hari ini sedang membaca buku Wrox Beginning Database Design. Hal satu hal yang saya ingin ]]></content:encoded>
</item>
<item>
<title><![CDATA[Database engines in MySQL. MyISAM and InnoDB]]></title>
<link>http://phpwala.wordpress.com/2009/11/23/database-engines-in-mysql-myisam-and-innodb/</link>
<pubDate>Mon, 23 Nov 2009 14:39:33 +0000</pubDate>
<dc:creator>Hitesh Mathpal</dc:creator>
<guid>http://phpwala.wordpress.com/2009/11/23/database-engines-in-mysql-myisam-and-innodb/</guid>
<description><![CDATA[What is a Database Engine? A database engine is basically a software layer in every DBMS that create]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>What is a Database Engine? </strong><br />
<em>A database engine is basically a software layer in every DBMS that creates table, updates them and retrieves information from them. </em>  Since data and database may be of different natures MySQL DBMS provides several kinds of DBMS engines. We discuss  two of them, that are most popular-   </p>
<p><strong>1)MyISAM   </strong>      </p>
<p>MyISAM is the default database engine of MySQL, that is based on ISAM (Index Sequential Access Method). ISAM was developed by IBM for fast retrieval of data in Mainframe Computers. MyISAM is fast in data access and supports full text searching.   The limitation of this is, MyISAM is not suitable for transactional tables or it does not support foreign key constraints. (i.e. referential integrities). This is poor in crash recovery also.                 MyISAM locks the table until the operation is not complete. For example if you are inserting a row, the next operation say ‘updating of row ‘will wait until the first finishes.   </p>
<p> <strong>2) InnoDB  </strong>          </p>
<p> InnoDB  is more safe database engine of MySQL. InnoDB is good for transactional tables. It supports foreign key constraints. COMMIT, ROLLBACK sort of operations can be performed in this engine. Crash recovery is more easy in this. This stores data in clustered indexes (Storing the rows in primary key order while<em> MyISAM stores the rows as they added</em>).      InnoDB is designed for large volume of data for high performance. This is also good for multi-user concurrency.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DB2 - Data Loading with DEL ]]></title>
<link>http://denysutani.wordpress.com/2009/11/23/db2-data-loading-with-del/</link>
<pubDate>Mon, 23 Nov 2009 13:36:59 +0000</pubDate>
<dc:creator>denysutani</dc:creator>
<guid>http://denysutani.wordpress.com/2009/11/23/db2-data-loading-with-del/</guid>
<description><![CDATA[Sering kali ketika ingin mengisi sebuah database dengan data, customer hanya memberikan struktur dan]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sering kali ketika ingin mengisi sebuah database dengan data, customer hanya memberikan struktur dan source data mereka dalam bentuk file. DB2 mempunyai beberapa cara dalam membaca dari file, salah satunya adalah source yang memiliki delimiter.</p>
<p>Berikut langkah-langkahnya.<br />
1. Buat sebuah table untuk menampung data hasil loading<br />
create table load_table (id char(5), name varchar(25),dept varchar (10),grade char(1),salary decimal(10,3) )</p>
<p>2. Buat sebuah file bernama &#8220;data delimited.txt&#8221; berisi sebagai berikut<br />
10001;Budiman;101;A;10000<br />
10002;Andrew;101;A;20000<br />
10003;Deny Sutani;102;A;25000<br />
10004;Johanes;102;A;30000<br />
10005;Paul;103;A;15000</p>
<p>3. Masuk ke Control Center, buka table yang ingin diisi data, klik kanan dan pilih load.<br />
<a href="http://img258.imageshack.us/i/db2loaddelimited1.jpg/" target="_blank"><img src="http://img258.imageshack.us/img258/69/db2loaddelimited1.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a></p>
<p>4. Pilih append data to table jika table sudah berisi data dan tidak ingin dihapus. Pilih replace table data jika ingin menghapus data yang lama.</p>
<p>5. Pada tab Files,karena source kita menggunakan delimiter, klik DEL Option. Pada column delimiter isi symbol delimiter yang digunakan di source. Dalam kasus ini kita isi dengan &#8220;;&#8221;<br />
<a href="http://img410.imageshack.us/i/db2loaddelimited2.jpg/" target="_blank"><img src="http://img410.imageshack.us/img410/4791/db2loaddelimited2.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a></p>
<p>6. Isi path dimana file sumber berada dan juga path dimana file log akan dibuat.<br />
<a href="http://img199.imageshack.us/i/db2loaddelimited3.jpg/" target="_blank"><img src="http://img199.imageshack.us/img199/2061/db2loaddelimited3.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a></p>
<p>7. Klik Finish.</p>
<p>Dalam kasus ini, karena sumber data hanya sederhana, parameter yang dibutuhkan hanya sampai disini saja. Jika dalam kasus yang lebih sulit, kita dapat mengatur parameter lain seperti performance, recovery yang akan dilakukan jika data gagal di load, atau penjadwalan proses.</p>
<p>Berikut merupakan syntax yang akan menghasilkan proses yang sama dengan menggunakan Control Center.<br />
LOAD FROM &#8220;C:\data delimited.txt&#8221; OF DEL MODIFIED BY COLDEL; METHOD P (1, 2, 3, 4, 5) MESSAGES &#8220;C:\load_data.log&#8221; INSERT INTO &#8220;8SDENY&#8221;.LOAD_TABLE (ID, NAME, DEPT, GRADE, SALARY) COPY NO INDEXING MODE AUTOSELECT;</p>
<p>Jika berhasil maka akan menghasilkan gambar seperti berikut<br />
<a href="http://img682.imageshack.us/i/db2loaddelimited4.jpg/" target="_blank"><img src="http://img682.imageshack.us/img682/9172/db2loaddelimited4.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a></p>
<p>Selamat mencoba <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Two tools to make back-ups of your Joomla database]]></title>
<link>http://toretto84.wordpress.com/2009/11/23/two-tools-to-make-back-ups-of-your-joomla-database/</link>
<pubDate>Mon, 23 Nov 2009 11:16:17 +0000</pubDate>
<dc:creator>Toretto</dc:creator>
<guid>http://toretto84.wordpress.com/2009/11/23/two-tools-to-make-back-ups-of-your-joomla-database/</guid>
<description><![CDATA[Backing up your Joomla database is important.&#160; Why, you ask?&#160; Well, for the simple reason ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Backing up your Joomla database is important.&#160; Why, you ask?&#160; Well, for the simple reason that the database is the most important part of your website.&#160; Templates can be re-installed, just like plug-ins, modules and components.&#160; But without your database, you’re doomed.&#160; It contains all articles, and anything Joomla related that was created over time.&#160; Users, Newsletters, forum posts, links, menu item…&#160;&#160; If you don’t have a back-up of your database to fall back on when you run into problems, you probably have to start all over.&#160; </p>
<p>That’s why it’s important to back-up your Joomla database.&#160; There might be “Joomla” ways to do this, but I’ve always preferred to do this manually.&#160; To back-up your Joomla database, you’ll need to use a tool which allows you to access / manage your MySQL databases – whether they’re stored on a local machine or on the server of your hosting company.&#160; Below, you’ll find two tools that I regularly use to get the job done.&#160; </p>
<p>1.&#160; PHPMyadmin:&#160; Used so often, that it’s considered to be a “standard” by many.&#160; This tool is mainly used to manage databases; and might already be installed on your server.&#160; By using the export function of this tool, you’ll get the SQL code you need to rebuild your database later on.&#160; Downside: You’ve got to paste it in notepad / your editor of choice and save it yourself.</p>
<p>2. PHPMybackuppro:&#160; This free tool has one goal: to allow you to back-up your databases in a simple way.&#160; It offers many options, like mailing the back-ups or FTP’ing them to a remote location.&#160; The big advantage of this tool is that, once it’s configured, making a back-up is as simple as pressing the “back up” button”.&#160; Or, if you’ve managed to schedule back-ups, you don’t even have to do a thing.&#160; </p>
<p>With these two tools, you should be able to do the job.&#160; In a future post, I’ll summarize how to make a back-up with PHPMyadmin.&#160; </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[No to a DNA database]]></title>
<link>http://shanecroucher.co.uk/2009/11/23/no-to-a-dna-database/</link>
<pubDate>Mon, 23 Nov 2009 10:43:23 +0000</pubDate>
<dc:creator>shanecroucher</dc:creator>
<guid>http://shanecroucher.co.uk/2009/11/23/no-to-a-dna-database/</guid>
<description><![CDATA[There&#8217;s a disturbing article on LabourList written by a Labour candidate for a Southend Boroug]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>There&#8217;s a <a href="http://www.labourlist.org/stand-up-for-dna-database" target="_blank">disturbing article</a> on LabourList written by a Labour candidate for a Southend Borough Council seat, which is unashamedly defending the DNA database on the following, very worrying, assumption:</p>
<blockquote><p>everyone is a potential criminal</p>
</blockquote>
<p>Just like every Muslim is a potential terrorist, yeah? So that&#8217;s why we can lock people up for 28 days, which the government wanted extended to 90 days, without sufficient evidence to be charged. It&#8217;s similar logic, that we should suspect everyone, which leads down the path to an authoritarian state. Why am I a potential criminal? I haven&#8217;t been charged, or convicted, or even arrested for any crimes. Why should my DNA be held by the government? What about my <a href="http://news.bbc.co.uk/1/hi/uk/7764069.stm" target="_blank">right to privacy</a>, as enshrined under Article 8 of the European Convention on Human Rights? Previous rulings have proven that the government&#8217;s underhand tactic of holding on to innocents&#8217; DNA in order to create a behind-the-scenes database does not work alongside human rights legislation. Does Zarb-Cousin advocate the removal or defacing of the Human Rights Act 1998 in order for it to fit in with the government&#8217;s desire to harvest our DNA?</p>
<p>He points out:</p>
<blockquote><p>Not only has the current database helped convict 270 people in the last year, but also the use of DNA has released innocent people from wrongful inprisonment.</p>
</blockquote>
<p>I don&#8217;t think anyone disputes its effectiveness. But Zarb-Cousin is chasing the wrong counter arguments. Many of those who are against the database aren&#8217;t necessarily against it because, as he puts it:</p>
<blockquote><p>the only logical objection I could possibly have to it is if I planned to commit a crime in the near future</p>
</blockquote>
<p>We&#8217;re against it because it is a total infringement of our civil liberties. We&#8217;re against it because DNA evidence can be fabricated, as can be seen in this recent <a href="http://www.fsigenetics.com/article/S1872-4973(09)00099-4/abstract" target="_blank">report by </a><em><a href="http://www.fsigenetics.com/article/S1872-4973(09)00099-4/abstract" target="_blank">Forensic Scientists International: Genetics</a>, </em>whereby scientists found:</p>
<blockquote><p>It turns out that standard molecular biology techniques such as PCR, molecular cloning, and recently developed whole genome amplification (WGA), enable anyone with basic equipment and know-how to produce practically unlimited amounts of <em>in vitro</em> synthesized (artificial) DNA with any desired genetic profile. This artificial DNA can then be applied to surfaces of objects or incorporated into genuine human tissues and planted in crime scenes. Here we show that the current forensic procedure fails to distinguish between such samples of blood, saliva, and touched surfaces with artificial DNA, and corresponding samples with <em>in vivo</em> generated (natural) DNA. Furthermore, genotyping of both artificial and natural samples with Profiler Plus® yielded full profiles with no anomalies.</p>
</blockquote>
<p>Worrying, eh? That your DNA can be re-created artificially and placed at a crime scene. The government and police force want your DNA. The alarm bells in your head should be not only ringing, but smashing through your skull. Whilst I doubt that the current administration would abuse it, I certainly wouldn&#8217;t put it past them. Plus, police officers have been known to <a href="http://london.indymedia.org/articles/1691" target="_blank">stage a fit-up</a>, or two. What if a member of the constabulary, with a couple of sciencey contacts, had a score to settle? Maybe I&#8217;m being conspiratorial. But what about twenty years down the line? We don&#8217;t know who will be in control of this country. You may be willing to give up your DNA and your liberties to the current administration, but what if fascists take control in the future? It might seem far-fetched, but <a href="http://rationalrevolution.net/images/fascists.gif" target="_blank">these things happen</a>.</p>
<p>How about another, &#8220;what if&#8221;? We know that the government take a dim-view of protesters. What if, after an anti-government demonstration, they swabbed litter or placards that have been left behind? They&#8217;d be able to identify who was at the protest. They could compile a list of dissenters to keep under surveillance. Well, <a href="http://www.google.co.uk/search?hl=en&#38;safe=off&#38;rlz=1C1CHMR_enGB331GB331&#38;q=government+protesters+surveillance&#38;btnG=Search&#38;meta=cr%3DcountryUK&#124;countryGB&#38;aq=undefined&#38;oq=government+protesters+surveillanc" target="_blank">they sort of already do this</a>, but couldn&#8217;t a DNA database be abused to make it easier to identify dissenting voices?</p>
<p>Zarb-Cousin&#8217;s article seems well-intentioned. However, he is, naively in my opinion, advocating the handing back of individual liberty to the state. He cites a recent murder on his street, and argues that a DNA database would help to catch this criminal quicker. But there are bigger and more long-term issues at hand.</p>
<p>Whilst he may trust his Labour bretherin, I don&#8217;t. And I certainly can&#8217;t forsee the future. So, we should be clutching on to our hard-won freedoms as tightly as possible. Today&#8217;s &#8216;friendly state&#8217; is tomorrow&#8217;s fascist regime.</p>
<p>Let&#8217;s not give them a headstart.</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DB2 Tuning Tips]]></title>
<link>http://vinaytech.wordpress.com/2009/11/23/db2-tuning-tips/</link>
<pubDate>Mon, 23 Nov 2009 10:26:22 +0000</pubDate>
<dc:creator>Vinay</dc:creator>
<guid>http://vinaytech.wordpress.com/2009/11/23/db2-tuning-tips/</guid>
<description><![CDATA[1) Take out any / all-Scalar functions coded on columns in predicates. For example, this is the most]]></description>
<content:encoded><![CDATA[1) Take out any / all-Scalar functions coded on columns in predicates. For example, this is the most]]></content:encoded>
</item>
<item>
<title><![CDATA[How to check Oracle processes in windows using command line?]]></title>
<link>http://dbametrix.wordpress.com/2009/11/22/how-to-check-oracle-processes-in-windows-using-command-line/</link>
<pubDate>Sun, 22 Nov 2009 18:08:28 +0000</pubDate>
<dc:creator>dbametrix</dc:creator>
<guid>http://dbametrix.wordpress.com/2009/11/22/how-to-check-oracle-processes-in-windows-using-command-line/</guid>
<description><![CDATA[How to check Oracle processes in windows using command line? Oracle DBA monitors oracle processes on]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>How to check Oracle processes in windows using command line?</strong></p>
<p>Oracle DBA monitors oracle processes on unix using ps command. It is rumor that there is no alternate command available in windows for checking oracle proceses on windows. This technical tip helps Oracle DBA for monitoring Oracle processes on windows using command line.</p>
<p>Burning problem of Oracle DBA is how to check Oracle process in Windows while GUI not available (May be in Remote database monitoring). In unix it is very easy for administrating using ps command. Is there any alternate available in Windows? When we will ask this question get no answer for same. Because lack of knowledge of command line for Windows. Here you can get help for same which command is available for performing same task of Oracle DBA.</p>
<p>Is there any command in Windows like ps command in Unix for Oracle DBA?</p>
<p>How to check Oracle processes in windows. This is burning problem for every Oracle DBA. </p>
<p>In unix there is command called “ps“. Using ps command Oracle DBA can check all type of processes which are running in system. Ps command is very useful to administrating and monitoring oracle in unix/linux systems for all Oracle DBA.</p>
<p>But unfortunately there is no command available in windows just like ps in unix! Means there is no way to find out running processes in windows system using command line! Only task manager option is available in windows system for Oracle DBA. Using task manager we can check running processes in windows system. Task manager is GUI tool. Sometimes it is very difficult to monitoring and administrating Oracle on windows systems for Oracle DBA using GUI tool.</p>
<p><strong>Alternate of ps command in windows (Great tip for Oracle DBA):</strong></p>
<p>Windows has own command to trace all running processes in the system. Using “tasklist” command Oracle DBA can able to trace all running processes in windows including oracle,sqlplus,exp,imp and others. Tasklist command is very closer to ps command. Using tasklist command Oracle DBA can able to access process ids, session ids, cpu time, and modules of running processes in Oracle on Windows.</p>
<p><em><strong>No it is not TRUE. Really !!!</strong></em> </p>
<p>Please check help of tasklist command.</p>
<p>C:\&#62;tasklist /?</p>
<p>TASKLIST [/S system [/U username [/P [password]]]] [/M [module] &#124; /SVC &#124; /V] [/FI filter] [/FO format] [/NH]</p>
<p>Description: This command line tool displays a list of application(s) and associated task(s)/process(es) currently running on either a local or remote system.</p>
<p>Parameter List:<br />
/S system Specifies the remote system to connect to.<br />
/U [domain\]user Specifies the user context under which the command should execute.<br />
/P [password] Specifies the password for the given user context. Prompts for input if omitted.<br />
/M [module] Lists all tasks that have DLL modules loaded in them that match the given pattern name. If the module name is not specified, displays all modules loaded by each task.<br />
/SVC Displays services in each process.<br />
/V Specifies that the verbose information is to be displayed.<br />
/FI filter Displays a set of tasks that match a given criteria specified by the filter.<br />
/FO format Specifies the output format.<br />
Valid values: “TABLE”, “LIST”, “CSV”. /NH S<br />
pecifies that the “Column Header” should not be displayed in the output. Valid only for “TABLE” and “CSV” formats.<br />
 /? Displays this help/usage.</p>
<p>Filters:<br />
Filter Name Valid Operators Valid Value(s) ———– ————— ————–<br />
STATUS eq, ne RUNNING &#124; NOT RESPONDING<br />
IMAGENAME eq, ne Image name<br />
PID eq, ne, gt, lt, ge, le PID value<br />
SESSION eq, ne, gt, lt, ge, le Session number<br />
SESSIONNAME eq, ne Session name<br />
CPUTIME eq, ne, gt, lt, ge, le CPU time in the format of hh:mm:ss. hh – hours, mm – minutes, ss – seconds<br />
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB<br />
USERNAME eq, ne User name in [domain\]user format<br />
SERVICES eq, ne Service name<br />
WINDOWTITLE eq, ne Window title<br />
MODULES eq, ne DLL name</p>
<p>Examples:<br />
TASKLIST<br />
TASKLIST /M<br />
TASKLIST /V<br />
TASKLIST /SVC<br />
TASKLIST /M wbem*<br />
TASKLIST /S system /FO LIST<br />
TASKLIST /S system /U domain\username /FO CSV /NH<br />
TASKLIST /S system /U username /P password /FO TABLE /NH TASKLIST /FI “USERNAME ne NT AUTHORITY\SYSTEM” /FI “STATUS eq running”</p>
<p>Example:<br />
C:\&#62;tasklist</p>
<p>Image Name                   PID Session Name     Session#    Mem Usage<br />
========================= ====== ================ ======== ============<br />
System Idle Process            0 Console                 0         16 K<br />
oracle.exe                         4 Console                 0     282,100 K<br />
smss.exe                     636 Console                 0        420 K<br />
csrss.exe                    692 Console                 0      6,496 K<br />
winlogon.exe                 716 Console                 0      1,336 K<br />
services.exe                 760 Console                 0      4,020 K<br />
lsass.exe                    772 Console                 0      7,188 K<br />
svchost.exe                  956 Console                 0      5,568 K</p>
<p>Means using tasklist or tasklist -v command we can monitor and manage our oracle processes.</p>
<p>Now never tell that you don’t have ps command for windows !!!</p>
<p>All the best,<br />
Gitesh Trivedi</p>
<p><strong>About The Author:</strong>  <em><strong>Gitesh Trivedi </strong></em>is an Expert Oracle DBA and working in Dbametrix.  He has excellent 12 years experience. You can reach him on site <a href="http://www.dbametrix.com">http://www.dbametrix.com</a> offers Remote DBA support and Offshore Oracle DBA support. All copyright reserved by @Dbametrix. contact mailto:info@dbametrix.com  or at <a href="http://www.dbametrix.com/service.html">http://www.dbametrix.com/service.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[mysql for python 2.6]]></title>
<link>http://eastman.wordpress.com/2009/11/22/mysql-for-python/</link>
<pubDate>Sun, 22 Nov 2009 14:51:45 +0000</pubDate>
<dc:creator>eastman</dc:creator>
<guid>http://eastman.wordpress.com/2009/11/22/mysql-for-python/</guid>
<description><![CDATA[if you want to use mysql with python, apart from standard installations, you also need a small integ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>if you want to use mysql with python, apart from standard installations, you also need a small integrator called <strong>mysql for python</strong>. Its a python based module to make sure that all communications with mysql from python code to look and behave similar rest of python style apis.</p>
<blockquote><p>if you are on windows with python 2.5, you can get it from following link<br />
<a href="http://sourceforge.net/projects/mysql-python/">mysql for python</a></p>
<p>However, for python 2.6, above installation is not working. follow below link<br />
<a href="http://www.thescotties.com/mysql-python/test/">mysql for python 2.6</a></p></blockquote>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DB2 - Oracle Migration Parameter]]></title>
<link>http://denysutani.wordpress.com/2009/11/22/db2-oracle-migration-parameter/</link>
<pubDate>Sun, 22 Nov 2009 13:31:17 +0000</pubDate>
<dc:creator>denysutani</dc:creator>
<guid>http://denysutani.wordpress.com/2009/11/22/db2-oracle-migration-parameter/</guid>
<description><![CDATA[Ada beberapa parameter yang sebaiknya diganti sebelum melakukan migrasi dari Oracle ke DB2. Paramete]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ada beberapa parameter yang sebaiknya diganti sebelum melakukan migrasi dari Oracle ke DB2. Parameter ini berguna untuk mempermudah atau mengotomatisasi proses migrasi.</p>
<p><strong>1. DB2_COMPATIBILITY_VECTOR (registry)</strong><br />
Isi nilai parameter ini dengan &#8220;ORA&#8221;. Ini merupakan level kompatibilitas tertinggi. Setelah mengubah parameter ini jangan lupa untuk merestart instance.<br />
<strong><br />
2. DB2_DEFERRED_PREPARE_SEMANTICS (registry)</strong><br />
Meningkatkan kompatibilitas antara aplikasi Oracle dan DB2. Dengan mengisi parameter ini menjadi &#8220;YES&#8221;, maka SQL statement dinamis akan dievaluasi di OPEN atau EXECUTE bukan di PREPARE. Hal ini berguna untuk mengambil kelebihan dari tipe data implisit yang baru di DB2 dan mencegah error yang mungkin terjadi pada langkah PREPARE. Setelah mengubah parameter ini jangan lupa untuk merestart instance.<br />
<strong><br />
3. AUTO_REVAL (database configuration)</strong><br />
Melakukan revalidation ketika sebuah object invalid terdeteksi. Default valuenya adalah &#8220;DEFERRED&#8221; yang akan melakukan revalidasi terhadap sebuah objek jika terjadi reference kembali terhadap objek tersebut. Jika parameter ini diisi dengan &#8220;DEFERRED_FORCE&#8221; maka objek akan sukses dibuat walaupun bergantung pada objek yang invalid / belum ada. Jangan lupa untuk melakukan deactivate database agar perubahan terjadi.<br />
<strong><br />
4. DECFLT_ROUNDING (database configuration)</strong><br />
Parameter ini berguna untuk menentukan rounding mode untuk decimal floating point. Di Oracle, rounding modenya adalah &#8220;ROUND_HALF_UP&#8221;, sedangkan by default parameter ini bernilai &#8220;ROUND_HALF_EVEN&#8221;. Jangan lupa untuk melakukan deactivate database agar perubahan terjadi.</p>
<p>Sumber<br />
Oracle to DB2 Conversion Guide</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[PL/pgSQL – SQL Procedural Language]]></title>
<link>http://wirabumisoftware.wordpress.com/2009/11/22/plpgsql-%e2%80%93-sql-procedural-language/</link>
<pubDate>Sun, 22 Nov 2009 12:30:48 +0000</pubDate>
<dc:creator>wirabumisoftware</dc:creator>
<guid>http://wirabumisoftware.wordpress.com/2009/11/22/plpgsql-%e2%80%93-sql-procedural-language/</guid>
<description><![CDATA[Tulisan ini menguraikan apa dan bagaimana cara membuat function menggunakan PL/pgSQL. Didalamnya ter]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Tulisan ini menguraikan apa dan bagaimana cara membuat function menggunakan PL/pgSQL. Didalamnya terdapat panduan tahap demi tahap dalam membuat dan menggunakan function menggunakan PL/pgSQL. Setelah membaca tulisan ini, anda diharapkan dapat membuat dan menggunakan fungsi menggunakan PL/pgSQL.<br />
<!--more--><strong>Overview</strong><br />
PL/pgSQL adalah procedural language yang loadable (dapat langsung digunakan tanpa restart server) pada sistem database PostgreSQL. PL/pgSQL didesain dengan tujuan supaya kita dapat membuat sebuah procedural language yang:</p>
<ul>
<li> dapat dipakai untuk membuat function atau trigger</li>
<li> dapat menambahkan sruktur kontrol pada bahasa SQL</li>
<li> dapat melakukan komputasi kompleks</li>
<li> semua type, function, dan operator yang didefinisikan user (buatan anda sendiri atau orang lain) dapat diturunkan (inherit)</li>
<li> dapat dipercaya oleh server</li>
<li> mudah digunakan</li>
</ul>
<p>Function yang telah anda buat menggunakan PL/pgSQL dapat digunakan sebagaimana function bawaan yang sudah ada. Misalnya, anda dapat membuat fungsi komputasi kondisional yang kompleks, kemudian menggunakannya untuk membuat operator atau menggunakannya untuk membuat index.<br />
<strong></strong></p>
<p><strong>Keuntungan menggunakan PL/pgSQL</strong><br />
SQL merupakan bahasa yang digunakan PostgreSQL, dan begitu pula sebagian besar sistem database relasional (RDBMS: Relational Dtabase Management System) juga menggunakanSQL sebagai bahasa query. Bahasa ini begitu portable (dapat dipakai dimana saja, dan tentu ada sedikit perbedaan antar RDBMS) dan mudah dipelajari.<br />
Namun, setiap pernyataan SQL harus dijalankan secara terpisah oleh server database. Artinya, setiap aplikasi client anda harus mengirimkan setiap perintah SQL pada server satu per satu. Seletah mengirim 1 perintah SQL, client menunggu hasil prosesnya, kemudian menerima hasilnya dan memroses hasil tersebut. Client kemudian melakukan komputasi selanjutnya, dan kemudian mengirim pernyataan SQL berikutnya pada server. Begitu seterusnya. Hal ini tentu menimbulkan beban komunikasi antara server dan client, yang tentu akan menimbulkan beban jaringan, utamanya jika client dan server database anda terpisah.<br />
Dengan menggunakan PL/pgSQL anda dapat mengelompokkan sebuah blok komputasi atau serangkaian query langsung didalam server, yang tentu saja anda memanfaatkan keunggulan procedural language dan kemudahan penggunaan SQL, sekaligus menghemat ongkos komunikasi dan beban jaringan.<br />
beban komunikasi dari server ke client dan sebaliknya dihilangkan<br />
client tidak perlu menerima hasil/data pada saat proses berlangsung, cukup menerima hasil akhir dari proses tersebut, dan siap digunakan untuk proses komputasi berikutnya<br />
dapat mencegah pengiriman query dari client ke server berulang-ulang, karena function dijalankan di sisi server<br />
Hal ini tentu saja meningkatkan performa aplikasi anda secara signifikan. Dalam membuat function menggunakan PL/pgSQL, anda dapat menggunakan tipe data, operator, dan function pada SQL.<br />
<strong></strong></p>
<p><strong>Tipe data parameter dan hasil yang didukung<br />
</strong>Function yang dibuat dari PL/pgSQL dapat menerima parameter dalam bentuk skalar apa saja (integrer, char, float, dsb) maupun array yang didukung server, dan dapat pula mengembalikan nilai/hasil dengan tipe data tersebut. Function ini juga dapat menerima parameter dan mengembalikan nilai dengan tipe data komposit (tipe row). Function ini juga dapat mengembalikan nilai berupa record yang kolomnya sesuai dengan query yang dijalankan. Function yang dibuat dari PL/pgSQL juga dapat menerima parameter dan mengembalikan nilai bertipe polymorphic (anyelement, anyarray, dsb).<br />
Function dari PL/pgSQL juga dapat dideklarasikan untuk mengembalikan nilai berupa sebuah set atau tabel. Dengan demikian fungsi ini dapat memberikan hasil dengan menjalankan perintah RETURN NEXT untuk setiap elemen dalam 1 record hasil query, atau menggunakan RETURN QUERY untuk mendapatkan semua hasil query.<br />
Function ini juga dapat dideklarasikan untuk menghasilkan nilai void jika anda menghendaki function ini tidak mengembalikan apa-apa.<br />
Function ini juga memiliki kemampuan untuk menerima parameter dengan tipe data berupa output, sehingga anda tidak perlu memberi perintah secara eksplisit untuk mengembalikan sebuah nilai dari suatu function. Ini seringkali berguna jika anda ingin mengembalikan beberapa nilai sekaligus.<br />
Function Anda yang Pertama<br />
Pada bagian ini anda akan saya ajak untuk membuat function, tentu saja function anda yang pertama. Pertama anda harus memiliki software-software yang dibutuhkan. Jika anda meggunakan windows, ada cukup perlu master installer PostgreSQL yang didalamnya sudah memasukkan server PostgreSQL dan aplikasi (client) manajemen database PgAdmin. Jika anda menggunakan linux, gunakan server PostgreSQL dan PgAdmin sesuai dengan distribusi/distro yang anda gunakan. Saya menggunakan PostgreSQL 8.3 dan PgAdmin 1.8.<br />
Buatlah sebuah database untuk mempraktekkan contoh-contoh yang akan saya tampilkan. Buat database baru dengan nama contohplsql. Kemudian jalankan script SQL yang dapat di-download disini, pada database tersebut. Jika sukses, database contohplsql akan memiliki 3 tabel (nama, alamat, negara) dan 2 function (uuid_generate_v4, get_uuid). Kedua function ini hanya digunakan untuk meng-generate primary key pada tiap-tiap record menggunakan algoritma UUID. Klik disini untuk informasi lebih lanjut tentang UUID.<br />
Melalui PgAdmi, masuklah pada database contohplsql, kemudian buka window baru untuk menuliskan script SQL.<br />
[gambar 1]<br />
[gambar 2]<br />
Kemudian tuliskan kode berikut:<br />
<em>CREATE FUNCTION somefunc() RETURNS integer AS $$<br />
&#60;&#60; outerblock &#62;&#62;<br />
DECLARE<br />
quantity integer := 30;<br />
BEGIN<br />
RAISE NOTICE &#8216;Quantity here is %&#8217;, quantity;  &#8212; mencetak 30<br />
quantity := 50;</em></p>
<p><em>/* Create a subblock */</em></p>
<p><em>DECLARE<br />
quantity integer := 80;<br />
BEGIN<br />
RAISE NOTICE &#8216;Quantity here is %&#8217;, quantity;  &#8212; mencetak 80<br />
RAISE NOTICE &#8216;Outer quantity here is %&#8217;, outerblock.quantity;  &#8212; mencetak 50<br />
END;</em></p>
<p><em>RAISE NOTICE &#8216;Quantity here is %&#8217;, quantity;  &#8212; mencetak 50</em></p>
<p><em>RETURN quantity;<br />
END outerblock;<br />
$$ LANGUAGE plpgsql;<br />
</em></p>
<p>Jalankan kode tersebut, anda baru saja membuat function anda yang pertama, dengan nama somefunc. Kemudian panggillah function yang baru saja anda buat dengan menjalankan perintah berikut:<br />
<em>SELECT * FROM somefunc()<br />
</em>Maka anda akan mendapatkan hasil berupa return value bertipe integer bernilai 50. Selamat! Anda baru saja berhasil membuat function.<br />
Struktur PL/pgSQL<br />
PL/pgSQL merupakan bahasa yang dibangun dari blok-blok. Syntax lengkap untuk mendefinisikan sebuah function harus membentuk sebuah blok. Sebuah blok didefinisikan sebagai berikut:<br />
<em>[&#60;&#62;]<br />
[DECLARE<br />
declaration]<br />
BEGIN<br />
statement<br />
END [label];<br />
</em>Pada function pertama yang sudah anda buat tedapat blok yang bernama outerblock. Karena dia didefinisikan dibagian atas, blok ini melingkupi seluruh function. Didalam blok outerblock terdapat blok yang tidak diberi nama (jadi block sebenarnya ditandai dari adanya BEGIN dan END). Setiap deklarasi dan setiap statement dalam sebuah blok harus diakhiri dengan titik koma (;). Sebuah blok yang berada dalam blok lain, tanda titik koma harus ada setelah END. Khusus untuk blok yang menandakan badan function (mencakup keseluruhan isi function) tidak perlu titik koma.<br />
Label hanya diperlukan untuk menandai sebuah blok jika anda menggunakan statement EXIT, atau untuk menandai nama variable yang sifatnya lokal di dalam blok tersebut. Label yang diberikan harus cocok antara yang ada di bagian BEGIN dan END. Pada function contohplsql, block outerblock diakhiri dengan END outerblock;<br />
Semua kata kunci (key word) dibedakan huruf besar/kecil. Identifier secara implisit dikonvesi menjadi huruf kecil, kecuali yang telah diberi petik ganda, sama seperti SQL pada umumnya.<br />
Ada 2 cara untuk menuliskan komentar pada PL/pgSQL. Pertama menggunakan awalan double dash (&#8211;), kedua menggunakan awalan /* dan akhiran */.<br />
Setiap statement dalam sesi statement pada sebuah blok dapat ditempatkan pada sebuah sub-blok. Pembuatan sub-blok bisa didasarkan pada logika pemrograman maupun untuk tujuan melokalisir variable. Namun, anda masih bisa mengakses varible diluar blok dengan jalan menggunakan nama label blok tersebut. Perhatikan function pertama yang sudah anda buat. Blok bagian luar bernama outerblock, sedangkan didalam blok ini terdapat sub-blok yang tidak diberi nama. Pada contoh ini, sub-blok digunakna untuk melokalisir varible. Didalam sub-blok ini terdapat variable quantity, dimana namanya sama dengan variable pada blok induknya. Namun karena posisinya berbeda blok, kedua variable ini berbeda. Untuk mengakses variable quantity pada sub-blok cukup menggunakan quantity saja, sementara untuk quantity yang berada pada blok induk harus menggunakan outerblock.quantity.<br />
Catatan: Pada function pertama yang sudah anda buat sebenarnya tedapat blok diluar semua blok yang telah didefinisikan. Blok ini dibuat oleh server secara implisit dan mencakup semua bagian dari blok-blok yang telah anda buat. Blok ini memiliki nama yang sama dengan nama function. Jadi, sebenarnya pada blok inilah anda mendeklarasikan parameter function, begitu juga varible spesial lainnya seperti FOUND. Dengan demikian anda dapat mengakses nama parameter dan variable khusus lainnya menggunakan nama function ini.<br />
Penting untuk memahami dan tidak bingung akan penggunaan BEGIN/END sebagai blok dan sebagai transaction. Pada PL/pgSQL pernyataan BEGIN/END hanya digunakan untuk pengelompokan saja, dia tidak bisa start/commit sebuah transaction. Namun, sebuah blok yang didalamnya terdapat klausa EXCEPTION akan membentuk susunan blok tertentu dimana sebuah rangkaian statement didalamnya dapat di-roll back tanpa mempengaruhi perintah-perintah di blok lain.</p>
<p><strong>Declaration<br />
</strong>Semua variable yang digunakan dalam blok harus dideklarasikan dalam bagian deklarasi pada blok tersebut. (Kecuali varible yang digunakan dalam iterasi LOOP, yang akan dideklarasikan secara otomatis sebagai integer). PL/pgSQL dapat memiliki tipe variable sebagaimana yang dimiliki SQL, seperti integer, char, maupun varchar.<br />
Pada function somefunc dideklarasikan 1 variable bernama quantity pada outerblock, dan 1 variable bernama quantity pada sub-blok. Berikut adalah contoh deklarasi variable:<br />
<em>user_id integer;<br />
quantity numeric(5);<br />
url varchar;<br />
myrow tablename%ROWTYPE;<br />
myfield tablename.columnname%TYPE;<br />
arow RECORD;<br />
</em>Syntax umum untuk mendeklarasikan variable adalah sebagai berikut:<br />
<em>name [ CONSTANT ] type [ NOT NULL ] [ { DEFAULT &#124; := } expression ];</em><br />
Jika dalam deklarasi varible terdapat klausa DEFAULT, maka value awal akan dimasukkan ke dalam variable tersebut. Namun, jika tidak ada klausa DEFAULT, nilaia awal yang dimasukkan dalam variable tersebut adalah SQL NULL. Klausa CONSTANT membuat nilai variable ini selalu tetap, sehingga jika terjadi perintah pengisian nilai pada variable ini akan terjadi error. Klausa NOT NULL membuat pengisian SQL NULL pada variable ini error. Oleh karena itu, jika terdapat salah satu saja dari kedua properti ini, maka sebuah variable harus memiliki klausa DEFAULT. Khusus untuk klausa NOT NULL, nilai awal yang dimasukkan tidak boleh NULL.<br />
Klausa DEFAULT dijalankan setiap kali blok tersebut dijalankan, jadi tidak hanya saat function di-compile. Contoh, jika anda mendefinisikan varible bertipe DATE, kemudian diisi dengan nilai default NOW(), maka isi varible tersebut akan berubah setiap blok dijalankan, bukan hanya saat pertama kali function ini di-compile.<br />
Contoh penggunaan klausa DEFAULT dan CONSTANT:<br />
<em>quantity integer DEFAULT 32;<br />
url varchar := &#8216;http://mysite.com&#8217;;<br />
user_id CONSTANT integer := 10;<br />
</em></p>
<p><strong>Alias untuk Parameter Fungsi<br />
</strong>Alias digunakan untuk memberikan nama pada parameter fungsi. Secara default nama parameter adalah angka yang urut sesuai definisi paramter fungsi. Perhatikan contoh berikut:<br />
<em>CREATE FUNCTION somefunc(integer, varchar) RETURNS integer AS $$<br />
</em>Pada contoh diatas, terdapat 2 parameter pada function somefunc, keduanya berturut-turut bertipe integer dan varchar. Secara default kedua parameter tersebut berturut-turut bernama $1 dan $2. Penamaan semacam ini, pada kasus tertentu, menyulitkan anda dalam membuat dan membaca kode function. Untuk itu diperlukan penamaan parameter yang mencerminkan penggunaan parameter tersebut. Proses penamaan ini disebut dengan alias.<br />
Terdapat 2 cara membuat alias pada parameter function. Perhatikan 2 contoh berikut:<br />
<em>CREATE FUNCTION instr(varchar, integer) RETURNS integer AS $$<br />
DECLARE<br />
v_string ALIAS FOR $1;<br />
index ALIAS FOR $2;<br />
BEGIN<br />
&#8211; some computations using v_string and index here<br />
END;<br />
$$ LANGUAGE plpgsql;</em></p>
<p><em>CREATE FUNCTION sales_tax(subtotal real, OUT tax real) AS $$<br />
BEGIN<br />
tax := subtotal * 0.06;<br />
END;<br />
$$ LANGUAGE plpgsql<br />
</em>Pada contoh pertama, alias dilaksanakan pada bagian deklarasi function. Sedangkan pada contoh kedua, alias dilaksanakan saat pendefinisian parameter. Kedua contoh diatas tidak sepenuhnya identik. Pada contoh kedua, kita dapat membuat referensi sales_tax.subtotal, sedangkan pada contoh pertama fitur ini tidak ada. Hal ini disebabkan karena PL/pgSQL akan membuatkan label khusus secara implisit yang melingkup semua isi function dengan nama label sama dengan nama function, sehingga sales_tax.total nampak pada label ini, sedangkan pada contoh kedua alias parameter berada pada label yang berbeda.<br />
Pada kasus parameter dan return function yang bertipe polymorphic, PL/pgSQL akan secara otomatis membuat variable bernama $0 yang akan menjadi tipe data aktual dari return function tersebut. Ini dapat digunakan sebagai variable yang dapat menampung nilai return dari suatu function, meski kadang ini tidak diperlukan. Selanjutnya, variable ini dapat diberi alias seperti parameter, yang telah dijelaskan sebelumnya. Perhatikan contoh berikut:<br />
<em>CREATE FUNCTION add_three_values(v1 anyelement, v2 anyelement, v3 anyelement)<br />
RETURNS anyelement AS $$<br />
DECLARE<br />
result ALIAS FOR $0;<br />
BEGIN<br />
result := v1 + v2 + v3;<br />
RETURN result;<br />
END;<br />
$$ LANGUAGE plpgsql;</em></p>
<p><em>CREATE FUNCTION add_three_values(v1 anyelement, v2 anyelement, v3 anyelement,<br />
OUT sum anyelement)<br />
AS $$<br />
BEGIN<br />
sum := v1 + v2 + v3;<br />
END;<br />
$$ LANGUAGE plpgsql;<br />
</em>Pada contoh pertama, alias dilaksanakan pada bagian deklarasi function. Pada contoh kedua, alias dilaksanakan pada pendefinisian parameter.</p>
<p><strong>Menyalin Tipe Data<br />
</strong><em>variable%TYPE</em></p>
<p>Anda dapat mendefinisikan sebuah variable dengan tipe data yang dinamis, artinya tipe data variable tersebut dapat berubah saat function dijalankan (on the fly). Tipe data seperti ini banyak dibutuhkan jika anda ingin membuat variable yang menampung data dari sebuah kolom pada suatu tabel. %TYPE akan menyajikan tipe data atau tipe kolom pada sebuah tabel. Jika anda ingin membuat variable yang bernama user_id dan digunakan untuk menampung nilai kolom user_id pada tabel user, maka syntax yang digunakan adalah:<br />
<em>user_id user.user_id%TYPE;</em></p>
<p>Jika kolom user_id bertipe integer maka variable user_id juga beritipe integer. Jika dikemudian hari anda mengubah kolom ini sehingga bertipe float, maka variable user_id juga akan bertipe float, tanpa harus mengganti function ini.</p>
<p><strong>Row Type<br />
</strong><em>name tablename%ROWTYPE;<br />
name composite_type_name;</em></p>
<p>Sebuah variable komposit adalah variable row (atau variable row-type). Sebuah variable row dapat menampung nilai dari seluruh kolom hasil perintah select. Setiap kolom dapat diakses menggunakan tanda dot (.), misalnya: variablerow.namafield.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Why use a database - Quality Counts!]]></title>
<link>http://glenschild.wordpress.com/2009/11/22/why-use-a-database-quality-counts/</link>
<pubDate>Sun, 22 Nov 2009 12:13:51 +0000</pubDate>
<dc:creator>Glen Schild</dc:creator>
<guid>http://glenschild.wordpress.com/2009/11/22/why-use-a-database-quality-counts/</guid>
<description><![CDATA[I said in my previous blog that I would cover &#8220;why&#8221; you should use a database. &#8220;Wh]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I said in my previous blog that I would cover &#8220;why&#8221; you should use a database. &#8220;Why&#8221; is a small word with a big meaning and as there are so many reasons why a business should consider using a database, I am going to break this down into bite size chunks!</p>
<p>First of all I am going to cover the need to have good quality, accurate information recorded no matter what system you use. I would argue that for any business the quality of your contact with your clients/customers is one of the most important aspects that needs to be considered.</p>
<p>Let’s just take a moment to consider our own personal experiences with other companies and organisations. How do you feel when you receive correspondence that has your name spelt wrongly? It happens to me all the time and yes I know my surname is not that common but the companies that take the time to get it right move up in my estimation and are more likely to get my business now and in the future!</p>
<p>Okay, so mistakes happen but then how much more annoying is it when you tell them about the mistake yet it is still not corrected! If companies cannot achieve something as basic as spelling your name correctly, what else are they doing wrong!</p>
<p>Most people will shop around and attention to detail can help give you the edge against your competitors.</p>
<p>No matter what client information you need for your business you can guarantee it is like storing shifting sand. Details constantly change. People move house, change their mobile phone numbers, change email details, move jobs, have children, get married, get divorced! The list is never ending!</p>
<p>Maybe you have client details recorded on a spreadsheet. Perhaps on more than one spreadsheet! Maybe you also have details recorded in a paper file and in an accounting package? So you phone a client and find out they have moved. You note this in the paper file but forget to update the spreadsheet and the accounts package.</p>
<p>You don&#8217;t realise that there is a problem until that invoice you sent out 90 days ago has not been paid and you have not been getting responses to reminder letters. By the time you have established what has happened you have not only wasted valuable business hours chasing payments but also your cash flow has been adversely affected possibly costing you more money by way of interest charged or not gained!</p>
<p>A well written database system will store client information ONCE and used it throughout your business. This makes it far easier to keep up to date which saves you time AND money.</p>
<p>My next blog will consider the importance of NOT wasting time in business!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[7/G Rainbow Colony – Ravi Krishna - Tamil movie - Online video]]></title>
<link>http://xxxindia.wordpress.com/2009/11/22/7g-rainbow-colony-%e2%80%93-ravi-krishna-tamil-movie-online-video/</link>
<pubDate>Sun, 22 Nov 2009 11:35:55 +0000</pubDate>
<dc:creator>desipooja</dc:creator>
<guid>http://xxxindia.wordpress.com/2009/11/22/7g-rainbow-colony-%e2%80%93-ravi-krishna-tamil-movie-online-video/</guid>
<description><![CDATA[Banner: Sri Surya Movies Cast: Ravi Krishna, Sonia Agrawal Direction: Selvaraghavan Production: AM. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Banner: Sri Surya Movies<br />
Cast: Ravi Krishna, Sonia Agrawal<br />
Direction: Selvaraghavan<br />
Production: AM. Rathnam<br />
Music: Yuvan Shankar Raja<br />
<img alt="" src="http://3.bp.blogspot.com/_cudK8MwW64I/Sl_9OR5sFmI/AAAAAAAAUNI/iN3kHzklTaA/s320/7G_Rainbow_Colony.jpg" title="7/g title movie download for free" class="alignnone" width="320" height="320" /><br />
Download the video</p>
<p>Part 1:http://sharecash.org/download.php?file=148746<br />
Part 2:http://sharecash.org/download.php?file=148749</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ars Combinatoria: Or, Hegel's Logic as Chronotope for the Digital Age]]></title>
<link>http://orbismediologicus.wordpress.com/2009/11/22/ars-combinatoria-the-chronotope-of-the-digital-age/</link>
<pubDate>Sun, 22 Nov 2009 10:49:04 +0000</pubDate>
<dc:creator>chris</dc:creator>
<guid>http://orbismediologicus.wordpress.com/2009/11/22/ars-combinatoria-the-chronotope-of-the-digital-age/</guid>
<description><![CDATA[by Christopher Vitale (crossposted at Networkologies) The combinatory is an idea whose time, once ag]]></description>
<content:encoded><![CDATA[by Christopher Vitale (crossposted at Networkologies) The combinatory is an idea whose time, once ag]]></content:encoded>
</item>
<item>
<title><![CDATA[]]></title>
<link>http://axiomamuse.wordpress.com/2009/11/22/4698/</link>
<pubDate>Sun, 22 Nov 2009 08:38:43 +0000</pubDate>
<dc:creator>AxXiom</dc:creator>
<guid>http://axiomamuse.wordpress.com/2009/11/22/4698/</guid>
<description><![CDATA[DHS Announces &#8220;Global Entry&#8221; Biometric Identification System for U.S. Airports Today, th]]></description>
<content:encoded><![CDATA[DHS Announces &#8220;Global Entry&#8221; Biometric Identification System for U.S. Airports Today, th]]></content:encoded>
</item>
<item>
<title><![CDATA[Table Indexes, yet again!]]></title>
<link>http://serendipityp.wordpress.com/2009/11/21/table-indexes-yet-again/</link>
<pubDate>Sun, 22 Nov 2009 03:16:07 +0000</pubDate>
<dc:creator>P</dc:creator>
<guid>http://serendipityp.wordpress.com/2009/11/21/table-indexes-yet-again/</guid>
<description><![CDATA[This time the query&#8217;s selecting all the female employees who joined after some time in a parti]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This time the query&#8217;s selecting all the female employees who joined after some time in a particular team. (Suppose the team is huge, like a product group)</p>
<blockquote><p>SELECT id FROM employees WHERE gender = 1 AND team = 1 AND join_time &#62; &#8216;2008-10-10 00:00:00&#8242;;</p></blockquote>
<p>I no longer remember how long this query takes without any indexing. After I added the index (join_time, gender, team), the query <em>did not</em> improve. So I did an EXPLAIN, and it shows that the index (join_time, gender, team) is considered, but not used. So I had to use FORCE INDEX to tell the optimizer to use the index. Not that it lead to a good result &#8211; around 3:45 minutes <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  I found out the later the reason why the optimizer decided not to use the index is because the percentage of the records being female from team #1 is too high. MySQL thinks it&#8217;s not worth loading the index and then the actual records, compared to just doing a full table scan.</p>
<p>After the experience with finding when the last employee joined a particular team, I created the index (gender, team, join_time). So all the exact match fields first. I still have to use FORCE INDEX, but the query dropped to 1:30 minutes!</p>
<p>Of course, 1:30 is still not desirable. The query is executed every time a detection algorithm runs, which takes around a minute. But the query returns 9 million rows &#8211; not sure what else can be down to speed it up. According to someone on the MySQL forum, 1:30 minutes for 9 million record retrieval seems pretty good.</p>
<p>While I was searching for solutions before creating the proper index, I came across <em>table partitioning</em>. The basic idea is to partition the table in storage area so the DBMS knows where to search. There are four ways of partitioning, that I won&#8217;t go into details because you can find it <a title="here" href="http://dev.mysql.com/doc/refman/5.1/en/partitioning-types.html">here</a>. So if I create range partitions on the join_time, then when I do a range query, MySQL will only search in the partitions that contains that range of time. Seems like a cool idea, will try when I get the chance to.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[oracle error]]></title>
<link>http://technospider.wordpress.com/2009/11/21/oracle-error/</link>
<pubDate>Sat, 21 Nov 2009 18:33:23 +0000</pubDate>
<dc:creator>technospider</dc:creator>
<guid>http://technospider.wordpress.com/2009/11/21/oracle-error/</guid>
<description><![CDATA[Database dismounted. ORACLE instance shut down. SQL&gt; startup ORACLE instance started. Total Syste]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Database dismounted.<br />
ORACLE instance shut down.<br />
SQL&#62; startup<br />
ORACLE instance started.</p>
<p>Total System Global Area  608174080 bytes<br />
Fixed Size                  1268920 bytes<br />
Variable Size             230687560 bytes<br />
Database Buffers          373293056 bytes<br />
Redo Buffers                2924544 bytes<br />
Database mounted.<br />
ORA-01157: cannot identify/lock data file 6 &#8211; see DBWR trace file<br />
ORA-01110: data file 6: &#8216;/data/dbs_609&#8242;</p>
<p>SQL&#62; alter database datafile 6 OFFLINE DROP;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Recovery after losing your control file.]]></title>
<link>http://rimpidevan.wordpress.com/2009/11/21/recovery-after-losing-your-control-file/</link>
<pubDate>Sat, 21 Nov 2009 17:07:29 +0000</pubDate>
<dc:creator>rimpidevamrithan</dc:creator>
<guid>http://rimpidevan.wordpress.com/2009/11/21/recovery-after-losing-your-control-file/</guid>
<description><![CDATA[Hi all . I am adding this info on my blog which has been told by one of our 11gR1 OU  trainers , ama]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hi all . I am adding this info on my blog which has been told by one of our 11gR1 OU  trainers , aman sharma . Hopefully all of us will find it equally useful now and in future. Here we go:</p>
<p>Let&#8217;s see go and see now how there can be different cases of the control file loss and what we can do to recover it,</p>
<p>1)   Control file lost with a mirrored copy available&#62;&#62;</p>
<p>As like always, its always better to have a seperate copy of your control file. Its going to be very handy when you have lost your any one of them. Oracle recommends to have at least 3 copies of the file all the time. Please note that the copies can be actually more than 3 also but here, “the more the merrier” will not be the right thing to do. If you are going to make multiplexed copies of your control file and your database is doing huge amount of contol file updates, it would lead to the Control File Parallel Write waite event and also the Control File Enque will come into contention. So its always better to use wisely the number of copies needed.</p>
<p>If you have just lost one copy out of your mirrored files, you have very less to do. Here are the steps to recover the database ,</p>
<p>a) If database is already up, bring it down immediately without invoking the checkpoint.</p>
<p>SQL&#62; shut abort;</p>
<p>b) Copy out of one available control files, one file to the location where the lost file is needed. This surely is mandatory that the location is intact. Use an operating system level command to do so,</p>
<p>$cp /u01/app/oracle/oradata/orcl/control02.ctl /u01/app/oracle/oradata/orcl/control01.ctl</p>
<p>c)    As you have already copied the file, just issue the instance startup to open the database.</p>
<p>SQL&#62; startup</p>
<p>It may also be possible that even though you have the multiplexed control files and you have just lost out of N, only 1 control file but the underlying location of the missing control file is also damaged. If that&#8217;s going to be the case then you can&#8217;t restore the file to the same location. You can use the existing control files&#8217;s copy for sure but the location has to be different and this means, you now need to edit the initillization file of the database as well to update the Control_Files parameter. With all the steps mentioned above being the same, you need to one more step and that would be to edit the parameter with the new location with the corresponding missing file&#8217;s name. After you are done doing that, issue a startup and you would be having a running database.</p>
<p>2&#62; Restoring control file with redo logs being intact &#62;&#62;</p>
<p>If you have lost all the copies of the control file but your datafiles and online redo logs are fine, you can use the backup of the control file to recover from the loss. Let&#8217;s create a small disaster where we would loss of our control files. Please note that we already took the backup and our database is already set into the archivelog mode.</p>
<p>Here is the listing of the files that we have in our database.</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls -l *ctl</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 9748480 Nov 17 12:51 control01.ctl</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 9748480 Nov 17 12:51 control02.ctl</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 9748480 Nov 17 12:51 control03.ctl</p>
<p>So , very rudely, we move them all to a folder called Control which is equivalent to losing all of them,</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ mv *.ctl control/</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls -ltr</p>
<p>total 1585940</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall   5251072 Nov 17 08:27 users01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall  52429312 Nov 17 08:27 redo03.log</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall  52429312 Nov 17 08:27 redo02.log</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 104865792 Nov 17 08:27 example01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall  20979712 Nov 17 09:26 temp01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall  41951232 Nov 17 12:52 undotbs01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 723525632 Nov 17 12:52 system01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall 588849152 Nov 17 12:52 sysaux01.dbf</p>
<p>-rw-r&#8212;&#8211;  1 oracle oinstall  52429312 Nov 17 12:52 redo01.log</p>
<p>drwxr-xr-x  2 oracle oinstall      4096 Nov 17 12:52 control</p>
<p>And just to make sure that we do get an error, let&#8217;s to access some thing which would only come from Control file,</p>
<p>SQL&#62; select * from V$database;</p>
<p>select * from V$database</p>
<p>*</p>
<p>ERROR at line 1:</p>
<p>ORA-00210: cannot open the specified control file</p>
<p>ORA-00202: control file: &#8216;/u01/app/oracle/oradata/orcl/control01.ctl&#8217;</p>
<p>ORA-27041: unable to open file</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>So there are no more control files there with us. Now, the first step would be to immediately issue shut down the database. Let&#8217;s do it,</p>
<p>SQL&#62; shut abort;</p>
<p>ORACLE instance shut down.</p>
<p>Fortunately, we did take the backup using RMAN so we can use it. But before that we need to have at least the instance started as RMAN needs at least the instance to be up,</p>
<p>SQL&#62; startup nomount</p>
<p>ORACLE instance started.</p>
<p>Total System Global Area  171573248 bytes</p>
<p>Fixed Size                  1298668 bytes</p>
<p>Variable Size             134221588 bytes</p>
<p>Database Buffers           29360128 bytes</p>
<p>Redo Buffers                6692864 bytes</p>
<p>And now we fire up RMAN and restore the control files from the backup,</p>
<p>RMAN&#62; restore controlfile from autobackup;</p>
<p>Starting restore at 17-NOV-09</p>
<p>using target database control file instead of recovery catalog</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=152 device</p>
<p>recovery area destination: /u01/app/oracle/flash_recovery_area</p>
<p>database name (or database unique name) used for search: ORCL</p>
<p>channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_17/o1_mf_s_703153678_5j449plt_.bkp found in the recovery area</p>
<p>AUTOBACKUP search with format &#8220;%F&#8221; not attempted because DBID was not set</p>
<p>channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_17/o1_mf_s_703153678_5j449plt_.bkp</p>
<p>channel ORA_DISK_1: control file restore from AUTOBACKUP complete</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control01.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control02.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control03.ctl</p>
<p>Finished restore at 17-NOV-09</p>
<p>We can see that all the 3 control files have come up. And we can verify it as well,</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls *.ctl</p>
<p>control01.ctl  control02.ctl  control03.ctl</p>
<p>The next step would be to recover the  the database. We can do it with bringing the datbase in the mount stage and issue the Resetlogs command to open it up afterwards.</p>
<p>RMAN&#62; recover database;</p>
<p>Starting recover at 17-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>starting media recovery</p>
<p>archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/oradata/orcl/redo01.log</p>
<p>archived log file name=/u01/app/oracle/oradata/orcl/redo01.log thread=1 sequence=1</p>
<p>media recovery complete, elapsed time: 00:00:00</p>
<p>Finished recover at 17-NOV-09</p>
<p>And now we can open the database happily,</p>
<p>SQL&#62; alter database open resetlogs;</p>
<p>Database altered.</p>
<p>SQL&#62; select status from V$instance;</p>
<p>STATUS</p>
<p>&#8212;&#8212;&#8212;&#8212;</p>
<p>OPEN</p>
<p>2&#62;Loss of control file with data files but redo logs being intact&#62;&#62;</p>
<p>This would a semi-disaster situation. Reason for adding here  “semi” is that you have almost lost everything with the loss of your datafiles and control files. Yet you have a ray of hope left as you are still left with your  current redo logs. In this case, as the current redo logs and archived logs , both are available , we can go ahead with the complete recovery.</p>
<p>Let&#8217;s try to have this issue for us. We shall delete the control files and data files and will see how we can recover this,</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control01.ctl  example01.dbf  redo03.log    temp01.dbf</p>
<p>control02.ctl  redo01.log     sysaux01.dbf  undotbs01.dbf</p>
<p>control03.ctl  redo02.log     system01.dbf  users01.dbf</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ mkdir control</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ mv *.ctl *.dbf control/</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control  redo01.log  redo02.log  redo03.log</p>
<p>So we have lost our control files and data files. Let&#8217;s stop our database and than start it in the nomount stage,</p>
<p>SQL&#62;shut abort;</p>
<p>SQL&#62;startup nomount;</p>
<p>Now, as we can be in the nomount stage, let&#8217;s restore first our control file,</p>
<p>RMAN&#62; restore controlfile from autobackup;</p>
<p>Starting restore at 18-NOV-09</p>
<p>using target database control file instead of recovery catalog</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=153 device</p>
<p>recovery area destination: /u01/app/oracle/flash_recovery_area</p>
<p>database name (or database unique name) used for search: ORCL</p>
<p>channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703222747_5j67r3rd_.bkp found in the recovery area</p>
<p>AUTOBACKUP search with format &#8220;%F&#8221; not attempted because DBID was not set</p>
<p>channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703222747_5j67r3rd_.bkp</p>
<p>channel ORA_DISK_1: control file restore from AUTOBACKUP complete</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control01.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control02.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control03.ctl</p>
<p>Finished restore at 18-NOV-09</p>
<p>As we have control file with us, let&#8217;s mount the db,</p>
<p>SQL&#62; alter database mount;</p>
<p>Database altered.<br />
Now we need to restore all the datafiles as well. So time to restore the database it self.</p>
<p>RMAN&#62; restore database;</p>
<p>Starting restore at 18-NOV-09</p>
<p>released channel: ORA_DISK_1</p>
<p>Starting implicit crosscheck backup at 18-NOV-09</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=153 device</p>
<p>allocated channel: ORA_DISK_2</p>
<p>channel ORA_DISK_2: SID=151 device</p>
<p>allocated channel: ORA_DISK_3</p>
<p>channel ORA_DISK_3: SID=150 device</p>
<p>allocated channel: ORA_DISK_4</p>
<p>channel ORA_DISK_4: SID=149 device</p>
<p>Crosschecked 7 objects</p>
<p>Finished implicit crosscheck backup at 18-NOV-09</p>
<p>Starting implicit crosscheck copy at 18-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>Finished implicit crosscheck copy at 18-NOV-09</p>
<p>searching for all files in the recovery area</p>
<p>cataloging files&#8230;</p>
<p>cataloging done</p>
<p>List of Cataloged Files</p>
<p>=======================</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_5_5j6ml70l_.arc</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_6_5j6mlhdr_.arc</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_7_5j6mlr9s_.arc</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703222747_5j67r3rd_.bkp</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>channel ORA_DISK_1: starting datafile backup set restore</p>
<p>channel ORA_DISK_1: specifying datafile(s) to restore from backup set</p>
<p>channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf</p>
<p>channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf</p>
<p>channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf</p>
<p>channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf</p>
<p>channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf</p>
<p>channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T033237_5j67cxb0_.bkp</p>
<p>channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T033237_5j67cxb0_.bkp tag=TAG20091118T033237</p>
<p>channel ORA_DISK_1: restored backup piece 1</p>
<p>channel ORA_DISK_1: restore complete, elapsed time: 00:01:05</p>
<p>Finished restore at 18-NOV-09</p>
<p>So we have all what we need. Let&#8217;s try to recover the database.</p>
<p>RMAN&#62; recover database ;</p>
<p>Starting recover at 18-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>starting media recovery</p>
<p>archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j67hbwq_.arc</p>
<p>archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_4_5j67qx4v_.arc</p>
<p>archived log for thread 1 with sequence 5 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_5_5j6ml70l_.arc</p>
<p>archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_6_5j6mlhdr_.arc</p>
<p>archived log for thread 1 with sequence 7 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_7_5j6mlr9s_.arc</p>
<p>archived log for thread 1 with sequence 8 is already on disk as file /u01/app/oracle/oradata/orcl/redo02.log</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j67hbwq_.arc thread=1 sequence=3</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_4_5j67qx4v_.arc thread=1 sequence=4</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_5_5j6ml70l_.arc thread=1 sequence=5</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_6_5j6mlhdr_.arc thread=1 sequence=6</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_7_5j6mlr9s_.arc thread=1 sequence=7</p>
<p>archived log file name=/u01/app/oracle/oradata/orcl/redo02.log thread=1 sequence=8</p>
<p>media recovery complete, elapsed time: 00:00:33</p>
<p>Finished recover at 18-NOV-09</p>
<p>Please note that this is a complete recovery only. But we still need to open the database using Resetlogs.</p>
<p>SQL&#62; alter database open resetlogs;</p>
<p>Database altered.</p>
<p>And we are done!</p>
<p>3&#62;Loss of control files when data files are from the backup  with the loss of redo logs as well&#62;&#62;</p>
<p>This essentially would be a similar sort of recovery as we have seen above but(and this matters the most) will be an incomplete recovery as we would not be able to recover what we had in our current redo logs leading us to have only a handful only.</p>
<p>To illustrate the point, we created a table and put some data into it. After that we added  a lot more data into it.  Some of the the entries would be able to go to the redo logs and from there to the archive logs would come back to us. The remaining would be lost confirming the incomplete recovery to us.</p>
<p>First let&#8217;s create a table and add some data to it,</p>
<p>SQL&#62; create table test_recovery(a number);</p>
<p>SQL&#62; insert into test_recovery values(1);</p>
<p>SQL&#62;commit;</p>
<p>And now we shall add some  more data to it.</p>
<p>SQL&#62; insert into test_recovery values(1);</p>
<p>(output trimmed)</p>
<p>.</p>
<p>..</p>
<p>&#8230;</p>
<p>&#8230;.</p>
<p>SQL&#62;commit;</p>
<p>At this stage, we had this much of data in this table.</p>
<p>SQL&#62;select count(*) from test_recovery;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>32</p>
<p>After this, we took a backup of the database and made sure that the current archive logs are in that backup. Once finished with that, we added a lot more to the table. And finally, we had these many rows in the table,</p>
<p>SQL&#62;select count(*) from test_recovery;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>1048576</p>
<p>And this was the last output for the redo logs,</p>
<p>SQL&#62; select * from V$log;</p>
<p>GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS</p>
<p>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>FIRST_CHANGE# FIRST_TIM</p>
<p>&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;</p>
<p>1          1          4   52428800          1 NO  CURRENT</p>
<p>593472 18-NOV-09</p>
<p>2          1          2   52428800          1 YES INACTIVE</p>
<p>593409 18-NOV-09</p>
<p>3          1          3   52428800          1 YES INACTIVE</p>
<p>593455 18-NOV-09</p>
<p>We can see that the Sequence# 4 is the number of the current log group of ours. At this moment, let&#8217;s introduce the crash.</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control        control03.ctl  redo02.log    system01.dbf   users01.dbf</p>
<p>control01.ctl  example01.dbf  redo03.log    temp01.dbf</p>
<p>control02.ctl  redo01.log     sysaux01.dbf  undotbs01.dbf</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ mv ** control/</p>
<p>mv: cannot move `control&#8217; to a subdirectory of itself, `control/control&#8217;</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control</p>
<p>So we have nothing with us anymore. Naturally, the first step would be to stop the database and start in the Nomount stage. After this, the next step would be to restore the control file from the backup.</p>
<p>RMAN&#62; restore controlfile from autobackup;</p>
<p>Starting restore at 18-NOV-09</p>
<p>using target database control file instead of recovery catalog</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=153 device</p>
<p>recovery area destination: /u01/app/oracle/flash_recovery_area</p>
<p>database name (or database unique name) used for search: ORCL</p>
<p>channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703262508_5j7globt_.bkp found in the recovery area</p>
<p>AUTOBACKUP search with format &#8220;%F&#8221; not attempted because DBID was not set</p>
<p>channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703262508_5j7globt_.bkp</p>
<p>channel ORA_DISK_1: control file restore from AUTOBACKUP complete</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control01.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control02.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control03.ctl</p>
<p>Finished restore at 18-NOV-09</p>
<p>Now, we need to bring the database in the Mount stage so that we can restore the rest of the database. And we shall also check here that whether we have got the control files or not(no need to doubt over RMAN but still),</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control  control01.ctl  control02.ctl  control03.ctl</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ sqlplus / as sysdba</p>
<p>SQL*Plus: Release 11.1.0.6.0 &#8211; Production on Wed Nov 18 14:44:39 2009</p>
<p>Copyright (c) 1982, 2007, Oracle.  All rights reserved.</p>
<p>Connected to:</p>
<p>Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 &#8211; Production</p>
<p>With the Partitioning, OLAP, Data Mining and Real Application Testing options</p>
<p>SQL&#62; alter database mount;</p>
<p>Database altered.</p>
<p>So indeed we have got them. Let&#8217;s proceed to the next step which is to restore the datafiles,</p>
<p>RMAN&#62; restore database;</p>
<p>Starting restore at 18-NOV-09</p>
<p>released channel: ORA_DISK_1</p>
<p>Starting implicit crosscheck backup at 18-NOV-09</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=153 device</p>
<p>allocated channel: ORA_DISK_2</p>
<p>channel ORA_DISK_2: SID=151 device</p>
<p>allocated channel: ORA_DISK_3</p>
<p>channel ORA_DISK_3: SID=150 device</p>
<p>allocated channel: ORA_DISK_4</p>
<p>channel ORA_DISK_4: SID=149 device</p>
<p>Crosschecked 14 objects</p>
<p>Finished implicit crosscheck backup at 18-NOV-09</p>
<p>Starting implicit crosscheck copy at 18-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>Finished implicit crosscheck copy at 18-NOV-09</p>
<p>searching for all files in the recovery area</p>
<p>cataloging files&#8230;</p>
<p>cataloging done</p>
<p>List of Cataloged Files</p>
<p>=======================</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/autobackup/2009_11_18/o1_mf_s_703262508_5j7globt_.bkp</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>channel ORA_DISK_1: starting datafile backup set restore</p>
<p>channel ORA_DISK_1: specifying datafile(s) to restore from backup set</p>
<p>channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf</p>
<p>channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/orcl/example01.dbf</p>
<p>channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhw3p_.bkp</p>
<p>channel ORA_DISK_2: starting datafile backup set restore</p>
<p>channel ORA_DISK_2: specifying datafile(s) to restore from backup set</p>
<p>channel ORA_DISK_2: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf</p>
<p>channel ORA_DISK_2: restoring datafile 00004 to /u01/app/oracle/oradata/orcl/users01.dbf</p>
<p>channel ORA_DISK_2: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhtyg_.bkp</p>
<p>channel ORA_DISK_3: starting datafile backup set restore</p>
<p>channel ORA_DISK_3: specifying datafile(s) to restore from backup set</p>
<p>channel ORA_DISK_3: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf</p>
<p>channel ORA_DISK_3: reading from backup piece /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhtt6_.bkp</p>
<p>channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhw3p_.bkp tag=TAG20091118T140610</p>
<p>channel ORA_DISK_1: restored backup piece 1</p>
<p>channel ORA_DISK_1: restore complete, elapsed time: 00:00:55</p>
<p>channel ORA_DISK_2: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhtyg_.bkp tag=TAG20091118T140610</p>
<p>channel ORA_DISK_2: restored backup piece 1</p>
<p>channel ORA_DISK_2: restore complete, elapsed time: 00:02:06</p>
<p>channel ORA_DISK_3: piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_18/o1_mf_nnndf_TAG20091118T140610_5j7dhtt6_.bkp tag=TAG20091118T140610</p>
<p>channel ORA_DISK_3: restored backup piece 1</p>
<p>channel ORA_DISK_3: restore complete, elapsed time: 00:02:16</p>
<p>Finished restore at 18-NOV-09</p>
<p>And now we can try recovering the database.</p>
<p>RMAN&#62; recover database;</p>
<p>Starting recover at 18-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>starting media recovery</p>
<p>archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_2_5j7dnrff_.arc</p>
<p>archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j7dw3cj_.arc</p>
<p>archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_1_5j7ghkx4_.arc</p>
<p>archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_2_5j7gkddx_.arc</p>
<p>archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j7glm85_.arc</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_2_5j7dnrff_.arc thread=1 sequence=2</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j7dw3cj_.arc thread=1 sequence=3</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_1_5j7ghkx4_.arc thread=1 sequence=1</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_2_5j7gkddx_.arc thread=1 sequence=2</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_18/o1_mf_1_3_5j7glm85_.arc thread=1 sequence=3</p>
<p>unable to find archived log</p>
<p>archived log thread=1 sequence=4</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-03002: failure of recover command at 11/18/2009 14:48:07</p>
<p>RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 4 and starting SCN of 593472</p>
<p>Please note that we got the error for the same sequence number 4 which was of our current log group. Oracle couldn&#8217;t find its archived file and the redo log surely got deleted by us only. So whatever we had inside it is lost and that&#8217;s what the point we mentioned that this would be an incomplete recovery. Let&#8217;s  open the database and check the number of the rows in the table.</p>
<p>SQL&#62; alter database open resetlogs;</p>
<p>Database altered.</p>
<p>SQL&#62; select count(*) from test_recovery;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>32</p>
<p>So indeed we got only what we could save via archive logs in our backup. And since we had lost the redo logs , with the Resetlogs , we got them back but only as blank with nothing available in them yet,</p>
<p>SQL&#62; select * from V$log;</p>
<p>GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS</p>
<p>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212; &#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>FIRST_CHANGE# FIRST_TIM</p>
<p>&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;</p>
<p>1          1          1   52428800          1 NO  CURRENT</p>
<p>593473 18-NOV-09</p>
<p>2          1          0   52428800          1 YES UNUSED</p>
<p>0</p>
<p>3          1          0   52428800          1 YES UNUSED</p>
<p>4&#62;&#62;Loss of control files with no backup available but redo logs are fine</p>
<p>Now this is a serious situation. You have ended up with loss of all of your control files and to put the last cherry on the cake, you have no backup either. This means that you can&#8217;t simply restore the control file from the backup. So you need to recreate the control file. Fortunately, oracle does gives us a way out to do so by its Create Controlfile command, using which we can recreate the control file. Let&#8217;s see this case as well.</p>
<p>To start with, we shall move the control file. Please note that in this case, we do need to have the redo logs fine. Using redo logs and archive logs, we shall be able to open the database. To simulate the loss of control files, let&#8217;s move them to some other location.</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ ls</p>
<p>control        control03.ctl  redo02.log    system01.dbf   users01.dbf</p>
<p>control01.ctl  example01.dbf  redo03.log    temp01.dbf</p>
<p>control02.ctl  redo01.log     sysaux01.dbf  undotbs01.dbf</p>
<p>[oracle@dhcp-otp-phase2-floor-g-1-10-177-54-233 orcl]$ mv *.ctl control/</p>
<p>As we have lost the control files, we need to immediately kill the instance with the Abort option.</p>
<p>SQL&#62; shut abort</p>
<p>ORACLE instance shut down.</p>
<p>To create the control file again, we shall need all the information of the database that this file stores and this must match exactly with the database structure of ours. You can get the current strcuture and the create command by using the</p>
<p>Alter Database Backup Controlfile To Trace command. This would create the text based trace file in the User Dump Dest(10g) and Diagnostic Dest(11g) . If you have not done any changes in the database structure of yours, you can simply pick up this file and use it. This file contains two section , with Resetlogs and without Resetlogs. If you have shutdown your db with the Abort option( like we did), you must use the with resetlogs option only. Also, here as the control file is older than the rest of the database so you need to use the Recover Database Using Backup Controlfile option to tell oracle that an old file is being used. Fortunately all this is already there in the trace file that you would get from the Alter database option.</p>
<p>The trace natively contains lots of information which may not be needed. Its better to get rid of that and let only that content be there in the trace file which is needed by you. You need to run this script while being connected as the Sys user. It has all the commands to go ahead with the rest of the process. Let&#8217;s try to do so,</p>
<p>SQL&#62; @/home/oracle/a.sql</p>
<p>ORACLE instance started.</p>
<p>Total System Global Area  171573248 bytes</p>
<p>Fixed Size                  1298668 bytes</p>
<p>Variable Size             138415892 bytes</p>
<p>Database Buffers           25165824 bytes</p>
<p>Redo Buffers                6692864 bytes</p>
<p>Control file created.</p>
<p>PL/SQL procedure successfully completed.</p>
<p>PL/SQL procedure successfully completed.</p>
<p>ORA-00279: change 593476 generated at 11/18/2009 14:48:31 needed for thread 1</p>
<p>ORA-00289: suggestion :</p>
<p>/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_1_%u_.arcORA-00280: change 593476 for thread 1 is in sequence #1</p>
<p>ORA-00308: cannot open archived log &#8216;&#8211;&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;ALTER&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;&#8211;&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;&#8211;&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;&#8211;&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;ALTER&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;SIZE&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>ORA-00308: cannot open archived log &#8216;&#8211;&#8217;</p>
<p>ORA-27037: unable to obtain file status</p>
<p>Linux Error: 2: No such file or directory</p>
<p>Additional information: 3</p>
<p>Specify log: {&#60;RET&#62;=suggested &#124; filename &#124; AUTO &#124; CANCEL}</p>
<p>/u01/app/oracle/oradata/orcl/redo01.log</p>
<p>Log applied.</p>
<p>Media recovery complete.</p>
<p>SQL&#62; alter database open resetlogs;</p>
<p>Database altered.</p>
<p>So we are done with the recovery!</p>
<p>In the creation of control file, there may be the cases when just going ahead with the default given file may not be sufficient for you. One of the case can be that you have added a new tablespace and then have lost the control file with no or old backup of it which doesn&#8217;t know about the newly added tablespace. In this case, its very important that the information of the newly added tablespace must be told to the previous control file and also to use the “using backup controlfile” option with the recover database. If you dont&#8217; have a backup of the old controlfile stored some where already and you are using the option to create it from the scratch using the Trace option, again you need to take care that the path of all the datafiles and the names of all the tablespaces which were added new must be added in the listing of this control file.</p>
<p>To illustrate the point , let&#8217;s see the same case here. Following are the files and tablespaces that what we have in our database.</p>
<p>SQL&#62; select name from V$datafile;</p>
<p>NAME</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;/u01/app/oracle/oradata/orcl/system01.dbf</p>
<p>/u01/app/oracle/oradata/orcl/sysaux01.dbf</p>
<p>/u01/app/oracle/oradata/orcl/undotbs01.dbf</p>
<p>/u01/app/oracle/oradata/orcl/users01.dbf</p>
<p>/u01/app/oracle/oradata/orcl/example01.dbf</p>
<p>SQL&#62; select * from V$tablespace;</p>
<p>TS# NAME                           INC BIG FLA ENC</p>
<p>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212; &#8212; &#8212; &#8212;</p>
<p>0 SYSTEM                         YES NO  YES</p>
<p>1 SYSAUX                         YES NO  YES</p>
<p>2 UNDOTBS1                       YES NO  YES</p>
<p>4 USERS                          YES NO  YES</p>
<p>3 TEMP                           NO  NO  YES</p>
<p>6 EXAMPLE                        YES NO  YES</p>
<p>6 rows selected.</p>
<p>Let&#8217;s add into the list one more tablespace.</p>
<p>SQL&#62; create tablespace new</p>
<p>2  datafile &#8216;/u01/app/oracle/oradata/orcl/new.dbf&#8217; size 1m;</p>
<p>Tablespace created.</p>
<p>SQL&#62; select count(*) from V$tablespace;</p>
<p>COUNT(*)</p>
<p>&#8212;&#8212;&#8212;-</p>
<p>7</p>
<p>So now we have got one more file in our database about which the backed up control file doesn&#8217;t know.</p>
<p>After getting our file lost,</p>
<p>RMAN&#62; restore controlfile from  &#8216;/u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_ncnnf_TAG20091119T083712_5j9fm60b_.bkp&#8217;;</p>
<p>Starting restore at 19-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>channel ORA_DISK_1: restoring control file</p>
<p>channel ORA_DISK_1: restore complete, elapsed time: 00:00:01</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control01.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control02.ctl</p>
<p>output file name=/u01/app/oracle/oradata/orcl/control03.ctl</p>
<p>Finished restore at 19-NOV-09</p>
<p>SQL&#62; alter database mount;</p>
<p>Database altered.</p>
<p>RMAN&#62; recover database;</p>
<p>Starting recover at 19-NOV-09</p>
<p>released channel: ORA_DISK_1</p>
<p>Starting implicit crosscheck backup at 19-NOV-09</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=152 device</p>
<p>allocated channel: ORA_DISK_2</p>
<p>channel ORA_DISK_2: SID=151 device</p>
<p>allocated channel: ORA_DISK_3</p>
<p>channel ORA_DISK_3: SID=150 device</p>
<p>allocated channel: ORA_DISK_4</p>
<p>channel ORA_DISK_4: SID=149 device</p>
<p>Crosschecked 4 objects</p>
<p>Finished implicit crosscheck backup at 19-NOV-09</p>
<p>Starting implicit crosscheck copy at 19-NOV-09</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>Finished implicit crosscheck copy at 19-NOV-09</p>
<p>searching for all files in the recovery area</p>
<p>cataloging files&#8230;</p>
<p>cataloging done</p>
<p>List of Cataloged Files</p>
<p>=======================</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_7_5j9fqchp_.arc</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_6_5j9fq1bs_.arc</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_annnn_TAG20091119T083931_5j9fqdg7_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_annnn_TAG20091119T083931_5j9fqdrj_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_nnsnf_TAG20091119T083712_5j9fmf0n_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_nnndf_TAG20091119T084437_5j9g0xgk_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_nnndf_TAG20091119T083712_5j9fm1ny_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_annnn_TAG20091119T083921_5j9fq1s8_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_annnn_TAG20091119T083931_5j9fqdb0_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_nnndf_TAG20091119T083712_5j9fm2lr_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_ncnnf_TAG20091119T083712_5j9fm60b_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_annnn_TAG20091119T083931_5j9fqdo9_.bkp</p>
<p>File Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2009_11_19/o1_mf_nnndf_TAG20091119T083712_5j9fm1sd_.bkp</p>
<p>using channel ORA_DISK_1</p>
<p>using channel ORA_DISK_2</p>
<p>using channel ORA_DISK_3</p>
<p>using channel ORA_DISK_4</p>
<p>RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row</p>
<p>RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows</p>
<p>ORACLE error from target database:</p>
<p>ORA-19922: there is no parent row with id 0 and level 1</p>
<p>starting media recovery</p>
<p>archived log for thread 1 with sequence 6 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_6_5j9fq1bs_.arc</p>
<p>archived log for thread 1 with sequence 7 is already on disk as file /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_7_5j9fqchp_.arc</p>
<p>archived log for thread 1 with sequence 8 is already on disk as file /u01/app/oracle/oradata/orcl/redo02.log</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_6_5j9fq1bs_.arc thread=1 sequence=6</p>
<p>archived log file name=/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_7_5j9fqchp_.arc thread=1 sequence=7</p>
<p>archived log file name=/u01/app/oracle/oradata/orcl/redo02.log thread=1 sequence=8</p>
<p>creating datafile file number=6 name=/u01/app/oracle/oradata/orcl/new.dbf</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-03002: failure of recover command at 11/19/2009 09:11:12</p>
<p>ORA-01119: error in creating database file &#8216;/u01/app/oracle/oradata/orcl/new.dbf&#8217;</p>
<p>ORA-27038: created file already exists</p>
<p>Additional information: 1</p>
<p>SQL&#62; recover database using backup controlfile;</p>
<p>ORA-00283: recovery session canceled due to errors</p>
<p>ORA-01111: name for data file 6 is unknown &#8211; rename to correct file</p>
<p>ORA-01110: data file 6: &#8216;/u01/app/oracle/product/11.1.0/db_1/dbs/UNNAMED00006&#8242;</p>
<p>ORA-01157: cannot identify/lock data file 6 &#8211; see DBWR trace file</p>
<p>ORA-01111: name for data file 6 is unknown &#8211; rename to correct file</p>
<p>ORA-01110: data file 6: &#8216;/u01/app/oracle/product/11.1.0/db_1/dbs/UNNAMED00006&#8242;</p>
<p>SQL&#62; alter database rename file &#8216;/u01/app/oracle/product/11.1.0/db_1/dbs/UNNAMED00006&#8242; TO &#8216;/u01/app/oracle/oradata/orcl/new.dbf&#8217;;</p>
<p>Database altered.</p>
<p>RMAN&#62; recover datafile 6;</p>
<p>Starting recover at 19-NOV-09</p>
<p>using target database control file instead of recovery catalog</p>
<p>allocated channel: ORA_DISK_1</p>
<p>channel ORA_DISK_1: SID=152 device</p>
<p>allocated channel: ORA_DISK_2</p>
<p>channel ORA_DISK_2: SID=150 device</p>
<p>allocated channel: ORA_DISK_3</p>
<p>channel ORA_DISK_3: SID=155 device</p>
<p>allocated channel: ORA_DISK_4</p>
<p>channel ORA_DISK_4: SID=149 device</p>
<p>RMAN-06900: WARNING: unable to generate V$RMAN_STATUS or V$RMAN_OUTPUT row</p>
<p>RMAN-06901: WARNING: disabling update of the V$RMAN_STATUS and V$RMAN_OUTPUT rows</p>
<p>ORACLE error from target database:</p>
<p>ORA-19922: there is no parent row with id 0 and level 1</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============</p>
<p>RMAN-00571: ===========================================================</p>
<p>RMAN-03002: failure of recover command at 11/19/2009 09:17:19</p>
<p>RMAN-06067: RECOVER DATABASE required with a backup or created control file</p>
<p>SQL&#62;  recover database using backup controlfile;</p>
<p>ORA-00279: change 564920 generated at 11/19/2009 08:43:22 needed for thread 1</p>
<p>ORA-00289: suggestion :</p>
<p>/u01/app/oracle/flash_recovery_area/ORCL/archivelog/2009_11_19/o1_mf_1_8_%u_.arcORA-00280: change 564920 for thread 1 is in sequence #8</p>
<p>Specify log: {&#60;RET&#62;=suggested &#124; filename &#124; AUTO &#124; CANCEL}</p>
<p>/u01/app/oracle/oradata/orcl/redo02.log</p>
<p>Log applied.</p>
<p>Media recovery complete.</p>
<p>SQL&#62;</p>
<p>SQL&#62; alter database open resetlogs;</p>
<p>Database altered.</p>
<p>SQL&#62; select * from V$tablespace;</p>
<p>TS# NAME                           INC BIG FLA ENC</p>
<p>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212; &#8212; &#8212; &#8212;</p>
<p>0 SYSTEM                         YES NO  YES</p>
<p>1 SYSAUX                         YES NO  YES</p>
<p>2 UNDOTBS1                       YES NO  YES</p>
<p>4 USERS                          YES NO  YES</p>
<p>3 TEMP                           NO  NO  YES</p>
<p>6 EXAMPLE                        YES NO  YES</p>
<p>7 NEW                            YES NO  YES</p>
<p>7 rows selected.</p>
<p>P.S: Any misspelled stuff apologies.</p>
<p>Rgds&#8230;R</p>
<p>N</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MacKinnon Talon tree]]></title>
<link>http://joannegen.wordpress.com/2009/11/21/mackinnon-talon-tree/</link>
<pubDate>Sat, 21 Nov 2009 17:04:27 +0000</pubDate>
<dc:creator>Joanne McKinnon</dc:creator>
<guid>http://joannegen.wordpress.com/2009/11/21/mackinnon-talon-tree/</guid>
<description><![CDATA[Just added the earliest MacKinnon record I could find in Canada.  Donald MacKinnon married Françoise]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Just added the earliest <a href="http://www.mcfingon.net/genealogy/getperson.php?personID=I1&#38;tree=Kildonan">MacKinnon</a> record I could find in Canada.  Donald MacKinnon married Françoise Talon April 22nd, 1765 in the Notre Dame Basilica of Montreal. Donald was born in <a href="http://en.wikipedia.org/wiki/Kildonan,_Arran">Kildonan</a>, Isle of Arran, Scotland circa 1739. Françoise Talon was born in Montmagny, Quebec, May 29th, 1738.</p>
<p>I traced her paternal line back to Etienne Talon, son of Simon and Jeanne Mura, born circa 1671 in <a href="http://en.wikipedia.org/wiki/Bordeaux">Bordeaux</a>, Guyenne, France.</p>
<p>Donald MacKinnon&#8217;s parents were Augustin and Christine MacDonald. Found no record of them having lived in Canada. I did not find any children from the MacKinnon and Talon marriage.</p>
<p>Found this marriage years ago in the early days of this project, but I was never able to find anything else on this couple. Donald was born before the battle of <a href="http://en.wikipedia.org/wiki/Battle_of_Culloden"> Culloden</a>. Did he arrive with his family? Or as a soldier?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ใน PDO query 2 ครั้งติดกันอาจจะเจ๊ง ถ้า...]]></title>
<link>http://veer66.wordpress.com/2009/11/21/pdomquery/</link>
<pubDate>Sat, 21 Nov 2009 10:54:35 +0000</pubDate>
<dc:creator>वीर</dc:creator>
<guid>http://veer66.wordpress.com/2009/11/21/pdomquery/</guid>
<description><![CDATA[ใน PDO query 2 ครั้งติดกันอาจจะเจ๊ง ถ้าหากว่า fetch ข้อมูลออกมาไม่หมด (ตามคู่มือ) แต่ก็มีท่าแก้คือ เ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>ใน PDO query 2 ครั้งติดกันอาจจะเจ๊ง ถ้าหากว่า fetch ข้อมูลออกมาไม่หมด (<a href="http://www.php.net/manual/en/pdo.query.php">ตามคู่มือ</a>)  แต่ก็มีท่าแก้คือ เรียก <a href="http://www.php.net/manual/en/pdostatement.closecursor.php">closeCursor</a> ก่อน</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ระบบฐานข้อมูล]]></title>
<link>http://sclaimon.wordpress.com/2009/11/21/%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a%e0%b8%90%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1%e0%b8%b9%e0%b8%a5-2/</link>
<pubDate>Sat, 21 Nov 2009 07:51:36 +0000</pubDate>
<dc:creator>SoClaimon</dc:creator>
<guid>http://sclaimon.wordpress.com/2009/11/21/%e0%b8%a3%e0%b8%b0%e0%b8%9a%e0%b8%9a%e0%b8%90%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1%e0%b8%b9%e0%b8%a5-2/</guid>
<description><![CDATA[204351     ระบบฐานข้อมูล     Database Systems ลักษณะทั่วไปของระบบสารสนเทศ เทคนิคการเก็บข้อมูล การบริ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>204351     ระบบฐานข้อมูล     Database Systems</p>
<p>ลักษณะทั่วไปของระบบสารสนเทศ เทคนิคการเก็บข้อมูล การบริการข้อมูลและการค้นหาข้อมูล การจัดระบบแฟ้มข้อมูล เทคนิคการเข้าถึงข้อมูลแบบต่างๆ หลักการของระบบฐานข้อมูลและการจัดการฐานข้อมูล ฐานข้อมูลแบบลํ าดับชั้น แบบเครือข่าย แบบเชิงสัมพันธ์และแบบเชิงวัตถุ การประยุกต์ใช้งานระบบฐานข้อมูล</p>
<p>(General characteristics of information systems; data storage techniques; data manipulation and searching services; file management; information retrieval techniques; principles of database systems and database management; database modeling: hierachical model, network model, relational model, and object-oriented model; applications of database systems.)</p>
<p>(204351 มหาวิทยาลัยเกษตรศาสตร์)</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
