Feed aggregator
PyCon pre-favorites
- Extending Java Applications with Jython
- I'm hopeful that this can really move Jython from my "stuff I think is cool" box to my "stuff I use every day" box.
- IronPython Tooling
- This is going to cover development environments and tools for debugging and profiling... pretty much a necessity in the .NET world. I also hope to use the video of this talk in the future in talking to the hordes of programmers around here who live and breathe Visual Studio.
- Python in the Browser
- Silverlight is way too cool to leave to the C# kids.
- Think Globally, Hack Locally - Teaching Python in Your Community
- As a local group-leader type geek, I'd love to start some of these Hack Nights.
- Dude, Where's My Database?
- There were so many proposals for descriptions of non-relational databases - but this one really stands out because it looks at the huge picture, classifying databases by their broad category and highlighting what makes each category beneficial for particular purposes.
- Sprox: data driven web development
- I confess - I've fallen behind the TurboGears world lately. Nobody's demanded a dynamic web app of me for a while, and TG has moved too fast for me to keep track of it. When last I was involved, Sprox was just emerging. I hope this talk will help me catch up.
- Revisioned Databases for MultiUser Editing
- Revisioned databases are an interesting concept, and seeing how one was actually developed should warm my datageek heart.
- Easy command-line applications with cmd and cmd2
- Interactive command-line interfaces were good enough for ZORK, and they're good enough for you! cmd and cmd2 make them crazy-easy. (I'll get in trouble if I don't go to this one, since I'm the speaker.)
- Dealing with unsightly data in the real world
- Gathering data from disparate, chaotic sources is a big part of pretty much everybody's life. I'm eager for any new insights.
- An Underwater Python: Tortuga the Python Powered Robot
- because, deep down inside, people everywhere are the same; we all want to be loved, and Python-powered robot submarines.
Oracle Fusion Developer Guide by OraclePress at McGraw Hill 2010 sent to the printer
Today I received a mail from Rachel, the copy editing coordinator at McGraw Hill, that Lynn Munsinger and my book “Oracle Fusion Developer Guide, Building Rich Internet Applications with Oracle ADF Business Components and Oracle ADF Faces” has been sent to the printer. This is good news because Lynn and I worked hard on keeping up with the tight release schedule.
Frank
RMAN backup-based duplicate database without connection to the source in 11GR2
11g release 1 introduced the RMAN active database duplication feature, where you can duplicate a database without having to take a backup of the source database.
A new feature in 11g release 2 is the ability to use RMAN to duplicate a database without having to connect to the source database. At the time of writing, most of the RMAN documentation tends to refer you back to 10gR2 documents for backup-based restores, whilst 11gR2 documents tend to focus on active database duplication, so I thought that a blog on this topic could be of use.
This functionality would be useful if you have thought about using the 11g active database duplication feature, but are concerned about possible network performance issues during the process.
Another situation where this procedure could be used, is where you have been asked to create a copy of a database on an isolated test server, where connection to the source database is not possible.
As in previous Oracle versions, it is still possible to create a clone of the source database by just extracting the database files from the RMAN backuppieces using DBMS_BACKUP_RESTORE. (See my previous blog “Extracting database files from RMAN backuppieces using DBMS_BACKUP_RESTORE” for an example of this). 11gR2 introduces a much more straightforward method of cloning the database without a connection to the source database.
An example of this process is shown below. In this scenario we’ll assume that the server that you’re duplicating the database to, has the same directory structure as the source server and that you want the cloned database to have the same name as the original source database. The source database is using an SPFILE. We’ll also assume that you’re not using a recovery catalog on the source or target servers, as this would probably be the situation if restoring to a remote test server. The SID of the database is ORCL, so replace with your own SID where appropriate.
The cloned database needs to be on the same platform as the source database and also have 11gR2 installed.
WARNING/DISCLAIMER: Before running any of these commands, you should ensure that you have current backups of any databases on the server. Refer to the more comprehensive Oracle support site notes and Oracle documentation before carrying out any work in a formal environment. The author accepts no responsibility for any damage to your data, server or database, by carrying out the commands below.
1) Take a full backup of the source database.
——————————————-
Our example database is running in archivelog mode, so we can take a hot backup.
a) create a directory to store the output from the backup. (For this example, I created the directory /u02/oradata/backup_orcl ).
b) Set your environment to the required database. (e.g. by running . oraenv)
c) Run RMAN commands to take the backup. We’ll specify an alternate location for the backups, otherwise they’ll just default to the flash recovery area (FRA). Whilst you could use the contents of the FRA for the clone, there may be files from other database in the same shared area and there could also be files here from previous backups, which you don’t need for this clone. Sending the backup to a separate location makes it easier to identify the files that you need.
rman
connect target
spool log to ‘/u02/oradata/backup_orcl/full_database_orcl.log’;
configure channel device type disk format ‘/u02/oradata/backup_orcl/orcl_%U’;
backup database plus archivelog;
exit
(You can run tail -f /u02/oradata/backup_orcl/full_database_orcl.log as the backup runs, if you wish to monitor progress).
2) Configure the environment on the destination server
—————————————————
a) Create a password file in $ORACLE_HOME/dbs using the orapwd utility.
b) Configure the $ORACLE_HOME/network/admin/listener.ora file. The only entries used for this work were:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/opt/oracle/product/11gR2/db_1)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
c) Configure the $ORACLE_HOME/network/admin/tnsnames.ora file. The only entry added for this work was:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
d) Create directories on the target server that are present on the source server. (e.g. archive destination, scripts, application directories, utl_file/dba_directories, flash recovery area, external table locations, database/redo log/controlfile/admin/diag directories, backup locations etc.)
e) Create the $ORACLE_HOME/dbs/initSID.ora file for the duplicate database. The only entry needed is:
db_name=’orcl’
No other information is required, as we’ll extract the source database SPFILE from the backup.
f) Add an entry to /etc/oratab for the database.
g) Set your environment to the new database and then startup the clone instance.
sqlplus / as sysdba
startup nomount
exit
h) Run RMAN command to clone the database. (We don’t need to specify the database name or DBID, as these are obtained from the backups).
rman auxiliary /
DUPLICATE DATABASE TO orcl
SPFILE
BACKUP LOCATION ‘/u02/oradata/backup_orcl’
NOFILENAMECHECK;
exit
Note: Be careful when running any duplicates on the same host as the source database when specifying the NOFILENAMECHECK option. This option could mean that you over-write your source database files.
i) Finally, you will need to re-create a tempfile for your temporary tablespace. From 10gR2, this would normally be created for you in a standard RMAN clone, but it is not re-created at present when using this method.
A tempfile is created, but it is not recognised as being part of the database - i.e. select file_name from dba_temp_files; returns the errors: “ORA-01157: cannot identify/lock data file X“ From the trace files it looks like there are some issues with the tempfile creation process. Sample errors are “Cannot re-create tempfile dbf, the same name file exists“ and “ORA-03214: File Size specified is smaller than minimum required“. It seems that the file creation works, but the file created is too small to be usable at 8MB - the original tempfile was 29MB in this test database.
This may be due to a bug, or due to the current design of this feature, or it could be due to the configuration of the test database used for this scenario. Fixing the issue is pretty straightforward - just drop and re-create the tempfile:
alter database tempfile ‘/u01/opt/oracle/oradata/orcl/temp01.dbf’ drop;
alter tablespace temp add tempfile ‘/u01/opt/oracle/oradata/orcl/temp01.dbf’ size 100M reuse autoextend on maxsize 5120M;
Other useful features of the duplicate process are that you can choose to exclude selected tablespaces and you can also choose to carry out a point-in-time duplicate of the source database.
References used: Oracle Support notes 228257.1, 259694.1, 452868.1, 452868.1, 568034.1, 374934.1,
Oracle Database Backup and Recovery User’s Guide 11g Release 2 (11.2) - ch 23: Duplicating a Database
Analysis of Oracle password expiry
SQL> connect a/a
Connected.
SQL> select username, account_status, expiry_date from dba_users where username = 'A';
USERNAME ACCOUNT_STATUS EXPIRY_DATE
------------------------------ -------------------------------- --------------------
A OPEN 08 MAY 2010 10:22:52
SQL> select name, astatus, ptime, exptime from sys.user$ where name = 'A';
NAME ASTATUS PTIME EXPTIME
------------------------------ ---------- -------------------- --------------------
A 0 09 NOV 2009 10:22:52
# So ASTATUS = O and EXPTIME are not set
SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_LIFE_TIME 1;
Profile altered.
SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_GRACE_TIME 7;
Profile altered.
SQL> connect a/a
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
SQL> select username, account_status, expiry_date from dba_users where username = 'A';
USERNAME ACCOUNT_STATUS EXPIRY_DATE
------------------------------ -------------------------------- --------------------
A EXPIRED(GRACE) 27 NOV 2009 09:17:11
SQL> select name, astatus, ptime, exptime from sys.user$ where name = 'A';
NAME ASTATUS PTIME EXPTIME
------------------------------ ---------- -------------------- --------------------
A 2 09 NOV 2009 10:22:52 27 NOV 2009 09:17:11
# So after we login we find the ASTATUS=2 and EXPTIME is set
SQL> ALTER PROFILE "DEFAULT" LIMIT PASSWORD_LIFE_TIME UNLIMITED;
Profile altered.
SQL> connect a/a
ERROR:
ORA-28002: the password will expire within 7 days
Connected.
# But we see that after we remove the password lifetime, the account is still expired
SQL> select username, account_status, expiry_date from dba_users where username = 'A';
USERNAME ACCOUNT_STATUS EXPIRY_DATE
------------------------------ -------------------------------- --------------------
A EXPIRED(GRACE) 27 NOV 2009 09:17:11
SQL> select name, astatus, ptime, exptime from sys.user$ where name = 'A';
NAME ASTATUS PTIME EXPTIME
------------------------------ ---------- -------------------- --------------------
A 2 09 NOV 2009 10:22:52 27 NOV 2009 09:17:11
# and ASTATUS is still "2" and exptime is still set. So once expiry is set, changing the profile won't remove expiry.
SQL> alter user a identified by a;
User altered.
SQL> select username, account_status, expiry_date from dba_users where username = 'A';
USERNAME ACCOUNT_STATUS EXPIRY_DATE
------------------------------ -------------------------------- --------------------
A OPEN
SQL> select name, astatus, ptime, exptime from sys.user$ where name = 'A';
NAME ASTATUS PTIME EXPTIME
------------------------------ ---------- -------------------- --------------------
A 0 20 NOV 2009 09:19:11 27 NOV 2009 09:17:11
# When we change the password the PTIME is updated, and the ASTATUS is reset to O, but EXPTIME is not changed.
# Conclusion - password expiry is controlled by the PASSWORD_LIFE_TIME profile limit, is activated at login, depends on a combination of ASTATUS and EXPTIME, and is reset by a password change. Changing the profile will not change ASTATUS. Changing the password resets ASTATUS, PTIME, but not EXPTIME.
ODTUG Board - Elections
- Jeff Jacobs
- John King
- Monty Latiolais
- Bambi Price
- Mark Rittman
- John Jeunette
- Barbara Morris
- Marc de Oliveira
- Mike Riley
Tim Tow will serve out the rest of his term through December of this year. I know I speak for not only myself but the entire Hyperion community when I say, thank you, Tim, for all the hard work you've put into ODTUG. Hyperion developers, administrators, and users finally have a place to call home again, and it was your tireless service that helped get us there. Sincerely, we appreciate it.
If you want to say thank you to Tim as well, nothing says you appreciate his service like buying a copy of Dodeca from AppliedOLAP.
Deploying OBIEE on Sun
Words About Oracle Direct NFS On Sun Storage 7410 And Chip Multithreading Technology (CMT) For Oracle Database 11g Release 2.
Enterprise Deployment of Oracle BI EE on OC4J and App Servers
On Dragons


