Monthly Archives: July 2011

Tracking row changes in Oracle tables

It’s been a while since I posted anything work related but here’s one I discovered today.

Have you ever needed to find out when a particular row was changed? From Oracle 10g there’s a feature which records the SCN number of a row change within the table in a pseudo-column called ora_rowscn. So for example:


SQL> SELECT ora_rowscn FROM sometable WHERE id = '123';

ORA_ROWSCN
----------
45738231

Then you can convert the SCN number to a timestamp using the scn_to_timestamp function


SQL> SELECT scn_to_timestamp(45738231) AS timestamp FROM dual;

TIMESTAMP
------------------------------
05-JUL-11 10.44.42.000000000

The only caveat with this feature is the tables have to be created with the ROWDEPENDENCIES option although it seems to be on as default in 11g.

Credits: http://oracle-tns.com/track-the-row-change-time/

The Goal of Prayer


NOT simply our own welfare.
Although that is often part of our purpose, Jesus taught his disciples to pray “give us this day our daily bread”. If it’s true of our material needs it’s no less true of our spiritual needs. Prayer for ourselves is clearly an important part of Jesus teaching but why it is important is what we need to ask ourselves. If our own welfare was to be our goal in prayer we would be in danger of becoming self centered.
So what can we say about the goal of…

The blessing and welfare of others.
Obviously we need to intercede for other people, and we spend most of our time at the prayer meeting doing just that. But what is our motive? Does it need to be more than a desire to see others blessed? Because it makes us feel good to think that our prayers made a difference to someone? how vain and conceited would that be? Prayer becomes just a way of making us feel good, like we’re doing something.

“Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts.” James 4:3(AV)

It seems that neither of these things should be our goal as they centre everything on us. What we need to do is to set out target in prayer to be…

Always and only the glory of our God
This is the only goal, and the highest purpose which we should aim for. Our own welfare and that of others must always be subservient to the glory of God. If something seems right for us, or for someone else, but not for His glory, then we should abandon the thought.
The glory of God is linked with his purpose, we can see that in John 14:13

“And I will do whatever you ask in my name, so that the Son may bring glory to the Father.”

That was always the aim of Jesus here on Earth as he prayed in John 17:4

“I have brought you glory on earth by completing the work you gave me to do.”

We should make that same goal our own, letting the glory of the Father be the link between our asking and His doing. Once we are joined on and in-tune with His purpose, then is the time that our prayers have the most effect on ourselves and those around us. There are two things we need to do to achieve our goal of giving glory to God:
1. Study His word to discover the plans that he has for us
2. Live out that same purpose.
How we live affects how we pray, when we sin we put a barrier up between God’s throne and us, but if we are made holy and justified, immediately we have a connection to that throne.
If we set our lives and our hearts on the glory of God, we become synchronised with His purposes. But there’s more to it than that, because the connection works both ways. If the glory of God is the only goal of our prayers, then this becomes reflected in our daily life.