<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>blogs.xtivia.com</title>
  <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/rss" />
  <subtitle>blogs.xtivia.com</subtitle>
  <entry>
    <title>Rolling DB2 tablespace location change using HADR</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/rolling-db2-tablespace-location-change-using-hadr" />
    <author>
      <name>Brian Fairchild</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/rolling-db2-tablespace-location-change-using-hadr</id>
    <updated>2013-05-23T20:28:36Z</updated>
    <published>2013-05-16T22:21:42Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	One of our &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; clients has a small DB2 environment with version 9.7 on Linux and HADR connecting a primary and standby system. &amp;nbsp;When the application team created the database, it was created using Automatic Storage on the /home filesystem. &amp;nbsp;This will always happen when the default setting of DFTDBPATH in the DBM configuration file is set to the instance owner's home unless the CREATE DATABASE command specifies a different location. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	So, they had all tablespaces in the database residing in /home and it was quickly growing. &amp;nbsp; Here are the details of the project.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;The Mission:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
	Move the database and all tablespace containers from /home to a new /db2data tablespace. &amp;nbsp; Do this while the application is online and the database is available.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;The Plan:&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
	Use HADR and Redirected Restores to move the database while the application is online and have no data loss. &amp;nbsp;First restore a copy of the Primary onto the Standby using a redirected restore to put the tablespace containers on the new filesystem. &amp;nbsp;Then sync up with HADR and Takeover HADR on the Standby to swap roles. &amp;nbsp;After the Primary has changed roles to Standby, stop HADR there. &amp;nbsp;Take a new online backup from the new primary and restore it on the new Standby using another redirected restore to the new filesystem. &amp;nbsp;Then start HADR again and let them sync. &amp;nbsp;Once they are in PEER state you can takeover again on the orginal Primary. &amp;nbsp;At this point both servers will have the database on the new filesystem.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;Execution:&lt;/strong&gt;&lt;/div&gt;
&lt;p&gt;
	Server1 is the primary and Server2 is the standby. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	1. &amp;nbsp;Online backup of the database on Server1. &amp;nbsp;This is a small database and it takes 2 minutes to backup.&lt;/p&gt;
&lt;ul style=""&gt;
	&lt;li&gt;
		&amp;nbsp;=&amp;gt;db2 backup db ITIMDB online compress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	2. &amp;nbsp;Copy the backup image from Server 1 to Server 2&lt;/p&gt;
&lt;p&gt;
	3. &amp;nbsp;From Server2, &amp;nbsp;generate a redirected restore script using the newly copied backup.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 restore db ITIMDB from /db2backups redirect generate script restore.ddl&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	4. &amp;nbsp;Edit the script to restore the db using the ON and DBPATH ON paramaters set to the new filesystem&lt;/p&gt;
&lt;p&gt;
	5. &amp;nbsp;Stop HADR on the standby (Server2)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 deactivate db ITIMDB&lt;/li&gt;
	&lt;li&gt;
		=&amp;gt;db2 stop hadr on db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	6. &amp;nbsp;Drop the database on the standby (Server2)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 drop db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	7. &amp;nbsp;Restore the database by running the redirect restore script (restore.ddl) on Server2&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 -tvf restore.ddl&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	8. &amp;nbsp;Once the restore finishes, edit the HADR settings on Server2&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 update db cfg for ITIMDB using HADR_LOCAL_HOST SERVER2 HADR_REMOTE_HOST SERVER1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	9. &amp;nbsp;Start HADR on the standby (Server2)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 start hadr on db ITIMDB as standby&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	10. &amp;nbsp;Once they are in PEER state, Takeover the database on Server2 so the same steps can take place on Server1. &amp;nbsp;Run this from Server2&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 takeover HADR on db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	11. &amp;nbsp;Now take an online backup of the database on Server2&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 backup db ITIMDB online compress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	12. &amp;nbsp;Copy the new backup from Server2 to Server1&lt;/p&gt;
&lt;p&gt;
	13. &amp;nbsp;From Server1, generate a redirected restore script using the fresh backup.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 restore db ITIMDB redirect generate script restore.ddl&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	14. &amp;nbsp;Edit the script to restore the db using the ON and DBPATH ON paramaters set to the new filesystem.&lt;/p&gt;
&lt;p&gt;
	15. &amp;nbsp;Stop HADR on the standby (Server1)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 deactivate db ITIMDB&lt;/li&gt;
	&lt;li&gt;
		=&amp;gt;db2 stop hadr on db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	16. &amp;nbsp;Drop the database on the standby (Server1)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 drop db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	17. &amp;nbsp;Restore the database by running the redirect restore script (restore.ddl)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 -tvf restore.ddl&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	18. &amp;nbsp;Once the restore finishes, edit the HADR settings&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 update db cfg for ITIMDB using HADR_LOCAL_HOST server1 HADR_REMOTE_HOST server2&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	19. &amp;nbsp;Start HADR on the standby (Server1)&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 start hadr on db ITIMDB as standby&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	20. &amp;nbsp;Once they are in PEER state, Takeover the database on Server1.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		=&amp;gt;db2 takeover HADR on db ITIMDB&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Now both Server1 and Server2 have their tablespace containers on the /db2data filesystem. &amp;nbsp;This was done online with no data loss! &amp;nbsp;Gotta love HADR. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	We also had Alternate Client Reroute set on both the Primary and Standby so that applications would quickly know to connect the primary database server when we swapped roles with the TAKEOVER HADR command.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Keep in mind that if the application uses connection pooling, the app should be restarted after setting the Automatic Client Reroute settings.&lt;/div&gt;</summary>
    <dc:creator>Brian Fairchild</dc:creator>
    <dc:date>2013-05-16T22:21:42Z</dc:date>
  </entry>
  <entry>
    <title>Moving datafiles to a different disk/lun linux Oracle 10gR2</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/moving-datafiles-to-a-different-disk-lun-linux-oracle-10gr2" />
    <author>
      <name>Luke Smith</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/moving-datafiles-to-a-different-disk-lun-linux-oracle-10gr2</id>
    <updated>2013-05-13T22:08:03Z</updated>
    <published>2013-05-13T16:48:14Z</published>
    <summary type="html">&lt;p&gt;
	We have a &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; client that was rapidly running out of space for one of their databases in VMWare. To rectify the problem we decided to move a few tablespaces to a new LUN/disk presented to the VMWare OS.&lt;/p&gt;
&lt;p&gt;
	We had a scheduled downtime window so we didn’t need to leave the database online to perform the move. If we had wanted to leave the database online we could have used RMAN to copy the files ahead of time, took the tablespace offline and then just recovered the tablespace.&lt;/p&gt;
&lt;p&gt;
	Instead we took the database offline and then made a copy of the database files from one drive to the new drive. We then started the database in mount mode. After the database was up we used the below command in a sqlplus prompt to change the file location.&lt;/p&gt;
&lt;p&gt;
	alter database rename file ‘/u01/oradata/datafile1.dbf’ to ‘/u02/oradata/datafile1.dbf’;&lt;/p&gt;
&lt;p&gt;
	We used the above command to change all the datafiles associated with the tablespaces we wanted to move and then we simply opened the database with alter database open command.&lt;/p&gt;
&lt;p&gt;
	We then verified that the datafiles were moved by selecting from the v$datafile view.&lt;/p&gt;
&lt;p&gt;
	Once everything was verified we removed/deleted the old datafiles and then took a full backup of the database.&lt;/p&gt;</summary>
    <dc:creator>Luke Smith</dc:creator>
    <dc:date>2013-05-13T16:48:14Z</dc:date>
  </entry>
  <entry>
    <title>File libclntsh.so.11.1 still in use patching Oracle 11gR2</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/file-libclntsh-so-11-1-still-in-use-patching-oracle-11gr2" />
    <author>
      <name>Luke Smith</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/file-libclntsh-so-11-1-still-in-use-patching-oracle-11gr2</id>
    <updated>2013-05-23T20:31:52Z</updated>
    <published>2013-05-13T16:30:33Z</published>
    <summary type="html">&lt;p&gt;
	This Saturday we were scheduled to patch eight oracle 11gR2 databases with the latest CPU/SPU set for one of our &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; clients. The databases were running in a zone on Solaris 10. This is normally a pretty straight forward process, but this weekend we ran into an issue that we wanted to share.&lt;/p&gt;
&lt;p&gt;
	We started by moving the patches to the server and unzipping them in a directory. We made a copy of the current $ORACLE_HOME by making a tar file out of it with the below command.&lt;/p&gt;
&lt;p&gt;
	tar -cvf /u02/ora_home_before_patch.tar /u01/app/oracle/product/11.2.0/db_home1&lt;/p&gt;
&lt;p&gt;
	We then gzipped it so it would take up less space on the drive. We then shutdown all 8 databases and the listeners that were running. We changed to the patch directory and attempted to apply the patch with the below command.&lt;/p&gt;
&lt;p&gt;
	opatch napply -skip_subset -skip_duplicate&lt;/p&gt;
&lt;p&gt;
	Opatch then threw an error complaing that the libclntsh.so.11.1 file was still in use and to make sure to stop all databases and listeners from the $ORACLE_HOME being patched. We checked all the oracle processes and no databases or listeners were started in the zone. We didn't have root so I couldn't use lsof if it was installed or pfiles. We got a Solaris admin involved and we couldn't find anything holding the file open.&lt;/p&gt;
&lt;p&gt;
	In the end we had to end of rebooting the zone. After the zone was rebooted we were able to apply the patch without any issues and restart the databases and run our catbundle.sql cpu apply command in sqlplus.&lt;/p&gt;</summary>
    <dc:creator>Luke Smith</dc:creator>
    <dc:date>2013-05-13T16:30:33Z</dc:date>
  </entry>
  <entry>
    <title>SSIS 2012 Reporting Driver Errors</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/ssis-2012-reporting-driver-errors" />
    <author>
      <name>Mangesh Mharolkar</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/ssis-2012-reporting-driver-errors</id>
    <updated>2013-05-08T17:05:31Z</updated>
    <published>2013-05-07T15:45:55Z</published>
    <summary type="html">&lt;p&gt;
	Often times when implementing data integration projects - we come across a need to implement a row/key based lookup and based on the found/not-found condition update or insert a row.&lt;/p&gt;
&lt;p&gt;
	I started implementing a simple data flow in SSIS. The idea was simple and has been implemented by quite a few folks and information is available all over the web. Yet when I built the simple workflow, I ran into an issue - the insert operation would fail with the following error - "[Insert Rows [23]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.&amp;nbsp; The AcquireConnection method call to the connection manager "Connection Name" failed with error code 0xC0202009.&amp;nbsp; There may be error messages posted before this with more information on why the AcquireConnection method call failed."&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/46138/Package+Error1.png/3679b1b8-91e3-4350-b5d3-9cfee3503b87?t=1367941983739" style="width: 749px; height: 624px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	After trying several different options with package configurations (yes, they are helpful!) and storing sensitive information like password/s with a password - nothing seemed to work until I realized the driver for destination connection I was using. Everything with the connection string, test connection was working except the insert (weird).&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/46138/Driver+Used.png/17032a69-26fb-428e-b398-4372bba6c21b?t=1367941994386" style="width: 610px; height: 631px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	I changed the driver from native client to MSFT OLE DB Driver and viola - everything worked as expected. Took me a couple of hours to figure this out. Hopefully it will save you some time...&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/46138/Change+Driver.png/2976f5ef-5bdf-4b09-aedd-d1c86fca7ea3?t=1367942001270" style="width: 610px; height: 624px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/46138/Everything+Works.png/9b38c3a6-e91c-40ad-b2d7-d7430ef0ace5?t=1367942007663" style="width: 810px; height: 451px;" /&gt;&lt;/p&gt;</summary>
    <dc:creator>Mangesh Mharolkar</dc:creator>
    <dc:date>2013-05-07T15:45:55Z</dc:date>
  </entry>
  <entry>
    <title>Patching Oracle Applications R12</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/patching-oracle-applications-r12" />
    <author>
      <name>Luke Smith</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/patching-oracle-applications-r12</id>
    <updated>2013-05-08T17:13:53Z</updated>
    <published>2013-05-07T15:49:11Z</published>
    <summary type="html">&lt;p&gt;
	So today we had a &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; client ask us to help them patch their Oracle Financials R12 for a bug they were having a problem with. So I thought I would share with you the process we used to patch their server.&lt;/p&gt;
