Tuesday, June 22, 2010

Oracle Flashback Version Query and Oracle Flashback Transaction Query

Oracle Flashback Version Query and Oracle Flashback Transaction Query
====================================================================
No need to db archive mode , recyclebin on


You are informed that the record empno=7499 is missing from
the scott.EMP table. You need to identify the following:

delete from emp where empno=7499;
commit ;

* The transaction identifier of the transaction that deleted the empno record
* The SQL statements necessary to undo the delete
* The user who executed the transaction

Which would you use?


A. Oracle Flashback Drop only
B. Oracle Flashback Version Query only
C. Oracle Flashback Version Query and Oracle Flashback Transaction Query
D. RMAN REPORT command only

Ans : C

Practical example :
-----------------

1. --SHOW all rows of emp table

select * from emp

2. --Delete one row

delete from emp where empno=7499

3. --commit the change

commit

4.----Oracle Flashback Version Query to find out the identified (history) of the transaction.

SELECT versions_xid, versions_operation
FROM emp
VERSIONS BETWEEN SCN MINVALUE AND MAXVALUE
WHERE empno=7499;


5.---Oracle Flashback Transaction Query to see the all information (audit) as well as undo sql


SELECT XID, COMMIT_TIMESTAMP, LOGON_USER,OPERATION, TABLE_NAME, TABLE_OWNER, UNDO_SQL
FROM FLASHBACK_TRANSACTION_QUERY
WHERE xid=HEXTORAW('09002700CE180000');

Sunday, June 20, 2010

Oracle Database Security Checklist

Oracle Database Security Checklist
==================================
For a production Database, must need to check the following points for
better security.



1. Protecting the database environment.............................................................
2. Install only what is required..........................................................................
3. Lock and expire default user accounts...........................................................
4. Changing default user passwords...................................................................
5. Change passwords for administrative accounts.............................................
6. Change default passwords for all users...........................................................
7. Enforce password management......................................................................
8. Secure batch jobs............................................................................................
9. Manage access to SYSDBA and SYSOPER roles..........................................
10. Enable Oracle data dictionary protection......................................................
11. Follow the principle of least privilege.............................................................
12. Public privileges..............................................................................................
13. Restrict permissions on run-time facilities......................................................
14. Authenticate clients........................................................................................
15. Restrict operating system access.....................................................................
16. Secure the Oracle listener..............................................................................
17. Secure external procedures.............................................................................
18. Prevent runtime changes to listener................................................................
19. Checking network IP addresses......................................................................
20. Harden the operating system.........................................................................
21. Encrypt network traffic..................................................................................
22. Apply all security patches...............................................................................
23. Report security issues to Oracle....................................................................