Is IdentitySignatureUUID (new to v17) useful as a globally unique database dbinit instance identifier? (which would be a very good thing)

Both are documented as "This property is for internal use only."

Both seem to be unique to a physical .db file created by a separate run of dbinit, and both seem to survive a restart.

SELECT DB_PROPERTY ( 'IdentitySignature' ),
       DB_PROPERTY ( 'IdentitySignatureUUID' );

-- for database 1...

DB_PROPERTY('IdentitySignature'),DB_PROPERTY('IdentitySignatureUUID')
'218646270','165c6939-65ef-4770-b53c-03cca8a313cf'

-- for database 2...

DB_PROPERTY('IdentitySignature'),DB_PROPERTY('IdentitySignatureUUID')
'218647726','2dc26698-ae53-46ac-8624-63d2701645bd'

asked 18 Nov '15, 16:56

Breck%20Carter's gravatar image

Breck Carter
27.0k444614889
accept rate: 21%


Each time you create a database it is given a unique "signature". This has been true for 20+ years. This signature is used (for example) to check that the dbspaces and transaction log file match the system dbspace.

New to v17 is the unique signature UUID. This was added since the signature field did not contain sufficient bits to actually guarantee uniqueness - i.e. it is highly unlikely but it is possible to create two databases that would end up having the same signature (exercise left to the reader ;-). This new UUID field resolves the problem.

The two database properties - IdentitySignature and IdentitySignatureUUID - provides a method for a database user to get these two database signatures.

permanent link

answered 25 Nov '15, 09:08

Mark%20Culp's gravatar image

Mark Culp
23.4k9132275
accept rate: 40%

> 20+ years

AFAIK the DB_PROPERTY('IdentitySignature') was introduced in V10.

I'm guessing that both properties survive unchanged when the *.db file is copied, making them less-than-perfectly-useful as a unique signature when (for example) multiple remote databases are "created" via file copy, or when embedded databases are published via file copy rather than dbinit.

(25 Nov '15, 13:23) Breck Carter
Replies hidden
1

Yes that may be true (that the property is relatively recent) but the "signature" has existed in the database since at least 1998 (I haven't taken the time to traced it back beyond that), it just wasn't exposed through the property function.

Re. copies of the database file: correct, if you copy the file the signature(s) remain the same (since the values are in the files). If an application is cloning a database (e.g. for remote clients) then the app should be using some other method to differentiate between the copies - e.g. write some unique data into a table.

(25 Nov '15, 14:54) Mark Culp
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:

×3

question asked: 18 Nov '15, 16:56

question was seen: 339 times

last updated: 25 Nov '15, 14:54