THINGS TO KNOW IN ORACLE 1. Default location for alert logs?

a)Normally it is under $oRACLE HoME/rdbms/logs, OR b)show parameter background dump dest (after login sqlplus / as sysdba). [NOTE: $oRACLE HoME/rdbms7trace for trace files] 2. explain unmount, mount, and open? in nomount-instance is started in mount - database started but datafile inaccessible in open - datafiles put in accessible mode 3.purpose of a pfile/spfile? to allocate system memory to point to control/admin file locations for the database 4. is it possible to change location of admin/control file with database in mount state? it aint possible because changing location requires changing pfile/spfile which have already been used by the time the database gets to MOUNT mode. 5. difference between obsolete and expired backup? EXPIRED: Displays backup sets, proxy copies, and image copies marked in the repository as expired, that is, "not found."To ensure that LIST EXPIRED shows upto-date output, issue a CROSSCHECK command periodically. When you issue a CROSSCHECK command, RMAN searches on disk and tape for the backups and copies recorded in the repository. If it does not find them, then it updates their repository records to status EXPIRED. OBSOLETE: 6. default location for spfile/pfile? $oRACLE HoME/dbs 7. default location for oracle password file? $oRACLE HOME/database 8. how do you-set the oracle database to use a password file? create an oracle password and you are up and running #orapwd file=PWDdb1.ora password=sys entries=6 9. how do you unset the database recovery area? 10. difference between a trace and an alert file? Each server and background process can write to an associated trace file. When an internal error is detected by a process, it dumps information about the error to its trace file. Some of the information written to a trace file is intended for the database administrator, while other information is for Oracle Support Services. Trace file information is also used to tune applications and instances. The alert file, or alert log, is a special trace file. The alert log of a database is a chronological log of messages and errors. 11. what does the alert

13. how do you start and stop a listener? Lsnr ctl [start, stop, status] 14.what are the key oracle file?

tnsnames, sqlnet, listener IS.Difference between sqlnet, tnsnames and listener? tnsnames > list of database connection info for client/server, This is a text file contains the information about the oracle databases.For each database, it must contains the db server name, db listener port number, and instance name. sqlnet > communication parameter setup listener> list of databases to listen for on the machine l6.How do i see the pl/sql procedure output? SET SERVERoUTPUT ON; do i execute a SQL file? @fHename. sql IS. how to see who is currently connected? SELECT username, program FROM v$session WHERE username IS NOT NULL; do i recompile invalid objects? @?/rdbms/admin/utlrp.sql do i tell which database am in? SELECT name from v$database; OR SELECT instance name, host name from v$instance; 21. how do u export and lmport in oracle? > make sure you run the script $oRACLE HoME/rdbms/admin/catexp.sql >import and export use IMP/EXP utilities which are both located in $oRACLE HOME/bin directory >-c:\>EXP HELP=Y > c:\>EXP USERID=scott/tiger oWNER=scott FILE=scott.dmp > c:\>IMP USERID=scott/tiger FILE=scott.dmp FULL=Y (which moves the dmp fHe) to add different service to one oracle default listener? Just edit the SID_LIST ie; 23.default location of tnsnames, sqlnet and listener? $oRACLE HoME\network\admin 24.Steps to moving admin and controlfiles? ***************MoVING A CoNTRRoLFILE -shutdown database -copy controlfile to new location -edit pfile/spfile pointing to new controlfile location -restart instance ***************MoVING ADMIN FILES -you can do the same as for controlfile -Use the ALTER SYSTEM command [ALTER SYSTEM set background dump dest=" SCoPE='spfile'] 2S.steps to partial movement of log/data-files by renaming them? ******************** -shutdown the database -copy logfiles to the desired new location -start the database in mount mode -issue the ALTER DATABASE RENAME FILE" TO ". -Open the database -put particular tablespace offline [alter tabl -use OS to move files to new location ~ -rename fHes [alter tablespace INDS rename.. • D~/'S' -put tablespace back online [alter tablespace ~ onni'\Sl.:? 26. steps to fun movement of log/data fHes by co .1"l-1le ******************* -backup the controlfile to trace and edit it • location





U ;z,.

-shutdown the database 27.steps to manually create an oracle database? -create directories -create pfile -startup nomount using pfile -run create database script -execute the catproc and catalog scripts -alter database put it in mount and open mode 28.steps to restore rman backup to a different node? -define the directories for the files -connect to NODE 1 using rman and backup database to an accessible location -Move the following files to the NODE 2 (+The database backup pieces, +Controlfile backup piece,+The parameter file i.e init.ora file) -Edit the PFILE on NODE 2 to change the environment specific parameters like. (user dump dest=,background dump dest=,control files=) -Once the-PFILE is suitably modIfied invoke Rman on the NODE 2 after setting the Oracle environment variables and start the database in nomount mode: -Restore the controlfile from the backup piece. -Mount the database. RMAN> alter database mount; -Now catalog the backup pieces that were shipped from NODE 1. RMAN> catalog backuppiece '/home/oracle/test/backup/o1 mf annnn TAG20070213T002925 2x21m6ty .bkp'; -Get to know the last sequence available in the archivelog backup-using the following command. RMAN > list backup of archivelog all; -Rename the Redologfiles,so that they can be created in new locations when opened the database is opened in resetlogs. SQL> alter database rename file '/u01/oracle/product/oradata/ora10g/log/redo01.log' to '/home/oracle/test/log/redo01.log'; . -execute script to restore datafiles to new node and recover RMAN> run { set until sequence <seq no> set newname for datafile-1 to '/home/oracle/test/data/sys01.dbf' ; set newname for datafile 2 to '/home/oracle/test/data/undotbs01.dbf' ; set newname for datafile 3 to '/home/oracle/test/data/sysaux01.dbf' ; set newname for datafile 4 to '/home/oracle/test/data/users01.dbf' ; set newname for datafile 5 to '/home/oracle/test/data/1.dbf'; set newname for datafile 6 to '/home/oracle/test/data/sysaux02.dbf' ; set newname for datafile 7 to '/home/oracle/test/data/undotbs02.dbf' ; restore database; switch datafile all; recover database; alter database open resetlogs; } 29.steps to creating and running rman backup scri 30.steps to manual database cloning with control -create directories for the database you are -create init file for the clone with point

desired controlfile -backup controlfile of database to clone, edit the backed up controlfile into a script pointing to the location of new datafiles and 10gfiles. -shutdown database to clone and move the datafiles and redolog files to their desired new location -startup the instance using a created pfile that points to the location of the controlfiles for the clone but startup should be in NOMOUNT mode. -Now execute the controlfile script to create the controlfiles. -open database with a RESETLOGS to avoid errors that may arise as a result of SCN number difference/change. 31.steps to manual database cloning without controlfile recreation? 32.difference between cloned and duplicate database? 33.steps to connect to rman using the catalog/auxilliary? 34.steps to recreating a lost controlfile? 35.why do we use a resetlog option when recreating a controlfile? 36.steps to manually upgrade a database? -connect to database to be upgraded as sysdba -Analyse the database to be upgraded [by executing the script /rdbms/utlulO.sql which is located in oracle home for new version --sript is executed from the old environment, execute a sql>spool info.log, execute the script utlululO.sql, turn off spool sql>spool off, read the info.log for information about the database and what needs to be upgraded] -Backup the database to be upgraded while in old environment [sign on to RMAN: rman "target / nocatalog", issue backup command:RUN

ALLOCATE CHANNEL chan name TYPE DISK; BACKUP DATABASE FORMAT @some backup directory%U@ TAG before upgrade; BACKUP CURRENT CONTROLFILE TO @save-controlfile 10cation@; }]

-shutdown instances -copy configuration files [spfile, password file] from old environment to your new home and then edit the pfiles accordingly] -make sure Oracle services are stopped -set your environment variables to the new release ie [oracle_home, path, oracle base,Ld library path and oracle sid] ~start sqlplus connecting with SYSDBA in your new release environment -startup upgrade with pfile [sql>startup upgrade pfile=' '] -create the SYSAUX tablespace - dont forget to specify [CREATE TABLESPACE sysaux DATAFILE '/uOl/oradata/sysauxOl.dbf' SIZE 700M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;] 'cause if extent management and segment space management are not set, sysaux tablespace cannot be created. -spool upgrade log [sql>spool upgrade. log] -Run the upgrade script[sql>@catupgrd.sql (this determines which upgrade scripts need to be run and then runs eac necessary script, according to your old release, this creates and upgrades data dictionary tables) -Put spool off -Run [sql>@utlulOls.sql TEXT], this specifies . ~~ components in the upgraded database. ~~ ~~ -shutdown and restart the instance -run [sql>@utlrp.sql], this recompiles any rema ~~tored PL/SQL and jJ~ code and also recompiles any invalid obj ects. .Ji!:~R:EGISTERED %: -YOUR DATABASE IS NOW UPGRADED. ~ I,



***************In case you need recovery -sign on to RMAN [rman "target / nocatalog"] -issue the recovery command


