The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

Simple question -- why is setting the db property use "GLOBAL_DATABASE_ID" but when you need to retrieve it you use GlobalDBID?

asked 22 Feb '13, 02:07

crb's gravatar image

crb
1263310
accept rate: 0%


They are technically two different things (an option and a property) and therefore can have two different names (although, AFAIK, in many other cases, the option and the according property share the same name):

  • "global_database_id" (originally in lower case) is a public database option, and you can set it via SET OPTION and also retrieve it via

    select * from sysoption where "option" = 'global_database_id';
    

  • "GlobalDBID" is a database property, and as such, read only, and used with select db_property()

  • With v9 or v10 and above, there's also a connection property "global_database_id" that's named like the option (and returns the same value - I don't know why it is there, as the option itself is public and therefore applies to all databases users and connections...)

permanent link

answered 22 Feb '13, 04:30

Volker%20Barth's gravatar image

Volker Barth
29.3k287438644
accept rate: 32%

edited 22 Feb '13, 04:31

Thanks, Volker.

(08 Mar '13, 12:39) crb
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:

×20

question asked: 22 Feb '13, 02:07

question was seen: 685 times

last updated: 08 Mar '13, 12:39