Then the following FAQs may be of help: However, these FAQs do not deal with the question whether the running database is the "right" one, i.e. whether the correct database file has been loaded. Say, if you have 10 different databases with the same schema, they don't tell if the desired database (say, here database 3) has been loaded. In case you know the file location then db_property('File') may help. For databases used with replication/synchronization, they usually can be identified via CURRENT PUBLISHER or the remote ID. For general purpose databases, I would think you would have to "label" them yourself, e.g. via a user-defined SET OPTION. answered 25 Feb '15, 07:16 Volker Barth Thanks... (although such an identifier would not be superfluous when the databases with one and the same filename & with one and the same scheme to migrate to the cloud and the client application must ensure that it has connected to "right" database).
(25 Feb '15, 07:44)
Ilia63
|
What are you trying to do - distinguish different databases from another or assuring that you are conecting to the "right" database and/or "right" database server or something else?
If related to the database file per se: Would you expect that a "copied" database (or a backup) has still the same UUID? Would you set the value yourself?
I want to be sure that I connect to the "right" database.
And I need to database ID does not change when I copy the database file.