Sybase Column/Row Tracking

I have a Sybase Anywhere 16 database. I was wondering if there was anyway of see who or when a row or column was last changed. I am thinking there is not but I am not that familiar with Sybase.
nmiller61Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Joe WoodhousePrincipal ConsultantCommented:
Yes, you have two ways you could do this.

SQL Anywhere has database auditing features that can help you get the information you need.

It won't directly report on last time a row or column was updated, but you can configure it to capture information such as all operations requiring permission. You could then extract this data and parse it to arrive at what you want.

Another way which is much easier to get the desired information, but probably more intrusive on database operations, is to add triggers to the tables you want this information for. The trigger could then update either the same table or a different table with a datetime and username for when the data/column was last written to for that table.

If you used an INSERT you'll have a history of when data is changing. This will get very large very quickly. If all you care about is "last updated" then you could use INSERT ... ON EXISTING UPDATE, which inserts if the row doesn't exist, and updates if it does, ensuring you'd only have one row per value. This last usage needs careful attention to primary keys to work correctly.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nmiller61Author Commented:
Thank you that helped a lot.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.