STARTUP NoMoUNT RUN { REPLICATE CoNTRoLFILE FROM @save_controlfile_location@; ALTER DATABASE MOUNT; RESTORE DATABASE FROM TAG before_upgrade ALTER DATABASE OPEN RESETLoGS; } ************************************************* 37.explain steps for database backup and recovery using the O.S? 38.explain steps for database backup and recovery using RMAN? 39.what do u do incase of a mssing lib in oracle? copy it to the directory where it's required and then execute [RELINK] $oRACLE HoME/bin/relink all OR bln# ./relink all 40.Explain differences between a hot backup and a cold/closed backup and the benefits of each? A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any point in time. The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process. In addition, since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk. 41.You have just had to restore from backup and do not have any control files. How would you go about bringing up this database? 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. 42.what is an oracle instance? 43.Describe what redo logs are & their advantage? Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database. 44.what are the background processes in oracle? 44.why set db block size to 8192? 8192 size is the default size but not the most recommended, because it has to be bigger when it comes to dataware houses. 45. what are the default ports? for oracle net listener and em repository port:1521/1526 [commonly used listener ports: 1522-1540] for em: oracle names server:1575 oracle connection manager:1630 http server listen port:80 EM Agent port:1831 EM reporting port:3339 iSQL plus: 5560/5580 do you start? em > emctl start dbconsole isqlplus>isqlplus ctl [start/stop] 47.what is the difference between NoMoUNT, MOUNT

IN NOMOUNT> instant starts but doesnt utilise the controlfile yet IN MOUNT>control file is in use but datafiles are not open IN OPEN>datafiles can be accessed 48.What@s the benefit of @dbms stats@ over @analyze@? 49.41. How would you configure-your networking files to connect to a database by the name of DSS which resides in domain 50.Explain the concept of the DUAL table? A single row table provided by oracle for selecting values and expressions. 51.What are the ways tablespaces can be managed and how do they differ? 52. From the database level, how can you tell under which time zone a database is operating? select DBTIMEZONE from dual; 53.How do you recover a datafile that has not been physically been backed up since its creation and has been deleted. Provide syntax example? 54.You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces? 55.Typically, where is the conventional directory structure chosen for Oracle binaries to reside? 56.Explain undo retention? 57.How does Oracle guarantee data integrity of data changes? 58.Which environment variables are absolutely critical in order to run the OUI? 59.Explain how you would restore a database using RMAN to Point in Time? 60.Database crashes. Corruption is found scattered among the file system neither of your doing nor of Oracle@s. What database recovery options are available? Database is in archive log mode? 61.What query tells you how much space a tables pace named @test@ is taking up, and how much space is remaining? SQL>select sum(bytes/(1024*1024)) mb from dba_free_space where tablespace name='TEST' 62.Which dIctionary tables and/or views would you look at to diagnose a locking issue? 63.What is theh difference between an spfile and a pfile? 63.would an oracle instance start incase you lost the controlfile? Yes it would but database wouldnt open because controlfile points to location of the physical files. 64.Explain the use of setting GLOBAL NAMES equal to TRUE. Setting GLOBAL NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking. 65. What command would you use to encrypt a PL/SQL application? WRAP 66.Explain the difference between a FUNCTION, PROCEDURE and PACKAGE. A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application, a function will return a single value. A package on the other hand is a collection of func ns. d procedures that are grouped together based on their function or application. E.~ED 67.Name three advisory statistics you can collect. ,~~ ~~ Buffer Cache Advice, Segment Level Statistics, • )~tatistics ~~ 68.Where in the Oracle directory tree structure are a • :~~ aces placed by ~ default? ~ ~ In unix $ORACLE_HOME/rdbms/audit, in Windows ~e~,E[~]rf:flf:l) 69.Explain materialized views and how they are us \ff:fl~/()~ Materialized views are objects that are reduced se summarized, grouped, or aggregated from base tab,

data warehouse or decision support systems. 70.When a user process fails, what background process cleans up after it? PMON 7I.What background process refreshes materialized views? The Job Queue Processes. 72.How would you determine what sessions are connected and what resources they are waiting for? Use of V$SESSION and V$SESSION WAIT 73.How would you force a log switch? ALTER SYSTEM SWITCH LOGFILE; 74.Give two methods you could use to determine what DDL changes have been made. You could use Logminer or Streams 7S.Explain steps in configuring your database for auditing? 76.What does coalescing a tablespace do? Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents into large single extents. 77.Name a tablespace automatically created when you create a database. The SYSTEM tablespace. 78.What is the difference between a TEMPORARY tablespace and a PERMANENT tables pace? A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database. 79.How do you add a data file to a tablespace? ALTER TABLESPACE ADD DATAFILE SIZE 80.How do you resize a data file? ALTER DATABASE DATAFILE RESIZE; 8I.What view would you use to look at the size of a data file? DBA DATA FILES 82.What view would you use to determine free space in a tablespace? DBA FREE SPACE 83.How would you determine who has added a row to a table? Turn on fine grain auditing for the table. 84. Explain steps to setting a database for fine grain 8S.How can you rebuild an index? ALTER INDEX REBUILD; 86.Explain what partitioning is and what Partitioning is a method of taking large into smaller, more manageable pieces. 87.You have just compiled a PL/SQL package but go errors? SHOW ERRORS

88.How can you gather statistics on a table? The ANALYZE command. 89.How can you enable a trace for a session? Use the DBMS_SESSIoN.SET_SQL_TRACE or

Use ALTER SESSION SET SQL TRACE = TRUE; 90.What is the difference-between the SQL*Loader and IMPORT utilities? These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formatted or delimited files. 91.Name two files used for network connection to a database. TNSNAMES.oRA and SQLNET.oRA Technical UNIX 92.Why is a Where clause faster than a group filter or a format trigger? Because, in a where clause the condition is applied during data retrieval than after retrieving the data. 93.What is the difference between TRUNCATE and DELETE? The delete command will log the data changes in the log file where as the truncate will simply remove the data without it. Hence data removed by DELETE command can be rolled back but not the data removed by TRUNCATE. Truncate is a DDL statement whereas DELETE is a DML statement. 94. What is user Account in Oracle database? A user account is not a physical structure in database but it is having important relationship to the objects in the database and will be having certain privileges. 95. How will you enforce security using stored procedures? Don@t grant user access directly to tables within the application. Instead grant the ability to access the procedures that access the tables. When procedure executed it will execute the privilege of procedures owner. Users cannot access tables except via the procedure. 96. What are the dictionary tables used to monitor a database space? DBA FREE SPACE DBA SEGMENTS DBA DATA FILES. 97. What is oCI. What are its uses? oCI is Oracle Call Interface. When applications de powerful interface to the Oracle Database Server, Interface(oCI). oCI provides the most comprehensi Database functionality. The newest performance, appear first in the oCI API. If you write applicat • you likely already depend on oCI. Some types of

ar (PL/SQL apps executing SQL, c++ apps using oCCI, Java Apps using oCI-based JDBC driver, CApps using oDBC driver, Pro*C apps, distributed SQL, VB apps using oLEDB driver) 98. What is Multi Node System? Multi node system in oracle Applications IIi means you have Applications IIi component on more than one system. Typical example is database, concurrent Manager on one machine and forms, webserver on second machine is example of two node system. 99.What is a pseudo column. Give examples? information such as row numbers and row descriptions ae automatically stored by oracle and is directly accessible i.e not through tables. This information is contained within pseudo columns. These pseudo columns can be retrieved in queries. These pseudo columns can be included in queries within select data from tables. [A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values.] Availables pseudo columns are RoWNUM - order number in which a row values is retrieved RoWID-physical row(memory or disk address) location i.e the unique row identification, SYSDATE-system or today's date, UID - user identification number indicating the current user, USER - name of current logged in user. 100. What is TWO TASK in oracle Database? TWO TASK mocks your tns alias which you are going to use to connect to database. Lets assume you ave database client with tns alias defined as PROD to connect to database PROD on machine listening on port 1S21. The usual way to connect is sqlplus username/passwd@PRoD; now if you dont want to use @PRoD then you set TWO TASK=PRoD and then can simply use sqlplus username/passwd then sql will check that it has to connect to tnsalias define by value PROD i.e TWO TASK. 101. What is the difference between unique and primary key? A unique key can have null whereas primary key is always not null. both bear unique names. 102.It is possible to use raw devices as data files and what is the advantages over file. system files? Yes. The advantages over file system files. I/O will be improved because Oracle is bye-passing the kernnel which writing into disk. Disk Corruption will be very less. 103.What are disadvantages of having raw devices? We should depend on export/import utility for backup/recovery (fully reliable) The tar command cannot be used for physical file backup, instead we can use dd command which is less flexible and has limited recoveries. 104.What is the use of INCTYPE option in EXP command? Type export should be performed COMPLETE ,CUMULATIVE ,INCREMENTAL. List the sequence of events when a large transaction that exceeds beyond its optimal value when an entry wraps and causes the rollback segment toexpand into anotion Completes. e. will be written. lOS.What is the use of FILE option in IMP command? The name of the file from which import should be perfo 106.What is a Shared SQL pool? The data dictionary cache is stored in an area in This will allow sharing of parsed SQL statements a rrent users. 107.List the Optional Flexible Architecture (oFA) we organize the tablespaces in Oracle database to SYSTEM - Data dictionary tables. DATA - Standard operational tables. VERSION DATA2- Static tables used for standard operatio INDEXES - Indexes for Standard operational tabl