&lt;p&gt;
	They had sent me the patch number that Oracle support had recommended, so we went to Metalink and downloaded the patch. The patch readme itself basically just says to patch the server. Sometimes these readmes have pre and post tasks that need to be accomplished. This one was just to install the patch and restart the services. Though Oracle had some additional instructions to clear the mid-tier cache and restart the server.&lt;/p&gt;
&lt;p&gt;
	After the patch was downloaded I used an SFTP client like Filezilla or Winscp to transfer the patch to their server. The patch was then placed in a directory wd could easily find again. Something like /u01/patches. The file was then uncompressed and it created it's own sub directory.&lt;/p&gt;
&lt;p&gt;
	This particular client had a refresh that runs and refreshes their QA environment so we made sure to disable that until they had time to test the patch after it was successfully applied.&lt;/p&gt;
&lt;p&gt;
	We used adadmin and put the application server into maintenance mode. Which is as simple as typing adadmin on the command line and answering the series of questions about your particular environment. A lot of the defaults are correct until it asks you for your appsys user and system database user passwords.&lt;/p&gt;
&lt;p&gt;
	Once the system is put into maintenance mode you can then change to your patch directory and apply your patch using adpatch inside the patch directory. You can use adpatch apply=n to just test the patch and see if there are going to be any errors and to also get a list of files the patch is going to change. We tested the patch with the adpatch apply=n and then went ahead and applied the patch.&lt;/p&gt;
&lt;p&gt;
	After the patch successfully installed we then disabled maintenance mode by again running adadmin and then answering the questions again and selecting the disable maintenance mode opton.&lt;/p&gt;
&lt;p&gt;
	We were then instructed by Oracle to clear the mid-tier cache. In 11i JSP pages were handled by apache jserv engine and in R12(our version) they are handled by OC4J. What that means is that if you just delete the $COMMON_TOP/_pages like you would in 11i. You will get a blank login page because AppsLocalLogin.jsp doesn’t get compiled by default. After you delete the _pages directory you can recompile by navigating to $JTF_TOP/admin/scripts &amp;nbsp;and then running the below command:&lt;/p&gt;
&lt;p&gt;
	perl ojspCompile.pl –compile –flush -p 20&lt;/p&gt;
&lt;p&gt;
	We stopped the app services using adstpall.sh. We then cleared the cache and then rebooted the server as per Oracle’s instructions.&lt;/p&gt;
&lt;p&gt;
	When the server came back online we started the mid-tier by using the start adstrtal.sh script. We then verified the application was up and running by logging into the web interface. We then tested the application to ensure the patch fixed the bug. It indeed did and that was the end of that.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Luke Smith</dc:creator>
    <dc:date>2013-05-07T15:49:11Z</dc:date>
  </entry>
  <entry>
    <title>A DB2 on Windows Upgrade Adventure</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/a-db2-on-windows-upgrade-adventure" />
    <author>
      <name>Brian Fairchild</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/a-db2-on-windows-upgrade-adventure</id>
    <updated>2013-04-25T18:05:06Z</updated>
    <published>2013-04-25T17:25:07Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
	Many of our &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; clients have DB2 upgrade plans in the works. &amp;nbsp;One of them wants to move from V9.1 to V10.1 on Windows. &amp;nbsp;I'll share some of my experience with this project. &amp;nbsp;Right now I've completed the set up of the 10.1 instance and restored a copy of their database there. &amp;nbsp;They are now kicking the tires. &amp;nbsp;Here are some more details:&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;System Background&lt;/strong&gt;: &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	This a client of ours that has a busy, 250 GB, OLTP database using DB2 version 9.1 on Windows. &amp;nbsp;We have set up an HADR Standby and also a disaster recovery server using log shipping. &amp;nbsp;The application is a home-grown java application.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;My Mission&lt;/strong&gt;:&lt;/div&gt;
&lt;div&gt;
	Move the production database from DB2 version 9.1 to a new version 10.1 DB2 instance and set up multiple HADR standby systems and Read On Standby. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;My Plan&lt;/strong&gt;:&lt;/div&gt;
&lt;ul&gt;
	&lt;li&gt;
		Install DB2 v9.7 and v10.1 on a new Windows 2008 server.&lt;/li&gt;
	&lt;li&gt;
		Create 2 instances on the new server. &amp;nbsp;One with version 9.7 and one with version 10.1&lt;/li&gt;
	&lt;li&gt;
		Take an offline backup of the production database and restore it onto the V9.7 instance. &amp;nbsp;&lt;/li&gt;
	&lt;li&gt;
		Take an offline backup of the database on the V9.7 instance and restore that into the V10.1 instance.&lt;/li&gt;
	&lt;li&gt;
		Perform testing of the applications against the V10.1 database.&lt;/li&gt;
	&lt;li&gt;
		When a cutover date is assigned, &amp;nbsp;Take the current 9.1 production instance offline. &amp;nbsp;Backup the database and restore onto 9.7 and then onto 10.1 instance in the same way as before.&lt;/li&gt;
	&lt;li&gt;
		Then set up the two HADR standby servers from online backups of the 10.1 database.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;strong&gt;My Progress and Lessons Learned.&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;
	When restoring a database between versions of DB2, you need to use an Offline backup of the database. &amp;nbsp;This is because the transaction logs written during an Online backup aren't usable on the new version. &amp;nbsp;So, because we could not take the production database offline, I had to restore an Online backup of the database onto a development server which also uses version 9.1. &amp;nbsp;I could then take that database offline for a backup. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Once I got an Offline backup copied to the new hardware, I restored it into the V9.7 instance. &amp;nbsp;The restore also migrates the database to the new version. &amp;nbsp;After the restore completed I got an error:&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;
	SQL1243W&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;
	Dropping SYSTOOLS.DB2LOOK_INFO db2look operation table failed in a DB2 Version 8 database.&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;
	Explanation&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;
	The UPGRADE DATABASE command checks whether the DB2 Version 8 database has a db2look operation table called SYSTOOLS.DB2LOOK_INFO, and drops this table if it exists.&amp;nbsp;&lt;/div&gt;
&lt;div style="margin-left: 40px;"&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	After looking through the diagnostic log I found that the upgrade was successfull so I dropped the DB2LOOK_INFO table and proceeded to test the database by connecting and selecting from a few tables. &amp;nbsp;It looked good, so I took an Offline backup, and restored that into the 10.1 instance. &amp;nbsp;That finished without error. &amp;nbsp;All in all it was a pretty smooth process. &amp;nbsp;&lt;span style="line-height: 1.4;"&gt;I'll keep you updated when we go live!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</summary>
    <dc:creator>Brian Fairchild</dc:creator>
    <dc:date>2013-04-25T17:25:07Z</dc:date>
  </entry>
  <entry>
    <title>Informix DRDA Connections</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/informix-drda-connections" />
    <author>
      <name>Barrie Shaw</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/informix-drda-connections</id>
    <updated>2013-04-19T21:29:24Z</updated>
    <published>2013-04-17T21:57:48Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	One of our &lt;a href="http://www.xtivia.com/database-management/virtual-dba"&gt;Virtual-DBA&lt;/a&gt; clients recently contacted me for assistance in setting up connections using the DRDA protocol.&amp;nbsp;&amp;nbsp; They are moving from Java to .NET for their development work, and when they tried to connect via the .NET drivers, they received the following error:&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Unable to open socket to server:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong style="line-height: 1.4;"&gt;ERROR [08001] [IBM] SQL30081N&amp;nbsp; A communication error has been detected. Communication protocol being used: "TCP/IP".&amp;nbsp; Communication API being used: "SOCKETS".&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;Location where the error was detected: "10.105.223.33".&amp;nbsp; Communication function&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;detecting the error: "recv".&amp;nbsp; Protocol specific error code(s): "*", "*", "0".&amp;nbsp; SQLSTATE=08001&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;strong&gt;Some things to consider:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;- is the port number correctly specified&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;nbsp; 50000 is the default for LUW servers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; svcename dbm cfg parm for LUW servers&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;nbsp; 446 is the only port for iSeries servers, default for zSeries&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;- for a LUW server, is the TCPIP listener started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;nbsp; db2set DB2COMM=TCPIP, db2stop / db2start&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;- for an Informix server, ensure&amp;nbsp;DRDA&amp;nbsp;listener is started&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	&lt;strong&gt;&amp;nbsp; and you are using&amp;nbsp;DRDA&amp;nbsp;port vs the SQLI port&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	I found that they were not set up to connect via DRDA.&amp;nbsp; In order to do so, we had to add an entry to DBSERVERALIASES with a corresponding entry in the sqlhosts file for the DRDA protocol.&amp;nbsp; &amp;nbsp;The DBSERVERNAME for the instance cannot be used for DRDA.&amp;nbsp; The protocol on the sqlhosts entry for the new alias was set to drsoctcp since their server uses sockets.&amp;nbsp; Likewise, if they were using tlitcp, the entry would be drtlitcp.&amp;nbsp; The new entry will need a corresponding entry with the DRDA port number in /etc/services.&lt;/p&gt;
&lt;p&gt;
	Example:&lt;/p&gt;
