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

<channel>
	<title>Pythian - Data Experts Blog &#187; Oracle</title>
	<atom:link href="http://www.pythian.com/blog/category/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pythian.com/blog</link>
	<description>Official Pythian Blog - Love Your Data</description>
	<lastBuildDate>Fri, 17 May 2013 12:23:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Log Buffer #320, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-320-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-320-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 17 May 2013 12:23:12 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=55171</guid>
		<description><![CDATA[The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy. Oracle: Create colored heat maps in SQL*Plus with Kyle Hailey. Here’s a quick and...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>The red carpet has been laid down at this Log Buffer Edition, and you can witness and cheer the cat-walking blog posts from Oracle, SQL Server and MySQL. Every one of them is chic, elegant, sensual in its own right. Enjoy.<br />
<span id="more-55171"></span><strong>Oracle:</strong></p>
<p>Create colored heat maps in SQL*Plus with <a href="http://dboptimizer.com/2013/05/10/colored-heat-maps-in-sqlplus/">Kyle Hailey.</a></p>
<p>Here’s a quick and dirty script to create a procedure (in the SYS schema – so be careful) to check the <a href="http://jonathanlewis.wordpress.com/2013/05/10/hakan-factor/">Hakan</a> Factor for an object.</p>
<p><a href="http://connormcdonald.wordpress.com/2013/05/13/default-null-for-collection-parameter/">Connor</a> has a good post about default null for collection parameter.</p>
<p>This is yet another blogpost on <a href="http://fritshoogland.wordpress.com/2013/05/09/direct-path-read-and-fast-full-index-scans/">Oracle</a>’s direct path read feature which was introduced for non-parallel query processes in Oracle version 11.</p>
<p>Owen Allen has seen some questions about provisioning Oracle Solaris 11. They boil down to <a href="https://blogs.oracle.com/opscenter/entry/provisioning_oracle_solaris_111">this</a>.</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://www.sqlservercentral.com/articles/Administration/98346/">Shashank Srivastava</a> tells us as how to Change the SQL Server Instance Name after Renaming the Windows Host.</p>
<p><a href="http://www.mssqltips.com/sqlservertip/2938/how-to-synchronize-two-ssas-servers/">Daniel Calbimonte</a> shares as how to synchronize two SSAS Servers.</p>
<p><a href="http://dataarch.sqlpass.org/">Data</a> Architecture underpins just about everything we do in IT.  Without a clear understanding of how data is structured, there is no reliable way to derive meaning from it.</p>
<p><a href="http://www.sqlservercentral.com/articles/Security/98202/">Orlando Colamatteo</a> is login-less in Seattle.</p>
<p>Lets get started testing database with tSQLt with <a href="https://www.simple-talk.com/sql/t-sql-programming/getting-started-testing-databases-with-tsqlt/">Robert Sheldon</a>.</p>
<p><strong>MySQL:</strong></p>
<p>After a lot of fuzz, Anders Karlsson is now releasing <a href="http://karlssonondatabases.blogspot.com/2013/05/myquery-351-beta-released.html">MyQuery</a> version 3.5.1.</p>
<p>Nothing like reestablishing a tradition and Dave Stokes is doing just that for <a href="http://opensourcedba.wordpress.com/2013/05/16/reestablishing-a-mysql-tradition/">MySQL</a>.</p>
<p><a href="http://marcalff.blogspot.com/2013/05/spreading-word-about-performance-schema.html">Mare Alff</a> is spreading the word about the performance schema.</p>
<p><a href="http://rethinkdb.com/blog/1.5-release">Slava Akhmechet</a> talks about secondary indexes, batched inserts performance improvements, soft durability mode.</p>
<p>It is a central part of the <a href="http://optimize-this.blogspot.com/2013/05/the-outer-join-to-inner-join-coversion.html">MySQL</a> philosophy to try and help you as much as you can. There are many occasions when it could tell you that what you are asking for is utterly stupid or give you a bad execution plan because &#8220;you asked for it&#8221;.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-320-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log Buffer #319, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-319-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-319-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 10 May 2013 12:52:27 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=55035</guid>
		<description><![CDATA[This week again, the Log Buffer Edition covers the exciting and ever-evolving galaxies of Oracle, MySQL and SQL Server. Oracle: When does an Oracle process know it’s on Exadata? MobaXterm 6.3 has been released. You can find the download and changelog in the usual place. A new major release (version 3.0) of Randolf&#8217;s XPLAN_ASH tool...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>This week again, the Log Buffer Edition covers the exciting and ever-evolving galaxies of Oracle, MySQL and SQL Server.</p>
<p><span id="more-55035"></span><strong>Oracle:</strong></p>
<p>When does an Oracle process know it’s on <a href="http://fritshoogland.wordpress.com/2013/05/04/when-does-an-oracle-process-know-its-on-exadata/">Exadata</a>?</p>
<p><a href="http://www.oracle-base.com/blog/2013/05/09/mobaxterm-6-3/">MobaXterm</a> 6.3 has been released. You can find the download and changelog in the usual place.</p>
<p>A <a href="http://oracle-randolf.blogspot.com/2013/05/new-version-of-xplanash-tool-video.html">new</a> major release (version 3.0) of Randolf&#8217;s XPLAN_ASH tool is available for download.</p>
<p>Important !! <a href="http://richardfoote.wordpress.com/2013/05/08/important-clustering-factor-calculation-improvement-fix-you/">Clustering</a> Factor Calculation Improvement</p>
<p><a href="http://hoopercharles.wordpress.com/2013/05/01/grouping-data-sets-by-week-number-in-the-month/">Grouping</a> Data Sets by Week Number of the Month</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://sqlserverpedia.com/blog/">Jason Crider</a> asks to put some Windows update in his basket.</p>
<p>Data cleansing can be done via SSIS as well as Data Quality Services (DQS) and Master Data Services (MDS).  The lines are a bit blurred when talking about data cleansing using SSIS, DQS and <a href="http://www.jamesserra.com/archive/2012/06/microsoft-data-quality-services-in-sql-server-2012/">MDS</a>.</p>
<p>How To: Migrate Encrypted Procedures To Windows Azure SQL Database (<a href="http://thomaslarock.com/">WASD</a>).</p>
<p>It’s a best <a href="http://littlekendra.com/">practice</a> to keep your index keys as narrow as possible, and SQL Server enforces a maximum key length of 900 bytes on most “normal” clustered and non-clustered indexes.</p>
<p>Webcast Presentation <a href="http://www.jasonstrate.com/">Materials</a>: Introduction to SQL Server Security</p>
<p><strong>MySQL:</strong></p>
<p>This is the start of the heavy travel season for the MySQL Community Team. So if you are attending<a href="http://opensourcedba.wordpress.com/2013/05/09/mysql-community-team-at-phptek-drupalcon-texas-linux-fest-self-redhat-summit-and-lonestar-php/"> PHPTek</a>, Drupalcon, Texas LinuxFest, SELF, Redhat Summit, or Lonestar PHP please make sure to say ‘hi’ while you are in Chicago, Portland, Austin, Charlotte, Boston, or Addison.</p>
<p>Your databases in a glance with <a href="http://www.mysqlplus.net/2013/05/09/databases-glance-glimpsee/">Glimpsee</a></p>
<p><a href="http://continuent-tungsten.blogspot.com/2013/05/tungsten-university-introduction-to.html">Continuent</a> Tungsten 2.0 is a major step forward that includes key feature improvements to help you manage very large datasets on MySQL.</p>
<p>How to create a new (or repair a broken) GTID based slave with Percona <a href="http://www.mysqlperformanceblog.com/2013/05/09/how-to-create-a-new-or-repair-a-broken-gtid-based-slave-with-percona-xtrabackup/">XtraBackup</a></p>
<p>Disk I/O is frequently the performance bottleneck with relational databases. With AWS recently releasing 4,000 PIOPs EBS volumes, <a href="http://palominodb.com/blog/2013/05/08/benchmarking-postgres-aws-4000-piops-ebs-instances">Laine Campbell</a> wanted to do some benchmarking with pgbench and PostgreSQL 9.2.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-319-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log Buffer #318, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-318-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-318-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 03 May 2013 11:50:57 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54997</guid>
		<description><![CDATA[News and views are an integral part of our modern daily life. When it comes to the information-hungry roles such as database professionals, such need becomes more pressing. Log Buffer is one way to keep abreast of news and views from the world of Oracle, SQL Server, and MySQL. Oracle: There is a significant update...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>News and views are an integral part of our modern daily life. When it comes to the information-hungry roles such as database professionals, such need becomes more pressing. Log Buffer is one way to keep abreast of news and views from the world of Oracle, SQL Server, and MySQL.</p>
<p><span id="more-54997"></span><strong>Oracle:</strong></p>
<p>There is a significant update SLOB 2, <a href="https://kevinclosson.wordpress.com/2013/05/02/slob-2-a-significant-update-links-are-here/">Kevin Closson</a> informs.</p>
<p><a href="http://hoopercharles.wordpress.com/2013/05/01/grouping-data-sets-by-week-number-in-the-month/">Charles Hooper</a> is grouping Data Sets by Week Number of the Month.</p>
<p><a href="http://www.antognini.ch/2013/05/itl-deadlocks-script/">Chris Antognini</a> has shared a script that is used to demo ITL deadlocks.</p>
<p>As <a href="http://richardfoote.wordpress.com/2013/05/01/storage-indexes-vs-database-indexes-iv-8-column-limit-eight-line-poem/">Exadata</a> Storage Indexes (SI) are purely memory only structures located on the Exadata storage servers, care needs to be taken in how much memory they can potentially consume.</p>
<p><a href="http://connormcdonald.wordpress.com/2013/04/29/its-not-about-the-outage/">Connon McDonald</a> says that its not about the outage, but&#8230;.</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://sql.richarddouglas.co.uk/">Richard Douglas </a>is giving information about SQL Server events in UK.</p>
<p><a href="http://thomaslarock.com/">Thomas LaRock</a> has been involved in a virtualization projects for almost ten years now.</p>
<p><a href="http://littlekendra.com/">Kendra Little</a> has five things about Fillfactor.</p>
<p><a href="http://kevinekline.com/">Kevin Kline</a> suggests to use TPC database benchmarks to save money.</p>
<p>Here’s a quick mystery. You have a <a href="http://midnightdba.itbookworm.com/midnightdba/blog/">SQL Server</a> with several jobs that appear to be running properly and on schedule, but many of them show no history.</p>
<p><strong>MySQL:</strong></p>
<p>How does <a href="http://blog.jcole.us/2013/05/02/how-does-innodb-behave-without-a-primary-key/">InnoDB</a> behave without a Primary Key? Jeremy Cole asks.</p>
<p>The <a href="http://blog.mariadb.org/mariadb-java-client-1-1-2-released/">MariaDB</a> project is pleased to announce the immediate availability of the MariaDB Java Client 1.1.2.</p>
<p>Normal 0 false <a href="http://scaledb.blogspot.com/2013/05/thoughts-on-xeround-and-free.html">false</a> false EN-US X-NONE X-NONE Everybody loves free. It is the best marketing term one could use.</p>
<p><a href="http://www.clusterdb.com/mysql-cluster/mysql-cluster-manager-1-2-3-released/">MySQL</a> Cluster Manager 1.2.3 is now available to download from My Oracle Support.</p>
<p>When is a Subquery Executed?  <a href="http://oysteing.blogspot.com/2013/05/when-is-subquery-executed.html">Øystein Grøvlen</a> writes.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-318-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Log Buffer #317, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-317-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-317-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 26 Apr 2013 12:06:10 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Log Buffer]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54967</guid>
		<description><![CDATA[Reminders are an inevitable part of our personal and professional lives. Keep reminding of oneself about goals, priorities, and milestones is key to stay on top of things. This Log Buffer Edition is a reminder about all those not-to-be-missed blogs out there. Oracle: One of the developers was performing a delete using a nested subquery,...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Reminders are an inevitable part of our personal and professional lives. Keep reminding of oneself about goals, priorities, and milestones is key to stay on top of things. This Log Buffer Edition is a reminder about all those not-to-be-missed blogs out there.</p>
<p><span id="more-54967"></span></p>
<p><strong>Oracle:</strong></p>
<p>One of the developers was performing a delete using a nested subquery, which was throwing out ORA-00600 errors. The ORA-00600 Lookup Tool on MOS suggested it was caused by a bug, <a href="http://www.oracle-base.com/blog/2013/04/25/opt_param-hint-saves-the-day/">Tim Hall</a> reports.</p>
<p>The healthcare sector has a clear opportunity to modernize care delivery by adopting new data interchange standards and EHR systems. <a href="http://dboptimizer.com/2013/04/24/database-virtualization-data-as-a-service-in-healthcare/">Kyle </a>opines.</p>
<p><a href="http://martincarstenbach.wordpress.com/2013/04/23/limiting-the-degree-of-parallelism-via-resource-manager-and-a-gotcha/">This</a> might be something very obvious for the reader but Martin had an interesting revelation recently when implementing parallel_degree_limit_p1 in a resource consumer group.</p>
<p><a href="http://www.adellera.it/blog/2013/04/22/fast-refresh-of-outer-join-only-materialized-views-algorithm-part-1/">Alberto</a> has a good post on fast refresh of outer-join-only materialized views.</p>
<p><a href="http://hoopercharles.wordpress.com/2013/04/19/unexpected-timer-resolution-unexpected-parked-cpus-unexpected-power-consumption/">Charles Hooper</a> is discussing Unexpected Timer Resolution, Unexpected Parked CPUs, Unexpected Power Consumption.</p>
<p><strong>SQL Server:</strong></p>
<p>There are five SQL Server white papers which every <a href="http://www.jasonstrate.com/">DBA</a> should read.</p>
<p><a href="http://www.jamesserra.com/">James</a> gets into an interesting discussion about consultants.</p>
<p><a href="http://littlekendra.com/">Kendra Little</a> wonders as why most people don&#8217;t follow best practices.</p>
<p><a href="http://kendalvandyke.blogspot.com">Kendal Van Dyke</a> writes a quick note to let you know that SQL Power Doc version 1.0.1.0 is now live.</p>
<p>Let’s talk about database application benchmarking with <a href="http://kevinekline.com/">Kevin Kline</a>.</p>
<p><strong>MySQL:</strong></p>
<p><a href="http://www.flamingspork.com/blog/2013/04/26/a-few-notes-on-innodb-in-mysql-5-7-1/">Stewart Smith</a> is sharing a few notes on InnoDB in MySQL 5.7.1.</p>
<p><a href="http://www.mysqlperformanceblog.com/2013/04/25/more-on-transactions-descriptors-optimization/">Alexey Kopytov</a> has blogged more on transaction descriptors optimization.</p>
<p>MySQL Cluster gets a Community Award, <a href="http://insidemysql.com/mysql-cluster-gets-a-community-award/">Tomas</a> tells us.</p>
<p>Oracle&#8217;s VP of MySQL Engineering Tomas Ulin delivered on Tuesday a keynote entitled &#8220;Driving <a href="https://blogs.oracle.com/MySQL/entry/driving_mysql_innovation">MySQL</a> Innovation for Next Generation Applications&#8221; at the Percona Live Conference.</p>
<p><a href="http://blog.mariadb.org/mariadb-introduces-atomic-writes/">MariaDB</a> Introduces Atomic Writes, Arel Schwenke reveals.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-317-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opening the Door without the Keys</title>
		<link>http://www.pythian.com/blog/opening-the-door-without-the-keys/</link>
		<comments>http://www.pythian.com/blog/opening-the-door-without-the-keys/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 14:36:16 +0000</pubDate>
		<dc:creator>Christine Kivi</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[DBA Lounge]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54921</guid>
		<description><![CDATA[This week my DBA team satisfied a request to restore 1 month old lost data.  A review of the RMAN backups showed that we indeed had a valid level 0 from the requested day which was 33 days ago.  However, upon recovery, the necessary archive logs to bring the database to a consistent point, were...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>This week my DBA team satisfied a request to restore 1 month old lost data.  A review of the RMAN backups showed that we indeed had a valid level 0 from the requested day which was 33 days ago.  However, upon recovery, the necessary archive logs to bring the database to a consistent point, were not available.  With a 28 day retention policy, running level 0 backups every 15 days, and level 1s each night, we did have the necessary level 0 backup, but the archive logs had been deleted.  How to retrieve a copy of a user schema from a database that you cannot open?  With the hidden “_allow_resetlogs_corruption” parameter.</p>
<p>To make matters more difficult, we were also doing just a partial database restore – we only required 1 schema, located in its own tablespace but this tablespace was encrypted.</p>
<p>The partial database restore was simple enough.  The team began the restore and recovery on another server.  The server where recovery is to be performed should have the same path/location of files as the old server, if not then update the path of the datafiles using set newname command in rman recovery, update the logfiles using alter database rename commands and update the tempfile by re-creating it.</p>
<pre>RMAN&gt; run
{
ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
ALLOCATE CHANNEL C2 DEVICE TYPE DISK;
ALLOCATE CHANNEL C3 DEVICE TYPE DISK;
set until time "to_date('16-03-2013 07:00:00','dd-mm-yyyy hh24:mi:ss')";
restore database skip forever tablespace 'USERS1','USERS2',' USERS3',' USERS4';
recover database skip forever tablespace 'USERS1','USERS2',' USERS3',' USERS4';
RELEASE  CHANNEL C1;
RELEASE  CHANNEL C3;
RELEASE  CHANNEL C3;
}</pre>
<p>RMAN completed the restore of the SYSTEM, SYSAUX, UNDO and our USERS tablespace without issue, but sadly during the recovery we received the Oracle Error:</p>
<pre>ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
RMAN-03002: failure of recover command at 04/19/2013 17:24:34
RMAN-06053: unable to perform media recovery because of missing log</pre>
<p>You know at this point that your data is right there – so close to grab and provide for your customer and become the DBA hero you long to be – but Oracle won’t open the door and let you in.  What to do?  All we need is to get the data and get out.  We are not going to allow users into this half-way house we call an Oracle database.  So, we allow for the corruption with the hidden parameter “_allow_resetlogs_corruption”.  This should not be used lightly – your database will be a mess – but it will allow you to open it, and hopefully get the data you need.</p>
<pre>SQL&gt; shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup mount
ORACLE instance started.

Total System Global Area  530288640 bytes
Fixed Size                  2131120 bytes
Variable Size             310381392 bytes
Database Buffers          209715200 bytes
Redo Buffers                8060928 bytes
Database mounted.

SQL&gt; ALTER SYSTEM SET "_allow_resetlogs_corruption"= TRUE SCOPE = SPFILE;
SQL&gt; ALTER SYSTEM SET undo_management=MANUAL SCOPE = SPFILE;
SQL&gt; shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL&gt; startup mount
ORACLE instance started.

Total System Global Area  530288640 bytes
Fixed Size                  2131120 bytes
Variable Size             310381392 bytes
Database Buffers          209715200 bytes
Redo Buffers                8060928 bytes
Database mounted.

SQL&gt; alter database open resetlogs;

Database altered.</pre>
<p>Halleluiah! As a DBA, these are words you long to see on your screen “Database opened”.  At this point, I am certain my team has super human DBA talent.  The data is there for the taking!  But wait, still not able to grab it.  The database continues to crash with ORA-600 errors.  The team realizes that the errors are related to Oracle jobs that are failing, we set job_queue_processes=0; and restart the instance.  The database seems to be stable now, but the expdp needs a job process in order to run.  If we modify the job_queue_processes parameter, then the instance will crash.  We go back to our roots and try the old export utility “exp”.  This works great, except if you remember our tablespaces are encrypted.  Exp cannot export the data from them.  Painstakingly, the team moves each object into a new non-encrypted tablespace.  Many ORA-00600 errors are hit along the way.  The road is not smooth, but, with perseverance all objects get moved.  We then create a new UNDO tablespace:</p>
<pre>SQL&gt; CREATE UNDO TABLESPACE undo1 datafile '&lt;ora_data_path&gt;\undo1_1.dbf' size 200m autoextend on maxsize unlimited;
Tablespace created.
SQL&gt; ALTER SYSTEM SET undo_tablespace = undo1 SCOPE=spfile;
System altered.
SQL&gt; alter system set undo_management=auto scope=spfile;
System altered.

SQL&gt; shutdown immediate
SQL&gt; startup</pre>
<p>Finally the team is able to generate a successful export dump using exp:</p>
<pre>exp file=&lt;path_to_exportlocation&gt;\tran.dmp indexes=n direct=y feedback=100000 statistics=none owner=('&lt;schema_owner&gt;')</pre>
<p>The team members are now experts at both partial recoveries and getting the front door to an Oracle database open when you fail to have the right keys.  The lesson here?  Keep all your keys to the front door, but remember back doors do exist.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/opening-the-door-without-the-keys/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Log Buffer #316, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-316-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-316-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 12:36:36 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54825</guid>
		<description><![CDATA[Just as information has become an integral part of technology, blogging has become an inseparable part of technology too. Database technologies are no exception and blogging in that arena is booming. This Log Buffer Edition is booming with some bombastic blog posts. Oracle: Arup Nanda asks. Application Design is the only Reason for Deadlocks? Think...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Just as information has become an integral part of technology, blogging has become an inseparable part of technology too. Database technologies are no exception and blogging in that arena is booming. This Log Buffer Edition is booming with some bombastic blog posts.</p>
<p><span id="more-54825"></span><strong>Oracle:</strong></p>
<p><a href="http://arup.blogspot.com/2013/04/application-design-is-only-reason-for.html">Arup Nanda</a> asks. Application Design is the only Reason for Deadlocks? Think Again.</p>
<p>It’s <a href="http://dboptimizer.com/2013/04/18/data-virtualization-for-databases-use-cases-part-1/">time</a> that businesses took a good, hard look at the way they manage their cloned database environments, Kyle Opines.</p>
<p><a href="http://oracle-randolf.blogspot.com/2013/04/asm-au-size-and-lmt-autoallocate.html">Randolf</a> touches the interesting topic of ASM AU Size And LMT AUTOALLOCATE.</p>
<p><a href="http://jonathanlewis.wordpress.com/2013/04/16/systimestamp/">Jonathan Lewis</a> is having some entertainment.</p>
<p><a href="http://www.scaleabilities.co.uk/2013/04/17/optimal-oracle-configuration-for-efficient-table-scanning-part-one/">James Morle</a> produces a gem of an article on Optimal Oracle Configuration for Efficient Table Scanning.</p>
<p><strong>SQL Server:</strong></p>
<p><a href="http://www.sqlservercentral.com/blogs/sql-development-wizard/2013/04/10/run-dbcc-checkdb-on-a-regular-basis/">Peter Skoglund</a> is running DBCC CHECKDB on a regular basis.</p>
<p><a href="http://www.sqlservercentral.com/blogs/james-sql-footprint/2013/04/10/set-dac-port-with-a-specific-number/">Usually</a> named instance can uses dynamic port, if firewall setup on the server, you can use SQL Server Configuration Manager.</p>
<p><a href="http://www.jasonstrate.com/">Jason</a> is backing up Azure SQL database to the cloud.</p>
<p>Microsoft let new SQL Server version name slip? <a href="http://sql.richarddouglas.co.uk/">Richard Douglas</a> asks.</p>
<p><a href="http://sqlsafety.blogspot.com/">David Dye</a> was recently introduced to a number of SSIS packages containing execute SQL and data flow tasks, all of which were using dynamic SQL.</p>
<p><strong>MySQL:</strong></p>
<p><a href="http://www.flamingspork.com/blog/2013/04/19/the-merge-storage-engine-not-dead-just-resting-or-forgotten/">Stewart Smith</a> says that the MERGE storage engine is not dead, just resting or forgotten.</p>
<p>Installing Apache2 With PHP5 And MySQL Support On OpenSUSE 12.3 (<a href="http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-onopensuse-12.3-lamp">LAMP</a>)</p>
<p>Rotating <a href="http://www.mysqlperformanceblog.com/2013/04/18/rotating-mysql-slow-logs-safely/">MySQL</a> slow logs safely is important.</p>
<p><a href="http://blog.mariadb.org/mariadb-foundation-takes-next-steps-to-community-governance/">MariaDB</a> Foundation Takes Next Steps To Community Governance</p>
<p><a href="http://blog.jcole.us/2013/04/17/innodb-a-journey-to-the-core-at-the-mysql-conference/">InnoDB</a>: A journey to the core: At the MySQL Conference</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-316-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IOUG Collaborate 2013 Wrap-Up</title>
		<link>http://www.pythian.com/blog/ioug-collaborate-2013-wrap-up/</link>
		<comments>http://www.pythian.com/blog/ioug-collaborate-2013-wrap-up/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 17:23:10 +0000</pubDate>
		<dc:creator>Jeremy Schneider</dc:creator>
				<category><![CDATA[Group Blog Posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Technical Blog]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54565</guid>
		<description><![CDATA[Personal highlights from Collaborate 2013 in Denver.  Discussion of networking with old and new friends, technical sessions (performance forecasting and multi-block read internals) and the Pythian RAC Attack class.]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>By now the Denver Convention Center is probably cleaned up from IOUG Collaborate.  The signs directing thousands of attendees to top-notch technical presentations have been removed, the twenty rental laptops which composed the classroom for Pythian&#8217;s RAC Attack class have been returned and the vendor exhibition floor has been completely cleared out.  Flight delays notwithstanding (thanks to some midwest weather), attendees are generally home by now &#8211; even those coming from places as far away as Germany and Australia.</p>
<p>Now that the buzz is dying down, I&#8217;ve finally found a few minutes to post my personal highlights.  </p>
<h2>Friends Old and New</h2>
<p>First off, my favorite part of Collaborate is the opportunity to meet so many old friends and make new acquaintances who are all using Oracle technology.  It&#8217;s both fun and informative to hear about the ways others are using Oracle software.</p>
<p>One person deserves very special mention: this was my first time hanging out in person with my Australia-based colleague <a href="https://twitter.com/yvelik">Yury Velikanov</a>.  You could hear Yury&#8217;s deep-chested, enthuiastic &#8220;Pythian&#8221; chants even if you were on the opposite side of the exhibition hall from our booth.  His sense of fun and relentless demands for silly faces during photos were so unresistable that anybody within about thirty feet of him was affected.  In the photo below, notice how the guy standing behind me has also made a silly face for the picture.</p>
<div id="attachment_54569" class="wp-caption aligncenter" style="width: 370px"><a href="http://www.pythian.com/blog/wp-content/uploads/collab-photo.jpg"><img src="http://www.pythian.com/blog/wp-content/uploads/collab-photo-360x270.jpg" alt="Yury&#039;s infectious enthusiasm" width="360" height="270" class="size-large wp-image-54569" /></a><p class="wp-caption-text">Yury&#8217;s infectious enthusiasm</p></div>
<h2>Technical Sessions</h2>
<p>I wasn&#8217;t able to attend many technical sessions simply because I was so busy with the RAC Attack classes but the two I did attend didn&#8217;t disappoint.</p>
<ul>
<li>
<p><a href="http://resources.orapub.com/">Craig Shallahamer</a>&#8216;s session <strong>Practical Performance Forecasting for the Oracle DBA</strong> was excellent. He compared benchmarking, simulating and modelling for performance evaluation and then took a deep dive into best practices for creating and using models.  He discussed a variety of potential input sources in depth and walked through practice exercises on a theoretical consolidation case.  Finally we wrapped up with a brief discussion of the queueing theory.  Excellent material!</p>
<p>If I had to choose one take-away which I think was the single most important point, it would be this: <strong>R = S + Q</strong>.  Every DBA should know what this is referring to on a basic level.  If you don&#8217;t know what I&#8217;m referring to, then I&#8217;d recommend Craig&#8217;s class &#8211; or any of <a href="http://www.method-r.com/">Cary Millsap</a>&#8216;s talks for that matter (they both cover this very well).</p>
</li>
<li>
<p><a href="http://fritshoogland.wordpress.com/">Frits Hoogland</a>&#8216;s session <b>How Oracle Secretly Changed Multiblock Reads</b> (at most conferences this same session is simply titled <b>About Multiblock Reads</b>) is a must-see presentation for DBA&#8217;s with any interest in database internals.  With the aid of <a href="http://fritshoogland.wordpress.com/2013/01/04/oracle-11-2-and-the-direct-path-read-event/">operating system traces and debuggers</a>, Frits has dissected the Oracle database kernel&#8217;s I/O process and compiled an incredible summary report.  Showing surprising differences between recent releases of Oracle RDBMS, Frits dispels any myth that they aren&#8217;t making major changes to the database engine.</p>
<p>However, despite unmatched technical depth and quality, my favorite part of this session wasn&#8217;t technical. At one point during the presentation I remember Frits saying that he ran a test and was completely baffled by the output.  While trying to problem-solve himself, he also fired off a few emails looking for feedback from others. An email from a colleague pointed him to the &#8220;total number of slots&#8221; statistic, which led to an &#8220;ah-ha&#8221; moment and explained the data he was seeing.  This was my favorite part because it made me feel much better about asking for help myself, since someone as smart as Frits asks for help sometimes too!</p>
</li>
</ul>
<h2>RAC Attack</h2>
<p>The bulk of my energy this week was dedicated to the RAC Attack class.</p>
<ul>
<li><b>Improvements</b></p>
<p>First off, I am excited to announce a major development for RAC Attack: we have re-introduced printed textbooks.  Two years ago we stopped printing textbooks &#8211; when the curriculum was moved to wikibooks in order to better support broad collaboration in creating the best beginner RAC curriculum available.  Last week we completed and released the process for creating a printed textbook from the wikibooks content.  The process is completely automated.  You start up an EC2 instance and run a little code which lives at github; shortly after this you get a PDF which is ready to go to the printers.  The 250-page textbook has over 200 screenshots.  In the USA, I&#8217;ve had them printed in the past for US$30-40 each.  This should go a long way toward supporting instructors who want to teach RAC Attack classes.  Information about the textbooks is at <a href="http://racattack.org/book">http://racattack.org/book</a>.</p>
<p>In addition to this, there have been a number of improvements to the organizer&#8217;s guide over the past few months. Anyone interested in organizing RAC Attack events can find a good deal of helpful material on <a href="http://racattack.org/e">the Events wiki page</a>.  We&#8217;ve learned a lot through the many events we&#8217;ve run in the past!</p>
</li>
<li><b>Monday Morning RAC Attack</b>
<p>We had 15-20 people gather in the foyer area for the initial kick-off.  Everyone listened to the description of the RAC Attack project with interest and some stayed to try starting out with their personal laptops, while many decided to attend one of the two later classroom sessions.  We occupied most of the available tables and we were a very noticeable crowd as everyone passed by from the keynote to find technical sessions to attend!</p>
</li>
<li><b>Monday Afternoon and Tuesday Morning RAC Attack</b>
<p>We filled the classroom sessions. There were no major technical problems with lab machines as people worked through the labs.  There were many good conversations; I remember in-depth discussions about listener architecture in 11.2 RAC (with SCAN) and about init parameters related to client connections and about services and about applications which require all connections to be made in a single instance.</p>
</li>
<li><b>Feedback</b>
<p>There was significant positive feedback about RAC Attack.  One guy stopped me as I was entering the exhibition hall Monday night just to tell me that that he had learned more in the RAC Attack class than any other session thus far at Collaborate &#8211; he was visibly pleased with the experience!</p>
</li>
</ul>
<p>Collaborate was a memorable conference this year.  I&#8217;m very thankful for the hard work by the IOUG leadership to put this event together!  If you attended Collaborate then make sure to pass along your thanks and any other feedback to IOUG!  And whether or not you attended &#8211; support your local user group; they are a crucial resource and tremendous asset to all of us.</p>
<p>For those of you who attended Collaborate, what were your favorite technical sessions or keynotes?  What other parts of the conference did you find valuable?  Leave a comment here to tell us what you thought about Collaborate!</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/ioug-collaborate-2013-wrap-up/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Log Buffer #315, A Carnival of the Vanities for DBAs</title>
		<link>http://www.pythian.com/blog/log-buffer-315-a-carnival-of-the-vanities-for-dbas/</link>
		<comments>http://www.pythian.com/blog/log-buffer-315-a-carnival-of-the-vanities-for-dbas/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 12:51:01 +0000</pubDate>
		<dc:creator>Fahd Mirza</dc:creator>
				<category><![CDATA[Log Buffer]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54547</guid>
		<description><![CDATA[Like in love there is no precondition, there are no limits held when it comes to the labor of love called as blogging. Lovingly this Log Buffer edition brings you some more roses from database arena. Oracle: Marco Vigelini shares as how to duplicate a production database on a different server mantaining the same SID...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Like in love there is no precondition, there are no limits held when it comes to the labor of love called as blogging. Lovingly this Log Buffer edition brings you some more roses from database arena.</p>
<p><span id="more-54547"></span><br />
<strong>Oracle:</strong></p>
<p><a href="http://dbaworkshop.blogspot.it/2013/03/How-to-duplicate-a-production-database-on-a-different-server-mantaining-the-same-SID-and-directory-structures-with-duplicate-RMAN-command.html">Marco Vigelini</a> shares as how to duplicate a production database on a different server mantaining the same SID and directory structures with &#8216;duplicate&#8217; RMAN command and <a href="http://dbaworkshop.blogspot.it/2013/04/How-to-resynchronize-a-duplicated-remote-database-using-RMAN-backups.html">how</a> to resynchronize a duplicated remote database using RMAN backups.</p>
<p><a href="http://timurakhmadeev.wordpress.com/2013/04/12/system-statistics-poll/">Recent</a> thread in the OakTable mailing list prompted Timur Akhmadeev to create a poll and ask about the ways DBAs use system statistics in real systems.</p>
<p><a href="http://www.pythian.com/blog/trying-out-s-ash/">Marc Fielding</a> was recently playing with an Oracle XE database, and when Marc plays, it stayed played.</p>
<p><a href="http://www.sqlfail.com/2013/04/12/insane-set-differences/">Here</a> are some insane set indifferences.</p>
<p><a href="https://blogs.oracle.com/VOX/entry/the_cloud_user_experience_changing">Cloud-delivered</a> applications are one of those things you watch to see how the  phenomenon is going to fully express itself.</p>
<p><strong>SQL Server:</strong></p>
<p>Discover, diagnose, and document all your SQL Servers On your <a href="http://kendalvandyke.blogspot.com">Coffee Break</a>.</p>
<p><a href="http://www.jenstirrup.com/search/label/SQLServerPedia%20Syndication">Jen Stirrup</a> has a good post post about PASSBAC keynote.</p>
<p>There are lots of horror stories of people going to <a href="http://itknowledgeexchange.techtarget.com/sql-server">Europe</a> on vacation or on business and coming home to massive cell phone bills.</p>
<p><a href="http://www.jasonstrate.com/">Jason Strate</a> discusses about staggering SQLIO sessions across multiple volumes.</p>
<p>You can export <a href="http://sqlandme.com/">data</a> from SQL Server using BCP command for SQLCMD utility. However, these utilities does not support dynamic file names when exporting data.</p>
<p><strong>MySQL:</strong></p>
<p><a href="http://www.mysqlplus.net/2013/04/11/linux-system-configuration-mysql/">Cedric Peintre</a> dishes out an incomplete guide to linux system configuration for MySQL.</p>
<p>Do you need run multi-master <a href="http://continuent-tungsten.blogspot.com/2013/04/tungsten-university-geographically.html">MySQL</a> database clusters across sites?</p>
<p><a href="http://databaseblog.myname.nl/2013/04/instant-innodb.html">Daniel van Eeden</a> has a good review about Instant InnoDB book.</p>
<p><a href="http://geert.vanderkelen.org/connectorpython-sqlalchemy/">SQLAchemy</a> has support for MySQL Connector/Python for a while now. Here is a little HOWTO showing how install both, and setup a database engine.</p>
<p><a href="http://izoratti.blogspot.com/2013/04/welcome-to-mysql-month.html">Ivan Zoratti</a> is welcoming to the MySQL month!</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/log-buffer-315-a-carnival-of-the-vanities-for-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trying out S-ASH: historical performance data for the under-licensed</title>
		<link>http://www.pythian.com/blog/trying-out-s-ash/</link>
		<comments>http://www.pythian.com/blog/trying-out-s-ash/#comments</comments>
		<pubDate>Fri, 12 Apr 2013 05:57:01 +0000</pubDate>
		<dc:creator>Marc Fielding</dc:creator>
				<category><![CDATA[Group Blog Posts]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[Technical Blog]]></category>
		<category><![CDATA[ash]]></category>
		<category><![CDATA[AWR]]></category>
		<category><![CDATA[AWR data mining]]></category>
		<category><![CDATA[Oracle XE]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[S-ASH]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54517</guid>
		<description><![CDATA[I was recently playing with an Oracle XE database. The main benefit of Oracle XE is that it can be used free of charge. And unlike the other database editions on the Oracle Technology Network, it is free the restrictions in the OTN license agreement that restrict products to &#8220;developing, testing, prototyping and demonstrating your...]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>I was recently playing with an <a href="http://www.oracle.com/technetwork/products/express-edition/overview/">Oracle XE</a> database.  The main benefit of Oracle XE is that it can be used free of charge.  And unlike the <a href="http://www.oracle.com/technetwork/database/enterprise-edition/downloads/">other database editions</a> on the Oracle Technology Network, it is free the restrictions in the <a href="http://www.oracle.com/technetwork/licenses/standard-license-152015.html">OTN license agreement</a> that restrict products to &#8220;developing, testing, prototyping and demonstrating your application&#8221; only;  you can even use Oracle XE in production if you so choose to.  XE also has side benefits of being slightly newer (11.2.0.2 instead of 11.2.0.1, effectively 6 months worth of bugfixes incorporated).  And, for fans of Red Hat Linux, the installation is dead easy:  download and install the RPM, run a setup script, and you have a database (and application server) ready to run.<br />
<span id="more-54517"></span><br />
To avoid cannibalizing product revenues, Oracle has imposed a number of <a href="http://docs.oracle.com/cd/E17781_01/install.112/e18802/toc.htm#BABIECJA">technical limits</a> that make XE unsuitable for most places you would use an Oracle database:</p>
<ul>
<li>Database resource manager is hard-coded to restrict CPU usage to one CPU core&#8217;s worth
<li>RAM usage is limited to 1GB
<li>Data size is limited to 11GB
<li>You can&#8217;t circumvent these restrictions by running multiple databases or software installs
</ul>
<p>On top of that, to keep the software download size to 300mb (as compared to 2GB+ for a full 11.2.0.3 install), a few large features have been removed, notably the built-in Java virtual machine, have been removed.</p>
<p>And the same features unavailable in Oracle Standard Edition One aren&#8217;t available on XE either.  One in particular that&#8217;s rather useful is the historical performance data available from Active Session History (ASH).</p>
<p>Fortunately, a workaround exists:  <a href="http://dboptimizer.com/ash-masters-2/s-ash/"><i>simulated</i> ASH</a> by <a href="http://dboptimizer.com">Kyle Hailey</a> and now maintained by <a href="http://oracleprof.blogspot.com/">Marcin Przepiorowski</a>.  S-ASH (not to be confused with <a href="http://docs.oracle.com/cd/E17645_01/doc.50/e17647/cnf_provisioning.htm">Oracle Sash</a>) is a straight of SQL scripts that take periodic snapshots of session state and stores it in Oracle tables for later retrieval.  Naturally it has a bit higher overhead than ASH, but for this type of test environment it isn&#8217;t a bit concern.</p>
<h2>Installing for the first time</h2>
<p>The first step is to download the latest version.  As I write this, the latest version is <a href="http://sourceforge.net/projects/orasash/files/latest/download?source=files">2.3</a>, released a bit over a year ago.  Since it consists entirely of SQL scripts, the download is all of 46kb in size.</p>
<p>S-ASH has the concept of target and repository databases.  The target databases are the databases to be monitored, and the repository database holds the actual historical data.  These can be separate databases on separate systems, both reducing performance impact on the target system and allowing several databases&#8217; historical performance data to be aggregated in a single location.  But for the purpose of this test, I&#8217;m going to put both target and repository on the same XE database.</p>
<p>I&#8217;m also doing this install on a Linux virtual machine (the latest and greatest 64-bit Oracle Linux 6.4, newly supported for Oracle 11g release 2).  A version of Oracle XE also exists for Windows 32-bit.</p>
<p>Unzipping the archive:</p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ unzip sash-v2.3.zip
Archive:  sash-v2.3.zip
  inflating: adddb.sql               
  inflating: ask.sql                 
  inflating: checklog.sql            
  inflating: config.sql              
  inflating: installation steps.txt  
  inflating: job_stat.sql            
  inflating: repo_schema.sql         
  inflating: repo_sys_procedure.sql  
  inflating: repo_user.sql           
  inflating: sash_pkg.sql            
  inflating: sash_repo.sql           
  inflating: sash_xplan.sql          
 extracting: start.sql               
 extracting: stop.sql                
  inflating: target_user_view_10g.sql  
  inflating: target_user_view_11g1.sql  
  inflating: target_user_view_11g2.sql  
  inflating: target_user_view_9i.sql  
  inflating: test.sql                
  inflating: top_10_sql_with_waits.sql  
  inflating: waitgroups.sql         
</pre>
<p>And note the file installation steps.txt, with install docs, which I will follow.  Next up is to create the sash user, grant it selects to performance views, and to create a new <i>sashnow</i> view that collects session status data from the Oracle fixed table x$ksuse, which is the basis for the better-known view x$ksuse.  Querying the x$ table directly avoids a lot of the overhead of joins inherant in querying v$session.  But as a fixed view, it can only be directly accessed by the SYS superuser.  So hence the <i>sashnow</i> view, created as SYS, allowing the lower-privilege sash user to see the data.</p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ sqlplus &quot;/ as sysdba&quot;

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 10 07:27:27 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL&gt; @target_user_view_11g2
&quot;SASH user will be created and used only by repository connection via db link&quot;
&quot;SASH privileges are limited to create session and select on system objects listed in script&quot;
Enter SASH password ? test123
Enter SASH default tablespace [or enter to accept USERS tablespace] ? 
&quot;SASH default tablespace is: &quot; users

User created.


Grant succeeded.

grant select on sys.sashnow to sash
                    *
ERROR at line 1:
ORA-00942: table or view does not exist

...
Grant succeeded.

&quot;SASHNOW view will be created in SYS schema. This view will be accesed by repository database via DB link using user sash&quot;

View created.
</pre>
<p>Note the error:  the install script attempted to grant privileges on the sashnow view before it got created.  This looks like a bug in the script, and has a simple workaround:  run the grant after the view creation:</p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ sqlplus &quot;/ as sysdba&quot;

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 10 07:29:11 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL&gt; grant select on sys.sashnow to sash;

Grant succeeded.
</pre>
<p>Next step: creating the repository.  I&#8217;ll re-use the SQL*Plus window I already have open.  Since I&#8217;m using the same database for the target and the repository, I&#8217;ll name the repository user sash_repo_owner.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; @config
&quot;------------------------------------------------------------------------------------&quot;
Creating repository owner and job kill function using SYS user
&quot;------------------------------------------------------------------------------------&quot;
Enter user name (schema owner) [or enter to accept username sash] ? sash_repo_owner
Enter user password ? test123
Enter SASH user default tablespace [or enter to accept USERS tablespace] ? USERS
SASH default tablespace is: USERS
&quot;------------------------------------------------------------------------------------&quot;
Existing sash_repo_owner user will be deleted.
If you are not sure hit Control-C , else Return : 
&quot;------------------------------------------------------------------------------------&quot;
drop user sash_repo_owner cascade
          *
ERROR at line 1:
ORA-01918: user 'SASH_REPO_OWNER' does not exist

This error is expected: the user is newly created.


New sash_repo_owner user will be created.

Warning: Procedure created with compilation errors.

Connected.
&quot;------------------------------------------------------------------------------------&quot;
Installing SASH objects into sash_repo_owner schema
&quot;------------------------------------------------------------------------------------&quot;
Create sequence
Create tables
Crating SASH_REPO package
No errors.

Warning: Package Body created with compilation errors.

Errors for PACKAGE BODY SASH_REPO:

248/5    PL/SQL: Statement ignored
248/5    PLS-00201: identifier 'SYS.KILL_SASH_SESSION' must be declared
Crating SASH_PKG package
No errors.
No errors.
&quot;------------------------------------------------------------------------------------&quot;
Instalation completed. Starting SASH configuration process
Press Control-C if you do not want to configure target database at that time.
&quot;------------------------------------------------------------------------------------&quot;
</pre>
<p>I don&#8217;t like to see errors.  Using control-c to cancel and troubleshooting.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; select * from user_objects where status = 'INVALID';

OBJECT_NAME
--------------------------------------------------------------------------------
SUBOBJECT_NAME                  OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
------------------------------ ---------- -------------- -------------------
CREATED   LAST_DDL_ TIMESTAMP           STATUS  T G S  NAMESPACE
--------- --------- ------------------- ------- - - - ----------
EDITION_NAME
------------------------------
SASH_REPO
                                    20303                PACKAGE BODY
10-APR-13 10-APR-13 2013-04-10:07:40:35 INVALID N N N          2
</pre>
<p>Attempting a recompile:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; alter package sash_repo compile body;

Warning: Package Body altered with compilation errors.

SQL&gt; show errors
Errors for PACKAGE BODY SASH_REPO:

LINE/COL ERROR
-------- -----------------------------------------------------------------
248/5    PL/SQL: Statement ignored
248/5    PLS-00201: identifier 'SYS.KILL_SASH_SESSION' must be declared
</pre>
<p>Becoming the superuser again and looking up the object.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; conn / as sysdba
Connected.
SQL&gt; select owner, object_name, object_type, status from dba_objects where object_name like 'KILL_SASH%';

OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
SYS
KILL_SASH_SESSION
PROCEDURE           INVALID
</pre>
<p>So the procedure exists, but in the SYS schema:  probably a missing grant.  But there&#8217;s a bigger problem:  KILL_SASH_SESSION itself is invalid.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; alter procedure kill_sash_session compile;

Warning: Procedure altered with compilation errors.

SQL&gt; show errors
Errors for PROCEDURE KILL_SASH_SESSION:

LINE/COL ERROR
-------- -----------------------------------------------------------------
9/3      PL/SQL: SQL Statement ignored
9/20     PL/SQL: ORA-00942: table or view does not exist
</pre>
<p>There&#8217;s a missing object (or perhaps just the grant).</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; select text from user_source where name = 'KILL_SASH_SESSION' and line = 9;

TEXT
--------------------------------------------------------------------------------
                insert into sash.sash_log (action, message,result) values ('kill_sash_session'
,'killing job ' || vsql, 'I');

SQL&gt; select owner, object_name, object_type, status from dba_objects where object_name like 'SASH_LOG';  

OWNER
------------------------------
OBJECT_NAME
--------------------------------------------------------------------------------
OBJECT_TYPE         STATUS
------------------- -------
PUBLIC
SASH_LOG
SYNONYM             VALID

SASH_REPO_OWNER
SASH_LOG
TABLE               VALID

SQL&gt; exit
Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
</pre>
<p>So the SASH_LOG table exists, but in the repository SASH_REPO_OWNER user we created, not SASH as requested.  Lookg like another bug: hardcoded SASH user.  Digging up the SQL script that has the error:</p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ grep sash.sash_log *
repo_sys_procedure.sql:         insert into sash.sash_log (action, message,result) values ('kill_sash_session','killing job ' || vsql, 'I');
</pre>
<p>And looking at repo_sys_procedure, I also see the reason why the grant didn&#8217;t work:</p>
<pre class="brush: plain; title: ; notranslate">
grant execute on kill_sash_session to sash;
</pre>
<p>Since we call our repository user sash_repo_owher, this should be changed too.</p>
<p>In this case, I&#8217;m simply going to user perl to do an in-place file replace to change the name, backing up the original with a .orig extension.  (In case you aren&#8217;t familiar with it, the perl in-place replace is an incredibly useful one-liner.  <a href="http://stefaanlippens.net/perlpie">Here&#8217;s a good reference</a>)</p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ perl -pi.orig -e 's/sash\.sash_log/sash_repo_owner.sash_log/;s/to sash;/to sash_repo_owner;/' repo_sys_procedure.sql
[oracle@ora11gr2a sash]$ grep sash.sash_log *
repo_sys_procedure.sql.orig:            insert into sash.sash_log (action, message,result) values ('kill_sash_session','killing job ' || vsql, 'I');
</pre>
<p>Repeating the same grep command as before, we now see that only the .orig file has sash.sash_log.  Doing a sanity check on repo_sys_procedure.sql; it only has two commands (a CREATE OR REPLACE PROCEDURE and a grant) so it can safely be re-run.  </p>
<pre class="brush: plain; title: ; notranslate">
[oracle@ora11gr2a sash]$ sqlplus &quot;/ as sysdba&quot;

SQL*Plus: Release 11.2.0.2.0 Production on Wed Apr 10 08:01:55 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

SQL&gt; @repo_sys_procedure

Procedure created.


Grant succeeded.
</pre>
<p>Much better!  Recompiling the sash_repo package:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; conn sash_repo_owner
Enter password: 
Connected.
SQL&gt; alter package sash_repo compile body;

Package body altered.
</pre>
<p>Moving ahead, I&#8217;m going to use the adddb.sql script to add a database, since we cancelled the initial database addition to resolve the errors.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; @adddb
Enter database name XE
Enter number of instances [default 1]1
Enter host name for instance number 1 localhost
Enter instance name for instance number 1 [ default XE ] XE
Enter listener port number [default 1521] 1521
Enter SASH password on target database test123
&quot;------------------------------------------------------------------------------------&quot;
Database added.
&quot;------------------------------------------------------------------------------------&quot;
</pre>
<p>Checking just status:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; @job_stat

SASH_PKG_COLLECT_XE1           10-APR-13 08.06.32.983557 AM +10:00 10-APR-13 08.06.32.000000 AM +10:00 RUNNING                     0
SASH_PKG_GET_ALL_XE1           10-APR-13 08.06.33.119275 AM AUSTRA 10-APR-13 08.21.33.000000 AM AUSTRA SCHEDULED                   0
                               LIA/BRISBANE                        LIA/BRISBANE

SASH_REPO_PURGE                                                    11-APR-13 12.00.00.000000 AM +10:00 SCHEDULED                   0
SASH_REPO_WATCHDOG             10-APR-13 08.06.33.453629 AM +10:00 10-APR-13 08.11.33.000000 AM +10:00 SCHEDULED                   0
</pre>
<p>It&#8217;s having trouble with formatting timezones, but we do see the collection job is running, as expected.  Checking for errors in collection:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; @checklog.sql

W 2013-04-10 08:06:32       add_db                                           no db link - moving forward XE1
I 2013-04-10 08:06:32       configure_db                                     get_event_names
I 2013-04-10 08:06:32       configure_db                                     get_users
I 2013-04-10 08:06:32       configure_db                                     get_params
I 2013-04-10 08:06:32       configure_db                                     get_data_files
I 2013-04-10 08:06:32       configure_db                                     get_metrics
I 2013-04-10 08:06:32       add_instance_job                                 adding scheduler job sash_pkg_collect_XE1
I 2013-04-10 08:06:32       add_instance_job                                 adding scheduler job sash_pkg_get_all_XE1
I 2013-04-10 08:06:33       create_repository_jobs                           adding new repository job
</pre>
<p>Now, to actually use SASH.  SASH has a set of views that mimic the familiar names from the &#8220;real&#8221; AWR/ASH.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; select view_name from user_views;

VIEW_NAME
------------------------------
ALL_OBJECTS
DBA_DATA_FILES
DBA_HIST_ACTIVE_SESS_HISTORY
DBA_HIST_SQLSTAT
DBA_HIST_SYSMETRIC_HISTORY
DBA_USERS
SASH
SASH_ALL
SASH_PLAN_TABLE
V$ACTIVE_SESSION_HISTORY
V$DATABASE
V$INSTANCE
V$IOSTAT_FUNCTION
V$PARAMETER
V$SQL
V$SQLSTATS
V$SQLTEXT_WITH_NEWLINES
V$SQL_PLAN
V$SYSMETRIC_HISTORY

19 rows selected.
</pre>
<p>The SASH1 through SASH31 are probably like SAR:  daily data tables, in a format that can be easily truncated much like partitions.</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; set serveroutput on
SQL&gt; declare
  2  cursor c1 is select view_name from user_views;
  3  c1rec c1%rowtype;
  4  v_rowcount number;
  5  begin
  6    for c1rec in c1 loop
  7       execute immediate 'select count(*) from ' || c1rec.view_name into v_rowcount;
  8       dbms_output.put_line('View ' || c1rec.view_name || ' has ' || v_rowcount || ' rows');
  9    end loop;
 10  end;
 11  /
View ALL_OBJECTS has 6 rows
View DBA_DATA_FILES has 4 rows
View DBA_HIST_ACTIVE_SESS_HISTORY has 0 rows
View DBA_HIST_SQLSTAT has 5 rows
View DBA_HIST_SYSMETRIC_HISTORY has 1710 rows
View DBA_USERS has 14 rows
View SASH has 1053 rows
View SASH_ALL has 1057 rows
View SASH_PLAN_TABLE has 32 rows
View V$ACTIVE_SESSION_HISTORY has 1057 rows
View V$DATABASE has 1 rows
View V$INSTANCE has 1 rows
View V$IOSTAT_FUNCTION has 14 rows
View V$PARAMETER has 344 rows
View V$SQL has 8 rows
View V$SQLSTATS has 3 rows
View V$SQLTEXT_WITH_NEWLINES has 8 rows
View V$SQL_PLAN has 32 rows
View V$SYSMETRIC_HISTORY has 1710 rows

PL/SQL procedure successfully completed.
</pre>
<p>So we have data being collected.  The only table without data is dba_hist_active_sess_history.  Looking at its creation DDL in repo_schema.sql:</p>
<pre class="brush: plain; title: ; notranslate">
create or replace view dba_hist_active_sess_history 
     as 
     select * from v$active_session_history 
     where rownum &lt; 1;
</pre>
<p>where rownum &lt; 1:  guaranteed never to return any rows.  So I guess the message is:  use v$active_session_history instead, as it doesn&#039;t suffer from the same limited lifespan as the &quot;real&quot; ash.  I do still have trouble understanding why the view can&#039;t be defined to select all of v$active_session_history, to maintain compatibility for scripts, though.</p>
<p>The idea now is that you can now tap the large library of ASH mining scripts out there on the Internet.  However some scripts may expect dba_hist_ tables like dba_hist_sqltext.  S-ASH supplies the same information in the v$ views, leaving two choices:  either modify the table name in the script, or create DBA_HIST views that mirror the v$ views already in place.  And naturally, S-ASH doesn&#039;t capture the range of data that AWR does, so if you&#039;re looking for, say, file I/O information, you&#039;d need to add logic in S-ASH to collect it.</p>
<p>And that&#039;s it.  Readers, I&#039;m always happy to hear about your S-ASH experiences.  Feel free to comment below.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/trying-out-s-ash/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>COLLABORATE 13 Day Two</title>
		<link>http://www.pythian.com/blog/collaborate-13-day-two/</link>
		<comments>http://www.pythian.com/blog/collaborate-13-day-two/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 21:07:42 +0000</pubDate>
		<dc:creator>Michael S. Abbey</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Pythian]]></category>
		<category><![CDATA[Pythian Appearances]]></category>
		<category><![CDATA[COLLABORATE13]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[User Groups]]></category>

		<guid isPermaLink="false">http://www.pythian.com/blog/?p=54505</guid>
		<description><![CDATA[MAbbey's musings on Monday at COLLABORATE13]]></description>
				<content:encoded><![CDATA[<div itemscope itemtype="http://schema.org/BlogPosting"><p>Like most days at these shows and my not attending shows life, the day started early and I was out of the room by 7am. The general session at 9:15 featured Aron Ralston, a canyoneer whose real-life experience over a 127 hour period  in April 2003 culminated in the triumph of the will to live and to love winning over a potential life-threatening accident. His story is the subject of a 2010 movie called <a href="http://en.wikipedia.org/wiki/127_Hours">127 Hours</a>, a gripping drama about Aron&#8217;s misfortune while climbing one day in the mountains if Utah. A boulder fell into a narrow passage and pinned his arm against the wall of the crevice. His story was gripping and an entertaining diversion from the tech-centric journey we were all beginning at COLLABORATE 13. </p>
<p>My sessions day started with Pythian&#8217;s own Maris Elsins and Yury Velikanov session #11792 in the OAUG forum discussing E-Business suite in Oracle Database Appliance (ODA). The content demonstrated how Pythian navigated through the complexities and idiosyncracies of the ODA offering to arrive at a successful migration. Being somewhat of a newbie to ODA the information presented was interesting.</p>
<p>I presented my pluggable database paper on Monday at 11am and the room was half full with maybe 80-100 people. The show went well and I was pleased that Bryn Llewellyn from Oracle was in attendance as I was discussing a concept/feature in his area. There were a few questions and I hope the attendees walked away from the room feeling confident that the session went well and there were some container database concepts/management items covered as per the session abstract.</p>
<p>My next stop was lunch on the 16th street mall. I look ahead to conference lunches most of the time with trepidation (and fright) and usually end up eating off-site more days than not during conference attendance. This is not always the case, but often the meal of choice.</p>
<p>We marched back to the convention centre after my visit to an American institution called Walgreen&#8217;s for some cold medication. My next stop was Rene Antunez session discussing how to survive a disaster with RMAN. This was a treat and not only that Rene&#8217;s first session at a tier one conference. His delivery was fantastic and he could have fooled me &#8230; he seemed to be a seasoned conference presenter. Well done Mr. A. :)</p>
<p>Monday evening was the manifestation of what Canucks are supposed to do in the winter &#8211; watch hockey. We scored 6 seats for the Avalanche against the Flames at the Pepsi centre. Bonus! We met in the lobby of the Hyatt about 6pm and decided to hoof it to the game. It was a 20 minute walk and further than I has expected. Once there we confidently rose the escalator and turned right to navigate to section 122. Our seats were great, about 10 rows up from the ice between the defender&#8217;s blue line and goaltender. We figured out the home team was in trouble when we only recognized one of their players &#8230; a goaltender named J.S. Giguere. The Avalanche lost 3-1. The arena food was as expected. We left the game to a light wet snow with the mercury around zero. The walk back to the hotel was again about 20 minutes and not long after turning onto a side street we saw the Hyatt looming on the horizon. It seemed the more we walked the less closer the building appeared. What seemed like a century later, we arrived home.</p>
<p>We coagulated in Todd&#8217;s room on the 35th floor as we had done the previous two nights. &#8216;Twas more early to bed than I had hoped.</p>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.pythian.com/blog/collaborate-13-day-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
