Feed aggregator

Free Free Free

Scott Schwab - Tue, 2006-02-28 19:08
As reported everywhere, Oracle XE is now out and available. Add this to SQLDeveloper, Qute and you can do some rock solid PL/SQL programming for free.Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

SQLDeveloper Export package file parsing

Scott Schwab - Sun, 2006-02-26 21:22
In my last post, I talked about the latest SQLDeveloper from Oracle, including a way to export all my packages in a single step, with their Tools->Export option. I had a Python script that did part of the job of breaking the outputted file into seperate files for package body and spec. Tonight, I reworked part of Python script, and then though I share it. Be warned, very little testing hasScott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com3

SQLDeveloper EA 5

Scott Schwab - Sun, 2006-02-26 11:04
On OTN, Oracle has just released the fifth early adaptor version of SQL Developer ( Going by the release notes, it fixed some bugs in the SQL Worksheet, UNICODE, and startup time.So far my favorite new feature, is the Tools->Export tool, which allows you to create a file of DDL and PL/SQL packages. This is great, as I end up writing lots of PL/SQL and leaving it in the databaseScott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Potential pitfall with Oracle Sequence

Wijaya Kusumo - Fri, 2006-02-24 00:44
Robert Vollman talks about Oracle sequences in his blog. Basically there are 3 potential issues with Oracle sequences that we need to consider when doing db design: 1. The squence number may "jump", that is 1,2,3,5,6,8,... with number 4 and 7 missing. One reason is if you do a transaction with NEXTVAL and then rollback, the sequence doesn't roll back to where you started. 2. By default,

A Simple Dual

Scott Schwab - Thu, 2006-02-23 20:14
What happens when this sql is called, but the tag you are looking for, is not in the XMLTYPE? SELECT extractvalue(my_xmltype, my_xpath_to, my_namespace) FROM dual; (1) Raise no data found exception (2) Returns null Answer: (2) returns null, so if you want to check to see if the text node exist for a x_path, don't expect a EXCEPTION clause to check it.Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Usability problems in JSF

Adam Winer - Tue, 2006-02-21 14:10
JSF is not perfect, nor the greatest thing since sliced bread. There, I said it!

What bugs me most (and remember, I'm still a big fan) is that JSF was supposed to be really easy-to-use. In many ways, it is very easy. But the reality isn't always quite so sweet. There's shortfalls that make the learning curve longer than it should be, and they are fixable.

The most annoying problem is that errors simply result in big stack traces. There's nothing wrong with stack traces per se, but by themselves they're totally insufficient for error diagnosis. Real diagnosis requires at a minimum:

  • Line and column numbers, as well as file name. And even better, the snippet of content from that document that matches up.

  • If an EL expression fails, information on what part of the EL expression failed. (When a complicated expression like #{foo.bar.baz == my.other.expression} fails, it's very hard to figure out what went wrong.)

In general, all exceptions thrown anywhere in JSF or JSPs should be vetted to ensure that they:
  • Contain a meaningful, useful error message
  • Contain enough context to point out what bit of user content failed
  • Never, ever drop the base error, if one is being wrapped
A second category of annoyances in JSF consist of "nothing happened" problems. For example, if a validation error stops you from going on to Invoke Application, but you've forgotten to add an tag or something similar to your page, all that you see is - nothing.

Finally, when you do figure out what you've done wrong, quite often you need to bounce the server to pick up the changes. Any changes to WEB-INF/faces-config.xml require this. That's a huge productivity hit.

So, that's my hit list for JSF usability problems. What are your biggest JSF usability concerns?

[PS: Yes, I edited the wording a bit. It was coming across as an angry rant that JSF isn't useable, which isn't where I'm coming from.]

first post

Scott Schwab - Mon, 2006-02-20 21:06
Hello worldScott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

What is SASH anyway?

Omar Tazi - Thu, 2006-02-09 19:03
One of the challenges most people I talk to have in dealing with OSS is integrating projects that were designed to work together. Many people are trying to use Struts with Hibernate and/or Spring with Hibernate and end up having integration problems…The reality is that enterprises run open source and commercial software side-by-side and will continue to do so. That’s why Oracle partnered with SourceLabs to solve this issue for Oracle AS 10g customers. SASH simply means (Struts, Apache Axis, Hibernate and Spring). SourceLabs provides services around their tested SASH stack. Oracle customers using server-side Java are now able to improve productivity, reduce operational risk, and adopt open platforms with confidence.

I find this exciting and it’s inline with Fusion Middleware’s Hot-Pluggable message (believe me it’s not just a marketing buzzword) which essentially means that we are willing to compete on industry standards and if you find a module that works better than one of the components in the Oracle stack, you can seamlessly swap it out with the equivalent module of your choice. Oracle’s middleware is engineered to work well with third-party products, including open source and IBM's WebSphere line.

To get more information and even download SASH for Oracle AS 10g, go to the SASH section on OTN.

What is SASH anyway?

Omar Tazi - Thu, 2006-02-09 19:03
One of the challenges most people I talk to have in dealing with OSS is integrating projects that were designed to work together. Many people are trying to use Struts with Hibernate and/or Spring with Hibernate and end up having integration problems…The reality is that enterprises run open source and commercial software side-by-side and will continue to do so. That’s why Oracle partnered with SourceLabs to solve this issue for Oracle AS 10g customers. SASH simply means (Struts, Apache Axis, Hibernate and Spring). SourceLabs provides services around their tested SASH stack. Oracle customers using server-side Java are now able to improve productivity, reduce operational risk, and adopt open platforms with confidence.

I find this exciting and it’s inline with Fusion Middleware’s Hot-Pluggable message (believe me it’s not just a marketing buzzword) which essentially means that we are willing to compete on industry standards and if you find a module that works better than one of the components in the Oracle stack, you can seamlessly swap it out with the equivalent module of your choice. Oracle’s middleware is engineered to work well with third-party products, including open source and IBM's WebSphere line.

To get more information and even download SASH for Oracle AS 10g, go to the SASH section on OTN.

Is this where OSS is going?

Omar Tazi - Wed, 2006-02-08 20:48
When I saw this deal today I thought it summarized pretty well where open source seems to be going. The news in itself is not very exciting but it’s yet another open source startup raising a pretty good round from top tier VCs. In a nutshell, Alfresco which offers a document management platform raised an $8M series B investment round from Mayfield and Accel (which had already led round A). This confirms that:

- Open source is more professional. Open source developers are not what they used to be (midnight hackers working from their garage). More often than not, open source developers today are professional developers employed by large vendors (like Oracle or IBM) or well-funded startups like Alfresco or Spikesource (backed by Kleiner Perkins). Additionally large vendors offer professional support for open source projects (for example Oracle, IBM, Novell and HP support Linux).

- Open source is (slowly but surely) moving up the stack. First, the debate is not limited to Linux vs. Windows anymore. Also, the target open source end user profile is changing as open source moves up the stack. With Linux and Eclipse, typical users are system administrators and developers. Open source is moving beyond infrastructure software and tools into different areas with various degrees of success. Alfresco seems to be doing a good job in document management and Asterisk seems to offer a very popular PBX/VoIP telephony system (I am a happy Asterisk user without knowing much about PBX systems).

Is open source ready for ERP or CRM? Those of us who have been around a while in this industry know full well that VCs are not always right but in the last 18 months they have been very active investors in open source based startups with services-based business models. Time will tell if they were on the money! Let's not get too excited for now I don’t see traditional commercial software going anywhere anytime soon.

ADF Faces and JSF 1.2

Adam Winer - Wed, 2006-02-08 00:55
JSF 1.2 is right around the corner, and, of course, ADF Faces is going to be right there too, right? Well, not so fast...

ADF Faces took one fairly unusual approach in designing its components. Instead of extending the standard UIComponentBase class like almost everyone else does, we directly extended UIComponent with UIXComponentBase. I chose this path for good reasons - like the FacesBean state saving approach I blogged about a few posts down - but it does carry a penalty. When UIComponent changes, ADF Faces breaks. And UIComponent does change in JSF 1.2. In particular, the move from the JSF EL to the new Unified EL means new getValueExpression() and setValueExpression() methods.

C'est la vie.

So, here's the good news: I'm promising, right here and now, to get a version of ADF Faces out soon that will be based on JSF 1.2. There's one big question to resolve: should it be based on the code in JDev 10.1.3, or on the post-10.1.3 code we're donating to MyFaces? I'm leaning towards the latter, but let me know if you feel differently.

What belongs in the JSF standard?

Adam Winer - Mon, 2006-02-06 15:29
As the Expert Group starts working on JSF 2.0, we're faced with a very fundamental question: how do we pick and choose what belongs in the standard? And what, by contrast, does not belong in the standard?

There are several reasons why something should go in the standard:

  1. Feature ABC cannot be implemented outside of the standard.

  2. Feature DEF is not directly needed by the standard, but promotes interoperability.

  3. Standards receive better tool support, and tool support is essential for feature XYZ.

Some examples of each:

  1. JSF Avatar requires support from UIComponent, and therefore has to go into the standard.

  2. The DataModel API allows interoperability between different model providers and component providers. It would be helpful if JSF had a TreeModel for the same reason - instead of everyone inventing their own TreeModel, we can have one abstract interface that lets model experts provide the best implementations possible and component developers design the best tree UIs around.

  3. Facelets would benefit from tool support (Creator, JDeveloper, etc.)

But if you don't meet these standards, why not still add the feature to JSF? Why not add a calendar component? How about a declarative framework that makes it easy to create renderers? Or support for XSLT post-processing of content? These all seem like handy features, but I feel strongly that none belong in the JSF standard yet. A J2EE standard has very difficult constraints placed on it. The long development cycle means we only get to add features occasionally. But we're also required to maintain backwards compatibility, so fixing mistakes is difficult-to-impossible. So, here's a list of some reasons why not to add something to the JSF spec:

  1. Feature ABC can be implemented just as easily outside of the spec as inside of it. That is, the current public API is entirely sufficient to implement the feature.

  2. Feature DEF is not yet well understood - there are multiple possible directions to head. The JCP process works best when it standardizes existing best practices.

  3. Feature XYZ is of only limited use - not everyone needs it.

These are not at all mutually exclusive lists. For example, the Avatar API is not the last word in handling AJAX requests for JSF. A declarative framework for renderers can be implemented outside the spec, but it would benefit from more tool support. And so forth.

Perhaps the most difficult task of any framework developer is learning how to say "No". As in, "No, we don't want that feature." But that is absolutely our responsibility as architects of JSF.

It's down there somewhere, let me take another look...
-- The Big Lebowski

Checking Redhat version installed

Wijaya Kusumo - Sun, 2006-02-05 23:55
I was looking at how to tell the version of Redhat Linux installed on a machine from a command line. Mostly I used uname -a to view the server settings.   Here is a sample: $ uname -a Linux myserver.mydomain.com 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 i686 i386 GNU/Linux It return the server kernel's version: 2.4.21-32.ELsmp, but not something my mother could understand.

Inception of ADF NOOB

Casper Bang - Thu, 2006-02-02 09:32
Welcome to my blog which will revolve primarily around real-word development issues using Oracle's JDeveloper IDE and their Application Development Framework (ADF). It is my attempt to communicate what I have learned to peers and in the process hopefully gain a better understanding myself.

ADF is vastly different than traditional web application development as well as other 4/5GL frameworks. It introduces an enterprise development infrastructure unlike most other, with a shift towards a highly declerative paradigm which encapsulates all parts of a J2EE application. ADF and the associated IDE, JDeveloper, relies on a complex stack of associated tier technologies and as such, is not the easiest to get started on without feeling that you are drowning in complexity. This blog will deal primarily with Apache Struts as the controller tier and Oracle UIX as the view tier, running on top of Oracle 10g.

While ADF and its associated tier technologies are definately not as easy to get started on as classic server side scripting with embedded PL/SQL nor other frameworks (Rails, Spring etc.), it constitutes the higher learning curve in the long run by addressing application issues on a large scale such as maintenance, service orientation and rapid application development (RAD). In a testiment to this, in a recent development contest Oracle ADF took home the gold and silver medal for being the most productive RAD framework. While neither JDeveloper nor ADF is open source, it is completely free to use and applications can be deployed to any J2EE-compliant application server. On a personal note, ADF is about the only framework I've come across, which allows a composite/joined table view to get its related (detail) table updated as well as the primary (master) table by means of the framework!

Why not?
As already mentioned, in order to benefit from the ADF framework you really must be willing to put in a substantial amount of time before you can expect to develop any real-world applications. On a more subtle note, realize that while ADF is at a fairly mature state as of JDeveloper 10.1.2; tools, documentation and community support might be sub bar compared to what you are used to in other development environments and frameworks. And finally you should also be aware, that standards and next-generation technologies will append or replace ADF and currently associated tier technologies. For example, the next version of JDeveloper (10.1.3) introduces a new view and controller framework known as Java Server Faces (JSF). Developer Joel Spolsky has an entertaining analogy to the complexity of frameworks.

ADF encapsulates many J2EE patterns within its framework, including the infamous MVC pattern. From top to buttom, a typical ADF application can be though of as having 4 tiers.

The view tier which is where all the UI rendering happens, a controller tier which handles navigational aspects and a model tier where data is bound to the final tier; the Business Service tier.
These Business Services are at the very core of ADF and this is where you will find the applications point of entry, known as the Application Module (AM). To uptain a detailed understanding of how the underlying binding layer works, Oracle publishes an up-to-date ADF Data Binding Primer.
Categories: Development

The Model: AM, Entities, Views etc.

Casper Bang - Thu, 2006-02-02 09:27
As already mentioned in my first blog entry, ADF is composed by a multitude of layers within a large technology stack and these can be abstracted into the MVC pattern. In reality, the View and Controller layer in ADF is collapsed into the same layer and this is why most ADF applications actually consist of 2 independent projects within one ADF application, namely the Model and the ViewController. The following provides a quick and rudimentary explanation to what you will find in the Model part of such an application.

Application Module (AM)
This is your applications point-of-entry and essentially responsible for launching and managing the data-model beneith your applcation. Whichever Views and ViewLinks you may have created will not have any effect (be visible) before they are added to the AM. The default implementation of the AM is in ApplicationModuleImpl.java which will have a main method for launching a default Swing test application which can come in very handy when debugging and testing your model layer. You may extend the default implementation, as is often nessesary, in order to satisfy various pre-condtions such as user authorization etc. For example, to lock a specific view (E.g. UserView) to only show records with the users own initials (CLB in my case), the following could be done:

protected void prepareSession(Session session)
this.getUserView().setWhereClause("UserView.initials = :initials");
this.getUserView().setWhereClauseParam(0, "CLB");

Whichever view is linked to the UserView, will "inherit" this limitation and thus provides an excellent way of ensuring users see only their related rows. This could not have been achieved by a pure static view since the view is dynamic by nature, adapting to whichever is signed in to the system.

Entity Objects
Entity objects are at the very heart of an ADF application and its responsibility is to encapsulate a database table (and its rows). The framework will require there be a primary key column before doing so, the reason for this will be obvious in a moment. A java representation instance is required in order to model layers on top and add business logic. ADF can overide the default Java representation for an Entity and expose type-safe accessor methods for
association attributes rather than the default getAttribute("
"). In JDeveloper an entity has both an instance (.java file) and related metadata (.xml file).

Handles relation and cardinality between two entity objects. These attributes allow you to navigate from one entity instance to either another entity instance or a collection of related instances, depending on the cardinality of the association in question. This can be done by using
") where the framework will use the association to perform a findByPrimaryKey() on the related table and fetch the data for you. Associations are paramount to making views over multiple Entities, by using the association information to automatically construct the underlying join (WHERE clause). Associations are just metadata for the entities, stored in corresponding XML files.

View Objects
In the simplest sence, a view is nothing more than a SQL query. However, even if a view is composited over multiple Entity objects, it can be updated just as if it was an atomic table in the database. This is done providing the "reference" attributte for the Entity object is checked and is what distinquishes an ADF view from a database view.

Handles relation and cardinality between two view objects. ViewLink's connect two views in a Master-Detail fashion, where the master view provides an overview og more detailed data, usually as a 1:* relation between views. When a ViewLink is created between two views, the newly linked attributtes become available to each view.

Categories: Development

Should JSF go stateless?

Adam Winer - Tue, 2006-01-31 16:12
Jacob Hookom's written an interesting blog entry about whether JSF could go stateless. The two of us have gone back and forth on this on e-mail a bunch of times, and I guess you could say that I fall in the "UI state is a good thing" camp. In large part, that comes from all the time I've spent working on component frameworks.

I absolutely agree with Jacob on one of his points - "Statesaving in JSF is [really] bad in implementation". It's a massive and heavyweight "save everything on the page" approach that is, at least conceptually, horrible overkill. For example, it's ridiculous that we have to save the UI component hierarchy, attributes, EL expressions, etc., when we have a JSP or Facelets document containing exactly that information just sitting there on the server. Even though I know why this happened - JSF had to support JSPs, etc., etc. - it's a very frustrating state of affairs.

Nevertheless, I think throwing out state saving altogether in response would be going too far. It'd be like saying that you should never bother sorting because Bubble Sort is a really slow algorithm. Unfortunately, JSF, as designed today, makes it very difficult to even attempt to optimize state saving. Until there's a really sane, solid implementation of state saving, any big policy decisions are premature.

The real problem with optimizing JSF state saving is the way that UIComponent.saveState() (and restoreState()) is typically implemented. Each class is responsible for saving all of its own per-instance state, up and down the hierarchy. So UIComponentBase stores its properties in an array, then UIOutput stores a few more properties (plus the UIComponentBase state) in an array of its own, then UIInput aggregates its own state, and finally HtmlInputText adds its own. For example, here's the start of HtmlInputText.saveState():

public Object saveState(FacesContext _context) {
Object _values[] = new Object[31];
_values[0] = super.saveState(_context);
_values[1] = accesskey;
_values[2] = alt;
_values[3] = dir;
_values[4] = this.disabled ? Boolean.TRUE : Boolean.FALSE;
_values[5] = this.disabled_set ? Boolean.TRUE : Boolean.FALSE;
.... and on and on and on for another 26 lines ....

Nasty! If a container wanted to optimize state saving, it'd somehow have to mix that in not just into one class, but into every component class up and down the hierarchy.

ADF Faces took a different approach. We store all of our component state in an FacesBean instance. It takes care of storing simple properties, ValueBindings, lists (like listeners and validators), and knows how to save and restore state. Here's the full code for UIXComponentBase.saveState();

public Object saveState(FacesContext context)
return getFacesBean().saveState(context);

And subclasses don't neeed any code at all. Aaahhhh..... Now that's better. More on FacesBean in a later post (there's a lot of other advantages), but what's relevant is the general principle: all state saving is implemented up in the base class, so now there's a hook to implement real cross-cutting optimizations like:

  • Cache reusable FacesBean instances on a Facelet tag handler (with copy-on-write), especially for panels and output components that rarely if ever mutate

  • Implement saveState() that only saves deltas from the original state of the bean (and rely on Facelets to recreate the tree in its original state)

Secondarily, we'd do very well to follow Jacob's advice and re-think how processSaveState() and processRestoreState() function - instead of creating a deep heirarchy, create a flattened Map or array structure.

Implement all of this, and then we're in a place to judge whether fully stateless UIs are necessary. I think they will be, for some limited types of applications, but JSF can be pushed a lot further than it's going now.

Solaris & Tamil - Part II

Siva Doe - Mon, 2006-01-30 19:29

More updates. I have, with the help of OpenSolaris/Sun folks, have successfully created a Tamil locale for Solaris (10). Now, I can set the locale (in my .dtprofile) to ta_IN.UTF-8 and can see the GNOME (JDS) desktop in Tamil :-) (well most of it).
Though I see a similar rendering issue in GNOME terminal. (swapping of characters), while all other apps (panel on menu items, metacity on window titles) seem to render them okay.
Next step is to get the X11/Openwin part of the localisation, I guess.


Contains: Gedit with a Tamil text, Firefox (built with --enable-pango), Run dialog, GNOME-terminal (compare the date output with the one on the panel on top).


New Oracle Q&A site

Mihajlo Tekic - Sat, 2006-01-21 12:00
I saw many posts about new Eddie Awad’s site Oracle Questions and Answers. Some of them criticize it some of them recognized it as a new Oracle Q&A site.
It was interesting to read what Tom Kyte and Howard Rogers wrote about it. One simple solution presented on Oracle Q&A produced big and strong discussion about possibility of one table to be read-only.
Howard Rogers did research about this possibility and as a result he got that one Oracle table could not be read-only in real meaning of the phrase “read-only”. So, his standing point was that this site does not provide real and true information.

From my perspective, this is good and useful site. You can find very useful information there. I agree that some of the answers are short, but sometimes it is better to get the idea, so you can extend it and adapt it to your needs.

Recently, I found very good solution how to generate sequence numbers between two numbers. For this purpose I was always using one table filled with sequential numbers from x to y. I was creating new rows whenever I needed it. But, the solution presented at Oracle Q & A, is so simple and practical.

select (lvl + &v_from - 1) myseq
from (
select *
from (
select level lvl
from dual
connect by level <= (&v_to - &v_from) + 1
order by myseq

This is very good place where you can find useful tips.

Mihajlo Tekic

Moving the Politics to freestateblogs.net; Keeping the Oracle stuff here

Denis Goddard - Fri, 2006-01-20 21:47
For the past 6 months, I have been maintaining this single blog.
The problem is, there are two rather disparate domains about which that I typically rant:

  1. My work at Oracle Corporation, the software product I work on there, and other geeky Software-related stuff

  2. The Free State Project, New Hampshire politics, and my generally Libertarian opinions

Now, it seems to me, that most of the people interested in my Oracle work really don't give a hoot about my politics. Indeed, one of the beautiful things about the capitalist Free Market system is that it allows people to work together, even when they do not share the same beliefs or opinions.

Moreover, it just seems impolite to broadcast my personal political ideas at people, if all they want to know is what I'm thinking with the latest release of ADE.

That said, I do want to ensure that folks far and wide know all about the Free State Project. I especially want people to know about the excellent progress being made in New Hampshire.

To that end, I have created a new website:

That site is intended to become a portal for information about pro-Liberty goings-on in New Hampshire.
From this point forward, the blog you are now reading will be dedicated to things relating only to ADE, Perl, Oracle, Software Configuration Manamgement, and maybe stuff like how much I miss the gym at Oracle HQ, or how much I love being three timezones ahead of Oracle HQ.

Please, feel free to comment... and to check out freestateblogs.net, if you're interested in that sort of thing.

Oracle Streams problems ... Check the Alert Log first!

Mihajlo Tekic - Fri, 2006-01-20 17:49
Some days I just don’t have luck.
Whatever I tried to do, I couldn’t achieve it. But, fortunately it is only one day and not whole day :-).
I was investigating Oracle Streams whole month. I got good results and everything seemed to be going so well until, I decide to add new destination site in my Oracle Streams environment.
I was wondering why all those people on forums have issues with Oracle Streams, it is much better than Advanced Replication, and with Oracle 10g R2 you can use OEM to monitor your Streams environment.
One thing what bothered me, while I was learning and investigating streams, was lack of resources and practice examples how to setup streams environment. There is only one book about Oracle Streams available “Oracle Streams - High Speed Replication and Data Sharing” by Madhu Tumma., and off course I bought it. I found some good information there, but most of the scripts what I found inside were not so helpful, because the information what I got from them can be found very easy using some dictionary views.
Also, there is no chapter about how the existing Oracle Streams environment can be extended with new destination database.
No, don’t get me wrong, I don’t like to criticize this book, it is quite good for a beginner to understand Oracle Streams.
So, I continued to find the way to add another database to my destination databases set.
I created new propagation process in the source database.
I crated streams administrator in the destination database, instantiated all tables, created apply handlers and apply process.
But, when I started the apply process, the changes from the source database were not being applied to the target tables.
The first thing what I got in mind was to check whether some errors occurred in some of the processes (capture, propagation, apply). But, I didn’t find any errors there. I thought, here comes the difficult part.
I checked the propagation jobs aq$_schedules. I notice that all propagation jobs have LAST_RUN value, except the propagation job for the new database. Oh, there you go, I said, there my problem is.
I checked everything related to the propagation process, I was dropping and re-creating it several times. Nothing happened…still nothing.
I was searching on the net, trying to find something related to the problem I have, but unfortunately except many old posts (most of them related to Oracle Streams for Oracle 9i) I didn’t find anything useful.
I open the OEM, and tried to monitor the Streams process from there. I notice that the propagation process is propagating messages. Then I decide to check and monitor Apply process. I saw messages are arriving, but nothing being applied.
This is good, this is progress, I thought and continued to check all components of the apply process (queue, queue tables, handlers, etc).
I spent almost whole day checking, researching, investigating, and trying to figure out what is the reason for my issue. During that time, I notice many OEM “bugs” related to Streams monitoring features: if one propagation process is disabled, there is no way to enable it again if it is not first listed in the web page :-); you can not create propagation rule if some of the global names are longer than 30 characters :-):-) .

Finally, I decide to check the alert log of the destination database, and I found this:

knllgobjinfo: MISSING Streams multi-version data dictionary!!!

I found that I that the tables at the source database are not instantiated.
I did it using DBMS_CAPTURE_ADM.PREPARE_TABLE_INSTANTIATION, after that re-instantiated the tables in the destination database, and that was it … It worked.

Check your alert log first, anytime when you have a problem with your Oracle Streams environment, and that problem is not a recognized error stored in DBA_CAPTURE, DBA_PROPAGATION or DBA_APPLY_ERROR views.

However, these are the steps what should be taken if you want to add new destination site in your Oracle Streams environment:

1. Stop Capture Process
2. Create Propagation Process, add propagation rules for all tables which are going to be replicated.
3. Create Streams Queue for receiving changes from source queue
4. Create AQ Agent and enable its privileges on STREAM ADMINISTRATOR
5. Add the AQ Agent as subscriber to Streams Queue
6. Create a dml handler procedure for DML statements issued on the tables
7. Set the DML Handlers for each table in the environment
8. Create apply process for the destination database
9. Set instantiation SCN for tables at the source database
10. Set instantiation SCN for tables at the destination database
11. Run apply process
12. Run capture process

For the end, I must say that from my perspective Oracle Streams are much better and easier to work with than Materialized Views (Advanced Replication).

But, nothing is perfect …

Mihajlo Tekic


Subscribe to Oracle FAQ aggregator