photo by Thomas Hawk
Interested in talking face to face about Delphix in NYC? Drop me a line. I’ll be in NYC on March 12th and 13th and look forward to meeting folks who are excited to learn more about Delphix.
New York Oracle’s User Group (NYOUG) is meeting March 12 and I will be speaking in the morning about the Agile Data Revolution. The cornerstone of the Agile Data Revolution is instant database duplication but there is much much more to it.
Have you built a site on a Squarespace template such as Flatiron or Marquee supporting the concept of index pages or index collections? Do you post a page or a gallery link to Facebook only to be frustrated that Facebook ignores the metadata for the page you are posting and displays the index page's metadata instead? Keep reading! There's a perfectly logical explanation along with a dead-simple solution.
Templates like Flatiron and Marquee are built around the concept of an index collection that is a grouping together of regular pages or galleries so as to make them appear as a single page in the viewer's browser. My personal website in the Marquee template builds the welcome page by concatenating the various pages in my index collection. Figure 1 shows an example site in the Flatiron template having a home page made up of one thumbnail taken from two galleries and one regular page making up the index collection.
Figure 1. An example page built in the Flatiron template
Figure 2 shows Figure 1's implementation from Squarespace's configuration page. You see in the Main Navigation section an index collection entitled Work. Nested underneath are two galleries and a page that are named Bikes, Headshots, and Boring Blog Post respectively.
Figure 2. The index collection underlying the page in Figure 1
Each of the items in Figure 2's index collection is at the same time two different things:
When a visitor load's the home page, all the items in the index collection are served to the user's browser as a single page. It's also possible to visit each page individually. Doing that is at the heart of what this blog post is about.
The problem comes about when you view a collection item thinking that you're viewing the specific page for that item. Then you post the URL from your browser's address bar on Facebook only to see Facebook display the wrong metadata, or at least not the metadata that you desire to see. Figure 3 shows the Bikes gallery as you would see it after clicking the image of the blue bicycle shown at left in Figure 1.
Figure 3. The Bikes gallery after clicking the image of the blue bike in Figure 1
The URL in the address bar is now the following:
Pasting the URL into Facebook yields the result in Figure 4. The title and description are not from the Bikes gallery at all. They are from the site's home page, which is not the effect you're going to be after when pasting what appears to be a link to specific gallery.
Figure 4. Metadata from the Work page (the site's home page) being displayed for the Bikes gallery
The techniques I give in my article Facebook Preview and Squarespace for controlling the metadata provided to Facebook do not seem at first to work for templates like Flatiron and Marquee. The symptom will be as in Figure 4, that you post a link in Facebook only to see metadata from the index page, and not from the specific page that you're posting.
Figure 5. The bottom of the gallery showing that the page is still the very same index page as in Figure 1
You'll see the same behavior from the Marquee template. Figure 6 shows what appears to be my Database and Tech blog page in that template. What you are really seeing though, is the result of my clicking the Database and Tech menu item in the parallax menu at the right side of my home page. Clicking that menu item causes the page to scroll to the region in Figure 6, and the link in the browser address bar will change, but you can easily scroll up and down and see that you are still on my home page.
Figure 6. My home page scrolled to show the region corresponding to my Database and Tech blog page
You can see how it's easy to think you're on a separate page when you're really not. You then end up with a link giving the wrong metadata when pasted into Facebook. Or rather, it gives the technically correct metadata that is not really what you're after.
The solution is dead-simple, and it lies in the links that you copy from your browser address bar to paste into a Facebook status update. Following are the URLs corresponding to Figure 5 and Figure 6:
Figure 5: www.learncss.co/#/bikes Figure 6: gennick.com/#database-articles
Focus on the number sign (#) symbol. That's the key. You want to remove that symbol, taking care not to leave any doubled-up forward-slash (/) characters in the URL. For example:
Figure 5: www.learncss.co/bikes Figure 6: gennick.com/database-articles
The first set of URLs having the number signs will take you to locations on their respective index pages. That's not the behavior you want when pasting a link into Facebook. The second set of URLs omit the number signs and take you directly to the pages in question. For example, the URL www.learncss.co/bikes leads to the page shown in Figure 7, which you see scrolled all the way to the bottom.
Figure 7. The specific gallery page, not a portion of the index page, and suitable for posting to Facebook
Figure 7's page is scrolled all the way down. You can see that it's a distinct page all its own. Paste the page's URL into Facebook now, and you'll get the metadata specific to the Bikes gallery. You can see that in Figure 8.
Figure 8. Metadata now being displayed for the Bikes gallery
Interestingly, the issue I've just described has ramifications when writing CSS to specify text colors and size and so forth for gallery and other pages that make up an index page. It is possible to inadvertently write CSS to affect the view of a gallery as it is displayed in the index page as in Figure 5, and yet not have that CSS affect the gallery when it is viewed independently as in Figure 7. That may not normally matter, as viewers don't normally navigate to the specific pages, but it does matter if you're posting links to those pages in Facebook.
Removing the number signs from the links. That's the solution to remember when pasting links to pages that are part of an index collection. Facebook will then draw on the metadata from the Basic settings tab for each specific page that you post, and the techniques from Facebook Preview and Squarespace can also help when you need to provide metadata to Facebook that differs from that provided to Squarespace.
* Thanks to Naseem Rafiei and her website 365 Days of Makeup for posing a question on what turned out to be a really interesting issue to explore.
I literally got no sleep last night before the Hyderabad event today. My hotel room overlooked what looked like the busiest road in the world and Indian drivers have a love affair with their car horns. Every time I was about to nod off, a different tone of horn would wake me.
So this morning, with a breakfast of coffee in me, we headed off to the huge Oracle campus in Hyderabad! The event was split into a technical track and an apps track. Not surprisingly, I spent the day in the technical track.
After introducing ourselves, we started with the first session by Satyendra Kumar talking about 12c New Features, which focussed mainly on the CDB/PDB functionality. As I’ve said previously, it’s interesting to see how different people approach this topic. We all have a slightly different angle on the same subject. The next session was by Chaitanya Koratamaddi, who talked about APEX. I’m trying to get my APEX mojo back so I’m happy to listen to as much as possible about APEX.
I avoided lunch as I didn’t want to have an afternoon slump. What with missing a nights sleep, I would probably have fallen into a coma if I had eaten anything. After a coffee lunch it was my first session, which was on PL/SQL performance. That was followed up by Hans Forbrich talking about Oracle Linux, a subject dear to my heart. After that came Satyendra Kumar speaking about performance tuning in 12c, then lastly me speaking about Analytic Functions.
As usual I got chatting to people at the end and made us late. Thanks to everyone for making this run smoothly. Thank you to all the attendees, who asked lots of great questions and helped make the event a success!
So that is 5 out of 7 cities done! I’m going to go down to hit the buffet hard, then pray for sleep tonight, before tomorrow’s flight to Bangalore.
PS. I got back to my room to find my freshly washed clothes waiting for me. Happy days!
This tutorial will try and see how you could implement an automatic push of your code, to a repository whenever that code changes. This could easily be implemented in a development environment, so that the chance of loosing code, is kept to a minimum. Most sites do not do backups of dev environments in the same frequency (or ever) as they do with production environments.
I will be presenting in HOTSOS symposium 2014 discussing correct methods to diagnose RAC performance issues. Very surprisingly, even very senior performance engineers make mistakes in their analysis while reviewing RAC issues. Come to my presentation and learn the golden rules of RAC performance diagnostics.
That was a 2 second soundbite from a 10+ minute interview I filmed with Oracle a couple of years ago. I am a fan of the OCP program, but my opinions are not necessarily in line with Oracle Education’s marketing message. Even so, I am happy I was included in the video, even if it was a small soundbite.
If you want to know more about my opinion of OCP, you might want to read this article.
Here is a small example.
Download the following file: W-ASH (web enabled ASH, file is wash.tar.gz )
Source is also on github at https://github.com/khailey/wash
Go to your apache web server root, in my case on redhat Linux is
# cd /usr/local/apache2 # gzip -d wash.tar.gz # tar xvf wash.tar -rwxr-xr-x 21956 14:08:21 cash.sh -rw-r--r-- 30881 11:52:10 htdocs/ash.html drwxr-xr-x 0 15:40:52 htdocs/js/ -rwxr-xr-x 10958 14:04:42 cgi-bin/json_ash.sh
(the directory htdocs/js has a number of files put into it from Highcharts. I edited them out to make the output cleaner)
There are 3 basic files
Now you are almost ready to go. You just need to start the data collection with “cash.sh” (collect ASH)
./cash.sh Usage: usage
The script “cash.sh” requires “sqlplus” be in the path and that is all. It’s probably easiest to
nohup cash.sh system change_on_install 172.16.100.250 orcl &
The script “cash.sh” will create a directory in /tmp/MONITOR/day_of_the_week for each day of the week, clearing out any old files, so there are only maximum 7 days of data. (to stop the collection run “rm /tmp/MONITOR/clean/*end” )
To view the data go to your web server address and add “ash.html?q=machine:sid”
For example my web server is on 172.16.100.250
The database I am monitoring is on host 172.16.100.250 with Oracle SID “orcl”
See video at : http://screencast.com/t/sZrFxZkTrmn
The Pune event took place in the local Oracle office, which is a very impressive building.
I did three sessions at this event. I was in the first slot with a virtualization presentation, then spent most of the next session talking to some of the attendees. After lunch I had a session on PL/SQL performance, then watched two APEX sessions by Raj Mattamal. After that it was my final session for the day, which was on analytic functions. I spent a long time talking to some of the attendees after my last session, which made us quite late leaving.
It was a really enjoyable event, with some great interaction with the audience!
From there is was straight back to the hotel to eat far too much food. I have a feeling I will not be able to fit into the plane for the flight home at this rate. Being a vegetarian in India is brilliant!
Tomorrow we fly to Hyderabad for the next event…
The Mumbai event took place in the local Oracle office and was attended by a straight technical crowd, which is much easier to present to than a mixed audience.
In addition to my own talks, I got to see some others too.
I had a lot of interaction with the attendees and speakers outside of the sessions, which is actually my favourite bit.
Thanks to everyone at the Oracle office in Mumbai for making us welcome and thanks to all the attendees for coming to the event. It was a very vocal audience, which makes for really fun sessions.
We left the Oracle office and drove straight to Pune, ready for the next event…
Many years ago, possibly when most sites were still using Oracle 8i, a possible solution to a particular customer problem was to create a function-based index on a CLOB column using the dbms_lob.getlength() function call. I can’t find the notes explaining why this was necessary (I usually have some sort of clue – such as the client name – in the script, but in this case all I had was a comment that “the manuals say you can’t do this, but it works provided you wrap the dbms_lob call inside a deterministic function”).
I never worked out why the dbms_lob.getlength() function wasn’t declared as deterministic – especially since it came complete with a most restrictive restricts_references pragma – so I had just assumed there was probably some good reason based on strange side effects when national language charactersets came into play. But here’s a little detail I noticed recently about the dbms_lob.getlength() function: it became deterministic in 11g, so if the client decided to implement my suggestion (which included the usual sorts of warnings) it’s now legal !
Footnote – the length() function has been deterministic and usable with LOBs for a long time, certainly since late 9i, but in 8i length(lob_col) will produce Oracle error “ORA-00932: inconsistent datatypes”