Photo by davidseth on Flickr used under Creative Commons
Since last week’s post on the interwebs and fear, a couple other un-related posts have come across my reader that have me pondering the future of our beloved intertubes.
First was Chris (#mrhashtag) Messina on “The death of the URL“, followed by Tim “What is Web 2.0″ O’Reilly on “The War For the Web“.
Both are well worth the read and both have a very clear takeaway in common, i.e. keep the Web open and independent. They also have Facebook and the App Store in common as examples of how freedom has been eroded in favor of a sanitized and monitored experience.
The App Store is a pretty common target for this argument, since Apple decides which apps make it (and more famously, which do not). Facebook isn’t as common, but last week, they were in the news because links were removed from the News Feed for a time.
This was reported as a bug and fixed, but the new part, at least for me, was the injection of a happy little Facebook warning about clicking short links. As Messina puts it “on the internet, thar be dragons”.
I rarely use Facebook at all and definitely not for finding links, so this may or may not be a new thing.
Anyway, the point is increasingly valid. As more companies produce sanitized and dumbed-down interfaces, the power of the Web diminishes because these interfaces could be used to censor the Web at large, and as people use these interfaces, they may not even know (or care) that they’re getting a censored experience.
Case in point, what if the war of ads between Verizon and AT&T leads to filtering out of each other’s sites, i.e. if you’re on AT&T’s network, you can’t view the YouTube video of Verizon’s ads or visit their web site.
The one thing that has been protecting the independence of the Web is the browser, but as interfaces take away the ability to view the URL of a given web page or app, that power is lost.
Looking back, the URL itself has always been under fire. From the beginning of the WWW, mainstream sites have tried to collect links and index pages to make finding information easier because those pesky URLs were too hard to remember.
Anyway, in my post last week, I advocated training for n00bs to protect them from the dragons, but even if this were the right answer (and I’m not convinced it is), it would fail because sanitized interfaces do this for you. Most people will gladly accept a smaller amount of freedom for an easier interface because it’s, well, easier.
But is there anything wrong with that?
I don’t think so, as long as people know what they’re getting and why. More importantly, the Web needs to stay accessible to those of us who are fine with the existence of dragons.
What do you think? Find the comments.Possibly Related Posts:
- Now We’re a Social Network
- Google Friend Connect Adds Twitter
- How Do You Get News Online?
- What’s Your GPS Do?
- Why Social Networks Don’t Work for Business
New TaskFlow Tutorial on OTN
Want to Test Drive WebCenter 11g?

Here’s another installment in the “we’re-a-for-reals-product-team” series.
If you’re interested in WebCenter, but don’t have the time or resources to download, install and configure it on your own to kick the tires, you should sign up for a WebCenter Test Drive.
Basically, the test drive will give you a hosted sandbox environment where you’ll have your own group space with full functionality. In your group space, you can do whatever you like, invite whomever you like and go nuts with WebCenter.
No fuss, no mess.
Right now, they’re collecting email addresses in anticipation of the private beta release. So, sign up and wait with baited breath for your invitation.
Here’s Tom Quigley with more details.
Check it out if you’re interested and feel free to share your thoughts and experiences here.Possibly Related Posts:
- Random Twitter Effects
- AWS Virtual Private Clouds
- WebCenter 11g Patch Set 1 Released
- We’re Joining WebCenter
- Fun with Numbers, Mix Edition
Upgrading to Fedora 12? You might need more /boot space!
Today, I had a spare Fedora 11 machine sitting next to me, so I thought I’d try the upgrade to the newly-released Fedora 12, aka “Constantine.” Fedora support cycles are rather short compared to Ubuntu, so Fedora 11 will likely be de-supported in 6 to 7 months. Normally I’d wait a little longer into the Fedora 12 cycle for others to find the fun upgrade bugs and have them fixed for me, but I didn’t mind having to re-install from scratch on this machine if I needed to.
Following the Fedora documentation, I decided to use the “preupgrade” tool. Everything was going smoothly until the machine restarted to begin installation of the new packages. I got a message that there wasn’t enough space in my /boot partition. Specifically, the message claimed that there was insufficient disk space in /mnt/sysimage/boot. I found this rather odd and troubling, since I had let the Fedora installer determine the /boot partition size when I originally installed Fedora 11.
Turns out that this is a known problem with the preupgrade tool. A kind soul in #fedora on IRC directed me to the list of common Fedora 12 bugs, in particular the preupgrade free space check. I installed the updated preupgrade package as directed, but again got the error. That’s when I followed the next link for additional tips to free up space in /boot. The first was to remove obsolete kernels, which I had already done. The next was to run tune2fs on /boot filesystem to free up reserved blocks, which aren’t needed for /boot. I strongly suggest you visit the links provided for helpful screenshots and commands to follow.
After making these changes, the upgrade worked and am I’m the proud owner of a Fedora 12 Constantine laptop, with a slightly brighter shade of blue desktop than that crusty old Fedora 11. ;)
11g Fusion Middleware Install Walkthrough – Part 3 Single Sign On
11g Fusion Middleware Install Walkthrough – Part 1 Before you Install.
11G Fusion Middleware Install Walkthrough – Part 2 Database + Oracle Identity Management
MOS, Linux, EBS, Analytic Features, Optimizer, OTN, Indexing
MOS
My Oracle Support has been a hot topic out in the blogosphere. For instance Chris Warticki's blog, which has a pointer to the FAQ.
Linux
Kevin Closson has some words of technical wisdom on Linux memory, free vs. reclaimable.
EBS
New from the Oracle E-Business Suite Technology blog this week:
E-Business Suite Technology Essentials (OpenWorld 2009 Recap)
Application Change Management Pack for EBS (OpenWorld 2009 Recap)
Critical Data Protection + Security in EBS (OpenWorld 2009 Recap)
Analytic Features
Tom Kyte is looking for feedback and ideas from users on Comparative Window Functions... in the analytics featureset of the RDBMS.
Optimizer
The Optimizer team over at the Inside the Oracle Optimizer blog remind us that old hints can go 'stale', how that happens and what to do about it.
OTN Best Articles for the Year
As we start the holiday season and the long slow slide out of 2009, OTN has a blog entry on the most popular articles of the year here.
Indexes: To Rebuild or Not to Rebuild
Yes, that ever-controversial topic is covered by Richard Foote, veritable doctor of indexology, at his blog, along with a very engaging comment thread beneath it.
Find and Expand all nodes of an ADF Tree
First some usefull methods.
private void expandTreeChildrenNode( RichTree rt
, FacesCtrlHierNodeBinding node
, List<Key> parentRowKey) {
ArrayList children = node.getChildren();
List<Key> rowKey;
if ( children != null ) {
for (int i = 0; i < children.size(); i++) {
rowKey = new ArrayList<Key>();
rowKey.addAll(parentRowKey);
rowKey.add(((FacesCtrlHierNodeBinding)children.get(i)).getRowKey());
rt.getDisclosedRowKeys().add(rowKey);
if (((FacesCtrlHierNodeBinding)(children.get(i))).getChildren() == null)
continue;
expandTreeChildrenNode(rt
,(FacesCtrlHierNodeBinding)(node.getChildren().get(i))
, rowKey);
}
}
}
// find a jsf component
private UIComponent getUIComponent(String name) {
FacesContext facesCtx = FacesContext.getCurrentInstance();
return facesCtx.getViewRoot().findComponent(name) ;
}
private UIComponent getUIComponent(UIComponent component,String name ){
List<UIComponent> items = component.getChildren();
for ( UIComponent item : items ) {
UIComponent found = getUIComponent(item,name);
if ( found != null ) {
return found;
}
if ( item.getId().equalsIgnoreCase(name) ) {
return item;
};
}
return null;
}
Now find the ADF tree in a region and expand the main and child nodes of this tree
// get the dymamic region of the main page
RichRegion region = (RichRegion)getUIComponent("dynam1");
if ( region != null) {
// find tree 2 and expand this tree
RichTree rt = (RichTree)getUIComponent(region,"t2");
if ( rt != null ) {
int rowCount = rt.getRowCount();
List<Key> rowKey;
for (int j = 0; j < rowCount; j++) {
// expand the main nodes
FacesCtrlHierNodeBinding node = (FacesCtrlHierNodeBinding)rt.getRowData(j);
rowKey = new ArrayList<Key>();
rowKey.add(node.getRowKey());
rt.getDisclosedRowKeys().add(rowKey);
rt.setRowKey(rowKey);
// expand the child nodes of the main nodes
expandTreeChildrenNode(rt , node, rowKey);
}
}
}
Find an UIComponent in an ADF Task Flow Region
First I need to have some common methods.
// find a jsf component inside the JSF page
private UIComponent getUIComponent(String name) {
FacesContext facesCtx = FacesContext.getCurrentInstance();
return facesCtx.getViewRoot().findComponent(name) ;
}
// find a UIComponent inside a UIComponent
private UIComponent getUIComponent(UIComponent component,String name ){
List items = component.getChildren();
for ( UIComponent item : items ) {
UIComponent found = getUIComponent(item,name);
if ( found != null ) {
return found;
}
if ( item.getId().equalsIgnoreCase(name) ) {
return item;
}
}
return null;
}
Now we can find the right Region and then search inside the Region for the ADF Tree
// get the dymamic region of the main page
RichRegion region = (RichRegion)getUIComponent("dynam1");
if ( region != null) {
// find tree 2
RichTree rt = (RichTree)getUIComponent(region,"t2");
if ( rt != null ) {
// do your thing
}
}


