Logical Area Number

Logical Area Number – I couldn’t remember this exactly… larea is logical area

select rdb$relation_name from rdb$relations
where rdb$storage_id = :larea_no
select rdb$index_name from rdb$indices
where rdb$index_id = :larea_no
select rdbvms$map_name from rdbvms$storage_map_areas
where rdb$storage_id = :larea_no;

If have received ABMBITERR messages you will probably be wanting to do this.

ABMBITERR, inconsistency between spam page and bit in
area bitmap in larea

Explanation: Either an ABM page contains a bit set for a spam page
that does not manage the logical area of the ABM page
or an ABM page does not contain a bit set for a spam
page that does manage the logical area of the ABM page.

User Action: Use RMU REPAIR to rebuild the ABM pages.

$ rmu/close/cluster DB

$ rmu/repair/abm DB /area=the-area-name-from-the-select
Continue reading “Logical Area Number”

Speeding up Queries

yesterday’s activity – get the slow query to go faster. Two things


changed the size of the database window from 200 buffers by a factor of 20. This allowed very large portions of the thrashing index area to reside in memory (60 I/O per second down to 1)


changed the file extend size from 5 – huge increase. Went from 3 extends per second to .03

Result? Approximately 12 hour query down to about 1 hour with zero code changes!

I like that!

Finding a Logical Area

rmu/analyze/opt=debug/end=1 DBname/out=logical_areas.dat

select rdbvms$map_name, rdbvms$area_name, rdb$storage_id, rdb$index_id from rdbvms$storage_map_areas

select rdb$relation_name, rdb$storage_id from rdb$relations order by 2

System Index Compression

3.9.4 System Index Compression

When you create a database, you can specify that Oracle Rdb compress the system indexes. To do so, use the SYSTEM INDEX COMPRESSION IS ENABLED clause of the CREATE DATABASE statement. To enable system index compression for an existing database, you must export and import the database and specify the SYSTEM INDEX COMPRESSION IS ENABLED clause with the IMPORT statement.

For system indexes, Oracle Rdb uses run-length compression, which compresses a sequence of space characters from text data types and binary zeros (also called ASCII NUL) from nontext data types. It compresses any sequences of two or more spaces for text data types or two or more binary zeros for nontext data types. See Section for more information on run-length compression.

Compressing system indexes results in reduced storage and improved I/O. Unless your applications often perform data definition concurrently, you should use compressed system indexes.

Replacement for Manila

It would seem that there isn’t much internal support for Manila at the U. I have a few, topical Manila sites that I probably want to preserve and/or migrate.

MT is a possibility…

LDAP search from the command line

Get a name, dbkey, and email address from ldap

ldapsearch -hldap.arizona.edu -LLL -x
“(mail=*payne*@*arizona.edu)” dn mail
perl -p -i -e
‘ s/.*cn=(.*)+dbkey=([0-9]+),.*/1~2/; s/mail: (.*)/1/’

all of that on one line – or use the continuation characters

POSIX path or POSIX file

POSIX path or POSIX file

set f to choose file — f is a file object

set p to POSIX path of f — p is Unicode text of the path

set f1 to POSIX file p — f1 is a file object again

set qp to quoted form of p — qp is a path string you can send to Terminal even if it contains spaces or special characters

Changing keyboard equivalents

Changing keyboard equivalents

The following example would set the Activity Viewer menu item of mail.app to be command+shift+A:

defaults write com.apple.Mail NSUserKeyEquivalents ‘{“Activity Viewer”=”@$A”;}’

The odd characters before the ‘A’ in the previous command, specify the modifiers:

* @ = Command * $ = Shift * ~ = Option * ^ = Control

To use other keys, such as Delete, you will have to use their Unicode codes like this:

@U0008 which would mean command+Delete.

This is really good, since it does not involve modifying the original application, and only applies to your environment, leaving that of others unchanged. I will try to make an app to handle this proceedure some time in the future.

Logging out via AppleScript

From Chris Nebel of Apple’s AppleScript Engineering group

ignoring application responses
¬†¬†tell application “loginwindow” to <>
end ignoring

The double pointy brackets around the raw event call should be replaced by option-backslash and shift-option-backslash.The “rlgo” is short for “really log out”; if you want the “are you sure you want to log out” dialog, use aevtlogo instead. A future version of AppleScript will have a real command similar to “shut down”.