The code in this Help topic fails with SQLCODE=-1090

Determining the Security Model Used by a Database

( or is this a completely pointless topic... and question? :)

SELECT @@VERSION;

@@VERSION
'17.0.10.6285'

SELECT IF ((HEXTOINT(SUBSTRING(DB_PROPERTY('Capabilities'),1,LENGTH(DB_PROPERTY('Capabilities'))-20)) & 8) = 8)
THEN 1
ELSE 0
END IF

Function 'hextoint' has invalid parameter '1' ('3DF8C0C66')
SQLCODE=-1090, ODBC 3 State="08004"

asked 14 Jun, 07:49

Breck%20Carter's gravatar image

Breck Carter
31.9k5147041031
accept rate: 20%

edited 14 Jun, 07:50

1

FWIW, with v16 for a database, which was reloaded from an originally pre-v16 database, it returns "1" as expected in my case.

UPDATE: This seems to be a bug introduced with v17.0.10.x. I had also tested with the 17.0.10.6285 demo database, and it worked as expected. The system catalog was lastly upgraded with 17.0.9.4838.

Now, when altering the system catalog etc. via ALTER DATABASE UPGRADE PROCEDURE ON, I also get the error message (with a different parameter value).

What does the following show for your database:

select operation, version
from sys.syshistory
where operation in ('INIT', 'UPGRADE')
order by 1, first_time_utc;

My sample demo database returns:

INIT;17.0.0.1062
UPGRADE;17.0.6.2806
UPGRADE;17.0.9.4838
UPGRADE;17.0.10.6285

Apparently, the Capabilities database property is way longer with 17.0.10.x than in previous versions, it looks like it would have 8 more leading digits...

(14 Jun, 10:26) Volker Barth
Replies hidden
Comment Text Removed

> What does the following show

If I ran it, it would show it was initialized with 17.0.10.6285.

(16 Jun, 08:13) Breck Carter
Be the first one to answer this question!
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:

×1

question asked: 14 Jun, 07:49

question was seen: 99 times

last updated: 16 Jun, 08:15

Related questions