What is cold backup and hot backup (in case of Oracle)?
[
]
Ø Cold Backup:
It is copying the three sets of files (database files, redo logs, and control file) when the instance is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the instance to guarantee a consistent copy.
If a cold backup is performed, the only option available in the event of data file loss is restoring all the files from the latest backup. All work performed on the database since the last backup is lost.
Ø Hot Backup:
Some sites (such as worldwide airline reservations systems) cannot shut down the database while making a backup copy of the files. The cold backup is not an available option.
So different means of backing up database must be used — the hot backup. Issue a SQL command to indicate to Oracle, on a tablespace-by-tablespace basis, that the files of the tablespace are to backed up. The users can continue to make full use of the files, including making changes to the data. Once the user has indicated that he/she wants to back up the tablespace files, he/she can use the operating system to copy those files to the desired backup destination.
The database must be running in ARCHIVELOG mode for the hot backup option.
If a data loss failure does occur, the lost database files can be restored using the hot backup and the online and offline redo logs created since the backup was done. The database is restored to the most consistent state without any loss of committed transactions.
Choose your rating:
Post Ans. View More Ans.
What are cursors give different types of cursors.
[
]
PL/SQL uses cursors for all database information accesses statements. The language supports the use two types of cursors
Ø Implicit
Ø Explicit
Choose your rating:
Post Ans. View More Ans.
What are stand-alone procedures?
[
]
Procedures that are not part of a package are known as stand-alone because they independently defined. A good example of a stand-alone procedure is one written in a SQL*Forms application. These types of procedures are not available for reference from other Oracle tools. Another limitation of stand-alone procedures is that they are compiled at run time, which slows execution.
Choose your rating:
Post Ans. View More Ans.
What is Authorization and Integrity manager?
[
]
It is the program module, which tests for the satisfaction of integrity constraint and checks the authority of user to access data.
Choose your rating:
Post Ans. View More Ans.
What is File Manager?
[
]
It is a program module, which manages the allocation of space on disk storage and data structure used to represent information stored on a disk.
Choose your rating:
Post Ans. View More Ans.
What is Transaction Manager?
[
]
It is a program module, which ensures that database, remains in a consistent state despite system failures and concurrent transaction execution proceeds without conflicting.
Choose your rating:
Post Ans. View More Ans.
What is Buffer Manager?
[
]
It is a program module, which is responsible for fetching data from disk storage into main memory and deciding what data to be cache in memory.
Choose your rating:
Post Ans. View More Ans.
What is Storage Manager?
[
]
It is a program module that provides the interface between the low-level data stored in database, application programs and queries submitted to the system.
Choose your rating:
Post Ans. View More Ans.
Does PL/SQL support overloading? Explain
[
]
The concept of overloading in PL/SQL relates to the idea that you can define procedures and functions with the same name. PL/SQL does not look only at the referenced name, however, to resolve a procedure or function call. The count and data types of formal parameters are also considered.
PL/SQL also attempts to resolve any procedure or function calls in locally defined packages before looking at globally defined packages or internal functions. To further ensure calling the proper procedure, you can use the dot notation. Prefacing a procedure or function name with the package name fully qualifies any procedure or function reference.
Choose your rating:
Post Ans. View More Ans.
How are exceptions handled in PL/SQL? Give some of the internal exceptions name
[
]
PL/SQL exception handling is a mechanism for dealing with run-time errors encountered during procedure execution. Use of this mechanism enables execution to continue if the error is not severe enough to cause procedure termination.
The exception handler must be defined within a subprogram specification. Errors cause the program to raise an exception with a transfer of control to the exception-handler block. After the exception handler executes, control returns to the block in which the handler was defined. If there are no more executable statements in the block, control returns to the caller.
User-Defined Exceptions
PL/SQL enables the user to define exception handlers in the declarations area of subprogram specifications. User accomplishes this by naming an exception as in the following example:
ot_failure EXCEPTION;
In this case, the exception name is ot_failure. Code associated with this handler is written in the EXCEPTION specification area as follows:
EXCEPTION
when OT_FAILURE then
out_status_code := g_out_status_code;
out_msg := g_out_msg;
The following is an example of a subprogram exception:
EXCEPTION
when NO_DATA_FOUND then
g_out_status_code := ‘FAIL’;
RAISE ot_failure;
Within this exception is the RAISE statement that transfers control back to the ot_failure exception handler. This technique of raising the exception is used to invoke all user-defined exceptions.
System-Defined Exceptions
Exceptions internal to PL/SQL are raised automatically upon error. NO_DATA_FOUND is a system-defined exception. Table below gives a complete list of internal exceptions.
PL/SQL internal exceptions.
<![endif]–>Exception Name
Oracle Error
CURSOR_ALREADY_OPEN
ORA-06511
DUP_VAL_ON_INDEX
ORA-00001
INVALID_CURSOR
ORA-01001
INVALID_NUMBER
ORA-01722
LOGIN_DENIED
ORA-01017
NO_DATA_FOUND
ORA-01403
NOT_LOGGED_ON
ORA-01012
PROGRAM_ERROR
ORA-06501
STORAGE_ERROR
ORA-06500
TIMEOUT_ON_RESOURCE
ORA-00051
TOO_MANY_ROWS
ORA-01422
TRANSACTION_BACKED_OUT
ORA-00061
VALUE_ERROR
ORA-06502
ZERO_DIVIDE
ORA-01476
In addition to this list of exceptions, there is a catch-all exception named OTHERS that traps all errors for which specific error handling has not been established.
Choose your rating:
Post Ans. View More Ans.