<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Technical Interview Questions &#187; Oracle Interview Questions &amp; Answers - 1</title>
	<atom:link href="http://www.technicalinterview.info/category/oracle-interview-questions-answers-1/feed" rel="self" type="application/rss+xml" />
	<link>http://www.technicalinterview.info</link>
	<description>Java Interview Questions &#124; IT interview questions &#124; Software Testing Interview questions &#124; .Net Interview Questions &#124; Job Interview Questions &#38; Answers &#124; Tough Interview Questions &#124; Technology Interview Questions &#124; Tech Interview Questions &#124; Testing Interview Questions &#124; SAP Interview Questions &#124; ABAP Interview Questions &#124; Data Warehousing Interview Questions</description>
	<pubDate>Tue, 02 Sep 2008 08:33:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Oracle Interview Questions &#038; Answers - 1</title>
		<link>http://www.technicalinterview.info/oracle-interview-questions-answers-1/</link>
		<comments>http://www.technicalinterview.info/oracle-interview-questions-answers-1/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 13:33:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Oracle Interview Questions &amp; Answers - 1]]></category>

		<guid isPermaLink="false">http://www.technicalinterview.info/oracle-interview-questions-answers-1/</guid>
		<description><![CDATA[What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?
SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What are SQLCODE and SQLERRM and why are they important for PL/SQL developers?</strong></p>
<p>SQLCODE returns the value of the error number for the last error encountered. The SQLERRM returns the actual error message for the last error encountered. They can be used in exception handling to report, or, store in an error log table, the error that occurred in the code. These are especially useful for the WHEN OTHERS exception.</p>
<p><strong>How can you find within a PL/SQL block, if a cursor is open?</strong></p>
<p>Use the %ISOPEN cursor status variable.<br />
<strong><br />
How can you generate debugging output from PL/SQL?</strong></p>
<p>Use the DBMS_OUTPUT package. Another possible method is to just use the SHOW ERROR command, but this only shows errors. The DBMS_OUTPUT package can be used to show intermediate results from loops and the status of variables as the procedure is executed. The new package UTL_FILE can also be used.</p>
<p><strong>What are the types of triggers?</strong></p>
<p>There are 12 types of triggers in PL/SQL that consist of combinations of the BEFORE, AFTER, ROW, TABLE, INSERT, UPDATE, DELETE and ALL key words:</p>
<p>BEFORE ALL ROW INSERT<br />
AFTER ALL ROW INSERT<br />
BEFORE INSERT<br />
AFTER INSERT etc.</p>
<p><strong>Give one method for transferring a table from one schema to another:</strong></p>
<p>There are several possible methods, export-import, CREATE TABLE&#8230; AS SELECT, or COPY.</p>
<p><strong>What is the purpose of the IMPORT option IGNORE? What is it?s default setting</strong></p>
<p>The IMPORT IGNORE option tells import to ignore &#8220;already exists&#8221; errors. If it is not specified the tables that already exist will be skipped. If it is specified, the error is ignored and the tables data will be inserted. The default value is N.</p>
<p><strong>You have a rollback segment in a version 7.2 database that has expanded beyond optimal, how can it be restored to optimal</strong></p>
<p>Use the ALTER TABLESPACE &#8230;.. SHRINK command.</p>
<p><strong>If the DEFAULT and TEMPORARY tablespace clauses are left out of a CREATE USER command what happens? Is this bad or good? Why</strong></p>
<p>The user is assigned the SYSTEM tablespace as a default and temporary tablespace. This is bad because it causes user objects and temporary segments to be placed into the SYSTEM tablespace resulting in fragmentation and improper table placement (only data dictionary objects and the system rollback segment should be in SYSTEM).</p>
<p><strong><br />
What are some of the Oracle provided packages that DBAs should be aware of?</strong></p>
<p>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.</p>
<p><strong>What happens if the constraint name is left out of a constraint clause</strong></p>
<p>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.</p>
<p><strong>What happens if a table space clause is left off of a primary key constraint clause?</strong></p>
<p>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.</p>
<p><strong>What is the proper method for disabling and re-enabling a primary key constraint</strong></p>
<p>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.</p>
<p><strong>What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause</strong></p>
<p>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.</p>
<p><strong>In UNIX, When should more than one DB writer process be used? How many should be used</strong></p>
<p>If the UNIX system being used is capable of asynchronous IO then only one is required, if the system is not capable of asynchronous IO then up to twice the number of disks used by Oracle number of DB writers should be specified by use of the db_writers initialization parameter.</p>
<p><strong>You are using hot backup without being in archivelog mode, can you recover in the event of a failure? Why or why not</strong></p>
<p>You can?t use hot backup without being in archivelog mode. So no, you couldn?t recover.</p>
<p><strong>What causes the &#8220;snapshot too old&#8221; error? How can this be prevented or mitigated</strong></p>
<p>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.</p>
<p><strong>How can you tell if a database object is invalid</strong></p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.technicalinterview.info/oracle-interview-questions-answers-1/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
