Hi How can I return the date a DB was last updated?

In MS (spit) SQL it can be done with

SELECT TOP 1 name, modify_date,
type_desc FROM  sy.sobjects ORDER BY
modify_date DESC

I can see that SQL Anywhere has SysObjects and Type but nothing for the last date modified

asked 03 Jan, 13:02

gchq's gravatar image

gchq
221151626
accept rate: 33%


This FAQ may help.

permanent link

answered 03 Jan, 14:04

Mark%20Culp's gravatar image

Mark Culp
24.2k9134286
accept rate: 40%

Mark

Thank you for responding.

I believe that FAQ is to query a specific table. I am attempting to query the DB to see which table was last updated and the date

(03 Jan, 14:12) gchq
Replies hidden

AFAIK There is no one piece of information that tell you when the database as a whole was last modified but the FAQ is saying that you could query the SYSTAB table and find the times when each of the tables were modified.

For example, extract the timestamp of the last table that was modified and that will be the time that the database was last modified.

checkpoint;
select first last_modified_at
  from sys.systab
 order by last_modified_at desc;

HTH

(03 Jan, 14:32) Mark Culp

Just what I wanted - thank you so much :-)

(03 Jan, 18:20) gchq
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×137
×5

question asked: 03 Jan, 13:02

question was seen: 198 times

last updated: 03 Jan, 18:20