A backup is a representative copy of data. This copy can include important parts of a database such as the control file, redo logs, and datafiles. A backup protects data from application error and acts as a safeguard against unexpected data loss, by providing a way to restore original data. Backups are divided into physical [...]
Written by admin on November 30th, 2010 with comments disabled.
Read more articles on Oracle Backup and Recovery.
Oracle8i and later has a great feature that stores information on long-running queries currently active in the V$SESSION_LONGOPS view. The following example shows the results of a query against V$SESSION_LONGOPS: SELECT username, sql_text, sofar, totalwork, units FROM v$sql, v$session_longops WHERE sql_address=address AND sql_hash_value=hash_value ORDER BY address, hash_value, child_number HROA select count(*) from winners w1, winners_backup [...]
Written by admin on November 23rd, 2010 with comments disabled.
Read more articles on Oracle Tuning.
An inline view is a statement in the FROM-clause of another SELECT statement. In-line views are commonly used simplify complex queries by removing join operations and condensing several separate queries into a single query. This feature was introduced in Oracle 7.2.An example of inline view is given blow SELECT * FROM (select dept_no, count(*) emp_count [...]
Written by admin on November 8th, 2010 with no comments.
Read more articles on SQL tutorials.
The ROWNUM pseudo column returns the row number of the record. This is a logical number, determined at the time a query is run. As such, a delete or insert can cause a different ROWNUM assignment. Row numbers do not stick to a particular record, so never rely on them as you would a physical [...]
Written by admin on November 4th, 2010 with no comments.
Read more articles on SQL tutorials.
A ROWID is a system-generated unique identifier that is created for every record in the database. This binary value is the address, or location of the data in the system.A ROWID can be physical, as is the case with records in a standard database table.ROWIDs can be logical as well, as is the case with [...]
Written by admin on October 21st, 2010 with no comments.
Read more articles on Oracle PL/SQL.
The primary key of a relational table Primarily identifies each record in the table. It can either be a normal attribute that is guaranteed to be Primary (such as Social Security Number) or it can be generated by the Database Primary keys may consist of a single attribute or multiple attributes in combination. A primary [...]
Written by admin on October 7th, 2010 with no comments.
Read more articles on SQL tutorials.
ADD_MONTHS adds n number of calendar months to date.The date argument can be a datetime value or any value that can be implicitly converted to DATE. The value of n must be an integer and can be negative.ADD_MONTHS return a value of DATE data type Syntax ——– ADD_MONTHS(date, n) Example 1: SELECT ADD_MONTHS (’11-JAN-10′,6) FROM [...]
Written by admin on October 5th, 2010 with no comments.
Read more articles on SQL tutorials.
MONTHS_BETWEEN finds the number of months between two dates, date1 and date2.MONTHS_BETWEEN, returns a numeric value.The result can be positive or negative. If date1 is later than date2, the result is positive; if date1 is earlier than date2, the result is negative. The non integer part of the result represents a portion of the month. [...]
Written by admin on October 4th, 2010 with no comments.
Read more articles on SQL tutorials.
A working Oracle database instance is organized using initialization parameters,which are set in the initialization parameter file. These parameters influence the behavior of the running instance, including influencing performance. In general, a simple initialization file with applicable settings covers most situations, and the initialization file should be the first place you expect to do performance [...]
Written by admin on August 27th, 2010 with no comments.
Read more articles on Oracle PL/SQL and Oracle Tuning.
Just as you can base a record on a table, you can also base a record definition on a cursor.Records that are based on an Oracle cursor draw their structure from the SELECT statement used for the cursor. This type of record has the same number of columns, with the same names and datatypes, as [...]
Written by admin on August 22nd, 2010 with no comments.
Read more articles on Oracle PL/SQL and Records in Oracle.