1752631 Members
5535 Online
108788 Solutions
New Discussion юеВ

Re: RDB introduction

 
Bob Blunt
Respected Contributor

Re: RDB introduction

Wim, I'm not a RDB expert by any means, I've only had to touch RDB as the supporting database for tools like DECplan, EDCS II and some others during a previous contract. I found it easy to learn the basics but it can get very complex in a big hurry.

There's a database-centric set of pages at http://dba.openvms.org, that group might have some other more specific suggestions and there's a RDB DBA seminar scheduled for later this month listed at the main http://www.openvms.org/ pages. Of course you might also check in the RDB-focused information at the Oracle website.

bob
Richard J Maher
Trusted Contributor

Re: RDB introduction

Hi Wim,

> What do you mean with linktables
> (in Oracle syntax) ?

I mean referencing tables in another database through a link table in the local database. The syntax is something linke (I created one yesterday so I should remember better)

create database link myLink connect to me identify mypassword tnsnamesref;

> So the snapsshot too old can't happen
> because the snapshot will grow until ...
> but then what happens if you run out of
> snapshot space ?

Good question. I don't know the answer as I've never seen it happen (even in dev/test) Presumable when the disk runs out of space there will be a cosi-f-kaboom error and something will happen. The philiosophy where I've been is that table-spaces/storage-areas are all able to auto extend (within the limits/percentages specified) An big-uk-bank-oracle site that I was at for some years would pride themselves on having "managed databases" where aouto-extend was forbidden. When I asked what the support DBAs did when they got called at 2:00am 'cos a table space had reached its growth limit, I was told "Well we extend it of course, Duh!" :-)

Set up alarms, device monitoring, OEM, yadda, yadda, yadda.

Now if the AIJ blows up that's a different story! (And a "simple" metadata change resulted in just such a device-full scenario) Which is why they have circular AIJs and emergency overflow bits.

> Wim

Cheers Richard Maher
Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: RDB introduction

Wim,

correct, you can disabled snapshot mechanism or use the enabled deferred clause.

But if you disabled snapshot your read write transaction don't give you the same level of isolation and generate a large locking activity.
It's most of the time not a good idea, except if all the application are designed for such behavior. It is generally better to us a exclusive write reserving clause.
But I have used a few times (very few) snapshot enabled deferred on some databases.

Oracle snapshot and Rdb snapshot don't work the same way.
Rdb keep in the snapshot file all versions of any record which can be retrieve by the oldest active transaction. But snapshot file automatically grow, limit is just your disk size...
So except if some exclusive write transaction has modified the table, a read only transaction can't failed (with snap enabled).

Rdb has snapshot since version 1.

JF
Wim Van den Wyngaert
Honored Contributor

Re: RDB introduction

JPF : not all tables are equal.

An application has critical tables and others that are not. When you do a loading/mass updating at night of a table that's not in use at night, it would be better to take locks instead of using snapshots. But I would implement it at table level instead of user/db. And may be alter the setting in certain jobs.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: RDB introduction

Sorry, JFP not JPF (have known a Jean Pierre we caleld JP).
Wim
Wim Van den Wyngaert
Honored Contributor

Re: RDB introduction

Richard,

In Sybase you have the system of proxies. WV1 coming from DB A has rights as WV2 in DB B. No need to hardcode your password.

I'll do some reading in
http://download.oracle.com/otn_hosted_doc/rdb/pdf/gdbdd.pdf
where many of the things are explained.

Wim
Wim
labadie_1
Honored Contributor

Re: RDB introduction

Wim

Book the 3 and 4 of May, and go to
European Oracle Rdb and Oracle Database on OpenVMS Technical Forums, they will be in Bruxelles on those days.

http://www.openvms.org/stories.php?story=10/02/13/8594578
Wim Van den Wyngaert
Honored Contributor

Re: RDB introduction

Yes but I'll have to know the basics before I go to that. And have free time (when employed).

Wim
Wim
Jean-Fran├зois Pi├йronne
Trusted Contributor

Re: RDB introduction

Wim,

just to clarify, take look and use snap are not mutually exclusive.
For the moment forgot the disable snap feature and the special batch update transaction.
You take locks on a table/record when you are in a read-write transaction. But the level of your lock depend on you reserving clause (and on the strategy choose by Rdb).
For a table you can specify 2 words, the first one is how you accept others access the table concurrently with you, the second how you access the table:
shared/protected/exclusive read/write

exclusive mean that you want to be alone on the table, in this case and only in this case you don't write to snap.
protected mean you accept reader
shared you accept reader/writer

Rdb escalate an shared lock on a table into a protected if the strategy choose is sequential.

You also specified the isolation level needed:
read committed/repeatable read/serializable
Rdb don't support dirty read mode.


There are, also, others options but outside the scope of this thread.

On Rdb cost of snapshot is "paid" by writer for an eventual reader.

Each time you update a record (table record, index record, system record,...) Rdb use a snap page (if necessary more than one) linked to the live page to write the old version of the record. The documentation contains a full description of the structure of a data/snap page, you can also use the rmu/dump command to view the content of a data/snap page, very useful.

Briefly, a read only transaction read the data page check the record version using the TSN (transaction sequence number), if this version is not the correct one, start to follow the chain of snap page/record.

If you have disabled snap, you have something very similar to "shared read isolation level read committed".


JFP
Richard J Maher
Trusted Contributor

Re: RDB introduction

> in this case and only in this case you
> don't write to snap.

Well there are also BATCH_UPDATE transactions but they're hardly ever used. (Don't write to the RUJ either and can't be rolled back) You can also just "defer" snapshots if there are no writers active on that storage area.

I see one of the Tech Forums this year is in Munich and IIRC the bier gartens start opening in May so I know where I'd rather be!

On the Orrible Oracle front, let me also tip my lid to CONNECT BY PRIOR. Traversing our Org_Unit hierarchy brilliantly at the moment!

I'm sure if Rdb was actively being developed then we'd have such functionality too let alone SQL> SET SESSION AUTHORIZATION USING (PERSONA :ws_integer);

Cheers Richard Maher

PS. Just where are these DBA jobs and how much are they paying :-)