detect locked schema

dschuchman

New Member
need a command line way to detect if a database is locked.
we currently run batch jobs that lock the db schema and prevent loads of data definitions (.df file).

would like a way to detect if the schema is currently locked (by one of these batch jobs)

is there a proutil command i can run or a DICTDB system table i can check?
 
Nope.

What version of Progress are you using? In modern versions many .df files can be loaded even while users are online -- but you have to use the "Add new objects online" option to do it:
Code:
  ┌───────────────────────── Load Data Definitions ──────────────────────────┐
  │  │
  │  Input File: sports2000.df  <Files...>  │
  │  │
  │  [ ]Stop If Errors Found  [ ]Commit Even with Errors  │
  │  [ ]Output Errors to File  [X]Output Errors to Screen  │
  │  [ ]Add new objects on-line  │
  │  │
  │ WARNING:  │
  │  If .df file is an incremental .df it may contain DROP statements which │
  │  will cause data to be deleted.  │
  │  │
  │  If you select that you are only adding new objects on-line and you try │
  │  to modify existing objects all changes could be rolled back.  │
  │  │
  │  If you select to commit with errors, your database could be corrupted. │
  │  │
  │  <OK>  <Cancel>  │
  └──────────────────────────────────────────────────────────────────────────┘
 
Nope.

What version of Progress are you using? In modern versions many .df files can be loaded even while users are online -- but you have to use the "Add new objects online" option to do it:
Code:
  ┌───────────────────────── Load Data Definitions ──────────────────────────┐
  │  │
  │  Input File: sports2000.df  <Files...>  │
  │  │
  │  [ ]Stop If Errors Found  [ ]Commit Even with Errors  │
  │  [ ]Output Errors to File  [X]Output Errors to Screen  │
  │  [ ]Add new objects on-line  │
  │  │
  │ WARNING:  │
  │  If .df file is an incremental .df it may contain DROP statements which │
  │  will cause data to be deleted.  │
  │  │
  │  If you select that you are only adding new objects on-line and you try │
  │  to modify existing objects all changes could be rolled back.  │
  │  │
  │  If you select to commit with errors, your database could be corrupted. │
  │  │
  │  <OK>  <Cancel>  │
  └──────────────────────────────────────────────────────────────────────────┘


i am using version 10. think 10.2B04.
trying to write a script to call load_df.p to load df file for schema change for multi user mode.
if there are batch jobs connecting also to the database, it locks the schema till the batch job is done.
trying to detect if the batch job is running (and the schema is locked)
 
any way you'd suggest to script loading of df files (schema changes)?
currently, if the schema is locked then the load_df.p will just hang and wait for it to release which
cause other requests to timeout. any ideas on how to get around this?
 
If by "this" you mean: "need a command line way to detect if a database is locked" then my original answer, as quoted by Cringer, stands.

If you think about it you might also begin to question if it would do you any good -- suppose you did have such a command? You check it, it gives your script the "all clear" and then you launch your .df update. But between those two steps someone else grabs a schema lock... Oops.

The classic solution to that is to shutdown and go to single-user mode. More sophisticated approaches might stay in multi-user mode but kick all non-maintenance users out and allow the update user to do what needs to be done.

There is also a newish feature related to imposing a "maintenance lock" but the details and the documentation thereof escape me for the moment. Perhaps someone will know what I speak of and clear up the matter (Rob, I'm looking your way...)
 
There is also a newish feature related to imposing a "maintenance lock" but the details and the documentation thereof escape me for the moment. Perhaps someone will know what I speak of and clear up the matter (Rob, I'm looking your way...)

If by "Rob" you mean me ;), I'm looking for the new feature you're talking about but it doesn't ring a bell. Do you think it's 11.x -specific? I've spent only limited time so far in 11, though we are beginning an internal upgrade.

I'm reading a KB article about updates to the schema change protocol but I think it's just detailing online changes, which have been around for a while.
 
Yeah, I meant you. I could have sworn you mentioned it in a post not too long ago. It's called "ops lock" or something like that. It's on the tip of my tongue but I just can't pin it down...
 
Back
Top