INDEXESI - Indexes of static tables used for standard operations. TOOLS - Tools table. TooLSl - Indexes for tools table. RBS - Standard Operations Rollback Segments, RBSl,RBS2 - Additional/Special Rollback segments. TEMP - Temporary purpose tablespace TEMP USER - Temporary tablespace for users. USERS - User tablespace. IDS.How to implement the mUltiple control files for an existing database? 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. 109.What is advantage of having disk shadowing/ Mirroring? Shadow set of disks save as a backup in the event of disk failure. In most Operating System if any disk failure occurs it automatically switchover to place of failed disk. Improved performance because most OS support volume shadowing can direct file I/O request to use the shadow set of files instead of the main set of files. This reduces I/O load on the main set of disks. 110.How will you force database to use particular rollback segment? SET TRANSACTION USE ROLLBACK SEGMENT rbs name. 111.Why query fails sometimes? Rollback segment dynamically extent to handle larger transactions entry loads. A single transaction may wipeout all available free space in the Rollback Segment Tablespace. This prevents other user using Rollback segments. l12.What is the use of RECORD LENGTH option in EXP command? Record length in bytes. l13.How will you monitor rollback segment status? Querying the DBA ROLLBACK SEGS view IN USE - Rollback Segment-is on-line. AVAILABLE - Rollback Segment available but not on-line. OFF-LINE - Rollback Segment off-line INVALID - Rollback Segment Dropped. NEEDS RECOVERY - Contains data but need recovery or corupted. PARTLY AVAILABLE - Contains data from an unresolved transaction involving a distributed database. l14.What is meant by Redo Log file mirroring? How it can be achieved? 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 of the current on-line redo log group. If anyone group fails then database automatically switch over to next group. It degrades performance. llS.Which parameter in Storage clause will reduce no. of rows per block? PCTFREE parameter Row size also reduces no of rows per block. l16.What is meant by recursive hints? Number of times processes repeatedly query the dictionary table is called recursive hints. It is due to the data dictionary cache is too small. By increasing the SHARED POOL SIZE parameter we can optimize the siz f Dictionary Cache. l17.What is the use of PARFILE option in EXP command ~E.~E:D Name of the parameter file to be passed for export. \.c, \ V~ llS.What is the difference between locks, latches, e • ~~d semaphores? ~~~

DBA) G'I A latch is an internal Oracle mechanism used to pro - ~ ,t:,~~~~~t&~S~ from simultaneous access. Atomic hardware inst ructrs ;ikeIY~bMil-l;fli:~~d;,f to implement latches. Latches are more restrictiv a' locks j~.1~t~t~~aire ~ always exclusive. Latches are never queued, but spin or s~~~y obtain a resource, or time out. Enqueues and locks are different names for the s

and concurrency. They are queued and serviced in a first-in-first-out (FIFO) order. Semaphores are an operating system facility used to control waiting. Semaphores are controlled by the following Unix parameters: semmni, semmns and semmsl. Typical settings are: semmns = sum of the "processes" parameter for each instance (see init<instance>.ora for each instance) semmni = number of instances running simultaneously; semmsl = semmns 119.What is a logical backup? Logical backup involves reading a set of database records and writing them into a file. Export utility is used for taking backup and Import utility is used to recover from backup. 120.What is a Rollback segment entry? It is the set of before image data blocks that contain rows that are modified by a transaction. Each Rollback Segment entry must be completed within one rollback segment. A single rollback segment can have mUltiple rollback segment entries. 121.What database events can be set? (for DBA) The following events are frequently used by DBAs and Oracle Support to diagnose problems: " 10046 trace name context forever, level 4 Trace SQL statements and show bind variables in trace output. " 10046 trace name context forever, level 8 This shows wait events in the SQL trace files " 10046 trace name context forever, level 12 This shows both bind variable names and wait events in the SQL trace files " 1401 trace name errorstack, level 12 1401 trace name errorstack, level 4 1401 trace name processstate Dumps out trace information if an ORA-1401 "inserted value too large for column" error occurs. The 1401 can be replaced by any other Oracle Server error code that you want to trace. " 60 trace name errorstack level 10 Show where in the code Oracle gets a deadlock (ORA-60), and may help to diagnose the problem. The following lists of events are examples only. They might be version specific, so please call Oracle before using them: " 10210 trace name context forever, level 10 10211 trace name context forever, level 10 10231 trace name context forever, level 10 These events prevent database block corruptions " 10049 trace name context forever, level 2 Memory protect cursor 10210 trace name context forever, level 2 Data block check 10211 trace name context forever, level 2 Index block check 10235 trace name context forever, level 1 Memory heap check 10262 trace name context forever, level 300 Allow 300 bytes memory leak for connections Note: You can use the Unix oerr command to get the description of an event. On Unix, you can type "oerr ora 10053" from the command prompt to get event details. 122.What are the different kind of export backups? Full back - Complete database Incremental - Only affected tables from last incremental Cumulative backup - Only affected table from the last cu, date. 123.How does Space allocation table place within Each block contains entries as follows Fixed block header Variable block header Row Header,row date (multiple rows may exists) PCTEREE (% of free space for row updation in fut 124.What are the factors causing the reparsing of Due to insufficient Shared SQL pool size. Monito

place while executing SQL statements. If the ratio is greater than 1 then increase the SHARED_POOL_SIZE. LOGICAL & PHYSICAL ARCHITECTURE OF DATWhat is dictionary cache ? Dictionary cache is information about the databse objects stored in a data dictionary table. ABASE. 125.What is dictionary cache? Dictionary cache is information about the databse objects stored in a data dictionary table. 126.What is Database Buffers? Database buffers are cache in the SGA used to hold the data blocks that are read from the data segments in the database such as tables, indexes and clusters DB BLOCK BUFFERS parameter in INIT.ORA decides the size. 127.What-is a Control file? Database overall physical architecture is maintained in a file called control file. It will be used to maintain internal consistency and guide recovery operations. Multiple copies of control files are advisable. 128.How will you create mUltiple rollback segments in a database? Create a database which implicitly creates a SYSTEM Rollback Segment in a SYSTEM tablespace. Create a Second Rollback Segment name RO in the SYSTEM tablespace. Make new rollback segment available (After shutdown, modify init.ora file and Start database) Create other tables paces (RBS) for rollback segments. Deactivate Rollback Segment RO and activate the newly created rollback segments. 130.What is cold backup? What are the elements of it? Cold backup is taking backup of all physical files after normal shutdown of database. We need to take. An Data files. All Control files. All on-line redo log files. The init.ora file (Optional) 131.What is meant by redo log buffer? 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, they will first brought to redo log buffers in SGA and LGWR will write into files frequently. LOG_BUFFER parameter will decide the size. 132.How will you monitor the space allocation? By querying DBA SEGMENT table/view. 133.What is meant by free extent? A free extent is a collection of continuous free blocks in tablespace. When a segment is dropped its extents are reallocated and are marked as free. 134.What are the different methods of backing up oracle database? - Logical Backups - Cold Backups - Hot Backups (Archive log) 135.The database instance crashed because of power failure. The database files are not affected by the crash. Which files will be used for the instance recovery at the next database instance startup? (Choose all that apply) Data files Control file E.~ED Redo log files . c,\ V~ 136.The database instance is started using SPFILE an ~~~iDase is in MOU~G() state. Which two operations can you perform in the MO ' ate of the databas~rG'l (Choose two) ~ REGISTERED ~ Renaming the data files ~ I, Configuring the database in the ARCHIVELOG AND NEVER NEVER Creating new tables pace , Adding atabase u\lf:RS/()~ 137.Which two statements are true about the Flas