&lt;p&gt;
	demo_on&amp;nbsp;&amp;nbsp; onsoctcp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on_hostname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on_servername &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&lt;span style="line-height: 1.4;"&gt;demo_dr&amp;nbsp;&amp;nbsp; drsoctcp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; on_hostname&amp;nbsp;&amp;nbsp;&amp;nbsp; dr_servername&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #&amp;nbsp; DRDA protocol&lt;/span&gt;&lt;/p&gt;</summary>
    <dc:creator>Barrie Shaw</dc:creator>
    <dc:date>2013-04-17T21:57:48Z</dc:date>
  </entry>
  <entry>
    <title>2013 IIUG Informix Conference</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/2013-iiug-informix-conference" />
    <author>
      <name>Barrie Shaw</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/2013-iiug-informix-conference</id>
    <updated>2013-04-16T22:26:54Z</updated>
    <published>2013-04-16T22:14:10Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p style="margin:0in;margin-bottom:.0001pt"&gt;
	&lt;a href="http://www.xtivia.com/resources/news-and-press-releases/483-2013-iiug-informix-conference"&gt;&lt;span style="font-size:11.0pt;font-family:&amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;"&gt;XTIVIA will be a Bronze sponsor&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 11pt; font-family: Arial, sans-serif;"&gt; at this year’s International Informix Users Group (IIUG) 2013 &amp;nbsp;Informix Conference next week (April 21-24) in San Diego, California.&amp;nbsp; This conference is the largest IBM Informix gathering in the world and is a technical conference for IBM Informix users.&amp;nbsp; The IIUG Conference offers a unique opportunity to network with a large gathering of fellow Informix users while also taking advantage of numerous sessions showcasing the latest Informix technology.&amp;nbsp; Please be sure to visit with Jack Dotson, Paul Anderson and myself at the XTIVIA table during the conference to see how we can help meet your Informix licensing and professional service needs. &amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 11pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;</summary>
    <dc:creator>Barrie Shaw</dc:creator>
    <dc:date>2013-04-16T22:14:10Z</dc:date>
  </entry>
  <entry>
    <title>Bad Application Architecture Limits Tuning Ability</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/bad-application-architecture-limits-tuning-ability" />
    <author>
      <name>Andrew Dalby</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/bad-application-architecture-limits-tuning-ability</id>
    <updated>2013-04-08T17:02:34Z</updated>
    <published>2013-04-06T02:22:04Z</published>
    <summary type="html">&lt;p&gt;
	We have a client who needs to run monthly reports from their financial application. &amp;nbsp;When we first started working for them, the monthly report took nearly a week to complete. &amp;nbsp;We noticed a huge amount of logfile waits and did the classic tuning task of increasing the size and number of logfiles, while putting them on alternating disks. &amp;nbsp;That reduced the processing time from several days to several hours, and kept them happy for about 5 years. &amp;nbsp;However, over the years, the size of the database and the processing time have kept getting bigger and longer. &amp;nbsp;It is now taking about 14 hours to complete the report. &amp;nbsp;While that is much better than it was originally, it's becoming burdensome again.&lt;/p&gt;
&lt;div&gt;
	This time, the statspack report needed a bit more analysis. &amp;nbsp;The client is running Standard Edition without Diagnostic or Tuning Packs on a Windows 32bit OS. &amp;nbsp;That rules out AWR, and using more than a couple Gigs of RAM. &amp;nbsp;We kicked off an hourly statspack snapshot a week before the monthly run to ensure we had a good baseline, then picked a time in the middle of the run to compare to normal processing.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The first thing that jumped out at us was that they were doing MUCH more work in MUCH smaller transactions during the monthly report. &amp;nbsp;The Load Profile section showed redo per second going from 72K to 1.5M, while the redo per transaction went from 800K to 3K. &amp;nbsp;Likewise Block Changes jumped from 470/s to 8.4K/s, but plummeted from 5.2K/tran to 17/tran. &amp;nbsp;Logical reads stayed approximately the same per second--13.5K to 16.6K, but per transaction dropped from 150K to 35. &amp;nbsp;The only way to interpret those stats is that the application is performing row-by-row (Tom Kyte refers to this as slow-by-slow) processing. &amp;nbsp;There's almost never a reason to do this, and is rightly regarded as a bug in programming. &amp;nbsp;Unfortunately, it's also extremely common. &amp;nbsp;Like the vast majority of tuning problems, there really isn't anything we as DBAs can do to fix it. &amp;nbsp;The application needs to be fixed to allow bulk processing.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Working our way down the statspack reports, in the Top 5 Timed Events, we saw that the db file sequential read went from 5K to 295K, but the Buffer Hit Ratio had stayed in the 99%+ range. &amp;nbsp;That indicates full table scans, which are sequential and bypass the Buffer Cache. &amp;nbsp;If we could add RAM, it's possible we could pin those tables in SGA, but we'd really like to avoid full table scans if we can. &amp;nbsp;Looking ahead to the Top SQL by reads, we saw that the top several queries all related to a table named xxx_TEMP_DETAIL. &amp;nbsp;That's trouble right there. &amp;nbsp;Temporary tables are almost always a bad idea in Oracle. &amp;nbsp;It's pretty standard practice in MS SQL Server, so sometimes a programmer with a Microsoft background or a vendor that's trying to be "DBMS agnostic" will use the technique in Oracle. &amp;nbsp;It's a bug. &amp;nbsp;What's worse is that the table isn't actually a temporary table, so it incurrs much more overhead than if it were actually a temp table. &amp;nbsp;Again, there isn't much we can do as DBAs to fix a poorly architected application. &amp;nbsp;This code needs to do bulk processing and avoid temp tables. &amp;nbsp;We can try to force better behavior by making it an actual temp table, pinning in RAM, or by making better indexes or turning it into an Index Only Table. &amp;nbsp;Unfortunately, without knowing exactly what the application is doing, any of these could break the application (more than it already is) by changing side effects that the programmer is wrongly relying on.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Finally, we saw in the Top SQL sorted by CPU that the third most CPU intensive query is updating seq$. &amp;nbsp;That's internal Oracle housekeeping. &amp;nbsp;It means that Oracle spent more time updating sequences than executing all but two user statements. &amp;nbsp;That is highly unusual, since sequences are extremely efficient. &amp;nbsp;Looking at the sequence table, I see that all the application owned sequences are set to not cache. &amp;nbsp;This is a very bad thing. &amp;nbsp;It means that every row that relies on a sequence, also requires an update to the seq$ table. &amp;nbsp;There were 1.6M unneeded updates. &amp;nbsp;This is usually caused by programmers who do not understand sequences. &amp;nbsp;They are not incremental row counters. &amp;nbsp;Programmers who try to use them as if they were often turn off caching to try to force them to behave like row counters, but they cannot be used that way. &amp;nbsp;Typically, this indicates a bug in the program. &amp;nbsp;On the other hand, it is possible that some tool, or legacy code sets caching off for all tables, and the code is actually correct. &amp;nbsp;If we can turn on caching, we will pave the way for much lower transaction load (with less logging) and parallel processing. &amp;nbsp;Unfortunately, based on what we see, it appears the application is relying on sequences being incremental row counters, so turning on caching might break the application.&lt;/div&gt;</summary>
    <dc:creator>Andrew Dalby</dc:creator>
    <dc:date>2013-04-06T02:22:04Z</dc:date>
  </entry>
  <entry>
    <title>Tweet! Tweet! Need to Integrate Twitter feeds into Liferay?</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/tweet!-tweet!-need-to-integrate-twitter-feeds-into-liferay-" />
    <author>
      <name>Tina Xing</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/tweet!-tweet!-need-to-integrate-twitter-feeds-into-liferay-</id>
    <updated>2013-03-30T04:20:40Z</updated>
    <published>2013-03-24T13:45:05Z</published>
    <summary type="html">&lt;p&gt;
	&lt;span style="font-size: 13px; line-height: 1.4;"&gt;Twitter is now ubiquitous in the social landscape. More and more organizations are showing twitter feeds in their external facing sites. In a recent project, I was tasked with the integration of Twitter tweets into an Enterprise Portal. In this blog post, I am going to walk through the steps for installing and setting up the twitter portlet from the Liferay Marketplace. As you explore the twitter portlet, you will probably face the same limitations that I did during this project. Fear not, as I will also provide my solution to the limitations that I faced.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
	The requirement for this project was to have a twitter portlet that can show tweets from multiple tweeter profiles.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The instructions below are specifically for the following bundle liferay-portal-tomcat-6.1.10-ee-ga1 (tomcat 7.0.25) and the twitter portlet available on the Liferay Marketplace for EE version.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Let's deploy and try it out!&lt;/div&gt;
