What are database files, control files and log files. How many of these files should a  database have at least? Why?

1 Answer

Answer :

∙ Database Files
The database files hold the actual data and are typically the largest in size. Depending  on their sizes, the tables (and other objects) for all the user accounts can go in one  database file—but that’s not an ideal situation because it does not make the database  structure very flexible for controlling access to storage for different users, putting the  database on different disk drives, or backing up and restoring just part of the database. You must have at least one database file but usually, more than one files are used. In  terms of accessing and using the data in the tables and other objects, the number (or  location) of the files is immaterial.
The database files are fixed in size and never grow bigger than the size at which they  were created
∙ Control Files
The control files and redo logs support the rest of the architecture. Any database must  have at least one control file, although you typically have more than one to guard  against loss. The control file records the name of the database, the date and time it was  created, the location of the database and redo logs, and the synchronization  information to ensure that all three sets of files are always in step. Every time you add a  new database or redo log file to the database, the information is recorded in the control  files.
∙ Redo Logs

Related questions

Description : You have just had to restore from backup and do not have any control files. How would you go about bringing up this database?

Last Answer : I would create a text based backup control file, stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.

Description : How to implement the multiple control files for an existing database ?

Last Answer : Shutdown the database Copy one of the existing control file to new location Edit Config ora file by adding new control file. name Restart the database.

Description : Which log would you check if a database has a problem?

Last Answer : Alert log

Description : How does one backup archived log files? (for DBA

Last Answer : One can backup archived log files using RMAN or any operating system backup utility. Remember to delete files after backing them up to prevent the archive log directory from filling up. If the ... oracle/arch_backup/log_t%t_s%s_p%p' 5> (archivelog all delete input); 6> release channel dev1; 7> }

Description : What is the purpose of Redo Log files?

Last Answer : Before Oracle changes data in a datafile it writes these changes to the redo log. If something happens to one of the datafiles, a backed up datafile can be restored and the redo, that was written since, replied, which brings the datafile to the state it had before it became unavailable.

Description : What is value of using access control database transaction and firewall log files?

Last Answer : Need answer

Description : Name two files used for network connection to a database.

Last Answer : TNSNAMES.ORA and SQLNET.ORA

Description : Name the three major set of files on disk that compose a database in Oracle

Last Answer : There are three major sets of files on disk that compose a database. All the files are binary. These are ∙ Database files ∙ Control files ∙ Redo logs The most important of these ... actual data resides. The control files and the redo logs support the functioning of the architecture itself.

Description : Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?

Last Answer : It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it affects logical transaction processing.

Description : How do you control number of Datafiles one can have in an Oracle database?

Last Answer : The db_files parameter is a "soft limit " parameter that controls the maximum number of physical OS files that can map to an Oracle instance. The maxdatafiles parameter is a different - "hard limit" ... value is 32. The maximum number of database files can be set with the init parameter db_files.

Description : Table Space,Data Files,Parameter File, Control Files

Last Answer : Table Space :: The table space is useful for storing the data in the database.When a database is created two table spaces are created. a) System Table space :: This data file stores all the tables ... They contain the Db name, name and location of dbs, data files ,redo log files and time stamp.

Description : How would you force a log switch?

Last Answer : ALTER SYSTEM SWITCH LOGFILE;

Description : What is the use of redo log information?

Last Answer : The information in a redo log file is used only to recover the database from a system or media failure prevents database data from being written to a database's data files.

Description : What is the function of redo log?

Last Answer : The primary function of the redo log is to record all changes made to data.

Description : What is a redo log?

Last Answer : The set of redo log files for a database is collectively known as the database redo log.

Description : What is Archived Redo Log ?

Last Answer : Archived Redo Log consists of Redo Log files that have archived before being reused.

Description : What is On-line Redo Log?

Last Answer : The On-line Redo Log is a set of tow or more on-line redo files that record all committed changes made to the database. Whenever a transaction is committed, the corresponding redo entries temporarily ... file by the background process LGWR. The on-line redo log files are used in cyclical fashion.

Description : What is Log Switch ?

Last Answer : The point at which ORACLE ends writing to one online redo log file and begins writing to another is called a log switch.

Description : What is meant by redo log buffer ?

Last Answer : Changes made to entries are written to the on-line redo log files. So that they can be used in roll forward operations during database recoveries. Before writing them into the redo log files ... buffers in SGA and LGWR will write into files frequently. LOG_BUFFER parameter will decide the size.

Description : What is meant by Redo Log file mirroring ? How it can be achieved?

Last Answer : Process of having a copy of redo log files is called mirroring. This can be achieved by creating group of log files together, so that LGWR will automatically writes them to all the members ... . If any one group fails then database automatically switch over to next group. It degrades performance.

Description : What is a SNAPSHOT LOG ?

Last Answer : A snapshot log is a table in the master database that is associated with the master table. ORACLE uses a snapshot log to track the rows that have been updated in the master table. Snapshot logs are used in updating the snapshots based on the master table.

Description : What is snapshot log ?

Last Answer : It is a table that maintains a record of modifications to the master table in a snapshot. It is stored in the same database as master table and is only available for simple snapshots. It should be created before creating snapshots.

Description : When will the data in the snapshot log be used?

Last Answer : We must be able to create a after row trigger on table (i.e., it should be not be already available) After giving table privileges. We cannot specify snapshot log name because oracle uses the ... 23 characters. (The table name created will be MLOGS_tablename, and trigger name will be TLOGS name).