The restoration of files is not required for accomplishing the recovery. The unsolicited or wrongly committed transactions can be recovered. AND NEVER NEVER The accidental loss of schema can be recovered, The accidental loss of tablespace can be recovered. 138. Which statement is true for the database configured in the ARCHIVELOG mode? You can take backup of the database without shutting down the database. AND NEVER NEVER Archiving information is written to the data files and redo log files, Flash recovery area must be used to store the archived redo log files,The online redo log files must be multiplexed before putting the database in the ARCHIVELOG mode. 139.The abnormal termination of the database background process causes the database instance to shut down without synchronizing the database files. Arrange the steps required for instance recovery? i) SMON applies redo to the database ii) The database opens iii)Uncommitted transactions are rolled back by SMON NB:Perform recovery manually AND SMON reads the archived redo log files and online redo log files are not required. 140.The database is running and users are connected to the database instance using the LSNR1 listener. You observe that LSNR1 has stopped. Which two statements are true in this situation? (Choose all that apply) -New connections are not allowed and -The connected sessions are not affected 141.UNDO RETENTION is set to 900 in your database, but undo retention guarantee is not enabled. Which statement is true in this scenario? Undo data is overwritten if no space is available for the new undo data AND NEVER NEVER Undo data is retained even if no space is available and new undo generated is stored in the temporary tablespace, Undo data becomes obsolete if a long-running transaction takes more time than that specified by UNDO RETENTION, All undo data is purged if no space is available to accommodate new undo generated 142.What is a 2 Phase Commit? Two Phase commit is used in distributed data base systems. This is useful to maintain the integrity of the database so that all the users see the same values. It contains DML statements or Remote Procedural calls that reference a remote object. There are basically 2 phases in a 2 phase commit. a) Prepare Phase: Global coordinator asks participants to prepare b) Commit Phase: Commit all participants to coordinator to Prepared, Read only or abort Reply 143.What are mutating tables? When a table is in state of transition it is said to be mutating. eg : If a row has been deleted then the table is said to be mutating and no operations can be done on the table except select. 144.Can U disable database trigger? How? Yes. With respect to table ALTER TABLE TABLE [[ DISABLE all trigger 11 14S.How many columns can table have? The number of columns in a table can range from 146.Is space acquired in blocks or extents? In extents . 147.What are attributes of cursor? %FOUND , %NOTFOUND , %ISOPEN,%ROWCOUNT 148.What are the various types of Exceptions? User defined and Predefined Exceptions. 149.Can we define exceptions twice in same block 7 No. ISO.Can you have two functions with the same name Yes.

151.Can you have two stored functions with the same name? Yes. 152.What are the various types of parameter modes in a procedure? IN, OUT AND INoUT. 153.What is Over loading and what are its restrictions? Overloading means an object performing different functions depending upon the no. of parameters or the data type of the parameters passed to it. 154.Can functions be overloaded? Yes. 155.Can two functions have same name & input parameters but differ only by return data type No. 156.What are the constructs of a procedure, function or a package? The constructs of a procedure, function or a package are: variables and constants cursors exceptions 157.Why Create or Replace and not Drop and recreate procedures? So that Grants are not dropped. 158.Can you pass parameters in packages? How? Yes. You can pass parameters to procedures or functions in a package. 159.What are the parts of a database trigger? The parts of a trigger are: A triggering event or statement A trigger restriction A t rigger action 160.What are the various types of database triggers? There are 12 types of triggers, they are combination of Insert, Delete and Update Triggers. Before and After Triggers. Rowand Statement Triggers. (3*2*2=12) 161.What is the advantage of a stored procedure over a database trigger? We have control over the firing of a stored procedure but we have no control over the firing of a trigger. 162.What is the maximum no. of statements that can be specified in a trigger statement? One. 163.Can views be specified in a trigger statement? No 164.What are the values of :new and :old in Insert/Delete/Update Triggers? INSERT new new value, old = NUll DELETE : new = NUll, old = old value UPDATE : new = new value, old = old value 165.What are cascading triggers? What is the maximum no of cascading triggers at a time? When a statement in a trigger body causes another trigger triggers are said to be cascading. Max = 32. 166.What are mutating triggers? A trigger giving a SELECT on the table on which the t 167.Describe Oracle database's physical and logical Physical: Data files, Redo log files, Control file. logical: Tables, Views, Tablespaces, etc. 168.Can you increase the size of a tablespace ? Yes, by adding datafiles to it. 169.What are constraining triggers? A trigger giving an Insert/Updat e on a table h constraint on the triggering table.

170.What is the use of Control files? Contains pointers to locations of various data files, redo log files, etc. 171.What is the use of Data Dictionary? Used by Oracle to store information about various physical and logical Oracle structures e.g. Tables, Tablespaces, datafiles, et 172.What are the disadvantages of clusters? The time for Insert increases. 173.What are the advantages of clusters? Access time reduced for joins. 174.What are the min. extents allocated to a rollback extent? Two 17S.An insert statement followed by a create table statement followed by rollback? Will the rows be inserted? No. 176.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. 177.What is the significance of the & and && operators in PL SQL ? The & operator means that the PL SQL block requires user input for a variable. The && operator means that the value of this variable should be the same as inputted by the user previously for this same variable. If a transaction is very large, and the rollback segment is not able to hold the rollback information, then will the transaction span across different rollback segments or will it terminate? It will terminate (Please check). 178.Can you pass a parameter to a cursor? Explicit cursors can take parameters, as the example below shows. A cursor parameter can appear in a query wherever a constant can appear. CURSOR c1 (median IN NUMBER) IS SELECT job, ename FROM emp WHERE sal> median; 179.What are the various types of RollBack Segments? Public Available to all instances Private Available to specific instance 180.Can you use %RowCount as a parameter to a cursor? Yes 181.What is Optimal Flexible Architecture? A directory structure. It is a standard or a set of configuration guidelines created to ensure fast and reliable oracle databases that require little maintenance. The main purposes thereof are -organising large amounts of complicated software and data on disk to prevent hardware bottlenecks and poor performance, facilitating routine administrative tasks that are highly vvulnerable to data corruption, facilitating switching between databases, managing the database growth, avoiding fragmentation of free space in the data dictionary, minimizing resource contention. In short oracle has designed the OFA as a file system directory structure that helps in maintaining mUltiple versions of mUltiple oracle products. 182. Which other protocols can oracle Net in 11g use? In release 11g Oracle's network support is limite socket,the newer Sockets Direct Protocol SDP and 183.Explain is ORACLE NET Oracle Net is a software component that enab oracle networks. It can also be defined as a su provide enterprise-wide connectivity solutions computing environments. Oracle Net Services con -Oracle Net, Listener, Oracle Connection Assistant, Oracle Net Manager. 184. Explain DBUA?

Database Upgrade Assistant is a GUI tool used to upgrade an existing database. Oracle recommends using DBUA while upgrading a database and DBCA while creating a database. 185. Explain DBCA? Database Configuration Assistant is a GUI-based oracle tool, which can run as part of OUI or as a standalone application and is used to create, configure, manage and delete a database. DBCA runs during database installation when the create a database option is selected. The DBCA utility is able to examine database settings. It is also optionally used to export the current data of a database. DBCA stores templates in a file with a .dbc extension, variables such as ORACLE BASE and DB NAME allow DBCA to install files into an appropriate directory for an-oracle installation. While exporting data from the database, DBCA creates a zip file having extension .dfj, which consists of raw images of each data file. These images are automatically written directly to disk instead of using SQL statements. Therefore, it is appropriate to use .dfj files for database creation, and not as a backup. 186. Explain OEM? Oracle Enterprise Manager is a graphical system management tool that is used to manage components of Oracle and administer databases. OEM comprises a graphical console, management server, Oracle Intelligent Agent, repository database, and tools to provide an intergrated and comprehensive system management platform for managing oracle products. Tools intergrated with OEM can be used to examine the performance of an Oracle database and tune the database accordingly. 187.Scenario: you work as a DBA for Infotech Inc. The company used Oracle as its database. You have opened the database to perform update. Which files if lost can cause the database to crash? Datafile from the SYSTEM tablespace and controlfile. Remember - if any of the control files and a datafile from the SYSTEM tablespace is missing, the instance will immediately abort reason being that these files are responsible for a database to remain in the MOUNT mode. AND NEVER NEVER archivelog file or datafile from SYSAUX reason being the instance can take the datafile from the SYSAUX tables pace offline automatically, and therefore is capable to remain open even if it is lost. and also if anything happened to an archived log file, it cannot have any effect on the instance. 188.Why do you have to open the database with RESETLOGS after recreating a controlfile? 189.which views are available in NOMOUNT mode? It's the V$INSTANCE and V$SESSION AND NEVER NEVER and view prefixed with DBA are the data dictionary views which are only seen in OPEN mode and also YOU CAN NEVER find V$DATABASE and V$DATAFILE because V$ views are dynamic views that are populated from the control file and therefore are only available in mount mode or Open mode 190.Explain parameters? USER DUMP DEST- an init parameter that specifies the destination in which the use processes inclusinve of background and foreground processes will write trace files. BACKGROUND DUMP DEST - specifies location for trace fi processes to be written and also location for the alert.log DB CREATE FILE DEST- parameter to specify the def managed datafiles with properties [parameter type:st syntax:DB_CREATE_FILE_DEST=directorYldisk group, d Modifiable:ALTER SESSION, ALTER SYSTEM], if DB CRE parameter lS not speclfled then DB CREATE FILElocation for oracle managed control files-and 0 REMEMBER: there is no such parameter as ba 191. Give types of segments? Table, Data dictionary,index, cluster 192.Explain the concept of segments, datablock,

SEGMENT: is a set of extents allocated for a specific database object such as mentioned above, each time a database object is created, oracle allocates a segment to it, this segment contains atleast one extent that intun contains atleast one block. A single segment holds all the data of the corresponding database object. A segment can belong to only one tablespace, but can be associated to mUltiple datafiles. Extents allocated to a segment can belong to mUltiple datafiles but datablocks allocated to an extent can belong to only one datafile. 193.which command is used to exit from the Listener command utility without saving changes to the listener.ora file? The QUIT command 194.Explain the Listener utility? The LSNRCTL utility enables a database administrator to manage one or more listeners. It cannot be used to create or configure listeners. It only proides commands to control various listener functions listener functions such as starting, stopping and getting status of listeners plus also changing parameter settings in the listener.ora file START-starts a listener STOP-stops a listener STATUS-sees status of a listener SERVICES-checks services offered by the listener VERSION-shows version of a listener RELOAD-forces a listener to re-read its entry in listener.ora file SAVE CONFIG-used to write any changes made online to the listener TRACE-enables tracing of a listener's activity CHANGE PASSWORD-sets password for a listener's administration EXIT-used to exit from the tool and save changes to the listener. ora file QUIT-used to exit the tool without saving changes made to the listener. ora file SET-used to set various options such as tracing and timeouts SHOW-used to show options that have been set for a listener SERVICE and STATUS commands are used to see the status of a listener. REMEMBER - ABORT is not a listener command 195.Explain the Data pump utility and the files belonging to it? Data pump is a new feature introduced in Oracle 109 to moev data between databases and to or from operating system files very efficiently. It provides parallel import and export utilities(impdb, expdp) on the command-line as well as the web-based oracle enterprise manager export/import interface. It is ideally beneficial for large databases and data waehousing environments. Oracle data pump facility runs on the server. some of the functions performed by oracle data pump are; - it is used to copy data from one schema to another between two databases or within a single database and also it can be used to extract a logical copy of the entire database, a list of tablespaces and a list of schemas or a list of tables. Types of files managed by the data pump are; -dump files:containing the data and metadata that is being moved, files:these record messages associated with an operation, SQL fil the output of a SQLFILE operation. a SQLFILE operation is in • - I ta pump import SQLFILE parameter and results in all of the f II ~~ • executing based on other parameters, being writtent 0 a .~ ·L:LJ ~~~ The Data pupm utility uses the export parameter CONT <fitter the export",.""r. objects such as data, metedata or both. ~ ~ 196.Explain SQL*Loader? ~ _DCr:'C:-T~DCn ~ 197.When the SGA TARGET is set to a non-zero value, • :5't fII'f~J)i;;M.Ya1I'~dlli'ml!l),~fe~ cache and Large pool which other memory structure • ,~config~~~~s~R~a~f the Automatic Shared Memory Management feature in or -. "t:f(~'lIfV It is the Java pool and Streams pool, becaus 'f SGA is s;ecified then the memory pools that are automatically sized are But. - cache(DBA@lO'Gz~Ohare

pool(SHARED POOL SIZE), large pool(LARGE POOL SIZE), java pool(JAVA POOL SIZE), streams pool(STREAMS POOL SIZE) NOTE: Streams pool is an optional SGA structure 198.Explain the flash recovery area? The flash recovery area Is a specific location on disk that stores and manages files for backup and recovery purposes. It is an automatic feature available in Oracle 109. Oracle Managed Files(OMF) configures the flash recovery area and utilises the disk resources managed by Automatic Storage Management (ASM) . RMAN performs the task of automatic cleaning up. The flash recovery area acts as a cache area for the backup components that are to be copied to the tape. The flash recovery area contains the following database file: Control files, archive log files, flashback logs, control file and SPFILE auto-backups, and datafile image copies. It is necessary to configure the flash recovery area when the database is set up for the very first time. 199.When database is in noarchielog mode and you used RMAN to take backup. which types of backups are possible? Only closed and Incremental backups INCREMENTAL BACKUP is an RMAN backup in which only data blocks that were modified since the last incremental backup are backed up. Incremental backup are classified by levels. The baseline backup for an incremental backup is a level 0 incremental backup. A level 0 incremental backup, like a full backup, backs up all data blocks that have ever been used. However, a full backup cannot be used as the baseline backup for subsequent incremental backups. Incremental backups at levels greater than 0 back up only data blocks modified since the last incremental backup. Forexample, a level 1 incremental backup will only backup only those data blocks that have changed since the level 0 incremental backup. furthermore, a level 2 incremental backup will back up only those data blocks that have changed since teh level 1 incremental backup. Incremental backups are quicker, and they occupy less space because they do not contain all data blocks. Incremental backups can be applied to the baseline backup, wen required to form a complete backup. A closed backup is a backup of one or more database files, which is taken while the database is closed. Usually, a closed backup is also a whole database backup(a backup of the control file and all datafiles of the database). A closed backup can be either consistent or inconsistent, A backup of a closed database that was cleanly sutdown(NORMAL, IMMEDIATE, TRANSACTIONAL) is a closed consistent backup. On the other hand, if a database is shutdown using the ABORT command or the associated instance terminates abnormally before the backup is taken, the backup will be a closed inconsistent backup. A closed backup is also called a cold backp and is the only type of backup that can be taken for a database running in NOARCHIVELOG mode. NOTE: that an open or online backup is one done while the datafiles are open and is always an inconsistent one that requires recovery(application of redo data) before it can be made consistent. 200.which files are created by default at database create command even if not specified? -control file, online redo log files, SYSAUX tablespace datafile. 201.Explain Normalisation? NOTE: Many-to-many is cardinality that is avoided in 202.Which background process is used to write dirty DBWn (it doesnt change) 203.How long does it take for MMON to gather a sna. 60 minutes. 204.Which view shows all the tables in a database? it is the DBA TABLE VERSION AND NEVER NEVER user tables, 205.what is an aggregate function?

206.How do you convert a date to a string? To_char. A bonus would be that they always include a format mask. 207.Describe the block structure of PLSQL? Declaration, Begin, exception, end. 20S.What is an anonymous block? Unnamed PL/SQL block. 209.Why would you choose to use a package versus straight procedures and functions? I look for maintenance, grouping logical functionality, dependency management, etc. I want to believe that they believe using packages is a @good thing@. 210.Explain what happens when you issue a commit command? 211.Your developers asked you to create an index on the PROD ID column of the SALES HISTORY table, which has 100million rows. The table has approximately 2 million rows of new data loaded on the first day of every mont. For the remainder of the month, the table is only queried. Most reports are generated according to the PROD ID, which has 96 distinct values. Which type of index would be app rop ri ate? 212.You examine the alert log file and notice that errors are being generated from an SQL*Plus session. Which files are best for providing you with more information about the nature of the problem? 213.Users pward and psmith have left the company. You nolonger want them to have access to the database. You need to make sure that the objects they created in the database remain. What do you need to do? 214.which two actions cause a log switch? 21S.which facts do you know about a shared pool? 216.You need to create an index on the PASSPORT RECORDS table. It contains 10 million rows of data. The key columns have low cardinality. The queries generated against this table use a combination of mUltiple WHERE conditions involving the OR operator. Which type of index would be best for this type of table? 217.Explain the concept of locally managed tablespace? 21S.You decided to use mUltiple buffer pools in the database buffer cache of your database, You set the sizes of the buffer pools with the DB KEEP CACHE SIZE and DB RECYCLE CACHE SIZE parameters and restarted your instance. What else must you do-to enable the-use of the buffer pools? 219.How do you create a hierarchical query? By using a CONNECT BY. 220.How would you generate XML from a query? The answer here is @A lot of different ways@. They should know that there are SQL functions: XMLELEMENT, XMLFoREST, etc and PL/SQL functions: DBMS_XMLGEN, DBMS XMLQUERY, etc. 221.How can you tell if a SELECT returned no rows? By uisng the NO DATA FOUND exception. 222.What is an autonomous transaction? Identified by pragma autonomous. A child parent that MUST be committed or rolled back. ~~ED 223.The DBA has decreased LoG_CHECKPoINT_INTERVAL to '.'. ~1t'rg,!>d' VL'LoG_CECKPoINT_ TIMEOUT from 0 to S. What best identif' '~Ipact of these <.,.~ settings on the oracle database? ~ ~ 224.which SQL*loader parameters enables you to loa •• ~ ~i~~~~~~rf~DQr.d~ stored in the data fHe? .....f'(C\:1I;:) , tzru: ;z_ 22S.You are attempting to create a robust backup • ~~overy it~~~~~g Oracle Enterprise Manager 2.0. which two tools al. you to s~~~~the Oracle Instance? 226.What are the things that Oracle 109 improved •••

improved against 109? Oracle 9i didnt have recovery file dest so had no flash recoevry area, no SYSAUX tablespace in 9i which is important for recovery. 227.Which roles must be granted to the recovery catalog owner in order for RMAN to work properly when you create a recovery catalog for a production database? 228.Explain rman commands? How you connect to an auxilliary and catalog database? sql>rman connect target sys/pwd@db1 CATALOG rman/pwd@catdb sql>rman connect target sys/pwd@db1 AUXILLIARY sys/pwd@auxdb 229.You are backing up an oracle database on the UNIX platform while the database is still open. Before issuing the tar command, which of statements should be issued? 230.You are evaluating the complexity of an existing recovery strategy in your organisation. Offline backups on OARCHIVELOG mode databases offer which of the following benefits over offline backups on ARCHIVELOG databases? 231.when a DBA attempts to backup the oracle database control file. after issuing the ALTER DATABASE BACKUP CONTROLFILE TO TRACE command, where can the DBA find the backup control file creation materials Oracle created for him? 232.You are trying to determine the status of a database backup. In order to determine the data files involved in the backup, which queries are appropriate? SELECT file# from V$BACKUP where STATUS=' ACTIVE ,; this lists files being backed up(in backup progress) 233.You are attempting to identify synchronisation between files on a mounted database that was just backed up. Which dictionary view may offer assistance in this task? 234.which background process does an oracle database use to ensure the detection of the need for database recovery by checking for synchronisation? 235.Explain base tables? A table used to define a view 236.Explain the concept of a large pool? The large pool is created to avoid contention in the shared pool in the cae of shard server environment. The UGA process takes place in the shared pool in the case of shared server environment so to avoid contentions all the user processes are shifted 237.The DBA is configuring use of RMAN with a recovery catalog. When using a recovery catalog in conjuction with RMAN, where can be the actual backup copies of database information found? 238.The DBA is assessing maintenance of recovery catalog creation. Once created, where does the recovery catalog draw much of its information from when maintenance is performed on it? [options:production database file, recovery catalog control file, production database control file, archived redo logs] 239.The DBA is configuring RMAN for use as the backup/recovery tool for the oracle database. After creating the production database and the recovery catalog, which command is used for establishing the baseline information required in the recovery catalog for proper RMAN usage? [options:RESET, REGISTER, RESYNC, REPORT] 240.The DBA has shutdown the database and made copies of a benchmark backup for stress testing. Which of the fol make that backup usable in the context of the rest of t catalog? [options:RESYNC, CATALOG, REPORT, LIST] 241.The DBA needs to identify available backups belonging to the SYSTEM tablespace. Which command this process? 242.The DBA is developing scripts in RMAN. In 0 commands in a scipt in RMAN for database backup, choices are appropriate?

[options:RUN{ ..}, EXECUTE SCRIPT{ ...}, CREATE SCRIPT{ ...}, ALLOCATE CHANNEL{ ...}] 243.The DBA is developing a script for backups that will ensure that no block corruption is permitted in a datafile. Which of the following commands is appropriate for that script? [options:SET MAXCoRRUPT 0, SET DBVERIFY ON, SET LOG BLOCK CHECKSUM ON] 244.Explain the trade-off a DBA makes when considering dropping and re-creating indexes using the NoLoGGING vs LOGGING? 245.What are the factors that would significantly contribute to a rapid recovery time when backing up an ARCHIVE LOG database? [options: (frequency of backups, size of datafiles & I/O speed), (available memory, I/O speed and size of datafiles) ,(available memory) ,(number of multiplexed cont rol files)] 246.The DBA has just finished making OS copies of dtafiles for the backup. Which of the following choices identifies how the DBA should complete the backup? Take tablespaces out of backup mode, backup control file to trace, witch online redo logs (OR THE REVERSE) 247.which priviledge has to be given to users to select data dictionary? sql>grant select catalog role to user; 248.Difference between-TEST/DEV/PRoD oracle databases? 249.Why is the instance started in NoMoUNT mode when manually creating a database? The reason is, there are no controlfiles for the database to be in OPEN mode, and you cannot even use MOUNT mode, because at mount mode, controlfile has already pointed to the location of the redologs and datafiles but just that access to them is not granted yet, so we start instance in NoMoUNT because we dont have control files yet but memory usage should be defined. 250.The different ways of restoring a controlfile? *********************Restore of the Control File From a Known Location RMAN> RESTORE CoNTRoLFILE from 'filename'; *********************Restore of the Control File to a New Location RESTORE CoNTRoLFILE TO '/tmp/my controlfile'; *********************Restore from autobackup RMAN> SET DBID 320066378; RMAN> RUN { SET CoNTRoLFILE AUToBACKUP FORMAT FOR DEVICE TYPE DISK TO 'autobackup format'; RESTORE CoNTRoLFILE FROM AUToBACKUP;

RMAN> RESTORE CoNTRoLFILE TO '/tmp/ctl file.ctl' FROM AUToBACKUP; NOTE: to restore controlfile from autobackup, the database must be in NoMoUNT mode and you must first set the DBID. After restoring controlfile from autobackup, you must run RECOVER DATABASE and also perform an OPEN RESETLoGS on the database. 251.Different ways of restoring spfiles? *********************Restore the server parameter file for autobackup RMAN> RESTORE SPFILE FROM AUToBACKUP; RMAN> RESTORE SPFILE TO '/tmp/spfileTEMP.ora' FROM 252.Steps for recovery?
*********************tablespace /~~


-connect to the target database ~ ~~ -take affected tablespace offline [alter dat ••• r-~D~~f)J~~~.~~ -run SHOW ALL to see current configurations ,~"'tft:17I~ I £:tft:LJ -restore tablespace or datafile with RESTOR ~oVER c~~ RMAN>SQL 'alter tablespace users offl immediate\{t:t(~/()~ RMAN>restore tables pace users; RMAN>recover tables pace users;


RMAN>sql 'alter tablespace users online; ********************database with current controlfile available -RMAN>startup mount;[best recover for database/datafile when in mount model -RMAN>restore database; -RMAN>recover database; -RMAN>alter database open; 253.Restore and Recover of Datafiles to a New Location The procedure shown here is a convenient way to restore a datafile to a new location and perform media recovery on it. RUN { SET NEWNAME FOR DATAFILE 3 to 'new location'; RESTORE DATAFILE 3; SWITCH DATAFILE 3; RECOVER DATAFILE 3; 254.what is the default location of portlist and PUPBLD.SQL? **********portlist.ini is located int $ORACLE HOME/install/portlist.ini *********PUPBLD.sql is located in $ORACLE HOME/sqlplus/admin/PUPBLD.SQL 255.How to backup incremental with block change tracking SQL> alter database enable block change tracking using file @/home/oracle/bc.ora@; This command brings up the background process Change Tracking Writer (CTWR) , that maintains a change tracking file. This file will contain the database block adresses of Oracle Blocks, modified after the next level 0 Full Backup. Because of this file, RMAN no longer has to scan all productive datafiles and compare their blocks with the blocks of the level 0 backup in order to determine which blocks have changed. That was a very time consuming process before 109. Now we will invoke RMAN with the following command: 256.What is the default password for the sys user in Oracle? Ans : CHANGE ON INSTALL 257.What would be the-first thing you would do if an end user complains that performance is poor? 258.Explain different startups?

* *

STARTUP NOMOUNT Starts the instance but does not mount the database.

STARTUP MOUNT Starts the instance and mounts the database but does not open the database. STARTUP OPEN Starts the instance and mounts and opens

* *

STARTUP RESTRICT Starts the instance, however, access is restricted to users with STARTUP RECOVER Starts the instance but begins recovery for whatever failure scenario oc


STARTUP FORCE Forces the instance to shutdown abort and immediately startup open. This option should only be used for instances having problems either starting or stopping. 259.How do you create a TEMPORARY tables pace using Oracle-Managed File (OMF) technique? First, connect to SQL*Plus as the system/manager user. SQL> CONNECT system/manager@school AS SYSDBA Define a create file destination Let's first make sure that the DB_ CREATE _ FILE DEST value is set to a valid sub-directory. SQL> ALTER SYSTEM SET db_create_file_dest='c:'

Create a temporary tables pace (OMF) Now, create a temporary tables pace with Oracle-Managed Files (OMF). Users create temporary segments in a tablespace when a disk sort is required to support their use of select statements containing the GROUP BY, ORDER BY, DISTINCT, or UNION, or the CREATE INDEX statements. SQL> CREATE TEMPORARY TABLESPACE mytemp 260.Give one method for transferring a table from one schema to another: Level: Intermediate Expected Answer: There are several possible methods, export-import, CREATE TABLE ... AS SELECT, or COPY. 261. What is the purpose of the IMPORT option IGNORE? What is it?s default setting? Level: Low Expected Answer: errors. If it is it is specified, default value is The IMPORT IGNORE option tens import to ignore "already exists" not specified the tables that already exist will be skipped. If the error is ignored and the tables data will be inserted. The N.

263. You have a rollback segment in a version 7.2 database that has expanded beyond optimal, how can it be restored to optimal? Level: Low Expected answer: Use the ALTER TABLESPACE ..... SHRINK 264. If the DEFAULT and TEMPORARY tables pace clauses a command what happens? Is this bad or good? Why? Level: Low Expected answer: The user is assigned the SYSTEM temporary tablespace. This is bad because it ca segments to be placed into the SYSTEM tables pace improper table placement (only data dictionary ob segment should be in SYSTEM).

265. What are some of the Oracle provided packages that DBAs should be aware of? Level: Intermediate to High Expected answer: Oracle provides a number of packages In the form of the DBMS packages owned by the SYS user. The packages used by DBAs may include: DBMS SHARED POOL, DBMS UTILITY, DBMS SQL, DBMS DDL, DBMS SESSION, DBMS OUTPUT and DBMS-SNAPSHOT. They may also try to answer with the UTL*~SQL or CAT*.SQL series of SQL procedures. These can be viewed as extra credit but aren?t part of the answer. 266. What happens if the constraint name is left out of a constraint clause? Level: Low Expected answer: The Oracle system will use the default name of SYS Cxxxx where xxxx is a system generated number. This is bad since it makes trackIng which table the constraint belongs to or what the constraint does harder. 267. What happens if a tablespace clause is left off of a primary key constraint clause? Level: Low Expected answer: This results in the index that is automatically generated being placed in then users default tablespace. Since this will usually be the same tablespace as the table is being created in, this can cause serious performance problems. 268. What is the proper method for disabling and re-enabling a primary key constraint? Level: Intermediate Expected answer: You use the ALTER TABLE command for both. However, for the enable clause you must specify the USING INDEX and TABLESPACE clause for primary keys. 269. What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause? Level: Intermediate Expected answer: The index is created in the user?s default tablespace and all sizing information is lost. Oracle doesn?t store this information as a part of the constraint definition, but only as part of the index definition, when the constraint was disabled the index was dropped and the information is gone. 270. (On UNIX) When should more than one DB writer should be used? Level: High Expected answer: If the UNIX system being used is only one is required, if the system is not capable twice the number of disks used by Oracle number 0 by use of the db_writers initialization paramete 271. You are using hot backup without being in an

the event of a failure? Why or why not? Level: High Expected answer: You can?t use hot backup without being in archivelog mode. So no, you couldn?t recover. 272. What causes the "snapshot too old" error? How can this be prevented or mitigated? Level: Intermediate Expected answer: This is caused by large or long running transactions that have either wrapped onto their own rollback space or have had another transaction write on part of their rollback space. This can be prevented or mitigated by breaking the transaction into a set of smaller transactions or increasing the size of the rollback segments and their extents. 273. How can you tell if a database object is invalid? Level: Low Expected answer: By checking the status column of the DBA, ALL or USER OBJECTS views, depending upon whether you own or only have permission on the view or are using a DBA account. 274. A user is getting an ORA-00942 error yet you know you have granted them permission on the table, what else should you check? Level: Low Expected answer: You need to check that the user has specified the full name of the object (select empid from scott.emp; instead of select empid from emp;) or has a synonym that points to the object (create synonym emp for scott.emp;) 275. A developer is trying to create a view and the database won?t let him. He has the "DEVELOPER" role which has the "CREATE VIEW" system privilege and SELECT grants on the tables he is using, what is the problem? Level: Intermediate Expected answer: You need to verify the developer has direct grants on all tables used in the view. You can?t create a stored object with grants given through views. 276. If you have an example table, what is the best way to get sizing data for the production table implementation? Level: Intermediate Expected answer: The best way is to analyze the tab provided in the DBA TABLES view to get the average data for the calculation. The quick and dirty way blocks the table is actually using and ratio the its number of blocks against the number of 277. How can you find out how many users are How can you find their operating system id?

Level: high Expected v$process v$sysstat command, answer: There are several ways. One is to look at the v$session or views. Another way is to check the current_logins parameter in the view. Another if you are on UNIX is to do a "ps -eflgrep oraclelwc -l? but this only works against a single instance installation.

278. A user selects from a sequence and gets back two values, his select is: SELECT pk_seq.nextval FROM dual; What is the problem? Level: Intermediate Expected answer: Somehow two values have been inserted into the dual table. This table is a single row, single column table that should only have one value in it. 279. How can you determine if an index needs to be dropped and rebuilt? Level: Intermediate Expected answer: Run the ANALYZE INDEX command on the index to validate its structure and then calculate the ratio of LF BLK LEN/LF BLK LEN+BR BLK LEN and if it isn?t near 1.0 (i.e. greater than 0.7 or so) then the index should be rebuilt. Or if the ratio BR_BLK_LEN/ LF_BLK_LEN+BR_BLK_LEN lS nearlng 0.3.

280. A tablespace has a table with 30 extents in it. Is this bad? Why or why not. Level: Intermediate Expected answer: Multiple extents in and of themselves aren?t bad. However if you also have chained rows this can hurt performance. 281. How do you set up tablespaces during an Oracle installation? Level: Low Expected answer: You should always attempt to use the Oracle Flexible Architecture standard or another partitioning scheme to ensure proper separation of SYSTEM, ROLLBACK, REDO LOG, DATA, TEMPORARY and INDEX segments. 282. You see mUltiple fragments in the SYSTEM tablespace, what should you check first? Level: Low Expected answer: Ensure that users don?t have TEMPORARY or DEFAULT tablespace assignment by 283. What are some indications that you need to parameter? Level: Intermediate

Expected answer: Poor data dictionary or library cache hit ratios, getting error ORA-04031. Another indication is steadily decreasing performance with all other tuning parameters the same. 284. What is the general guideline for sizing db block size and db_multi_block_read for an application that does-many full table scans? Level: High Expected answer: Oracle almost always reads in 64k chunks. The two should have a product equal to 64 or a mUltiple of 64. 285. What is the fastest query method for a table? Level: Intermediate Expected answer: Fetch by rowid 286. Explain the use of TKPROF? What initialization parameter should be turned on to get full TKPROF output? Level: High Expected answer: The tkprof tool is a tuning tool used to determine cpu and execution times for SQL statements. You use it by first setting timed statistics to true in the initialization file and then turning on tracing for either the entire database via the sql trace parameter or for the session using the ALTER SESSION command. Once the trace file is generated you run the tkprof tool against the trace file and then look at the output from the tkprof tool. This can also be used to generate explain plan output. 287. When looking at v$sysstat you see that sorts (disk) is high. Is this bad or good? If bad -How do you correct it? Level: Intermediate Expected answer: If you get excessive disk sorts this is bad. This indicates you need to tune the sort area parameters in the initialization files. The major sort are parameter is the SORT_AREA_SIZe parameter. 288. When should you increase copy latches? What parameters control copy latches? Level: high Expected answer: When you get excessive contention for the copy latches as shown by the "redo copy" latch hit ratio. You can increase copy latches via the initialization parameter LOG_SIMULTANEOUS_COPIES to twice the num your system. How about an Level: Low Expected answer: You can look in the init.ora fil set parameters. For all parameters, their value value is the default value, look in the v$paramete

290. Describe hit ratio as it pertains to the database buffers. What is the difference between instantaneous and cumulative hit ratio and which should be used for tuning? Level: Intermediate Expected answer: The hit ratio is a measure of how many times the database was able to read a value from the buffers verses how many times it had to re-read a data value from the disks. A value greater than 80-90% is good, less could indicate problems. If you simply take the ratio of existing parameters this will be a cumulative value since the database started. If you do a comparison between pairs of readings based on some arbitrary time span, this is the instantaneous ratio for that time span. Generally speaking an instantaneous reading gives more valuable data since it will tell you what your instance is doing for the time it was generated over. 291. Discuss row chaining, how does it happen? How can you reduce it? How do you correct it? Level: high Expected answer: Row chaining occurs when a VARCHAR2 value is updated and the length of the new value is longer than the old value and won?t fit in the remaining block space. This results in the row chaining to another block. It can be reduced by setting the storage parameters on the table to appropriate values. It can be corrected by export and import of the effected table. 292. When looking at the estat events report you see that you are getting busy buffer waits. Is this bad? How can you find what is causing it? Level: high Expected answer: Buffer busy waits could indicate contention in redo, rollback or data blocks. You need to check the v$waitstat view to see what areas are causing the problem. The value of the "count" column tells where the problem is, the "class" column tells you with what. UNDO is rollback segments, DATA is data base buffers. 293. If you see contention for library caches how can you fix it? Level: Intermediate Expected answer: Increase the size of the shared pool. 294. If you see statistics that deal with "undo" what are they really talking about? Level: Intermediate Expected answer: Rollback segments and associated 295. If a tablespace has a default pctincrease of relationship to the smon process)? Level: High Expected answer: The SMON process won?t automatic fragments. 296. If a tablespace shows excessive fragmentati

defragment the tablespace? (7.1,7.2 and 7.3 only) Level: High Expected answer: In Oracle 7.0 to 7.2 The use of the 'alter session set events 'immediate trace name coalesce level ts#';? command is the easiest way to defragment contiguous free space fragmentation. The ts# parameter corresponds to the ts# value found in the ts$ SYS table. In version 7.3 the ?alter tablespace coalesce;? is best. If the free space isn?t contiguous then export, drop and import of the tablespace contents may be the only way to reclaim non-contiguous free space. 297. How can you tell if a tablespace has excessive fragmentation? Level: Intermediate If a select against the dba free space table shows that the count of a tables paces extents is greater than the-count of its data files, then it is fragmented. 298. You see the following on a status report: redo log space requests 23 redo log space wait time 0 Is this something to worry about? What if redo log space wait time is high? How can you fix this? Level: Intermediate Expected answer: Since the wait time is zero, no. If the wait time was high it might indicate a need for more or larger redo logs. 299. What can cause a high value for recursive calls? How can this be fixed? Level: High Expected answer: A high value for recursive calls is cause by improper cursor usage, excessive dynamic space management actions, and or excessive statement reparses. You need to determine the cause and correct it By either relinking applications to hold cursors, use proper space management techniques (proper storage and sizing) or ensure repeat queries are placed in packages for proper reuse. 300. If you see a pin hit ratio of less than 0.8 in the estat library cache report is this a problem? If so, how do you fix it? Level: Intermediate Expected answer: This indicate that the shared pool shared pool size. 301. If you see the value for reloads is high in t this a matter for concern? Level: Intermediate Expected answer: Yes, you should strive for zero

excessive reloads then increase the size of the shared pool. 302. You look at the dba rollback segs view and see that there is a large number of shrinks and they are of relatively small size, is this a problem? How can it be fixed if it is a problem? Level: High Expected answer: A large number of small shrinks indicates a need to increase the size of the rollback segment extents. Ideally you should have no shrinks or a small number of large shrinks. To fix this just increase the size of the extents and adjust optimal accordingly. 303. You look at the dba rollback segs view and see that you have a large number of wraps is this a problem? Level: High Expected answer: A large number of wraps indicates that your extent size for your rollback segments are probably too small. Increase the size of your extents to reduce the number of wraps. You can look at the average transaction size in the same view to get the information on transaction size. 304. In a system with an average of 40 concurrent users you get the following from a query on rollback extents: ROLLBACK CUR EXTENTS


11 8

R03 12 R04 9 SYSTEM 4 You have room for each to grow by 20 more extents each. Is there a problem? Should you take any action? Level: Intermediate Expected answer: No there is not a problem. You have 40 extents showing and an average of 40 concurrent users. Since there is plenty of room to • action is needed. 305. You see mUltiple extents in the temporary Level: Intermediate Expected answer: As long as they are all the same fact, it can even improve performance since Oracl extent when a user needs one. 306. Define OFA.

Level: Low Expected answer: OFA stands for Optimal Flexible Architecture. It is a method of placing directories and files in an Oracle system so that you get the maximum flexibility for future tuning and file placement. 307. How do you set up your tablespace on installation? Level: Low Expected answer: The answer here should show an understanding of separation of redo and rollback, data and indexes and isolation os SYSTEM tables from other tables. An example would be to specify that at least 7 disks should be used for an Oracle installation so that you can place SYSTEM tablespace on one, redo logs on two (mirrored redo logs) the TEMPORARY tablespace on another, ROLLBACK tables pace on another and still have two for DATA and INDEXES. They should indicate how they will handle archive logs and exports as well. As long as they have a logical plan for combining or further separation more or less disks can be specified. 308. What should be done prior to installing Oracle (for the OS and the disks)? Level: Low Expected Answer: adjust kernel parameters or OS tuning parameters in accordance with installation guide. Be sure enough contiguous disk space is available. 309. You have installed Oracle and you are now setting up the actual instance. You have been waiting an hour for the initialization script to finish, what should you check first to determine if there is a problem? Level: Intermediate to high Expected Answer: Check to make sure that the archiver isn?t stuck. If archive logging is turned on during install a large number of logs will be created. This can fill up your archive log destination causing Oracle to stop to wait for more space. 310. When configuring SQLNET on the server what files must be set up? Level: Intermediate Expected answer: INITIALIZATION file, TNSNAMES.ORA file, SQLNET.ORA file 311. When configuring SQLNET on the client what files need to be set up? Level: Intermediate Expected answer: SQLNET.ORA, TNSNAMES.ORA 312. What must be installed with ODBC on the Oracle? Level: Intermediate Expected answer: SQLNET and PROTOCOL (for exampl transport programs.

313. You have just started a new instance with a large SGA on a busy existing server. Performance is terrible, what should you check for? Level: Intermediate Expected answer: The first thing to check with a large SGA is that it isn?t being swapped out. 314. What OS user should be used for the first part of an Oracle installation (on UNIX)? Level: low Expected answer: You must use root first. 315. When should the default values for Oracle initialization parameters be used as is? Level: Low Expected answer: Never 316. How many control files should you have? Where should they be located? Level: Low Expected answer: At least 2 on separate disk spindles. Be sure they say on separate disks, not just file systems. 317. How many redo logs should you have and how should they be configured for maximum recoverability? Level: Intermediate Expected answer: You should have at least three groups of two redo logs with the two logs each on a separate disk spindle (mirrored by Oracle). The redo logs should not be on raw devices on UNIX if it can be avoided. 318. You have a simple application with no "hot" tables (i.e. uniform 10 and access requirements). How many disks should you have assuming standard layout for SYSTEM, USER, TEMP and ROLLBACK tablespaces? Expected answer: At least 7, see disk configuration answer above. 319. Describe third normal form? Level: Low Expected answer: Something are related to the primary 320. Is the following statement true or "All relational databases must be Level: Intermediate Expected answer: False. While 3NF is good for 10 they have more than just a few tables, will not Usually some entities will be denormalized in the process.

321. What is an ERD?

Level: Low Expected answer: An ERD is an Entity-Relationship-Diagram. entities and relationships for a database logical model. It is used to show the

322. Why are recursive relationships bad? How do you resolve them?

Level: Intermediate A recursive relationship (one where a table relates to itself) is bad when it is a hard relationship (i.e. neither side is a "may" both are "must") as this can result in it not being possible to put in a top or perhaps a bottom of the table (for example in the EMPLOYEE table you couldn?t put in the PRESIDENT of the company because he has no boss, or the junior janitor because he has no subordinates). These type of relationships are usually resolved by adding a small intersection entity.
323. What does a hard one-to-one

both ends is "must")?

relationship mean (one where the relationship on

Level: Low to intermediate Expected answer: This means the two entities should probably be made into one entity.
324. How should a many-to-many

relationship be handled?

Level: Intermediate Expected answer: By adding an intersection entity table
325. What is an artificial (derived) primary key? When should an artificial (or derived) primary key be used? Level: Intermediate

Expected answer: A derived key comes from a sequence. Usually it is used when a concatenated key becomes too cumbersome to use as a foreign key.
326. When should you consider denormali2ation?

Level: Intermediate Expected answer: Whenever performance analysis indicates it would be beneficial to do so without compromising data integrity. UNIX Interview Questions
327. How can you determine the space left in a file

Level: Low Expected answer: There are several commands to do
328. How can you determine the number of SQLNET


Level: Intermediate Expected answer: SQLNET users will show up with a process unique name that begins with oracle, if you do a ps -eflgrep oraclelwc -1 you can get a count of the number of users. 329. What command is used to type files to the screen? Level: Low Expected answer: cat, more, pg 330. What command is used to remove a file? Level: Low Expected answer: rm 331. Can you remove an open file under UNIX? Level: Low Expected answer: yes 332. How do you create a decision tree in a shell script? Level: intermediate Expected answer: depending on shell, usually a case-esac or an if-endif or fi structure 333. What is the purpose of the grep command? Level: Low Expected answer: grep is a string search command that parses the specified string from the specified file or files 334. The system has a program that always includes the word nocomp in its name, how can you determine the number of processes that are using this program? Level: intermediate Expected answer: ps -eflgrep *nocomp*lwc -1 335. What is an inode? Level: Intermediate

Level: High Expected answer: Maybe. Some UNIX systems don?t

Inode problems and dead user processes can accumulate causing possible performance and corruption problems. Most UNIX systems should have a scheduled periodic reboot so file systems can be checked and cleaned and dead or zombie processes cleared out. 337. What is redirection and how is it used? Level: Intermediate Expected answer: redirection is the process by which input or output to or from a process is redirected to another process. This can be done using the pipe symbol "I", the greater than symbol ">" or the "tee" command. This is one of the strengths of UNIX allowing the output from one command to be redirected directly into the input of another command. 338. How can you find dead processes? Level: Intermediate Expected answer: ps -eflgrep zombie -- or -- who -d depending on the system. 339. How can you find all the processes on your system? Level: Low Expected answer: Use the ps command 340. How can you find your id on a system? Level: Low Expected answer: Use the "who am i" command. 341. What is the finger command? Level: Low Expected answer: The finger command uses data in the passwd file to give information on system users. 342. What is the easiest method to create a file on UNIX? Level: Low Expected answer: Use the touch command 343. What does


Level: Intermediate Expected answer: The "»" redirection symbol appends specified into the file specified. The file must al 344. If you aren?t sure what command does a part best way to determine the command? Expected answer: The UNIX man -k command specified. Review the results from the command t

Oracle Troubleshooting

Interview Questions

345. How can you determine if an Oracle instance is up from the operating system level? Level: Low Expected answer: There are several base Oracle processes that will be running on multi-user operating systems, these will be smon, pmon, dbwr and 19wr. Any answer that has them using their operating system process showing feature to check for these is acceptable. For example, on UNIX a ps -eflgrep dbwr will show what instances are up. 346. Users from the PC clients are getting messages indicating Level: Low ORA-06II4: (Cnct err, can't get err txt. See Servr Msgs & Codes Manual) What could the problem be? Expected answer: The instance name is probably incorrect in their connection string. 347. Users from the PC clients are getting the following error stack: Level: Low ERROR: ORA-OI034: ORACLE not available ORA-073I8: smsget: open error when opening sgadef.dbf file. HP-UX Error: 2: No such file or directory What is the probable cause? Expected answer: The Oracle instance is shutdown that they are trying to access, restart the instance. 348. How can you determine if the SQLNET process is running for SQLNET VI? How about V2? Level: Low Expected answer: For SQLNET VI check for the existence of the orasrv process. You can use the command "tcpctl status" to get a full status other protocols have similar command formats. For SQLNET of the LISTENER process(s) or you can issue the command 349. What file will give you Oracle instance status located? Level: Low Expected answer: The alert.ora log. It is the background_dump_dest parameter in the

350. Users aren?t being allowed on the system. The following message is received: Level: Intermediate ORA-00257 archiver is stuck. Connect internal only, until freed What is the problem? Expected answer: The archive destination is probably full, backup the archive logs and remove them and the archiver will re-start. 351. Where would you look to find out if a redo log was corrupted assuming you are using Oracle mirrored redo logs? Level: Intermediate Expected answer: There is no message that comes to the SQLDBA or SRVMGR programs during startup in this situation, you must check the alert.log file for this information. 352. You attempt to add a datafile and get: Level: Intermediate ORA-OllIS: cannot add anymore datafiles: limit of 40 exceeded What is the problem and how can you fix it? Expected answer: When the database was created the db files parameter in the initialization file was set to 40. You can shutdown and reset this to a higher value, up to the value of MAX DATAFILES as specified at database creation. If the MAX DATAFILES is set to low, you will have to rebuild the control file to increase it before proceeding. 353. You look at your fragmentation report and see that smon hasn?t coalesced any of you tablespaces, even though you know several have large chunks of contiguous free extents. What is the problem? Level: High Expected answer: Check the dba tablespaces view for the value of pct increase for the tablespaces. If pct_increase is zero, smon will not coalesce theIr free space. 354. Your users get the following error: Level: Intermediate ORA-00055 maximum number of DML locks exceeded What is the problem and how do you fix it? Expected answer: The number of DML Locks is set by DML LOCKS. If this value is set to low (which it i error. Increase the value of DML LOCKS. If you are temporary problem, you can have them wait and the should clear. 355. You get a call from you backup DBA while yo

corrupted all of the control files while playing with the ALTER DATABASE BACKUP CONTROLFILE command. What do you do? Level: High Expected answer: As long as all datafiles are safe and he was successful with the BACKUP controlfile command you can do the following: CONNECT INTERNAL STARTUP MOUNT (Take any read-only tablespaces offline before next step ALTER DATABASE DATAFILE .... OFFLINE;) RECOVER DATABASE USING BACKUP CONTROLFILE ALTER DATABASE OPEN RESETLOGS; (bring read-only tablespaces back online) Shutdown and backup the system, then restart If they have a recent output file from the ALTER DATABASE BACKUP CONTROL FILE TO TRACE; command, they can use that to recover as well. If no backup of the control file is available then the following will be required: CONNECT INTERNAL STARTUP NOMOUNT CREATE CONTROL FILE However, they will need to know all of the datafiles, logfiles, and settings for MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES for the database to use the command 261.How do i know when the database was up? SQL> SELECT instance name, version, to char(startup time, 'DD-MON-YYYY HH24:MI:SS') "DB Startup Tlme" FROM vsins t ance ; 262.How do i know when the database was created? SQL>select name,created,log mode from v$database; 263.What happens if archivelog dest is full? If the archive log file system is full, your database will hang (ora-002S7) and no one can login the database until you move the archive logs to some other file systems. 264.How do i know if an oracle account has been locked and h SQL>select username, lock date from dba users where 1 SQL>alter user scott account unlock; [You can unlock the account with the above 26S.How do i know all the database user names? SQL>select username from dba users order by us 267.How to find out what objects are in a parti SQL>select segment name, segment type, bytes where tablespace name = 'EXAMPLE'; 268.How to find out what tablespace the object SQL>select segment_name, tablespace_name, where segment_name = 'SALES';

269.How do i know if my datafile is autoextend (YES/NO)? SQL>select file name, autoextensible, maxbytes/(1024*1024*1024) MAX GB from dba data files; 270~How to increase sga max size? SQL>alter system set sga max size=130m scope=spfile; SQL>create pfile from spfile; 271.How do i know if my database is using a PFILE or SPFILE? show parameter spfile (if NULL, then your db was started up using pfile initSID.ora)

273. 274. 275. 276.
277 .

278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. 291. 292. 293. 294. 295. 296. 297. 298. 299. 300.

Sign up to vote on this title
UsefulNot useful