&lt;ol&gt;
	&lt;li&gt;
		&lt;div&gt;
			Copy the lkg (plug-in) file into your deploy folder of the Liferay bundle.&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;div&gt;
			Start your Tomcat server and login in to your Liferay instance.&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;div&gt;
			Select Add-&amp;gt;Social-&amp;gt;Twitter, add it to your public or private page.&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;div&gt;
			&lt;span style="font-size: 13px; line-height: 1.4;"&gt;Twitter Portlet will let you set up a Twitter account, this will go to Liferay component which is under Control Panel-&amp;gt;My Account-&amp;gt;Social Network. Here you can configure Twitter Account (Your Twitter Screen Name). For example, my Twitter screen name is RujuanXing.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;div&gt;
			&lt;span style="font-size: 13px; line-height: 1.4;"&gt;Go back to the page you've added Twitter portlet. It'll say "Your activities will be shown in Activities Portlet".&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;div&gt;
			&lt;span style="font-size: 13px; line-height: 1.4;"&gt;Now you need to add Activities Portlet which is under Social category in your portal. This is where you will see the tweets of the user that you configured.&lt;/span&gt;&lt;/div&gt;
	&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
	&lt;span style="font-size: 13px; line-height: 1.4;"&gt;If you have not yet posted a blog or done any social activities on the portal, the Activities Portlet will display something like "No activities now".&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	So, how does this portlet work?&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;p&gt;
		&lt;span style="font-size: 13px; line-height: 1.4;"&gt;1. When you deploy twitter portlet plug-in, a table called twitter_feed is created. The table is used to store twitter screen names that you configure in Control Panel.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/MySQLTableEditor.png" style="width: 640px; height: 523px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/p&gt;
	&lt;p&gt;
		2. Twitter portlet schedules a job to fetch tweets from Twitter REST API. The job is configured in liferay-portlet.xml&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="font-size: 13px; line-height: 1.4;"&gt;3. When the user that you configured in the Control Panel tweets in Twitter, the Twitter Portlet will get the data and store the tweet in socialactivity table which is a default table in Liferay.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		4. The Activities portlet grabs the data from the socialactivity table and displays it.&lt;/p&gt;
	&lt;div&gt;
		&lt;div&gt;
			I will let you absorb the above information, and think about the constraints that you are facing with this particular offering of the Liferay Marketplace.&amp;nbsp;&lt;/div&gt;
		&lt;div&gt;
			&amp;nbsp;&lt;/div&gt;
		&lt;div&gt;
			Some of these are obvious, some are not. Here are the items that I ran into:&lt;/div&gt;
		&lt;div&gt;
			&lt;ol&gt;
				&lt;li&gt;
					The Twitter portlet available on Liferay Marketplace is using the Twitter REST API. Twitter has limited the REST API on the number of calls allowed. Unauthenticated user calls are permitted 150 requests per hour. Authenticated calls are permitted 350 requests per hour. For more details, please refer to &lt;a href="https://dev.twitter.com/docs/rate-limiting/1.1"&gt;https://dev.twitter.com/docs/rate-limiting/1.1&lt;/a&gt;. This becomes a key issue on a public facing site which could possibly have 1000s of users.&lt;/li&gt;
				&lt;li&gt;
					The REST API call is hard coded in the class. Whenever Twitter changes its API (which happens more often than you can imagine), you will need to change the code and compile and deploy. I faced this issue right at the outset. The twitter portlet that I was using from Marketplace, it uses legacy Twitter REST API to fetch tweets from Twitter.com. In March of 2012, Twitter announced their new API and in early October 2012, they turned off old endpoints. Since our project uses Liferay EE 6.1.10, I could not use the latest version of Twitter portlet which was targeted for Liferay EE 6.1.20. I did change the code and compile and redeploy. If only we could put the API in properties file, we will be spared the trouble of changing code, compile and deploy.&lt;/li&gt;
				&lt;li&gt;
					One more limitation that I observed, the marketplace twitter plug-in does not fetch the tweets when a user retweets other user’s tweets.&lt;/li&gt;
				&lt;li&gt;
					If you want to configure two or more twitter accounts in the twitter portlet, you are out of luck. I found this to be a serious limitation for my requirement.&lt;/li&gt;
				&lt;li&gt;
					All the tweets are shown in Activities portlet. Any social activity such as blogging will also show up on the Activities portlet effectively crowding out the tweets. There was no means of configuring a filter for just the tweets.&lt;/li&gt;
			&lt;/ol&gt;
			&lt;div&gt;
				&lt;div&gt;
					Because of these shortcomings, I decided to develop our own twitter-portlet for this particular project.&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&lt;/div&gt;
				&lt;div&gt;
					Below you will see the approach I took to solve the shortcomings I faced.&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&lt;/div&gt;
				&lt;div&gt;
					Twitter provides another API: Streaming API which is long live connection to Twitter. Whenever our subscribed twitter account tweets, Twitter will push the tweets to us. For more info, refer to &lt;a href="https://dev.twitter.com/docs/streaming-apis"&gt;https://dev.twitter.com/docs/streaming-apis&lt;/a&gt;. When you use REST API, tweets are stored at Twitter. With Streaming API, you need a place to store those tweets. In short, we need to design some tables in the database to store those tweets.&amp;nbsp;&lt;/div&gt;
				&lt;div&gt;
					&amp;nbsp;&lt;/div&gt;
				&lt;div&gt;
					&lt;div&gt;
						For this project, I designed three tables: organizationstatus, tweet and feed.&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;strong&gt;organizationstatus table&lt;/strong&gt;: This table was used to store twitter screen name and organization id which is configured in Liferay.&lt;/div&gt;
					&lt;div&gt;
						&lt;strong&gt;feed table&lt;/strong&gt;: This table was used to store twitter user id and organization id.&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;strong&gt;tweet table&lt;/strong&gt;: This table was used to store tweets from the subscribed users on Twitter.&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/MySQLTableEditor4.png" style="width: 640px; height: 515px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/MySQLTableEditor3.png" style="width: 640px; height: 518px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/MySQLTableEditor2.png" style="width: 640px; height: 517px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						There are three specific applications: twitter-persistence, twitter standalone app and twitter portlet.&lt;/div&gt;
					&lt;div&gt;
						&amp;nbsp;&lt;/div&gt;
					&lt;div&gt;
						&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/TwitterSolutionComponents.png" style="width: 640px; height: 367px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
					&lt;div&gt;
						&lt;div&gt;
							&amp;nbsp;&lt;/div&gt;
						&lt;div&gt;
							&lt;strong&gt;Twitter Persistence&lt;/strong&gt;: This app is used to perform all database operations.&lt;/div&gt;
						&lt;div&gt;
							&lt;strong&gt;Twitter Standalone&lt;/strong&gt;: This app is used to set up a long live connection to Twitter.com. It listens to a list of twitter accounts. When those accounts tweet on Twitter, those tweets will be pushed by Twitter.com to our connection. Our standalone app will store those tweets in tweet table. Because our listening list is dynamic, when user adds/updates/deletes organization's twitter account in Liferay, we need to change our listening list. In order to do that, we have a job to check organizationstatus table every 30 minutes (you can specify the time you want). When the job finds that the table is changed, it'll make the corresponding change into feed table including get the new twitter user id and then change the listening list.&lt;/div&gt;
						&lt;div&gt;
							&lt;strong&gt;Twitter Portlet&lt;/strong&gt;: It has two functions: Primary function is to display tweets and the other is actually a hook which stores organization's twitter screen into organizationstatus table. Whenever a user logs into Liferay Portal, the portlet will get the User’s organization, and display the tweets. If there are no tweets with current organization, the portlet will display the organization's parent organization's tweets. When admin adds/updates/deletes organization's twitter account, we make a corresponding update to the organizationstatus table.&lt;/div&gt;
						&lt;div&gt;
							&amp;nbsp;&lt;/div&gt;
						&lt;div&gt;
							Second, how can we set up a long live connection to Twitter.com? Previously, I was thinking I need to start coding from scratch. But then I found twitter4j which is an unofficial Java Library for Twitter API. You can download jar files and demo &lt;a href="http://twitter4j.org/en/index.html"&gt;here&lt;/a&gt;.&lt;/div&gt;
						&lt;div&gt;
							&amp;nbsp;&lt;/div&gt;
						&lt;div&gt;
							I was able to overcome the limitations that I faced while using the Liferay’s twitter portlet by essentially writing my own twitter portlet. With a clean design approach, and efficient coding standards, I was able to make the portlet do what I specifically started out to do.&lt;/div&gt;
						&lt;div&gt;
							&amp;nbsp;&lt;/div&gt;
						&lt;div&gt;
							Let me share a small demo with you. This demo is used to get the tweets which we specify in the filter. In this case, I am only listening to the tweets of RujuanXing and CNN.&lt;/div&gt;
						&lt;div&gt;
							&amp;nbsp;&lt;/div&gt;
					&lt;/div&gt;
				&lt;/div&gt;
				&lt;div&gt;
					&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/JavaCode.png" style="width: 640px; height: 594px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
			&lt;/div&gt;
			&lt;div&gt;
				&amp;nbsp;&lt;/div&gt;
			&lt;div&gt;
				Another question is how to get twitter userId based on twitter screen name. It's really easy to do that when we use twitter4j.&lt;/div&gt;
			&lt;div&gt;
				&amp;nbsp;&lt;/div&gt;
			&lt;div&gt;
				&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/JavaCode2.png" style="width: 640px; height: 127px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		Here is a screenshot of the twitter portlet that I developed –&lt;/div&gt;
	&lt;div&gt;
		&amp;nbsp;&lt;/div&gt;
	&lt;div&gt;
		&lt;img alt="" src="http://blogs.xtivia.com/documents/10314/42127/TwitterPortlet.png" style="width: 326px; height: 374px; margin-left: 5px; margin-right: 5px;" /&gt;&lt;/div&gt;
	&lt;div&gt;
		Hopefully this helps in getting you started in writing your own twitter portlet! If you have any question, need help or want to share your perspective, just comment at the bottom of this post or &lt;a href="http://www.xtivia.com/request-info"&gt;contact Xtivia&lt;/a&gt;, my employer!&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</summary>
    <dc:creator>Tina Xing</dc:creator>
    <dc:date>2013-03-24T13:45:05Z</dc:date>
  </entry>
  <entry>
    <title>How to shrink the SQL Server log file?</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/how-to-shrink-the-sql-server-log-file-" />
    <author>
      <name>Kaushik Nagaraj</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/how-to-shrink-the-sql-server-log-file-</id>
    <updated>2013-04-04T17:34:59Z</updated>
    <published>2013-03-27T16:33:50Z</published>
    <summary type="html">&lt;p&gt;
	&lt;u style="font-size: 11px; line-height: 1.4;"&gt;&lt;strong&gt;SQL Server 2005/2008 : Error: 9002, Severity: 17, State: 2&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#ff0000;"&gt;Error: 9002, Severity: 17, State: 2&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#ff0000;"&gt;The transaction log for database 'mydatabase' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Very often clients come to us requesting assistance because the log file is full and the transactions won’t complete anymore. They try to fix this problem by expanding the size of the log file or adding more space to the disk drive where the log file is located. Although this gives them some breathing room, very soon they land in the same situation as before.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	SQL Server logging mechanism is not that complicated but it’s best to leave the log file management to the experts (DBAs). I will try to explain the most common reason why the log file will get full.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Databases in SQL Server can be in either SIMPLE recovery mode or in FULL recovery mode. In SIMPLE recovery mode as soon as the transactions are committed the log space can be re-utilized. But SIMPLE mode does not give you the option of recovering the database using log backups.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If your database is in SIMPLE recovery mode and the log file is full then either the file size is small for the amount of active transactions or you have run out disk space.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	But if your database is in FULL recovery mode and the transaction log file is full then follow these steps to fix the problem.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If the log file is configured with a preset max size then see if you can increase that for now.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Now lets look at why the file got full in the first place. First thing that you need to check is the &lt;em&gt;log_reuse_wait_desc&lt;/em&gt; column in the &lt;em&gt;sys.databases&lt;/em&gt;.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;select name, recovery_model_desc, log_reuse_wait_desc from sys.databases&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	There are several reasons that could come up in this column and some of them are noted here.&lt;/div&gt;
&lt;div&gt;
	NOTHING&lt;/div&gt;
&lt;div&gt;
	CHECKPOINT&lt;/div&gt;
&lt;div&gt;
	LOG_BACKUP&lt;/div&gt;
&lt;div&gt;
	ACTIVE_BACKUP_OR_RESTORE&lt;/div&gt;
&lt;div&gt;
	ACTIVE_TRANSACTION&lt;/div&gt;
&lt;div&gt;
	DATABASE_MIRRORING&lt;/div&gt;
&lt;div&gt;
	REPLICATION&lt;/div&gt;
&lt;div&gt;
	DATABASE_SNAPSHOT_CREATION&lt;/div&gt;
&lt;div&gt;
	LOG_SCAN&lt;/div&gt;
&lt;div&gt;
	OTHER_TRANSIENT&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If the database in question is TEMPDB then the process to resolve it would be different and also the reasons for which TEMPDB gets full are different. But let me discuss the most common reason why a user database’s log file gets full.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;u&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;LOG_BACKUP&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
	In most cases you will see the reason noted in 'log_reuse_wait_desc' is given as 'LOG_BACKUP'. This means that the database is in FULL recovery model and is waiting for a log backup to be taken.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If you have scheduled a regular log backup job then check its status and wait for it to finish before you shrink the log file. If you check the free space in the log file then you will indeed see a lot of unused space but you can not shrink it. Once the log backup completes you can shrink the file.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	You can run the following TSQL to get the amount of free space vs used space in the log file.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;select&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;[FileSizeMB]&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;=&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;convert(numeric(10,2),round(a.size/128.,2)),&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;[UsedSpaceMB]&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;=&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;convert(numeric(10,2),round(fileproperty( a.name,'SpaceUsed')/128.,2)) ,&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;[UnusedSpaceMB]&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;=&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;convert(numeric(10,2),round((a.size-fileproperty( a.name,'SpaceUsed'))/128.,2)) ,&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;[DBFileName]&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;= a.name&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;from&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;em&gt;&lt;span style="color:#0000ff;"&gt;sysfiles a&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	But if the data file is not as big as the log file then instead of doing a log backup, I would do the following.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	1) Change the recovery model to SIMPLE&lt;/div&gt;
&lt;div&gt;
	2) Run a CHECKPOINT.&lt;/div&gt;
&lt;div&gt;
	3) Shrink the log file&lt;/div&gt;
&lt;div&gt;
	3) Change the recovery model to FULL&lt;/div&gt;