Description : How can we specify the Archived log file name format and destination?

Last Answer : By setting the following values in init.ora file. LOG_ARCHIVE_FORMAT = arch %S/s/T/tarc (%S - Log sequence number and is zero left paded, %s - Log sequence number not padded. %T - Thread number lef ... not padded). The file name created is arch 0001 are if %S is used. LOG_ARCHIVE_DEST = path.

Description : What is a Redo Log ?

Last Answer : The set of Redo Log files YSDATE,UID,USER or USERENV SQL functions,or the pseudo columns LEVEL or ROWNUM.

Description : What is Mirrored on-line Redo Log ?

Last Answer : A mirrored on-line redo log consists of copies of on-line redo log files physically located on separate disks, changes made to one member of the group are made to all members.

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the DB ... locked users account ALTER USER scott PASSWORD EXPIRE; -- Force user to choose a new password

Description : How does one manage Oracle database users? (for DBA

Last Answer : Oracle user accounts can be locked, unlocked, forced to choose new passwords, etc. For example, all accounts except SYS and SYSTEM will be locked after creating an Oracle9iDB database using the ... from SYS.V$BH log buffer spaces Increase LOG_BUFFER parameter or move log files to faster disks

Description : How does one backup a database using the export utility? (for DBA

Last Answer : Oracle exports are "logical" database backups (not physical) as they extract data and logical definitions from the database into a file. Other backup strategies normally back-up the physical data ... exports include more information about the database in the export file than user level exports.

Description : What strategies are available for backing-up an Oracle database? (for DBA

Last Answer : The following methods are valid for backing-up an Oracle database: Export/Import - Exports are "logical" database backups in that they extract logical definitions and data from the database to a file. ... , etc. If your database is in ARCGIVELOG mode, you also need to backup archived log files.

Description : Why and when should I backup my database? (for DBA

Last Answer : Backup and recovery is one of the most important aspects of a DBAs job. If you lose your company's data, you could very well lose your job. Hardware and software can always be ... things that will get you. Most failed recoveries are a result of organizational errors and miscommunications.

Description : What are the roles and user accounts created automatically with the database?

Last Answer : DBA - role Contains all database system privileges. SYS user account - The DBA role will be assigned to this account. All of the base tables and views for the database's dictionary ... administrative information and internal tables and views used by oracle tools are created using this username.

Description : What are the responsibilities of a Database Administrator ?

Last Answer : Installing and upgrading the Oracle Server and application tools. Allocating system storage and planning future storage requirements for the database system. Managing primary database structures ... tape Backing up and restoring the database. Contacting Oracle Corporation for technical support.

Description : How does one create a standby database? (for DBA)

Last Answer : While your production database is running, take an (image copy) backup and restore it on duplicate hardware. Note that an export will not work!!! On your standby database, issue ... the standby database, stop the recovery process and activate it: ALTER DATABASE ACTIVATE STANDBY DATABASE;

Description : When creating a user, what permissions must you grant to allow them to connect to the database?

Last Answer : Grant the CONNECT to the user.

Description : Name a tablespace automatically created when you create a database.

Last Answer : The SYSTEM tablespace.

Description : How would you determine the time zone under which a database was operating?

Last Answer : select DBTIMEZONE from dual;

Description : Where would you look for errors from the database engine?

Last Answer : In the alert log.

Description : What is network database link?

Last Answer : Network database link is created and managed by a network domain service. A network database link can be used when any user of any database in the network specifies a global object name in a SQL statement or object definition.

Description : What is public database link?

Last Answer : Public database link is created for the special user group PUBLIC. A public database link can be used when any user in the associated database specifies a global object name in a SQL statement or object definition.

Description : What is private database link?

Last Answer : Private database link is created on behalf of a specific user. A private database link can be used only when the owner of the link specifies a global object name in a SQL statement or in the definition of the owner's views or procedures.

Description : What are the types of database links?

Last Answer : Private database link, public database link & network database link.

Description : What is Database Link ?

Last Answer : A database link is a named object that describes a "path" from one database to another.

Description : What are the steps involved in Database Shutdown ?

Last Answer : Close the Database, Dismount the Database and Shutdown the Instance.

Description : What are the advantages of operating a database in ARCHIVELOG mode over operating it in NO ARCHIVELOG mode ?

Last Answer : Complete database recovery from disk failure is possible only in ARCHIVELOG mode. Online database backup is possible only in ARCHIVELOG mode.

Description : What are the different modes of mounting a Database with the Parallel Server ?

Last Answer : Exclusive Mode If the first instance that mounts a database does so in exclusive mode, only that Instance can mount the database. Parallel Mode If the first instance that mounts a database is started in parallel mode, other instances that are started in parallel mode can also mount the database.

Description : Can Full Backup be performed when the database is open ?

Last Answer : No.

Description : What are the steps involved in Database Startup ?

Last Answer : Start an instance, Mount the Database and Open the Database. Rolling forward to recover data that has not been recorded in data files, yet has been recorded in the on-line redo ... Resolving any pending distributed transactions undergoing a two- phase commit at the time of the instance failure.

Description : Can you store pictures in database? How?

Last Answer : Yes , in long Raw datatype.

Description : Can U disable database trigger? How?

Last Answer : Yes. With respect to table ALTER TABLE TABLE [[ DISABLE all_trigger ]]