on 05-30-2016 10:21 AM
Hi There,
I would like to identify if a database is a system database or a tempdb (durability no_recovery)
At this moment I know the following methodes, but they are not 'waterproof' !
- use name of the databases (master, model, tempdb, sybsystemprocs, sybsecurity, dbccdb, sybmgmtdb)
- select name, id from master..sysdatabases where durability = 6 and dbid < 4 and dbid > 31500 (or something like this)
Are there other way's to identify them?
Regards,
Harry
I'd add sybsyntax to the list of "system" databases...
Unfortunately the "system" databases are not marked (yet?) in ASE. You cannot identify one as system database unless you know it by name. Pretty annoying as it would take zero effort to add this functionality. Some sites introduce range conventions to "create database" usage (with dbid = {range for udbs}). Relying on durability flag too may mislead as you may create user database with durability = no_recovery as well.
I'm afraid you have little choice but to maintain the list of names (put it into your own catalogue table).
Maybe ASE 20 will have it... unless ASE will by then merge into HANA as scratch DB...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
79 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.