&lt;div&gt;
	4) Take a full backup and subsequently schedule log backups.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Sometimes the above steps take a lot less time to complete than taking a log backup and then shrinking the file. But please keep in mind that when you do this you have essentially broken the log chain and will have to resync the database if it is configured for log shipping.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	The question of whether to truncate the log or not is dependent on the DB size. If it is not too big then truncate it and take a full backup. Otherwise it is best to take log backups.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;u&gt;&lt;strong&gt;&lt;span style="color:#0000ff;"&gt;ACTIVE_TRANSACTION&lt;/span&gt;&lt;/strong&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
	Another prominent reason that I have seen is 'ACTIVE_TRANSACTION'. In this case, it would be best if you first add a new log file to the database or extend it. Then run the DBCC OPENTRAN on that database and check the open transactions. This should give you more information about the transaction that is consuming most of the log space and has not yet completed.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If the reason given is ACTIVE_BACKUP_OR_RESTORE then refer to my earlier post to find what is the expected time to finish the current backup or restore.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	If the reason is related to either replication or mirroring then first check the status of replication or mirroring to ensure that they are up to speed and don't have any latency. This should help in reducing the log reuse wait time.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</summary>
    <dc:creator>Kaushik Nagaraj</dc:creator>
    <dc:date>2013-03-27T16:33:50Z</dc:date>
  </entry>
  <entry>
    <title>SQL Server backup or restore progress</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/sql-server-backup-or-restore-progress" />
    <author>
      <name>Kaushik Nagaraj</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/sql-server-backup-or-restore-progress</id>
    <updated>2013-04-03T16:21:59Z</updated>
    <published>2013-03-27T16:16:04Z</published>
    <summary type="html">&lt;p&gt;
	&lt;u style="font-size: 11px; line-height: 1.4;"&gt;&lt;strong&gt;SQL Server 2005/2008: Find backup and restore status/progress&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Ever wondered how long it would take to complete a backup or restore that is running in the background. I, for one, do not want to keep looking at the job or TSQL that is taking the backup or doing the restore.&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	I found this neat TSQL that will give you the progress report of the backup/restore and will also tell you how long it would take to complete it. In case you are running the backup with the VERIFY option then it does not tell you how long it would take to complete the VERIFY phase.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	Run the following TSQL query to get the status&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;SELECT command,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s.text,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; start_time,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; percent_complete,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CAST(((DATEDIFF(s,start_time,GetDate()))/3600) as varchar) + ' hour(s), '&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + CAST((DATEDIFF(s,start_time,GetDate())%3600)/60 as varchar) + 'min, '&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + CAST((DATEDIFF(s,start_time,GetDate())%60) as varchar) + ' sec' as running_time,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CAST((estimated_completion_time/3600000) as varchar) + ' hour(s), '&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + CAST((estimated_completion_time %3600000)/60000 as varchar) + 'min, '&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + CAST((estimated_completion_time %60000)/1000 as varchar) + ' sec' as est_time_to_go,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dateadd(second,estimated_completion_time/1000, getdate()) as est_completion_time&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;FROM sys.dm_exec_requests r&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;CROSS APPLY sys.dm_exec_sql_text(r.sql_handle) s&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&lt;span style="color:#0000ff;"&gt;WHERE r.command in ('RESTORE DATABASE', 'BACKUP DATABASE', 'RESTORE LOG', 'BACKUP LOG')&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
	&amp;nbsp;&lt;/div&gt;</summary>
    <dc:creator>Kaushik Nagaraj</dc:creator>
    <dc:date>2013-03-27T16:16:04Z</dc:date>
  </entry>
  <entry>
    <title>Creating a simple Elastic Search cluster</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/creating-a-simple-elastic-search-cluster</id>
    <updated>2013-03-24T18:10:55Z</updated>
    <published>2013-03-20T12:42:47Z</published>
    <summary type="html">&lt;div style="max-width: 700px; word-wrap: break-word;"&gt;
	&lt;p&gt;
		&lt;span style="font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;In this post (my second post in a series on Elastic Search and Liferay) we are going to see how to&amp;nbsp;&lt;/span&gt;&lt;span style="line-height: 1.4;"&gt;install and configure Elastic Search on our computer and perform simple queries. I am going to use&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;0.19.4 version in Windows, but the process is really similar with other versions / platforms.&lt;/span&gt;&lt;/p&gt;
	&lt;p&gt;
		&lt;span style="font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;Follow these steps:&lt;/span&gt;&lt;/p&gt;
	&lt;ol style="font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;
		&lt;li&gt;
			&lt;a href="https://github.com/elasticsearch/elasticsearch" style="color: rgb(24, 93, 130); text-decoration: none;" target="_blank"&gt;Select and download a version of Elastic Search.&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;
			Unzip in two different locations (yes, we are going to create a simple cluster with two nodes):
			&lt;ul&gt;
				&lt;li&gt;
					C:\Projects\ElasticSearch\elasticsearch-0.19.4-node-1&amp;nbsp;&lt;/li&gt;
				&lt;li&gt;
					C:\Projects\ElasticSearch\elasticsearch-0.19.4-node-2&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
		&lt;li&gt;
			Modify \node_name\config\elasticsearch.yml in both nodes:
			&lt;table border="1" cellpadding="1" cellspacing="1" style="table-layout:fixed; width: 100%;"&gt;
				&lt;thead&gt;
					&lt;tr&gt;
						&lt;th scope="col" style="padding: 1em; text-align: center;"&gt;
							Original&lt;/th&gt;
						&lt;th scope="col" style="padding: 1em; text-align: center;"&gt;
							\elasticsearch-0.19.4-node-1\config\elasticsearch.yml&lt;/th&gt;
						&lt;th scope="col" style="padding: 1em; text-align: center;"&gt;
							\elasticsearch-0.19.4-node-2\config\elasticsearch.yml&lt;/th&gt;
					&lt;/tr&gt;
				&lt;/thead&gt;
				&lt;tbody&gt;
					&lt;tr&gt;
						&lt;td style="padding: 1em;"&gt;
							&lt;p&gt;
								[...]&lt;/p&gt;
							&lt;p&gt;
								################################### Cluster ###################################&lt;/p&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Cluster name identifies your cluster for auto-discovery. If you're running&lt;/div&gt;
							&lt;div&gt;
								# multiple clusters on the same network, make sure you're using unique names.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# cluster.name: elasticsearch&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								#################################### Node #####################################&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Node names are generated dynamically on startup, so you're relieved&lt;/div&gt;
							&lt;div&gt;
								# from configuring them manually. You can tie this node to a specific name:&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# node.name: "Franz Kafka"&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Every node can be configured to allow or deny being eligible as the master,&lt;/div&gt;
							&lt;div&gt;
								# and to allow or deny to store the data.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to be eligible as a master node (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# node.master: true&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to store data (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# node.data: true&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								[...]&lt;/div&gt;
							&lt;div&gt;
								&lt;div&gt;
									# Set a custom port for the node to node communication (9300 by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									# transport.tcp.port: 9300&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Enable compression for all communication between nodes (disabled by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									# transport.tcp.compress: true&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Set a custom port to listen for HTTP traffic:&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									# http.port: 9200&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									[...]&lt;/div&gt;
							&lt;/div&gt;
						&lt;/td&gt;
						&lt;td style="padding: 1em;"&gt;
							&lt;p&gt;
								[...]&lt;/p&gt;
							&lt;p&gt;
								################################### Cluster ###################################&lt;/p&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Cluster name identifies your cluster for auto-discovery. If you're running&lt;/div&gt;
							&lt;div&gt;
								# multiple clusters on the same network, make sure you're using unique names.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								cluster.name: my_cluster_name&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								#################################### Node #####################################&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Node names are generated dynamically on startup, so you're relieved&lt;/div&gt;
							&lt;div&gt;
								# from configuring them manually. You can tie this node to a specific name:&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								node.name: node1&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Every node can be configured to allow or deny being eligible as the master,&lt;/div&gt;
							&lt;div&gt;
								# and to allow or deny to store the data.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to be eligible as a master node (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;node.master: true&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to store data (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;node.data: true&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								[...]&lt;/div&gt;
							&lt;div&gt;
								&lt;div&gt;
									# Set a custom port for the node to node communication (9300 by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;transport.tcp.port: 9300&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Enable compression for all communication between nodes (disabled by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									# transport.tcp.compress: true&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Set a custom port to listen for HTTP traffic:&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;http.port: 9200&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									[...]&lt;/div&gt;
							&lt;/div&gt;
						&lt;/td&gt;
						&lt;td style="padding: 1em;"&gt;
							&lt;p&gt;
								[...]&lt;/p&gt;
							&lt;p&gt;
								################################### Cluster ###################################&lt;/p&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Cluster name identifies your cluster for auto-discovery. If you're running&lt;/div&gt;
							&lt;div&gt;
								# multiple clusters on the same network, make sure you're using unique names.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								cluster.name: my_cluster_name&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								#################################### Node #####################################&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Node names are generated dynamically on startup, so you're relieved&lt;/div&gt;
							&lt;div&gt;
								# from configuring them manually. You can tie this node to a specific name:&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								node.name: node2&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								# Every node can be configured to allow or deny being eligible as the master,&lt;/div&gt;
							&lt;div&gt;
								# and to allow or deny to store the data.&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to be eligible as a master node (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;node.master: false&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								# Allow this node to store data (enabled by default):&lt;/div&gt;
							&lt;div&gt;
								#&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;node.data: true&lt;/div&gt;
							&lt;div&gt;
								&amp;nbsp;&lt;/div&gt;
							&lt;div&gt;
								[...]&lt;/div&gt;
							&lt;div&gt;
								&lt;div&gt;
									# Set a custom port for the node to node communication (9300 by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;transport.tcp.port: 9301&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Enable compression for all communication between nodes (disabled by default):&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									# transport.tcp.compress: true&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									# Set a custom port to listen for HTTP traffic:&lt;/div&gt;
								&lt;div&gt;
									#&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;http.port: 9201&lt;/div&gt;
								&lt;div&gt;
									&amp;nbsp;&lt;/div&gt;
								&lt;div&gt;
									[...]&lt;/div&gt;
							&lt;/div&gt;
						&lt;/td&gt;
					&lt;/tr&gt;
				&lt;/tbody&gt;
			&lt;/table&gt;
			&lt;div&gt;
				&amp;nbsp;&lt;/div&gt;
		&lt;/li&gt;
		&lt;li&gt;
			It may be necessary to copy several jars into \lib folder. If they are not present, be sure to copy these jars in both nodes:
			&lt;ol&gt;
				&lt;li&gt;
					elasticsearch-0.19.4.jar&lt;/li&gt;
				&lt;li&gt;
					jna-3.3.0.jar&lt;/li&gt;
				&lt;li&gt;
					jts-1.12.jar&lt;/li&gt;
				&lt;li&gt;
					log4j-1.2.17.jar&lt;/li&gt;
				&lt;li&gt;
					lucene-analyzers-3.6.2.jar&lt;/li&gt;
				&lt;li&gt;
					lucene-core-3.6.2.jar&lt;/li&gt;
				&lt;li&gt;
					lucene-highlighter-3.6.2.jar&lt;/li&gt;
				&lt;li&gt;
					lucene-memory-3.6.2.jar&lt;/li&gt;
				&lt;li&gt;
					lucene-queries-3.6.2.jar&lt;/li&gt;
				&lt;li&gt;
					snappy-java-1.0.4.1.jar&lt;/li&gt;
				&lt;li&gt;
					spatial4j-0.3.jar&lt;/li&gt;
			&lt;/ol&gt;
			&lt;p&gt;
				And if you want to use analyzers, may be also in \plugins\analysis-icu folder,&lt;/p&gt;
			&lt;div&gt;
				&lt;ol&gt;
					&lt;li&gt;
						elasticsearch-analysis-icu-1.7.0.jar&lt;/li&gt;
					&lt;li&gt;
						icu4j-4.8.1.1.jar&lt;/li&gt;
					&lt;li&gt;
						lucene-icu-3.6.1.jar&lt;/li&gt;
				&lt;/ol&gt;
			&lt;/div&gt;
		&lt;/li&gt;
		&lt;li&gt;
			Create a file named start_elasticsearch_cluster.bat like this:&lt;br /&gt;
			&lt;p&gt;
				&lt;code&gt;start call "c:/Projects/ElasticSearch/elasticsearch-0.19.4-node-1/bin/elasticsearch.bat"&lt;br /&gt;
				PING -n 1 -w 15000 1.1.1.1&amp;gt;NUL&lt;br /&gt;
				start call "c:/Projects/ElasticSearch/elasticsearch-0.19.4-node-2/bin/elasticsearch.bat"&lt;/code&gt;&lt;/p&gt;
			&lt;p&gt;
				What does this file do? &amp;nbsp;It starts the first node, it waits for 15 seconds (just pinging for 15 seconds to nowhere and redirecting the result to nowhere :), this is really useful for wait some time until doing something else), and then it starts the second node.&lt;/p&gt;
		&lt;/li&gt;
		&lt;li&gt;
			Go to http://localhost:9200. You will see a page like this:&lt;br /&gt;
			&lt;p&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; line-height: normal; white-space: pre;"&gt;{&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt; "ok" : true, &lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt;"status" : 200, &lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt;"name" : "node1",&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt; "version" : {&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt; "number" : "0.19.4",&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt; "snapshot_build" : false&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt;},&lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt; "tagline" : "You Know, for Search" &lt;/span&gt;&lt;br /&gt;
				&lt;span style="font-family: 'Courier New', Courier, monospace; white-space: pre; line-height: normal;"&gt;}&lt;/span&gt;&lt;/p&gt;
			&lt;p&gt;
				And right now, you are prepared to create an index, add a document to the index, and perform amazingly fast searches against your new Elastic Search Cluster!&lt;/p&gt;
		&lt;/li&gt;
	&lt;/ol&gt;
	&lt;p&gt;
		&lt;span style="font-family: Helvetica, Arial, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;If you have any question, need help or want to share your perspective, just comment at the bottom of this post or &lt;a href="http://www.xtivia.com/request-info" target="_blank"&gt;contact Xtivia&lt;/a&gt;, my employer!&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2013-03-20T12:42:47Z</dc:date>
  </entry>
  <entry>
    <title>Elastic Search: A distributed RESTful Search Engine</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/elastic-search:-a-distributed-restful-search-engine" />
    <author>
      <name>Asier Del Pozo</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/elastic-search:-a-distributed-restful-search-engine</id>
    <updated>2013-03-24T15:26:44Z</updated>
    <published>2013-03-19T20:49:09Z</published>
    <summary type="html">&lt;p&gt;
	Traditionally, building portals and/or web sites with "search that just works" has been hard but over the last few years, life has become easier. Various search tools such as Lucene and Solr have emerged, and platforms such as Liferay have integrated with them to provide the kind of search capabilities that I and my customers/users expect - fast, east to set up, easy to scale, and easy to find relevant results. Recently I had an opportunity to use elasticsearch instead of Solr or Lucene as the search engine on an enterprise scale portal implementation project with &lt;a href="http://www.xtivia.com/portal/liferay-portal" target="_blank"&gt;Liferay&lt;/a&gt;. This is the first blog post in a series that talks about elasticsearch and how you can integrate it with Liferay.&lt;/p&gt;
