Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Adaptive Server Anywhere Server Version How do I get the date time that the database was started? Via sql command / function or something.

asked 27 Sep '13, 14:21

Walmir%20Taques's gravatar image

Walmir Taques
accept rate: 12%

edited 27 Sep '13, 14:22

SELECT PROPERTY ( 'StartTime' );

'2013-09-27 15:21:06.152'
permanent link

answered 27 Sep '13, 15:20

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%


Note that the property StartTime is when the server was started. There is not an equivalent property for when the database file was started as far as I know.

(27 Sep '13, 15:24) Chris Keating

The SYSHISTORY table should have this information. Look for the LAST_START operation.

permanent link

answered 27 Sep '13, 14:30

Chris%20Keating's gravatar image

Chris Keating
accept rate: 31%

Ok...thank you!

(27 Sep '13, 14:39) Walmir Taques

Note: SYSHISTORY has been introduced in ASA 9.0.1. Generally, and for older versions, you can also query the according server property via

SELECT property('StartTime');

That's even easier IMHO.

permanent link

answered 27 Sep '13, 15:26

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%


Very strange, but the system view SYSHISTORY shows yesterday:

I. 10/18 10:34:13. Starting database "..." (D:\ ... .db) at Wed Oct 18 2017 10:34
select last_time from SYSHISTORY where operation='LAST_START'
2017-10-17 10:48:02.000

(18 Oct '17, 04:46) Ilia63
Replies hidden

For current versions, I think SYSHISTORY entries for "START" and "LAST_START" seem to get refreshed only when a new version has been applied and not for general starts of the database. In my case, a v12.0.1 database has been started a few days ago but the last_time of the "LAST_START" row lists a date in 2016 when the last EBF had been applied...

(23 Oct '17, 03:52) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 27 Sep '13, 14:21

question was seen: 2,474 times

last updated: 23 Oct '17, 03:52