Question Difference between APW, AIW and BIW, How to check long run transcation

JATINDER88

New Member
Hi,

1) What is the difference between APW, AIW and BIW and how its work in progress database ?
2) How can me check long run transcations ?
3) How can we check user licence in database ?

Kindly help

Regards
Jatinder Kumar
9999011541
 

JATINDER88

New Member
Sir,

I have studied about page writers. Also applied on database.

APW, AIW, BIW



Each page writer counts as a process connected to a database and uses resources associated with a
user. You might have to increase the value of the Number of Users (-n) parameter to allow for PW. However, PWs are not counted as licensed users.

Almost same answer im getting for all pager writers.

I'm not getting actual difference in all. Kindly help.

2) For user licence count. I did't get command any where.

3) Long run transaction i can check in multi user invirnment through lvmon. It shows the user detail. I would know more ways to check the long run transactions. for eg how can we check through backend commands.


 

Cringer

ProgressTalk.com Moderator
Staff member
For #3 you can use ProTop. Or you can use something like this:
Code:
DEFINE TEMP-TABLE tt-Trans NO-UNDO LIKE _Trans
  INDEX idx1 _Trans-Usrnum.
  
DEFINE TEMP-TABLE tt-Connect NO-UNDO LIKE _Connect
  FIELD ServerInfo AS CHARACTER FORMAT "x(50)" LABEL "Server Info"
  INDEX idx1 _Connect-Usr.
    
FOR EACH _Trans WHERE _Trans._Trans-Usr <> ? NO-LOCK,
  FIRST _Connect WHERE _Connect._Connect-Usr = _Trans._Trans-Usrnum NO-LOCK:
    
  FIND FIRST _Servers
    WHERE _Servers._Server-Id = _Connect._Connect-Server
    NO-LOCK NO-ERROR.
    
  CREATE tt-Trans.
  BUFFER-COPY _Trans TO tt-Trans.
  CREATE tt-Connect.
  BUFFER-COPY _Connect TO tt-Connect
    ASSIGN tt-Connect.ServerInfo = IF AVAILABLE _Servers THEN SUBSTITUTE("Server &1 : PID &2 &3 &4/&5",_Servers._Server-Id,_Servers._Server-Pid,_Servers._Server-Type,_Servers._Server-PortNum,_Servers._Server-Protocol) ELSE "".
END.

That will capture all active transactions, and you can use tt-Trans._Trans-Duration as a filter for a "long running" transactions. I have that code running periodically on the server and it then emails an alert group if any transactions go over a threshold.
 

Cringer

ProgressTalk.com Moderator
Staff member
I don't know the definition of the 3 things. I've been doing this for 10 years now and never really needed to know.
As for license count - you can't get that from the database.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
The information you quoted above deals with licensing considerations for these helper processes. I assume you are looking for information on functionality. You should familiarize yourself with the Progress documentation for the release you are using. Start with the Database Essentials manual, then move on to Database Administration. Both talk about the functionality of these processes.

1) What is the difference between APW, AIW and BIW and how its work in progress database ?

These are Progress processes you can run against a database that is online in multi-user mode, provided you have an Enterprise RDBMS license.

The before image writer (BIW) ensures that the transaction notes in full BI buffers are written to the BI file on disk in a timely manner so they can be emptied and made available again to write more notes. You can only run one BIW per database. If you are using an Enterprise license you should always run a BIW. If you don't, writes to the BI file are done by the servers and may be a performance bottleneck for your application.

The after image writer (AIW) performs a similar function for the after image notes. It writes the contents of full AI buffers to the current AI extent so the buffers can be re-used. You can only run one AIW per database. If you are using an Enterprise license and after imaging is enabled in your database, you should always run an AIW. If your database contains important data, i.e. data loss would be a cost to your database, you should always have after imaging enabled.

The asynchronous page writer (APW) performs a few different tasks. From the 10.2B Database Administration manual, page 14-11:
APWs are optional and require an Enterprise database license. APWs are highly recommended
because they improve performance in the following ways:
• They ensure that a supply of empty buffers is available so the database engine does not
have to wait for database buffers to be written to disk.
• They reduce the number of buffers that the engine must examine before writing a modified
database buffer to disk. To keep the most active buffers in memory, the engine writes the
least recently used buffers to disk; the engine must search buffers to determine which one
is least recently used.
• They reduce overhead associated with checkpointing

You can run one or more APWs against a database, and you should always have at least one per database. Follow the information in the manuals to determine whether you may need more than one based on performance metrics from promon.

2) How can me check long run transcations ?
On your database server you can run promon against your database:
Code:
promon dbname
Go into the R&D menu, then 1 (status), 4 (clients), 3 (active transactions). If there are any long-running transactions you will see them here.

3) How can we check user licence in database ?
There are a few different ways I could interpret this question so I'm not sure what you're asking. Do you want to know which product licenses are installed on the database server? How many users are connected to the database? How many users have been connected historically? Please rephrase your question in more detail.
 

acejimmyster

New Member
Hi,
Sorry for breaking in. According to the above comment, I have a question that If I want to enable two APW,BIW or AIW processes. Shall I need to purchase two Enterprise Lisenses?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Hi,
Sorry for breaking in. According to the above comment, I have a question that If I want to enable two APW,BIW or AIW processes. Shall I need to purchase two Enterprise Lisenses?

No, Progress background writer processes are not licensed users. You don't have to pay extra for them. But they are only available if your database license is Enterprise RDBMS, not Workgroup or Personal.

As these processes do use database connections you have to account for them when you are calculating an appropriate value for -n. But understand that this parameter has to do with database connections and is not related to user licensing.
 

TomBascom

Curmudgeon
Yes, but our new poster then goes on to ask again -- so it seemed he did not get the message the first time ;)
 
Top