30 July 2010

Parametrized view

Following is an example which shows use of parametrized view:

CREATE OR REPLACE VIEW test_vw AS
SELECT empno,ename,sal
FROM emp
WHERE empno = to_number(userenv('client_info')) ;

In Stored Procedure, will have to call following procedure before executing the View query, as in following example:

exec dbms_application_info.set_client_info(7934);

select * from test_vw ;

And the output is:

EMPNO ENAME SAL
---------- ---------- ----------
7934 MILLER 13040

05 July 2010

Installation Oracle 10g on Slackware 13.1 Linux

The reason for this actions could be an error has been gotten while installing Oracle on Slackware.
Error description: Failure OS verification
Action: create a file - /etc/redhat-release for OS verification and add something like "Red Hat Enterprise Linux AS release 3 (Taroon)".

09 June 2010

Changing the Database Archiving Mode

1)See the current archiving mode of the database.

select log_mode from v$database;

2)Perform clean shutdown of the database.
shutdown immediate or,
shutdown transactional or,
shutdown normal

You cannot change the mode from ARCHIVELOG to NOARCHIVELOG if any datafiles need media recovery.

How to Enable Flashback Database

To enable flashback database the following operations is needed.


1)Configure the Database in archivelog mode.

To change archiving read, Change Archival Mode

2)Configure Flash Recovery Area.
To configure flash recovery area,
Set up Flash Recovery Area

Set Up a Flash Recovery Area for RMAN

Flash recovery area simplifies the ongoing administration of your database by automatically naming recovery-related files, retaining them as long as they are needed for restore and recovery activities, and deleting them when they are no longer needed to restore your database and space is needed for some other backup and recovery-related purpose.


To see up flash recovery follow below steps.

03 June 2010

Quiescing mode of database state

Quiesced state
Aim: perform DBA actions (compile objects, alter tables ...)
Conditions:
Active non-DBA sessions go on until they are becoming inactive. No active sessions are allowed to be active, but they will be hung. When the database is unquiesced, all hung sessions are resumed and blocking actions are processed. Issued command will wait  for active sessions to become inactive.
RAC: Quiesce affects all instances.
Command:
ALTER SYSTEM QUIESCE RESTRICTED;
ALTER SYSTEM UNQUIESCE;
Control:
V$BLOCKING_QUIESCE - view where DBA can check the info about sessions that are blocking.

02 June 2010

English dictations and listening

There were three dictations had done. (http://www.fonetiks.org/dictations/)
Elementary 2,7,10
2. - done
7. - ... date of expiry ...
10. - ... not very tall and a bit plump..., ... blond hair ..., ... blue eyes ...


There was one listening test had done (http://www.esl-lab.com)


easy phone  messages man 00:34

Answering Machine
Score 80%