Beruflich Dokumente
Kultur Dokumente
What are the states of a rollback segment ? What is the difference between
partly available and needs recovery ?
The various states of a rollback segment are :
ONLINE, OFFLINE, PARTLY AVAILABLE, NEEDS RECOVERY and INVALID.
What is Auditing ?
The database has the ability to audit all actions that take place within it.
a) Login attempts, b) Object Accesss, c) Database Action Result of
Greatest(1,NULL) or Least(1,NULL) NULL
If you insert a row in a table, then create another table and then say
Rollback. In this case will the row be inserted ?
Yes. Because Create table is a DDL which commits automatically as soon as it is
executed. The DDL commits the transaction even if the create statement fails
internally (eg table already exists error) and not syntactically.
What is a transaction ?
A transaction is a set of SQL statements between any two COMMIT and
ROLLBACK statements.
What is PL/SQL?
PL/SQL is Oracle's Procedural Language extension to SQL. The language includes
object oriented programming techniques such as encapsulation, function
overloading, information hiding (all but inheritance), and so, brings state-of-the-
art programming to the Oracle database server and a variety of Oracle tools.
Can one use dynamic SQL within PL/SQL? OR Can you use a DDL in a
procedure ? How ?
From PL/SQL V2.1 one can use the DBMS_SQL package to execute dynamic SQL
statements.
Eg: CREATE OR REPLACE PROCEDURE DYNSQL
AS
cur integer;
rc integer;
BEGIN
cur := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cur,'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);
rc := DBMS_SQL.EXECUTE(cur);
DBMS_SQL.CLOSE_CURSOR(cur);
END;