&lt;h1&gt;
	Elastic Search: A distributed RESTful Search Engine&lt;/h1&gt;
&lt;p&gt;
	That's how they define themselves on their website - &lt;a href="http://www.elasticsearch.com" target="_blank"&gt;www.elasticsearch.com&lt;/a&gt;. It was created as a scalable search solution with a&amp;nbsp;common interface,&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/JSON" target="_blank"&gt;JSON&lt;/a&gt;&amp;nbsp;over&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/HTTP" title="HTTP"&gt;HTTP&lt;/a&gt;,&amp;nbsp;and the first version was released in February 2010.&lt;/p&gt;
&lt;p style="text-align: center;"&gt;
	&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/XCHYo0CsZrk" width="560"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;
	These are the most important features:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		Based on &lt;strong&gt;&lt;span title="a free/open source information retrieval software library, originally created in Java"&gt;Apache Lucene&lt;/span&gt;&lt;/strong&gt;, elasticsearch&amp;nbsp;&lt;span style="font-family: sans-serif; font-size: 13px; line-height: 19.1875px;"&gt;can be used to search all kinds of documents.&amp;nbsp;&lt;/span&gt;&lt;span style="line-height: 1.4;"&gt;Lucene's features are available through the&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/JSON" target="_blank" title="JSON"&gt;JSON&lt;/a&gt;&lt;span style="line-height: 1.4;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Java_API" style="line-height: 1.4;" target="_blank" title="Java API"&gt;Java API&lt;/a&gt;&lt;span style="line-height: 1.4;"&gt;. It supports&amp;nbsp;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Faceted_search" style="line-height: 1.4;" target="_blank" title="Faceted search"&gt;faceting&lt;/a&gt;&amp;nbsp;that is really useful to use with advanced search systems such as Liferay's (a really fantastic explanation about that can be found in &lt;a href="http://www.liferay.com/web/raymond.auge/blog/-/blogs/faceted-search-in-liferay-6-1" target="_blank"&gt;Ray Auge's blog&lt;/a&gt;),&lt;span style="line-height: 1.4;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.elasticsearch.org/blog/2011/02/08/percolator.html" style="line-height: 1.4;" target="_blank"&gt;percolating&lt;/a&gt;&lt;span style="line-height: 1.4;"&gt;, which can be useful for notifying users if new documents match for registered queries.&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;&lt;span title="of or relating to or being computer software for which the source code is freely available"&gt;Open Source&lt;/span&gt;&lt;/strong&gt;, it is stored in &lt;a href="https://github.com" target="_blank"&gt;GitHub &lt;/a&gt;and its latest version can be reached in &lt;a href="https://github.com/elasticsearch/elasticsearch" target="_blank"&gt;its repository&lt;/a&gt;. There are a lot of &lt;a href="http://www.elasticsearch.org/guide/clients/" target="_blank"&gt;clients and integrations&lt;/a&gt; available (clients for Groovy, Perl, Python, Java, Ruby, PHP or .Net, among others, and integrations with Jetty, Drupal, Spring or Liferay, among others).&lt;/li&gt;
	&lt;li&gt;
		&lt;span title="A distributed system consists of multiple computers that communicate through a computer network"&gt;It is &lt;strong&gt;distributed&lt;/strong&gt;,&amp;nbsp;&lt;/span&gt;which means that indices can be divided into&amp;nbsp;shards&amp;nbsp;and each shard can have zero or more replicas. Each node hosts one or more shards, and acts as a coordinator to delegate operations to the correct shard(s).&amp;nbsp;It provides a scalable search solution, has near&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Real-time_search" target="_blank" title="Real-time search"&gt;real-time search&lt;/a&gt;&amp;nbsp;and support for&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Multitenancy" target="_blank" title="Multitenancy"&gt;multitenancy&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="text-align: center;"&gt;
	&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/l4ReamjCxHo" width="560"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;span title="Representational State Transfer (REST) is a style of software architecture for distributed systems such as the World Wide Web"&gt;&lt;strong&gt;RESTful&lt;/strong&gt;&lt;/span&gt;, it uses JSON models for representing data. With JSON it is simple to provide semi-structured data with complex entities as well as being programming language neutral with first-level parser support.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	Of course, the first thing that comes to mind is, ok, "for Search", but what can Elastic Search do and how can I compare it to Solr, for example? I am not going to answer this second question because &lt;a href="#Solr vs Elastic Search"&gt;a lot of people has done so before me&lt;/a&gt;, but about what Elastic Search can do, I will stop&lt;a href="#Help"&gt;&amp;nbsp;&lt;/a&gt;and reply: a lot of things, easily and really fast!!&lt;/p&gt;
&lt;p&gt;
	Explaining every functionality about Elastic Search would be really useful, but if &lt;a href="http://www.elasticsearch.org/guide/" target="_blank"&gt;someone has already done so&lt;/a&gt;, why do it again? While I have been working with Elastic Search, I found some additional resources really helpful. Here is a list of some of those useful resources:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://www.elasticsearch.org/" target="_blank"&gt;Elastic Search Website&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://www.elasticsearch.org/guide/" target="_blank"&gt;Elastic Search Guide&lt;/a&gt;
		&lt;ul&gt;
			&lt;li&gt;
				&lt;a href="http://www.elasticsearch.org/guide/reference/glossary/" target="_blank"&gt;Glossary of terms&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;
				&lt;a href="http://www.elasticsearch.org/guide/reference/api/index_.html" target="_blank"&gt;Index &lt;/a&gt;management
				&lt;ul&gt;
					&lt;li&gt;
						&lt;a href="http://www.elasticsearch.org/guide/reference/mapping/" target="_blank"&gt;Mapping&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;
						&lt;a href="http://www.elasticsearch.org/guide/reference/api/admin-indices-templates.html" target="_blank"&gt;Templates&lt;/a&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/li&gt;
			&lt;li&gt;
				&lt;a href="http://www.elasticsearch.org/guide/reference/api/search/" target="_blank"&gt;Search API&lt;/a&gt;
				&lt;ul&gt;
					&lt;li&gt;
						&lt;a href="http://www.elasticsearch.org/guide/reference/api/search/sort.html" target="_blank"&gt;Sort&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;
						&lt;a href="http://www.elasticsearch.org/guide/reference/api/search/highlighting.html" target="_blank"&gt;Highlighting&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;
						&lt;a href="http://www.elasticsearch.org/guide/reference/api/search/facets/" target="_blank"&gt;Facets&lt;/a&gt;&lt;/li&gt;
				&lt;/ul&gt;
			&lt;/li&gt;
			&lt;li&gt;
				And, of course, &lt;a href="http://www.elasticsearch.org/guide/reference/java-api/" target="_blank"&gt;Java API&lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="https://github.com/elasticsearch/elasticsearch" target="_blank"&gt;Elastic Search code&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		A lot of &lt;a href="https://github.com/elasticsearch" target="_blank"&gt;Elastic Search projects&lt;/a&gt;:
		&lt;ul&gt;
			&lt;li&gt;
				A really &lt;a href="https://github.com/karmi/ember-data-elasticsearch/tree/master/example" target="_blank"&gt;useful example&lt;/a&gt; about &lt;a href="http://www.elasticsearch.org/tutorials/2012/08/22/javascript-web-applications-and-elasticsearch.html" target="_blank"&gt;how Elastic Search can work&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;
				&lt;a href="https://github.com/dadoonet/spring-elasticsearch" target="_blank"&gt;Spring factories for Elastic Search&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;
				&lt;a href="https://github.com/sematext/SearchSchemer" target="_blank"&gt;Search Schemer&lt;/a&gt;, a simple application which allows to convert index structure between &lt;a href="http://lucene.apache.org/solr/" target="_blank"&gt;Solr&lt;/a&gt;, &lt;a href="http://www.elasticsearch.org/" target="_blank"&gt;Elastic Search&lt;/a&gt; and &lt;a href="http://www.senseidb.com/" target="_blank"&gt;SenseiDB&lt;/a&gt;&lt;/li&gt;
			&lt;li&gt;
				&lt;a href="https://github.com/searchbox-io/Jest" target="_blank"&gt;Jest&lt;/a&gt;, a Java HTTP Rest client for &lt;a href="http://www.elasticsearch.org/" target="_blank"&gt;ElasticSearch &lt;/a&gt;&lt;/li&gt;
		&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://curl.haxx.se/" target="_blank"&gt;Curl&lt;/a&gt;, a command line tool for transferring data with URL syntax.&lt;/li&gt;
	&lt;li&gt;
		And, of course, &lt;a href="http://elasticsearch-users.115913.n3.nabble.com/" target="_blank"&gt;Elastic Search Users&lt;/a&gt;, where you can share your experience and &lt;a href="#Help"&gt;get help&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	The three most useful Elastic Search vs Solr comparisions:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		&lt;a href="http://solr-vs-elasticsearch.com/" target="_blank"&gt;http://solr-vs-elasticsearch.com/&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://www.findbestopensource.com/article-detail/solr-vs-elasticsearch" target="_blank"&gt;http://www.findbestopensource.com/article-detail/solr-vs-elasticsearch&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;
		&lt;a href="http://opensearchnews.com/2012/07/elasticsearch-possibly-a-solr-alternative/" target="_blank"&gt;http://opensearchnews.com/2012/07/elasticsearch-possibly-a-solr-alternative/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
	If you have any question, need help or want to&amp;nbsp;&lt;span style="line-height: 1.4;"&gt;share your impressions&lt;/span&gt;&lt;span style="line-height: 1.4;"&gt;, just comment below on this blog post&amp;nbsp;or &lt;a href="http://www.xtivia.com/request-info" target="_blank"&gt;contact Xtivia&lt;/a&gt;!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</summary>
    <dc:creator>Asier Del Pozo</dc:creator>
    <dc:date>2013-03-19T20:49:09Z</dc:date>
  </entry>
  <entry>
    <title>Preping Oracle Linux(OEL5 / OEL6) for an Oracle Database install using oracle-validated RPM</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/preping-oracle-linux-oel5-oel6-for-an-oracle-database-install-using-oracle-validated-rpm" />
    <author>
      <name>Luke Smith</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/preping-oracle-linux-oel5-oel6-for-an-oracle-database-install-using-oracle-validated-rpm</id>
    <updated>2013-03-08T16:58:55Z</updated>
    <published>2013-03-06T23:12:48Z</published>
    <summary type="html">&lt;p&gt;
	Today we were helping a &lt;a href="http://www.virtual-dba.com/" target="_blank"&gt;Virtual-DBA&lt;/a&gt; client prep an Oracle Linux 6 server to install Oracle Grid Control 12c. We were configuring the server to have the database on the local Grid Control server since it will be monitoring a small number of databases. We wanted to speed up the prep work for the Oracle database install so we were planning to use the oracle-validated RPM package. This will speed up the process by creating an oracle user, oinstall and dba groups, setting kernel parameters, sets hard and soft shell resource limits, downloads and installs the required packages for the Oracle database install to complete successfully. Below are the steps outlined to accomplish this task.&lt;/p&gt;
&lt;p&gt;
	After the server software is installed we need to either register our server with the Unbreakable Linux Network(ULN) or the public repository. Unless you have bought support for the ULN you will be using the public repository.&lt;/p&gt;
&lt;p&gt;
	To register your server with the ULN you will need an account with the correct permissions most likely root. You will then either type in uln_register for OEL6 or type in up2date --register for OEL5. &amp;nbsp;You will then be prompted for your Oracle account information and your ULN&amp;nbsp; CSI number.&amp;nbsp; If you selected the options at the bottom of the screen you server will then upload&amp;nbsp; information about the servers packages and configuration. After the upload you will be able to visit &lt;a href="https://linux.oracle.com/"&gt;https://linux.oracle.com/&lt;/a&gt; and manage the channel subscription for that server.&lt;/p&gt;
&lt;p&gt;
	If you haven’t purchased ULN support you can get your updates from Oracle’s public repository. For OEL5 and OEL6 you cd to /etc/yum.repos.d and then type&lt;/p&gt;
&lt;p&gt;
	OEL5:&lt;/p&gt;
&lt;p&gt;
	wget &lt;a href="http://public-yum.oracle.com/public-yum-el5.repo"&gt;http://public-yum.oracle.com/public-yum-el5.repo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	OEL6:&lt;/p&gt;
&lt;p&gt;
	wget &lt;a href="http://public-yum.oracle.com/public-yum-el6.repo"&gt;http://public-yum.oracle.com/public-yum-el6.repo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
	Once you have downloaded the updated repository information you can then edit the file with your favorite text editor. &amp;nbsp;To update your subscriptions simply edit the file by changing &lt;em&gt;enabled=0 to enabled=1&lt;/em&gt; below the channel you wish to subscribe.&lt;/p&gt;
&lt;p&gt;
	After you have either registered with ULN or the public repository you can then type yum update to update your subscriptions. You can get a list of packages by typing yum list.&lt;/p&gt;
&lt;p&gt;
	Finally to install an RPM from the repository of your choice you can type yum install &amp;lt;package_name&amp;gt;.&lt;/p&gt;
&lt;p&gt;
	For the automated configuration of the server to prep for the Oracle Database install the command you are looking for is either:&lt;/p&gt;
&lt;p&gt;
	OEL5:&lt;/p&gt;
&lt;p&gt;
	&lt;em&gt;yum install oracle-validated&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	OEL6:&lt;/p&gt;
&lt;p&gt;
	&lt;em&gt;yum install oracle-rdbms-server-11gR2-preinstall&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
	(Note on licenses: You are allowed to install a copy of Oracle Database to house your repository for both Grid Control and a Recovery Catalog as long as you don’t use the database for any other purposes and the databases being monitored are licensed.)&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Luke Smith</dc:creator>
    <dc:date>2013-03-06T23:12:48Z</dc:date>
  </entry>
  <entry>
    <title>Looping Construct for ETL - Simplified by Talend DI</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/looping-construct-for-etl-simplified-by-talend--1" />
    <author>
      <name>Mangesh Mharolkar</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/looping-construct-for-etl-simplified-by-talend--1</id>
    <updated>2013-03-02T21:57:22Z</updated>
    <published>2013-03-01T19:05:45Z</published>
    <summary type="html">&lt;p&gt;
	I am not a regular ETL developer but I do "dabble" in developing code from time to time. One requirement that I come across is looping (while, for, infinite) in a job and performing a task based on condition and then going to sleep for a period of time. This certainly can be accomplished through a scheduler as well but is often time easier to accomplish in the ETL job design.&lt;/p&gt;
&lt;p&gt;
	I have had the opportunity to implement this construct using SSIS and Datastage. In my opinion, Datastage was the most complicated - took me a good 5 hours to get the code to do exactly what I wanted. SSIS was more cooperating - I was able to do the same in about 3 hours.&lt;/p&gt;
&lt;p&gt;
	As I started working with Talend Open Studio earlier this week, I was amazed to see how simple it was to work with Talend.&lt;/p&gt;
&lt;p&gt;
	As you open the Studio, you can find various orchestration steps very quickly - something the other two tools do not do. i.e. the IDE user interface is more intuitive for Talend&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/39723/Pallet_Image11.png" style="width: 322px; height: 588px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	From here, it was drag and drop easy...&lt;/p&gt;
&lt;p&gt;
	Step 1: Drag the while loop on the canvas - define the parameters.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/39723/DefineLoop.png" style="width: 600px; height: 188px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Step 2: Create a job run step to be executed in each of the iterations&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/14601/39723/ExecuteJob.png" style="width: 600px; height: 295px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	Step 3: Drag the "sleep" step and assign values.&lt;/p&gt;
&lt;p&gt;
	I was done start to finish in about 20 minutes and the code generated in Java was pretty easy to read and understand. Very cool!&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Mangesh Mharolkar</dc:creator>
    <dc:date>2013-03-01T19:05:45Z</dc:date>
  </entry>
  <entry>
    <title>The Importance of a Security Audit</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/the-importance-of-a-security-audit" />
    <author>
      <name>Chris Shaw</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/the-importance-of-a-security-audit</id>
    <updated>2013-02-27T14:01:54Z</updated>
    <published>2013-02-27T00:20:59Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Often I am asked about the importance of a security audit, with the majority of these questions being asked by representatives of smaller organizations. The questions are centered around if there is a need to perform a security audit when the organization has taken some measures to protect themselves on the network in one fashion or another.&amp;nbsp; For example I was recently asked why a company should perform a security audit when the SQL Server they have is behind a firewall and the company is small enough that everyone knows all the staff.&lt;/p&gt;
&lt;p&gt;
	I recommend security audits for all SQL Servers in my care.&amp;nbsp; Let me explain why…&lt;/p&gt;
&lt;p&gt;
	Security can be very complex with multiple layers, yet even the most complex systems can be as risk and sometimes even from their own complexity.&amp;nbsp; If the data in the database is important enough to keep around it is important enough to secure. The responsibility is multiplied when the data contains sensitive information or Personally Identifiable Information (PII). As a database professional, I want to know that even if a layer of security is breached at points where security is intended to protect the database server that I still have a layer of protection.&amp;nbsp; In other words, if for some reason the firewall were to be circumvented or compromised the database still has its own layer of protection.&amp;nbsp; According to statistics from datalossdb.org (&lt;a href="http://datalossdb.org/statistics" target="_blank"&gt;http://datalossdb.org/statistics&lt;/a&gt;) almost 40% of data breach incidents come from lost, stolen or fraud to obtain access to physical media such as a lost or stolen laptop, or lost or stolen backup tape, none of these methods protected by a firewall.&amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	At one point during a Sarbanes Oxley audit I was asked why management of our company determined that the data should be easily accessible by IT and Development staff. I learned a great lesson when the auditor explained to me that security is not a matter of trust.&amp;nbsp; Security also protects from legitimate mistakes when no malicious intent is involved.&amp;nbsp; The statistics from datalossdb.org reflect that 38% of data loss incidents come from internal to the organization.&amp;nbsp; 21% of all incidents are accidents from internal sources with 10% of all incidents as being malicious in nature from internal sources.&amp;nbsp; Just over half of the incidents come from outside the organization, how does this reflect on completing a security audit? &lt;strong&gt;&lt;em&gt;By completing a security audit and making appropriate changes a company can limit its risk by nearly 50%.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;
	The scary part as a database administrator is the fact that as a whole we have only seen the decrease in the number of incidents once over the last 9 years, 2012 had the most incidents with a drastic increase over 2011.&amp;nbsp; If the trend holds true, as a database professional I urge organizations complete audits on a regular basis.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	Our &lt;a href="http://www.xtivia.com/database-management/health-checks-a-performance-tuning/microsoft-sql-server-health-check" target="_blank"&gt;Configuration and Performance Review for SQL Server&lt;/a&gt; can be focused on security. &amp;nbsp;Contact us for more information through our web site or by sending an email to &lt;a href="mailto:info@xtivia.com?subject=Contact%20Form%20//%20Xtivia.com"&gt;&lt;strong&gt;info@xtivia.com&lt;/strong&gt;&lt;/a&gt;.&amp;nbsp; Or you can reach out to me via email at &lt;a href="mailto:cshaw@xtivia.com"&gt;&lt;strong&gt;cshaw@xtivia.com&lt;/strong&gt;&lt;/a&gt;.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Chris Shaw</dc:creator>
    <dc:date>2013-02-27T00:20:59Z</dc:date>
  </entry>
  <entry>
    <title>Excel Chart Portlet</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/excel-chart-portl-1" />
    <author>
      <name>Bin Zhu</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/excel-chart-portl-1</id>
    <updated>2013-02-25T04:15:20Z</updated>
    <published>2013-02-19T15:35:00Z</published>
    <summary type="html">&lt;p&gt;
	Microsoft Excel is the de facto standard spreadsheet tool used by businesses around the world and houses some of the most critical business information. However businesses often struggle to make this information available to employees and other stakeholders that would benefit from having access to this information.&lt;/p&gt;
&lt;p&gt;
	An enterprise portal such as Liferay is a framework for integrating information, people and processes across organizational boundaries. It provides a secure unified access point in the form of a web-based user interface, and is designed to aggregate and personalize information through application-specific portlets. If we can take some of the business information housed in Excel documents, and surface that information graphically via portlets on the enterprise portal, then enterprises would be able to derive much greater value.&lt;/p&gt;
&lt;p&gt;
	Many years back, Plumtree Portal was a leading portal product in the early 2000s until its acquisition by BEA Systems in 2005, and Oracle subsequently acquired BEA. Plumtree's former portal product became part of BEA AquaLogic Use Interaction Portal suite which has now been replaced by another Oracle product. One of Plumtree's innovations was providing the Plumtree Gadget Framework for Microsoft Excel, which empowered portal users to embed Microsoft Excel tables and charts in a personalized or community portal page. The Excel Gadget Framework helped reduce development costs by allowing customers to publish a vast range of new resources in the portal from every business unit and workgroup in the organization without any coding, including the data imported from applications such as Oracle, SAP and Siebel, as well as the objectives and performance metrics stored in spreadsheets on manager's computers.&lt;/p&gt;
&lt;p&gt;
	In conversations with customers looking to migrate from Plumtree to Liferay, we found that many of these customers found the Plumtree Excel portlets a killer feature. So, we at Xtivia, decided to build the Xtivia Excel Chart Viewer portlet to address this need - you can upload relevant Excel documents to the Liferay document library using Liferay out-of-the-box functionality, and then use the Xtivia portlet to point to the Excel document in the Liferay document library, and configure the portlet to display a chart using the data in the specified Excel worksheet cell range. You can add multiple instances of this portlet to the Portal with each instance configured to point to different Excel files, different worksheets, and different cell ranges.&lt;/p&gt;
&lt;p&gt;
	In this blog, I’m going to provide some usage information about the Xtivia Excel Chart Viewer portlet that was developed using Apache POI and some charting APIs. In the portlet, users can easily configure the data source using excel files uploaded in the Liferay document library, the data range inside the excel file and the chart type to be rendered.&lt;/p&gt;
&lt;p&gt;
	The following steps describe how to add an Excel Chart Viewer portlet on a page and configure it:&lt;/p&gt;
&lt;p&gt;
	1. Upload the Excel file that you want to generate charts from to the Liferay document library.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic2.png" style="width: 600px; height: 482px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	2. Add “Excel Chart” portlet on a page.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic3.png" style="width: 600px; height: 540px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	3. Choose to configure the portlet.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic4.png" style="width: 700px; height: 549px;" /&gt;&lt;/p&gt;
&lt;ol style="list-style-type:lower-alpha;"&gt;
	&lt;li&gt;
		&lt;strong&gt;Charting API&lt;/strong&gt;: Currently we have two chart libraries available which are Fusion Chart and Any Chart&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;Chart Type&lt;/strong&gt;: For each chart library, we have 4 different chart types available which are Column 2D, Column 3D, Pie 2D and Pie 3D.&lt;/li&gt;
	&lt;li&gt;
		&lt;strong&gt;Worksheet Name, From Cell, To Cell&lt;/strong&gt;: To specify the cell range of the data in the excel file. The available values of “From Cell” and “To Cell” are the cell id in the spreadsheet. For example, we can specify “$A$1” as the “From Cell” and “$D$8” as the “To Cell”.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic5.png" style="width: 400px; height: 348px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	4. Select the Excel file from the document library.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic6.png" style="width: 600px; height: 430px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	5. Save the settings and close the dialog box. The chart shows in the portlet.&lt;/p&gt;
&lt;p&gt;
	&lt;img alt="" src="http://blogs.xtivia.com/documents/12933/38417/pic7.png" style="width: 600px; height: 467px;" /&gt;&lt;/p&gt;
&lt;p&gt;
	Please note that this portlet will soon be available for download from the Liferay Marketplace free of charge.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	We plan to offer other innovations in terms of surfacing Excel data via portlets including more charting options, more charting libraries, data grids, and more. Please do comment on this blog post with features that you would like to see added.&lt;/p&gt;
&lt;p&gt;
	For more information about expert help with your Liferay implementation, check out &lt;a href="http://www.xtivia.com/portal/liferay-portal"&gt;http://www.xtivia.com/portal/liferay-portal&lt;/a&gt;, or contact&amp;nbsp;us at &lt;a href="mailto:info@xtivia.com"&gt;info@xtivia.com&lt;/a&gt;.&lt;/p&gt;</summary>
    <dc:creator>Bin Zhu</dc:creator>
    <dc:date>2013-02-19T15:35:00Z</dc:date>
  </entry>
  <entry>
    <title>SQL Server Key Performance Metrics – Page Life Expectancy</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/sql-server-key-performance-metrics-–-page-life-expectancy" />
    <author>
      <name>Mark Halstead</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/sql-server-key-performance-metrics-–-page-life-expectancy</id>
    <updated>2013-02-23T13:54:47Z</updated>
    <published>2013-02-23T01:36:06Z</published>
    <summary type="html">&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;
	&lt;span style="font-size: 13px; font-weight: normal; line-height: 1.4;"&gt;One of the important performance metrics we monitor for our &lt;a href="http://www.xtivia.com/database-management/virtual-dba"&gt;Virtual-DBA&lt;/a&gt; and &lt;a href="http://www.xtivia.com/database-management/database-platforms/microsoft"&gt;consulting&lt;/a&gt; customers is Page Life Expectancy (PLE). We look for low values as well as values that are trending lower over time. A drop in PLE is a prime indicator of memory pressure.&lt;/span&gt;&lt;/h1&gt;
&lt;p&gt;
	PLE is how many seconds a page can be expected to reside in memory before being flushed to disk. Microsoft recommends that SQL PLE not fall below 300. In real life we often see PLE in the 2000+ range in healthy systems.&lt;/p&gt;
&lt;p&gt;
	Maintenance activities can drop PLE substantially. Rebuilding indexes or doing backups can drop PLE.&amp;nbsp; When a drop in PLE occurs often determines its importance. For instance a drop in PLE overnight may not be as important as a drop during business hours.&lt;/p&gt;
&lt;h2&gt;
	Fixing Page Life Expectancy&lt;/h2&gt;
&lt;p&gt;
	In order to fix PLE problems we need to examine the entire Server. We need to look at Available Mbytes of Memory as well as what functions the server performs. We don’t want to create a situation where SQL Server has to give back memory to the operating system since this can result in clearing the SQL Server cache with an associated temporary performance drop. For this, and other reasons we prefer to set Max Server Memory to a specific value rather than leave it unlimited.&lt;/p&gt;
&lt;p&gt;
	I like to look at a long term perfmon trace that includes Memory:Available Mbytes as well as some other counters like Total and Target server memory and Memory Grants Pending from SQL Server Memory Manager. If you consistently have a large number of available Mbytes of memory available consider increasing SQL Server Max server memory.&lt;/p&gt;
&lt;p&gt;
	It’s important to note that the Max Server Memory setting has changed in SQL 2012. Before it measured the amount of memory allocated to the buffer pool. Starting in SQL 2012 the Max server memory includes many more important memory consuming areas of SQL Server. In SQL 2008 and earlier we needed to estimate the memory needs of non-buffer areas of SQL Server in calculating an optimum Max Server memory.&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
	&amp;nbsp;&lt;/p&gt;</summary>
    <dc:creator>Mark Halstead</dc:creator>
    <dc:date>2013-02-23T01:36:06Z</dc:date>
  </entry>
  <entry>
    <title>Oracle Enterprise Manager Grid Control Agent Installation Linux</title>
    <link rel="alternate" href="http://blogs.xtivia.com/home/-/blogs/oracle-enterprise-manager-grid-control-agent-installation-linux" />
    <author>
      <name>Luke Smith</name>
    </author>
    <id>http://blogs.xtivia.com/home/-/blogs/oracle-enterprise-manager-grid-control-agent-installation-linux</id>
    <updated>2013-02-21T13:55:36Z</updated>
    <published>2013-02-21T01:03:25Z</published>
    <summary type="html">&lt;p&gt;
	We had a &lt;a href="http://www.xtivia.com/database-management/virtual-dba" target="_blank"&gt;Virtual-DBA&lt;/a&gt; customer request that we install and configure a new Grid Control agent on a new server with existing databases.&amp;nbsp; While there are several ways to do this, we wanted the customer to be able to perform this task by themselves in the future.&lt;/p&gt;
&lt;p&gt;
	The method&amp;nbsp;we chose to use was to deploy the agent from Enterprise Manager. The process of adding a new agent can be complex and difficult sometimes, but this procedure is fairly straight forward.&lt;/p&gt;
&lt;p&gt;
	We logged into the server hosting Grid Control and ensured that the agent we would be deploying was available for the platform we were deploying. We were deploying to Linux so we navigated to $OMS_HOME/sysman/agent_download. Here you will see versions of the agent currently available on the server and under the versions there will be the platform specific agent files. So if you wanted to install a windows agent and it wasn't available on your Grid Control server you would download it from Oracle or Oracle Support and place it in this location.&lt;/p&gt;
&lt;p&gt;
	Next we logged into both servers and made sure we were able to SSH to the target and from the target to the Grid Control server. If SSH isn't already setup between Oracle Management Server (OMS) and the target the deployment wizard will try to set it up by creating keys, but we have had issues with this in the past so we choose to test and set it up ourselves if there are any issues.&lt;/p&gt;
&lt;p&gt;
	Our host was in a different domain so we edited our host files on both the target server and Grid Control server to add both fully qualified host names and IP address as our client isn't using DNS for their Linux servers. For safe measure we also added entries to the TNSNAMES.ORA file on the Grid Control server to ensure we could tnsping the databases that were to be added to Grid Control.&lt;/p&gt;
&lt;p&gt;
	With that little bit of setup we were then ready to log into Enterprise Manager and begin the deployment by clicking on the deployment tab from the home page once logged in. We then selected 'Install Agent' on the next page. We did a fresh install so we selected 'Fresh Install'.&lt;/p&gt;
&lt;p&gt;
	On the next page we selected the default Source Shiphome Directory as we verified in the beginning that the agent we wanted to install was indeed available via Grid Control server. We selected&amp;nbsp;our agent and our platform versions from the dropdown boxes. We then provided our list of hosts that were to have the agent installed. We made sure to only put hostnames here and not IP addresses. We then entered in our host credentials and base installation directory that we wanted the agent to be installed on the target server. We left the default port as that’s what they were already using. With the information filled it we were able to then click next and let the automated process finish the agent install. After the agent install we were able to look and manage the new hosts and databases from our Enterprise Manager console.&lt;/p&gt;</summary>
    <dc:creator>Luke Smith</dc:creator>
    <dc:date>2013-02-21T01:03:25Z</dc:date>
  </entry>
</feed>

