on 2013 Sep 27 3:21 PM
Adaptive Server Anywhere Server Version 9.0.2.3951 How do I get the date time that the database was started? Via sql command / function or something.
SELECT PROPERTY ( 'StartTime' ); PROPERTY('StartTime') '2013-09-27 15:21:06.152'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
The SYSHISTORY table should have this information. Look for the LAST_START operation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
but
select last_time from SYSHISTORY where operation='LAST_START'
2017-10-17 10:48:02.000
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...
User | Count |
---|---|
71 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.