Sei sulla pagina 1di 47

Oracle grid interview QsAns

What is component of sag? SGA is a memory structure component of Oracle instance. SGA is system global area is allocated whenever an instance is startedalong with SGA background process also gets started up.the components of SGAa)Shared pool1)Library cache2)Data dictionary cache.b)DBBCdata buffer cachec)RLBC- redo log buffer cached)java poole)Large poolall five components together called as SGA Difference between VIEW and MATERIALIZED VIEW? Views are the latest snapshot of the database at any instance of time. whereas Mat Views are the snapshots of Database at aparticular instance.For E.g.: If there exists a table Imp containing 10 records against which there is a view Like (Select emp, emptied from emp)and there exists a MAT view with the same query( Select emp, emp_id from emp), if you fire a query at let say 10.15 am as SELECT* FROM EMP_VIEW This will return 10 records, If you fire the same query against MVIEw it will return 10 records. If at 10.30 I insertone more record in emp table and then If I fire a query SELECT * from EMP_VIEW it will return me 10 rows but the MVIEW querywill still return me 10 rows as it is the snapshot of the database at 10.15 What is Drawback of cursor? Cursor fetches the record in a row by row process. It takes some more time. so in oracle 8i there is a concept that is bulk into andbulk bind. Why oracle is the best database ? Oracle is best database because it follows more codes rules as compare to other database system . What is place holder column? where we can use other than formula column? Place Holder column is created in reports<bra><bra>A placeholder is a column for which you set the data type and value in PL/SQLthat you define. Placeholder columns are useful when you want to selectively set the value of a column (e.g., each time the nthrecord is fetched, or each time a record containing a specific value is fetched, etc.). You can set the value of a placeholder column inthe following places: the Before Report Trigger, if the placeholder is a report-level column a report-level formula column, if theplaceholder is a report-level column a formula in the

placeholder's group or a group below it (the value is set once for each record of the group)<bra>1)random number located in stochastic by means we can't catch such a number stored procedure .stop the process by function ,atposition {1,1,1,1,1,1,0,-1,-2,-3} stop location zero left counting for example six ,a function create a stored data .At right ascendingorder by start to end position located in variable. in that suited we are easy to get a value from right position of ZERO.<br>ZEROLEFT is called as GROUP.<br>ZERO RIGHT is called as ORDER.<br>BOTH by product is PLACEHOLDER.<br><br>2)(I)critical inend: collection of objects raise error, at THIS. time.<br><br>(ii)normal in front end: if we write sequence, Automatic reply without usemathematical expression. example scroll up and down. What is the difference between groupby and orderby? Group by is used to group set of values based on one or more values. Order by is to sort values either in ascending or descendingorder group by is always used with having clause whereas we do not use having clause with order by.

List out differences between Oracle Server 9i and Oracle Server 10g. 10 G supports grid computing, ASM (Automatic storage management )and Memory management.In 10g there is another pool including java pool and large pool that is pool and oem graphical tool is not automatically built it has tobe created. Explain truncate with restore option with example 12.0pt;margin-left:0in;tab-stops:495.0pt'>TRUNCATE cannot be roll backed i.e. restore cannot work on TRUNCATE.So while truncating a table if u feel you might need the data later use DELETEinstead of TRUNCATE which can be roll backed.E.g. DELETE from table nameTruncate apply on a table when we want the retain storage will be reuse in feature Then apply REUSE STORAGE.like TRUNCATE CLUSTER personnel REUSE STORAGE;otherwise its default drops storage. How to get a calendar in date field in oracle forms? 1)Set the LOV of the item for which calendar to be attached as ENABLE_LIST_LAMP LOV, which is included in the TEMPLATEform.2)Set ?Validate from List? to 'No' in the property palette of that item .3)Then in KEY?LISTVAL trigger of that item writecalendar. show; Explain the nvl2 function Syntax:- - nvl2(expr1,expr2,expr3)In nvl2 if expr1 evaluates to NULL then expr3 is returned and if it evaluates to some value itreturns expr2.for e.g. select nvl2(commission_pct,'SAL+COMM','SAL') from employees;if commission_pct is having null value thenSAL will be displayed else SAL+COMM. Which command is used to define CONNECT and RESOURCE as the default roles for user JAMES?a. ALTER USERb. ALTER ROLEc. SET ROLEd. SET PRIVILEGE The ALTER USER command is used to define the default role(s) for a user. Which is not a

system privilege?a. SELECTb. UPDATE ANYc. EXECUTE ANYd. CREATE TABLE SELECT, INSERT, UPDATE, DELETE, EXECUTE, and REFERENCES are object privileges. SELECT ANY, UPDATE ANY, etc. aresystem privileges. Which data dictionary view can be queried to see whether a user has the EXECUTE privilege on a procedure?a. DBA_SYS_PRIVSb. DBA_TAB_PRIVS

c. DBA_PROC_PRIVSd. SESSION_PRIVS

The DBA_TAB_PRIVS. USER_TAB_PRIVS and ALL_TAB_PRIVS views show information about the object privileges. Which dictionary view shows the password expiration date for a user? The DBA_USERS view shows the password expiration date, account status, and locking date along with the user?s table spaceassignments, profile, creation date, etc. Which resource specifies the value in minutes? CONNECT_TIME is specified in minutes, CPU_PER_SESSION is specified in hundredths of a second, andPASSWORD_LOCK_TIME is specified in days. Which data dictionary view shows statistical information from the ANALYZE INDEX VALIDATE STRUCTUREcommand? The INDEX_STATS and INDEX_HISTOGRAMS views show statistical information from the ANALYZE INDEXT VALIDATESTRUCTURE STATEMENT Which keyword should be used in the CREATE INDEX command to create a function ?based index?A. CREATE FUNCTION INDEX?B. CREATE INDEX ? ORGANIZATION INDEXC. CREATES INDEX? FUNCTION BASED ?D. None of the above No keyword needs to be specified to create a function-based index other than to specify the function itself. To enable a functionbased index, you must set the parameter QUERY_REWRITE_ENABLED to TRUE and QUERY_REWRITE_INTEGRITY toTRUSTED. What clause is in the ALTER TABLE command is used to reorganize a table? The MOVE clause is used to reorganize a table. You can specify new table space and storage parameters. Queries are allowed onthe table, but no DML operations are allowed during the move Which keyword is not valid of the BUFFER_POOL parameter of the STORAGE clause? The BUFFER_POOL parameter specifies a buffer pool cache for the

table or index. The KEEP pool retains the blocks in theSGA. RECYCLE removes blocks from SGA as soon as the operation is completed, and the DEFAULT pool is for objects for whichKEEP or RECYCLE is not specified. When validating a constraint, why would you specify the EXCEPTIONS clause? If you specify the EXCEPTIONS INTO clause when validating or enabling a constraint, the ROWIDs of the rows that do not satisfythe constraint are saved in the table specified in the EXCEPTIONS clause. You can remove the bad rows or fix the column valuesand enable the constraint. What can cause the Snapshot too old error? Smaller rollback extents can cause Snapshot too old error if there are long-running queries in the database . What is row migration? Row migration is the movement of a row from one block to a new block.. This occurs when a row is updated and its new size cannotfit into the free space of the block; Oracle moves the row to a new block, leaving a pointer in the old block to the new block. Thisproblem can be avoided by either setting a higher PCTFREE value or specifying a larger block size at database creation.

What is the minimum number of extents a rollback segment can have? The roll back segment should always have at least two extents. When creating a rollback segment, the MINEXTENTS value shouldbe two or more. Which data dictionary view would you query to see the free extents in a tablespace? DBA_FREE_SPACE shows the free extents in a tablespace. DBA_EXTENTS shows all the extents that are allocated to a segment. Which parameter specifies the number of transaction slots in a data block? INITRANS specifies the number of transaction slots in a data block. A transaction slot is used by Oracle when the data block isbeing modified. INITRANS reserves space for the transactions in the block.

When a table is updated, where is the before image information (which can be used for undoing the changes)stored? Rollback segment. Before any DML operation ,the undo information (before-image of data ) is stored in the rollback segments.This information is used to undo the changes and to provide a read-consistent view of the data. How would you determine how much sort space is used by a user session? The V$SORT_USAGE shows the active sorts in the database; it shows the space used, username, SQL address, and hash value. Italso provides the number of EXTENTS and number of BLOCKS used by each sort session, and the username. The V$SORT can be joined with V$SESSION or V$SQL to obtain more information on the session or the SQL statement causing the sort. What are the recommended INITIAL and NEXT values for a temporary tablespace, to reduce fragmentation? The recommended INITIAL and NEXT should be equal to each other and it should be a multiple of SORT_AREA_SIZE plusDB_BLOCK_SIZE to reduce the possibility of fragmentation. Keep PCTINCREASE equal to zero. Fro example, if you r sort area sizeis 64 kb and database block size is 8KB, provide the default storage of the temporary tables as (INITIAL 136K PCTINCREASE 0MAXEXTENST UNLIMITED). How would you drop a tablespace if the tablespace were not empty? Use DROP TABLESPACE <TABLESPACE NAME> INCLUDING CONTENTS.The INCLUDING CONTENTS clause is used to drop a tablespace that is not empty. Oracle does not remove the data files thatbelong to the tablespace; you need to do it manually using an OS command. Oracle updates only the control file. Which operation is permitted on a read ? only tablespace? A table can be dropped from a read-only tablespace. When a table is dropped, Oracle does not have to update the data file; itupdates the

dictionary tables. Any change to data or creation of new objects is not allowed in a read-only tablespace. When does the SMON process automatically coalesce the tablespaces? When the PCTINCREASE default storage of the tablespace is set to 0. You can manually coalesce a tablespace by using ALTERTABLESPACE <TABLESPACE NAME> COALESCE. List the steps needed to rename a redo log file . Shut down the database; 2) use an OS command to rename the redo log file; 3) STARTUP MOUNT; 4) ALTER DATABASE RENAME FILE ?oldfile? TO ?newfile?; 5) ALTER DATABASE OPEN; and 6) back up the control file. If you have two redo log groups with four members each, how many disks does Oracle recommend to keep theredo log files ? You should keep a minimum of two redo log groups, with a recommended two members in each group. Oracle recommends that youkeep each member of a redo log group on a different disk. The maximum number of redo log groups is determined by theMAXLOGFILES database parameter. The MAXLOGMEMBERS database parameter specifies the maximum number of membersper group. What are the valid status codes in the V$LOGFILE view? Valid status codes V$LOGFILE views include STALE, INVALID, DELETED, or the status can be blank. STALE means the filecontents are incomplete; INVALID means the file is not accessible; DELETED means the file is no longer used; and blank statusmeans the file is in use. How many ARCn processes can be associated with an instance? You can have a max of 10 ARCn processes associated with an instance. What is the biggest advantage of having the control files on different disks? By storing the control file on multiple disks, you avoid the risk of a single point of failure. Which data dictionary view provides the names of the control files? V$CONTROLFILES shows the names of the control files. When you create a control file, the database has to be: Not mounted. If you mount the database it automatically opens the database.

What piece of information is not available in the control file? The instance name is not available. The control files include the following: Database name the control file belongs to, database creation timestamp, data files, redo log files , tablespace names, current logsequence number, most recent checkpoint information, and Recovery Managers backup information. What is the best method to rename a control file? Use the ALTER DATABASE RENAME FILE command.b. Shut down the database, rename the control file by using an OS command, and restart the database after changing theCONTROL_FILES parameter.c. Put the database in RESTRICTED mode and issue the ALTER DATABASE RENAME FILE command.d. Shut down the database, change the CONTROL_FILES parameter, and start up the database.e. Re-create the control file using the new name. Which clauses in the CREATE DATABASE command specify limits for the database? The control file size depends on the following limits (MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES,MAXINSTANCES), because Oracle pre-allocates space in the control file.MAXLOGFILES specifies the maximum number of redo log groups that can ever be created in the database.MAXLOGMEMBERS ? specifies the maximum number of redo log members (copies of the redo logs) for each redo log group.MAXLOGHISTORY ? is used only with Parallel Server configuration. It specifies the maximum number of archived redo log files for automatic media recovery .MAXDATAFILES ? specifies the maximum number of data files that can be created in this database. Data files are created when youcreate a tablespace, or add more space to a tablespace by adding a data file.MAXINSTANCES ? specifies the maximum number of instances that can simultaneously mount and open this database.If you want to change any of these limits after the database is created, you must re-create the control file. What is the default password for the SYS user? The default password for the SYS user is CHANGE_ON_INSTALL, and for SYSTEM it is MANAGER. You should change thesepasswords once the database

is created. Who owns the data dictionary? The SYS user owns the data dictionary. The SYS and SYSTEM users are created when the database is created. How many data files can be specified in the DATAFILE clause when creating a database ? You can specify more than one data file; the files will be used for the SYSTEM tablespace. The files specified cannot exceed thenumber of data files specified in the MAXDATAFILES clause. Which script creates the data dictionary views? The catalog.sql script creates the data dictionary views. The base tables for these views are created by the script sql.bsq, which isexecuted when you issue the CREATE DATABASE command. What does OFA stand for? OFA- Optimal Flexible Architecture is a set of guidelines to organize the files related to the Oracle database and software for better management and performance . Which command should be issued before you can execute the CREATE DATABASE command? You must start up the instance to create the database. Connect to the database by using the SYSDBA privilege and start theinstance by using the command STARTUP NOMOUNT.

How many control files are required to create a database? You do not need any control files to create a database; the control files are created when you create a database, based on thefilenames specified in the CONTROL_FILES parameter of the parameter file Which DB administration tools are included in the DBA Studio Pack? The DBA Management Pack is a set of tools integrated with the OEM , which helps administrators with their daily routine tasks.These tools provide complete database administration ,via GUI tools (vs. SQL *Plus), and can be accessed by using the OEM,through DBA Studio, or by individually accessing each tool.The DB Studio Pack includes Instance Manager, Schema Manager, Storage Manager, and Security Manager .Instance Manager allows you to startup or shut down an instance; modify parameters; view and change memory allocations, redologs, and archival status; age resource allocations and long-running sessions.Schema Manager allows you to create, alter, or drop any schema object, including advanced queries and Java-stored procedures.You can clone any object.Storage Manager allows you to manage tablespaces, data files, rollback segments, redo log groups, and archive logs.Security Manager allows you to change the security privileges for users and roles, and create and alter users, roles, and profiles. Which view has information about users who are ghranted SYSDBA or SYSOPER privilege? A dynamic view of V$PWFILE_USERS has the username and a value of TRUE in column SYSDBA if the SYSDBA privilege isgranted, or a value of TRUE in column SYSOPER if the SYSOPER privilege is granted. Using SQL*Plus, list two options which show the value of the parameter DB_BLOCK_SIZE? The SHOW PARAMETER command (SHOW PARAMETERDB_BLOCK_SIZE or SHOW ALL) will show the current value of the parameter. If you provide parameter name, its value is shown; if you omit the parameter name, all the values are shown. SHOW ALL in SQL *Plus will display the SQL *Plus environment

settings,not the parameters. 13. User SCOTT has opened a SQL * Plus session and left for lunch. When you queired the V$SESSION view, theSTATUS was INACTVE. You terminated SCOTT?s session in V$SESSION? When you terminate a session that is INACTIVE, the STATUS in V$SESSION will show as KILLED. When SCOTT tries to performany database activity in the SQL *Plus window, he receives an error that his session is terminated. When an ACTIVE session iskilled, the changes are rolled back and an error message is written to the user?s screen. Which parameter in the ORAPWD utility is optional? The parameter ENTRIES is optional. You must specify a password file name and the SYS password. The password file created willbe used for authentication. Which role is created by default to administer databases? The DBA role is created when you create the database and is assigned to the SYS and SYSTEM users. How do you make a database read-only? To put a database into read-only mode, you can mount the database and open the database in read-only mode. This can beaccomplished in one step by using STARTUP OPEN READ ONLY. Which SHUTDOWN option will wait for the users to complete their uncommitted transactions? When SHUTDOWN TRANSACTIONAL is issued, Oracle waits for the users to either commit or roll back their pending transactions.Once all users have either rolled back or committed their transactions, the database is shut down. When using SHUTDOWNIMMEDIATE, the user sessions are disconnected and the changes are rolled back. SHUTDOWN NORMAL waits for the user sessions to disconnect from the database. Which two values from the V$SESSION view are used to terminate a user session? The session identifier (SID) and the serial number (SERIAL ) uniquely identify each session and both are needed to kill a session.

List all the valid database start-up option? STARTUP MOUNT, STARTUP NOMOUNT, and STARTUP FORCE.STARTUP NOMOUNT is used for creating a new database or for creating new control files. STARTUP MOUNT is used for performing specific maintenance operations such as renaming data files, enabling or disabling archive logging, renaming, addingor dropping redo log files , or for performing a full database recovery .Finally, STARTUP FORCE is used to start a databaseforcefully, (if you have problems starting up an instance.) STARTUP FORCE shuts down the instance if it is already running and thenrestarts it. Name the parts of the database buffer pool. The database buffer pool consists of the keep buffer pool, recycle buffer pool, and the default buffer pool.The keep buffer pool retains the data block in memory.The recycle buffer pool removes the buffers from memory when it?s not needed.The default buffer pool contains the blocks that are not assigned to the other pools. When is the system change numbers assigned? System changed numbers (SCN) are assigned when a transaction is committed. The SCN is a unique number acting as an internaltimestamp, used for recovery and read-consistent queries. In other words, the SCN number is assigned to the rollback statement tomark it as a transaction committed. What is the minimum number of redo log files required in a database ?

The minimum number of redo log files required in a database is two because the LGWR (log writer )process writes to the redo logfiles in a circular manner. Which memory structure records all database changes made to the instance? The redo log files holds information on the changes made to the database data . Changes are made to the database throughinsert, update, delete, create, alter, or drop commands. When a SELECT statement is issued, which stage checks the user?s privileges? Parse checks the user?s privileges, syntax correctness, and the column names against the dictionary .Parse also determines theoptional execution plan and finds a shared SQL area for the statement. Which memory structures are shared? Name two. The library cache contains the shared SQL areas, private SQL areas, PL/SQL procedures, and packages, and control structures.The large pool is an optional area in the SGA. What is a dirty buffer? A dirty buffer refers to blocks in the database buffer cache that are changed, but are not yet written to the disk. Which component in the SGA has the dictionary cache? The dictionary cache is part of the shared pool. The shared pool also contains the library cache and control structures. Which component of the SGA contains the parsed SQL code?

The library cache contains the parsed SQL code. During parsing, Oracle allocates a shared SQL area for the statement in the librarycache, and stores its parsed representation there. If a query is executed again before it?s aged out of the library cache, Oracle willuse the parsed code and execution plan from the library cache. Describe a parallel server configuration. In a parallel server configuration multiple instances known as nodes can mount one database . In other words, theparallel server option lets you mount the same database for multiple instances. In a multithreaded configuration, one shared server process takes requests from multiple user processes List components of an Oracle instance? An Oracle instance is comprised of memory structures and background processes.The Systems Global Area (SGA) and shared pool are memory structures. The process monitor is a background process (DBWn,LGWR, ARCn, PMON, any others??). The Oracle database consists of the physical components such as data files, redo log files , and the control file. What are the various types of queries? Answer: The types of queries are: Normal Queries Sub Queries What is a transaction? Answer: A transaction is a set of SQL statements between any two COMMIT and ROLLBACK statements. What is implicit cursor and how is it used by Oracle? Answer: An implicit cursor is a cursor, which is internally created by Oracle. It is created by Oracle for each individual SQL.

Which of the following is not a schema object: Indexes, tables, public synonyms, triggers and packages? Answer: Public synonyms What is PL/SQL? Answer: PL/SQL is Oracle's Procedural Language extension to SQL.The language includes object orientedprogramming techniques such as encapsulation, function overloading, information hiding (all but inheritance), and so, brings stateof-the-art programming to the Oracle database server and a variety of Oracle tools. Is there a PL/SQL Engine in SQL*Plus? Answer: No. Unlike Oracle Forms, SQL*Plus does not have a PL/SQL engine. Thus, all your PL/SQL is send directly to the databaseengine for execution. This makes it much more efficient as SQL statements are not stripped off and send to the databaseindividually. Is there a limit on the size of a PL/SQL block? Answer: Currently, the maximum parsed/compiled size of a PL/SQL block is 64K and the maximum code size is 100K.You can runthe following select statement to query the size of an existing package or procedure. SQL> select * from dba_object_size wherename = 'procedure_name' Can one read/write files from PL/SQL? Answer: Included in Oracle 7.3 is a UTL_FILE package that can read and write files. The directory you intend writing to has to be inyour INIT.ORA file (see UTL_FILE_DIR=...parameter).Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUTwith the SQL*Plus SPOOL command.DECLAREfile Handler UTL_FILE.FILE_TYPE;BEGINfile Handler := UTL_FILE.FOPEN('/home/oracle/tmp', 'myoutput','W');UTL_FILE.PUTF(file Handler, 'Value of func1 is %sn', func1(1));UTL_FILE.FCLOSE(fileHandler);END; How can I protect my PL/SQL source code? Answer: PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code. Thisis done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than theoriginal).This way you can distribute software without having to worry about exposing your proprietary algorithms andmethods.SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no "decode"command available. The syntax is: wrap iname=myscript.sql oname=xxxx.yyy Can one use dynamic SQL within PL/SQL? ALTERNATIVELY, Can you use a DDL in a procedure? How? Answer: From PL/SQL V2.1 one can use the DBMS_SQL package to execute dynamic SQL statements.E.g.: CREATE OR REPLACE PROCEDURE DYNSQL AScur integer;rc integer;BEGINcur := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(cur,'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);rc := DBMS_SQL.EXECUTE(cur);DBMS_SQL.CLOSE_CURSOR(cur);END; What is implicit cursor and how is it used by Oracle? Answer: An implicit cursor is a cursor, which is internally created by Oracle. It is created by Oracle for each individual SQL.

Which of the following is not a schema object: Indexes, tables, public synonyms, triggers and packages? Answer: Public synonyms What is PL/SQL? Answer: PL/SQL is Oracle's Procedural Language extension to SQL.The language includes object orientedprogramming techniques such as encapsulation, function overloading, information hiding (all but inheritance), and so, brings stateof-the-art programming to the Oracle database server and a variety of Oracle tools. Is there a PL/SQL Engine in SQL*Plus? Answer: No. Unlike Oracle Forms, SQL*Plus does not have a PL/SQL engine. Thus, all your PL/SQL is send directly to the databaseengine for execution. This makes it much more efficient as SQL statements are not stripped off and send to the databaseindividually. Is there a limit on the size of a PL/SQL block? Answer: Currently, the maximum parsed/compiled size of a PL/SQL block is 64K and the maximum code size is 100K.You can runthe following select statement to query the size of an existing package or procedure. SQL> select * from dba_object_size wherename = 'procedure_name' Can one read/write files from PL/SQL? Answer: Included in Oracle 7.3 is a UTL_FILE package that can read and write files. The directory you intend writing to has to be inyour INIT.ORA file (see UTL_FILE_DIR=...parameter).Before Oracle 7.3 the only means of writing a file was to use DBMS_OUTPUTwith the SQL*Plus SPOOL command.DECLAREfileHandler UTL_FILE.FILE_TYPE;BEGINfileHandler := UTL_FILE.FOPEN('/home/oracle/tmp', 'myoutput','W');UTL_FILE.PUTF(fileHandler, 'Value of func1 is %sn', func1(1));UTL_FILE.FCLOSE(fileHandler);END; How can I protect my PL/SQL source code? Answer: PL/SQL V2.2, available with Oracle7.2, implements a binary wrapper for PL/SQL programs to protect the source code. Thisis done via a standalone utility that transforms the PL/SQL source code into portable binary object code (somewhat larger than theoriginal). This way you can distribute software without having to worry about exposing your proprietary algorithms and methods.SQL*Plus and SQL*DBA will still understand and know how to execute such scripts. Just be careful, there is no "decode" commandavailable. The syntax is: wrap iname=myscript.sql oname=xxxx.yyy Can one use dynamic SQL within PL/SQL? ALTERNATIVELY, Can you use a DDL in a procedure? How? Answer: From PL/SQL V2.1 one can use the DBMS_SQL package to execute dynamic SQL statements.E.g.: CREATE OR REPLACE PROCEDURE DYNSQL AScur integer;rc integer;BEGINcur := DBMS_SQL.OPEN_CURSOR; DBMS_SQL.PARSE(cur,'CREATE TABLE X (Y DATE)', DBMS_SQL.NATIVE);rc := DBMS_SQL.EXECUTE(cur);DBMS_SQL.CLOSE_CURSOR(cur);END; What are the various types of Exceptions? Answer: User defined and Predefined Exceptions. Can we define exceptions twice in same block?

Answer: No. What is the difference between a procedure and a function? Answer: Functions return a single variable by value whereas procedures do not return any variable by value. Rather they returnmultiple variables by passing variables by reference through their OUT parameter. Can you have two functions with the same name in a PL/SQL block? Answer: Yes. Can you have two stored functions with the same name? Answer: Yes. Can you call a stored function in the constraint of a table? Answer: No. What are the various types of parameter modes in a procedure? Answer: IN, OUT AND INOUT. What is Over Loading and what are its restrictions? Answer: Overloading means an object performing different functions depending upon the no. of parameters or the data type of theparameters passed to it. Can functions be overloaded? Answer: Yes. Can 2 functions have same name & input parameters but differ only by return data type Answer: No. What are the constructs of a procedure, function or a package? Answer: The constructs of a procedure, function or a package are:

variables and constants

cursors Why create or Replace and not Drop and recreate procedures? Answer: So that Grants are not dropped. Can you pass parameters in packages? How? Answer: Yes. You can pass parameters to procedures or functions in a package. What are the parts of a database trigger? Answer: The parts of a trigger are:

A triggering event or statement A trigger restriction A trigger action What are the various types of database triggers? Answer: There are 12 types of triggers, they are combination of: Insert Delete and Update Triggers. Before and After Triggers. Row and Statement Triggers. What is the advantage of a stored procedure over a database trigger? Answer: We have control over the firing of a stored procedure but we have no control over the firing of a trigger. What is the maximum no. of statements that can be specified in a trigger statement? Answer: One. Can views are specified in a trigger statement ? Answer: No What are the values of :new and :old in Insert/Delete/Update Triggers ? Answer: INSERT : new = new value, old = NULLDELETE : new = NULL, old = old valueUPDATE : new = new value, old = old value What are cascading triggers? What is the maximum no of cascading triggers at a time? Answer: When a statement in a trigger body causes another trigger to be fired, the triggers are said to be cascading.Max = 32. What are mutating triggers ? Answer: A trigger giving a SELECT on the table on which the trigger is written. What are constraining triggers ? Answer: A trigger giving an Insert/Update e on a table having referential integrity constraint on the triggering table. Describe Oracle database's physical and logical structure ? Answer:

Physical : Data files, Redo Log files, Control file. Logical : Tables, Views, Table spaces, etc. Can you increase the size of a table space ? How ? Answer: Yes, by adding data files to it. Can you increase the size of data files ? How ? Answer: No (for Oracle 7.0)yes (for Oracle 7.3 by using the Resize clause ) What is the use of Control files ? Answer: Contains pointers to locations of various data files, redo log files, etc. What is the use of Data Dictionary ? Answer: It Used by Oracle to store information about various physical and logical Oracle structures e.g. Tables, Table spaces, datafiles, etc What are the advantages of clusters ? Answer: Access time reduced for joins. What are the disadvantages of clusters ? Answer: The time for Insert increases. Can Long/Long RAW be clustered ? Answer: No. Can null keys be entered in cluster index, normal index ? Answer: Yes. Can Check constraint be used for self referential integrity ? How ? Answer: Yes. In the CHECK condition for a column of a table, we can reference some other column of the same table and thusenforce self referential integrity. What is the min.extents allocated to a rollback extent ? Answer: Two What are the states of a rollback segment ? What is the difference between partly available and needs recovery ? Answer: The various states of a rollback segment are :

ONLINE OFFLINE PARTLY AVAILABLE NEEDS RECOVERY INVALID. What is the difference between unique key and primary key ? Answer: Unique key can be null; Primary key cannot be null. An insert statement followed by a create table statement followed by rollback ? Will the rows be inserted ? Answer: No. Can you define multiple savepoints ? Answer: Yes. Can you Rollback to any savepoint ? Answer: Yes. What is the maximum no. of columns a table can have ? Answer: 254. What is the significance of the & and && operators in PL SQL ? Answer: 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 Can you pass a parameter to a cursor ? Answer: Explicit cursors can take parameters, as the example below shows. A cursor parameter can appear in a query wherever aconstant can appear.CURSOR c1 (median IN NUMBER) ISSELECT job, ename FROM emp WHERE sal > median; What are the various types of RollBack Segments ? Answer: The types of Rollback segments are as follows : Public Available to all instances Private Available to specific instance

Can you use %RowCount as a parameter to a cursor ? Answer: Yes Is the query below allowed :Select sal, ename Into x From emp Where ename = 'KING' (Where x is a record of Number(4) and Char(15)) Answer: Yes Is the assignment given below allowed :ABC = PQR (Where ABC and PQR are records) Answer: Yes Is this for loop allowed :For x in &Start..&End Loop Answer: Yes How many rows will the following SQL return :Select * from emp Where rownum < 10; Answer: 9 rows How many rows will the following SQL return :Select * from emp Where rownum = 10; Answer: No rows Which symbol precedes the path to the table in the remote database ? Answer: @ Are views automatically updated when base tables are updated ? Answer: Yes Can a trigger written for a view ? Answer: No If all the values from a cursor have been fetched and another fetch is issued, the output will be : error, last record,or first record ? Answer: Last Record A table has the following data : [[5, Null, 10]].What wills the average function return ? Answer: 7.5 Is Sysdate a system variable or a system function? Answer: System Function Consider a sequence whose corral is 1 and gets incremented by 1 by using the nextval reference we get the nextnumber 2.Suppose at this point we issue an rollback and again issue a nextval.What will the output be ?

Answer: 3 Definition of relational DataBase by Dr.Codd (IBM)? Answer: A Relational Database is a database where all data visible to the user is organized strictly as tables of data values andwhere all database operations work on these tables. What is Multi Threaded Server (MTA) ? Answer: In a Single Threaded Architecture (or a dedicated server configuration) the database manager creates a separateprocess for each database user. However, in MTA the database manager can assign multiple users (multiple user processes) to asingle dispatcher (server process), a controlling process that queues request for work thus reducing the databases memoryrequirement and resources. Which are initial RDBMS, Hierarchical & N/w database ? Answer: RDBMS - R system Hierarchical - IMS N/W - DBTG Difference between Oracle 6 and Oracle 7 Answer:ORACLE 7ORACLE 6Cost based optimizerRule based optimizer Shared SQL AreaSQL area allocated for each user Multi Threaded ServerSingle Threaded Server Hash ClustersOnly B-Tree indexingRoll back Size AdjustmentNo provisionTruncate commandNo provisionDistributed DatabaseDistributed QueryTable replication & snapshotsNo provisionClient/Server TechNo provision What is Functional Dependency Answer: Given a relation R, attribute Y of R is functionally dependent on attribute X of R if and only if each X-value has associatedwith it precisely one -Y value in R What is Auditing ? Answer: The database has the ability to audit all actions that take place within it. a) Login attempts, b) Object Access, c) Database Action Result of Greatest(1,NULL) or Least(1,NULL) NULL While designing in client/server what are the 2 imp.things to be considered ? Answer: Network Overhead (traffic), Speed, and Load of client server What are the disadvantages of SQL ?

Answer: Disadvantages of SQL are : Cannot drop a field Cannot rename a field Cannot manage memory Procedural Language option not provided Index on view or index on index not provided View updation problem When to create indexes ? Answer: To be created when table is queried for less than 2% or 4% to 25% of the table rows. How can you avoid indexes ? Answer: To make index access path unavailable Use FULL hint to optimizer for full table scan Use INDEX or AND-EQUAL hint to optimizer to use one index or set to indexes instead of another. Use an expression in the Where Clause of the SQL. What is the result of the following SQL :Select 1 from dual UNION Select 'A' from dual; Answer: Error Can database trigger written on synonym of a table and if it can be then what would be the effect if original tablewere accessed. Answer: Yes, database trigger would fire. Can you alter synonym of view or view ? Answer: No Can you create index on view Answer: No. What is the difference between a view and a synonym ? Answer: Synonym is just a second name of table used for multiple link of database. View can be created with many tables, and withvirtual columns and with conditions. However, synonym can be on view.

What's the length of SQL integer ? Answer: 32 bit length What is the difference between foreign key and reference key ? Answer: Foreign key is the key i.e. attribute which refers to another table primary key. Reference key is the primary key of tablereferred by another table. Can dual table be deleted, dropped or altered or updated or inserted ? Answer: Yes If content of dual is updated to some value computation takes place or not ? Answer: Yes If any other table same as dual were created would it act similar to dual? Answer: Yes For which relational operators in where clause, index is not used ? Answer: <> , like '%...' is NOT functions, field +constant, field||'' Assume that there are multiple databases running on one machine. How can you switch from one to another ? Answer: Changing the ORACLE_SID What are the advantages of Oracle ? Answer: Portability : Oracle is ported to more platforms than any of its competitors, running on more than 100 hardware platformsand 20 networking protocols. Market Presence : Oracle is by far the largest RDBMS vendor and spends more on R & D than most of its competitors earn in total revenue. This market clout means that you are unlikely to be left in the lurch by Oracle and there arealways lots of third party interfaces available. Backup and Recovery : Oracle provides industrial strength support for on-line backupand recovery and good software fault tolerance to disk failure. You can also do point-in-time recovery. Performance : Speed of a'tuned' Oracle Database and application is quite good, even with large databases. Oracle can manage > 100GB databases.Multiple database support : Oracle has a superior ability to manage multiple databases within the same transaction using a two-phase commit protocol. What is a forward declaration ? What is its use ? Answer: PL/SQL requires that you declare an identifier before using it. Therefore, you must declare a subprogram before calling it.This declaration at the start of a subprogram is called forward declaration. A forward declaration consists of a subprogramspecification terminated by a semicolon. What are actual and formal parameters ?

Answer: Actual Parameters : Subprograms pass information using parameters. The variables or expressions referenced in theparameter list of a subprogram call are actual parameters. For example, the following procedure call lists two actual parametersnamed emp_num and amount:Eg.raise_salary(emp_num, amount);Formal Parameters : The variables declared in a subprogram specification and referenced in the subprogram body are formalparameters. For example, the following procedure declares two formal parameters named emp_id and increase:Eg.PROCEDURE raise_salary (emp_id INTEGER, increase REAL) IS current_salary REAL; What are the types of Notation ? Answer: Position, Named, Mixed and Restrictions. What all important parameters of the init.ora are supposed to be increased if you want to increase the SGA size ? Answer: In our case, db_block_buffers was changed from 60 to 1000 (std values are 60, 550 & 3500) shared_pool_size waschanged from 3.5MB to 9MB (std values are 3.5, 5 & 9MB) open_cursors was changed from 200 to 300 (std values are 200 & 300)db_block_size was changed from 2048 (2K) to 4096 (4K) {at the time of database creation}. The initial SGA was around 4MB whenthe server RAM was 32MB and The new SGA was around 13MB when the server RAM was increased to 128MB. If I have an execute privilege on a procedure in another users schema, can I execute his procedure even though Ido not have privileges on the tables within the procedure ? Answer: Yes What are various types of joins ? Answer: Types of joins are: Equijoins Non-equijoins self join outer join What is a package cursor ? Answer: A package cursor is a cursor, which you declare in the package specification without an SQL statement. The SQLstatement for the cursor is attached dynamically at runtime from calling procedures. If you insert a row in a table, then create another table and then say Rollback. In this case will the row be inserted ? Answer: Yes. Because Create table is a DDL, which commits automatically as soon as it is executed. The DDL commits thetransaction even if the create statement fails internally (e.g. table already exists error) and not syntactically. What is an Oracle instance?

Overview of an Oracle InstanceEvery running Oracle database is associated with an Oracle instance. When adatabase is started on a database server (regardless of the type of computer),Oracle allocates a memory area called the System Global Area (SGA) and startsone or more Oracle processes. This combination of the SGA and the Oracleprocesses is called an Oracle instance. The memory and processes of an instancemanage the associated databases data efficiently and serve the one or multipleusers of the database.The Instance and the Database After starting an instance, Oracle associates the instance with the specifieddatabase. This is called mounting the database. The database is then ready to beopened, which makes it accessible to authorized users.Multiple instances can execute concurrently on the same computer, each accessingits own physical database. In clustered and massively parallel systems (MPP),the Oracle Parallel Server allows multiple instances to mount a single database.Only the database administrator can start up an instance and open the database.If a database is open, the database administrator can shut down the database sothat it is closed. When a database is closed, users cannot access theinformation that it contains.Security for database startup and shutdown is controlled via connections toOracle with administrator privileges. Normal users do not have control over thecurrent status of an Oracle database. What is a view? View A view is a tailored presentation of the data contained in one or more tables(or other views). Unlike a table, a view is not allocated any storage space, nor does a view actually contain data; rather, a view is defined by a query thatextracts or derives data from the tables the view references. These tables arecalled base tables. Views present a different representation of the data that resides within thebase tables. Views are very powerful because they allow you to tailor thepresentation of data to different types of users.Views are often used to: provide an additional level of table security by restricting access to apredetermined set of rows and/or columns of a table hide data complexity simplify commands for the user present the data in a different perspective from that of the base table isolate applications from changes in definitions of base tables express a query that cannot be expressed without using a view What is referential integrity? Rules governing the relationships between primary keys and foreign keys of tables within a relational database that determine data consistency. Referentialintegrity requires that the value of every foreign key in every table be matchedby the value of a primary key in another table. Name the data dictionary that stores user-defined constraints? USER_CONSTRAINTS What is a collection of privileges? user_tab_privs_madeuser_tab_privs_recd What is a Snapshot? A snapshot is a read-only copy of a table or a subset of a table. What is a collection of privileges? collection of privileges is role. What is a cursor? Cursor is a private sql work area used to perform manipulations on data using pl\sql. What is a sequence? It is database objects to auto generate numbers. Why Use Sql* Loader in Oracle Database? The Sql Loader module of the oracle database Management System loads data into an existing ORACLE table from an externalfiles.It is available locally only on CMS and PCs with oracle version 5. Throughout this documentation the CAR database describedin Referance A is used for illustration.There are several methods others than using SQL *Loader of inserting data into a table.1. The Sql insert command may be used from the SQL * Plus module,for

Example :insert into CAR values()where the values to be inserted into a row of the table are listed inside the parentheses. Dates and Characters data must beSurrounded by single quotes; items are separated by commas.2. Sql*Forms allows you to add rows interactively using forms. The forms may contain default values and checks for invalid data.3. ODL loads the table from a control file and separate fixed format data file. ODL is available on all versions of ORACLE . SQL *Loader is much more flexible than ODL and will eventually supersede it on all systems. What is a synonym ? A synonym is an alternative name for tables, views, procedures and other database objects generally when we have more than oneschema and we wish to access an object of a different schema then we create synonyms for that object in the schema where wewish to access the object. What is an exception ? Exception is an event that causes suspension of normal program execution. In oracle there are several types of exceptions1) Pre-defined exceptions like NO_DATA_FOUND,TOO_MANY_ROWS2) User-defined exceptions which would validate the business logic3) unnamed system exceptions which are raised due to errors in the application code .. you can name these exceptions usingPRAGMA EXCEPTION_INIT4)Unnamed programmer-defined exceptions. Exceptions that are defined and raised in the server by the programmer. In this case,the programmer provides both an error number (between -20000 and -20999) and an error message, and raises that exception witha call to RAISE_APPLICATION_ERROR.For all the exceptions raised oracle fills in sqleerm and sqlcode variable which provide the error message and error code for theexception raised. What are pseudo-columns in SQL? Provide examples? A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but youcannot insert, update, or delete their values.Examples:CURRVAL,NEXTVAL,ROWID,LEVEL What is a schema ? A database user account is called a schema. What is a co-related sub-query? It is very similar to sub-queries where the parent query is executed based on the values returned by sub-queries. but when comes toco-related sub queries for every instance of parent query subquery is executed and based on the result od sub-query the parentquery will display the record as we will have reference of parent queries in sub-queries we call these as correlated subquries.Therefore, we can define co-related sub query as for every record retrieval from the sub query is processed and based on result of process the parent record is displayed. What is trigger? Trigger is an event. It is used prevent the invalid entries of the data. Therehas a different types of trigger are available.1) row level trigger before insert, before delete, before updateafter insert, after delete, after update2) statement level trigger before insert ,before delete, before updateafter insert, after delete, after update3) INSTEAD OF trigger 4) Schema level Triggers5) System level Triggers Can we delete column? yes we can delete a column in a table, we can add a new column ,but we can not change the column_name.If. If we want to changethe column name delete that column and add with new column name. What happens if a primary key constraint is disabled and then enabled without fully specifying the index clause? The index is created in the users default tablespace and all sizing information is lost. Oracle doesnt store this information as a partof the constraint definition, but only as part of the index definition, when the constraint was disabled the index was dropped and theinformation is gone What is the difference between rowid and rownum?

rowid is an internal representation of a row in a table, it is effectively the primary key and can be used for fast access to the rowrownum is a function of a result set of your query:select * from emp where rownum = 1 will get the first row of your result set.Therefore, rowid is a function of the table. rownum is a function of the result set What is difference b/w trigger and procedure? Procedure:- When you want to perform any activity such as calculation, validations etc then create a function or procedure.Procedure runs only when you call them manually or from any forms or other procedure/functionsTrigger:If you want to perform any action when there is any insert update or delete on any database table. Trigger will run whenthere will be any activity(insert, update, delete) on table on which that trigger is written. What is the function of instead of trigger? You can create an INSTEAD OF trigger on any view to make it updatable. How you will avoid your query from using indexes? SELECT * FROM emp where emp_no+ =12345;i.e. you have to concatenate the column name with space within codes in the where condition.Suppose a customer table is having different columns like customer no, payments. What will be the query to select top three maxpayments?SELECT customer_no, payments from customer C1WHERE 3col_name)group by level;Example:Given a table called emp with the following columns: id number name varchar2(20) sal number For the second highest salary: select level, max(sal) from emp where level=2 connect by prior sal > sal group by levelselect level, min(col_name) from my_table where level = &n connect by prior (col_name) 1;Delete from emp where rowid not in (select distinct(duplicate_field) from emp) Which is faster - IN or EXISTS? EXISTS is faster than IN because EXISTS returns a Boolean value whereas IN returns a value.What are cursor attributes?%ROWCOUNT%NOTFOUND %FOUND%ISOPEN What is the use of CASCADE CONSTRAINTS? When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. What is the advantage of specifying WITH GRANT OPTION in the GRANT command? The privilege receiver can further grant the privileges he/she has obtained from the owner to any other user. What does the following query do? SELECT SAL + NVL(COMM,0) FROM EMP;This displays the total salary of all employees. The null values in the commission column will be replaced by 0 and added to salary. What will be the output of the following query? SELECT REPLACE(TRANSLATE(LTRIM(RTRIM(!! ATHEN !!,'!), !), AN, **),*',TROUBLE) FROM DUAL;TROUBLETHETROUBLE Which system table contains information on constraints on all the tables created? USER_CONSTRAINTS Which system tables contain information on privileges granted and privileges obtained? USER_TAB_PRIVS_MADE, USER_TAB_PRIVS_RECD Why does the following command give a compilation error? DROP TABLE &TABLE_NAME;Variable names should start with an alphabet. Here the table name starts with an & symbol. Which command executes the contents of a specified file?

START or @. What operator tests column for the absence of data? IS NULL What is the use of the DROP option in the ALTER TABLE command? It is used to drop constraints specified on the table. What operator performs pattern matching? LIKE Which date function is used to find the difference between two dates? MONTHS_BETWEEN What will be the output of the following query? SELECT DECODE(TRANSLATE(A',1234567890,1111111111), 1,YES, NO );NOExplanation :The query checks whether a given string is a numerical digit. Which command displays the SQL command in the SQL buffer, and then executes it? RUN What is the value of comm and sal after executing the following query if the initial value of sal is 10000 UPDATE EMP SET SAL = SAL + 1000, COMM = SAL*0.1;sal = 11000, comm = 1000 Which function is used to find the largest integer less than or equal to a specific value? FLOOR What is the parameter substitution symbol used with INSERT INTO command? What are the wildcards used for pattern matching? _ for single character substitution and % for multi-character substitution What is the output of the following query SELECT TRUNC(1234.5678,-2) FROM DUAL;1200TRUNCATE TABLE EMP;DELETE FROM EMP; Will the outputs of the above two commands differ? Both will result in deleting all the rows in the table EMP.However, we cant rollback after truncating a table where as we can rollback after delete.Delete is DML where as rollback is DDLtruncate will release the storage space where as delete wont release storage space. What command is used to create a table by copying the structure of another table?CREATE TABLE .. AS SELECT command To copy only the structure, the WHERE clause of the SELECT command should contain a FALSE statement as in the following. CREATE TABLE NEWTABLE AS SELECT * FROM EXISTINGTABLE WHERE 1=2;If the WHERE condition is true, then all the rows or rows satisfying the condition will be copied to the new table. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables? DDL What is the use of DESC in SQL?

DESC has two purposes. It is used to describe a schema as well as to retrieve rows from table in descending order.Explanation :The query SELECT * FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order. How do I display row number with records? select rownum, ename from emp;Output:1 Scott2 Millor 3 Jiyo4 Smith Display Top n rows? SELECT * FROM (SELECT * FROM my_table ORDER BY col_name_1 DESC) WHERE ROWNUM SELECT *2 FROM (SELECT job,3 sum(decode(deptno,10,sal)) DEPT10,4 sum(decode(deptno,20,sal)) DEPT20,5 sum(decode(deptno,30,sal)) DEPT30,6 sum(decode(deptno,40,sal)) DEPT407 FROM scott.emp8 GROUP BY job)9 ORDER BY 1;JOB DEPT10 DEPT20 DEPT30 DEPT40 - - - - ANALYST 6000CLERK 1300 1900 950MANAGER 2450 2975 2850PRESIDENT 5000SALESMAN 5600Oracle reserved wordsSELECT * FROM V$RESERVED_WORDS;How to display 100 as ONE HUNDRED?select to_char(to_date(100,jsp),j') from dual;Matrix reportselect * from (selectcount(decode(to_char(hiredate,MON),DEC,hiredate)) DEC,count(decode(to_char(hiredate,MON),FEB,hiredate)) FEB,count(decode(to_char(hiredate,MON),MAR,hiredate)) MAR,count(decode(to_char(hiredate,MON),APR,hiredate)) APR,count(decode(to_char(hiredate,MON),JAN,hiredate)) JAN,count(decode(to_char(hiredate,MON),AUG,hiredate)) AUG,count(decode(to_char(hiredate,MON),SEP,hiredate)) SEPfrom emp)output DEC FEB MAR APR JAN AUG SEP3 2 0 2 1 0 2 What is a database buffer cache? Database buffer cache is one of the required SGA component. It caches recent accessed data. It keeps the entry (transaction) in thebuffer cache till it is written on the disk (which is done by DBWn background process) at a scheduled time or when ever possible byOracle. Blocks in database buffer cache can be in the any of the following state: PINNED(it is an active transaction), CLEAN(instance is just started so it is empty or it has been flushed to the disk and can be reused) , DIRTY (transaction is completed butblocks are waiting to be written on the disk by DBWn). To see current user name Sql> show user; Change SQL prompt name SQL> set sqlprompt Manimara > Manimara >Manimara > Switch to DOS prompt SQL> host How do I eliminate the duplicate rows ? SQL> delete from table_name where rowid not in (select max(rowid) from table group by duplicate_values_field_name);or SQL> delete duplicate_values_field_name dv from table_name ta where rowid <(select min(rowid) from table_name tb whereta.dv=tb.dv);Example.Table EmpEmpno Ename101 Scott102 Jiyo103 Millor 104 Jiyo105 Smithdelete ename from emp a where rowid < ( select min(rowid) from emp b where a.ename = b.ename);The output like,Empno Ename101 Scott102 Millor 103 Jiyo104 Smith How do I display row number with records? To achieve this use rownum pseudocolumn with query, like SQL> SQL> select rownum, ename from emp;Output:1 Scott2 Millor 3 Jiyo4 Smith Display the records between two ranges. select rownum, empno, ename from emp where rowid in

(select rowid from emp where rownum <=&uptominusselect rowid from emp where rownum<&Start);Enter value for upto: 10Enter value for Start: 7ROWNUM EMPNO ENAME--------- --------- ----------1 7782 CLARK2 7788 SCOTT3 7839 KING4 7844 TURNER I know the nvl function only allows the same data type(i.e. number or char or date Nvl(comm, 0)), if commission isnull then the text Not Applicable want to display, instead of blank space. How do I write the query? SQL> select nvl(to_char(comm.),'NA') from emp;Output :NVL(TO_CHAR(COMM),'NA')----------------------NA300500NA1400NANA Oracle cursor : Implicit & Explicit cursors Oracle uses work areas called private SQL areas to create SQL statements.PL/SQL construct to identify each and every work are used, is called as Cursor.For SQL queries returning a single row, PL/SQL declares all implicit cursors.For queries that returning more than one row, the cursor needs to be explicitly declared. Explicit Cursor attributes There are four cursor attributes used in Oraclecursor_name%Found, cursor_name%NOTFOUND, cursor_name%ROWCOUNT, cursor_name%ISOPEN Implicit Cursor attributes Same as explicit cursor but prefixed by the word SQLSQL%Found, SQL%NOTFOUND, SQL%ROWCOUNT, SQL%ISOPENTips : 1. Here SQL%ISOPEN is false, because oracle automatically closed the implicit cursor after executing SQL statements.: 2. All are Boolean attributes. Find out nth highest salary from emp table SELECT DISTINCT (a.sal) FROM EMP A WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM EMP B WHEREa.sal<=b.sal);Enter value for n: 2SAL---------3700 To view installed Oracle version information SQL> select banner from v$version; Display the number value in Words SQL> select sal, (to_char(to_date(sal,'j'), 'jsp'))from emp;the output like,SAL (TO_CHAR(TO_DATE(SAL,'J'),'JSP'))-------- -----------------------------------------------------800 eight hundred1600 one thousand six hundred1250 one thousand two hundred fiftyIf you want to add some text like,Rs. Three Thousand only.SQL> select sal "Salary ",(' Rs. '|| (to_char(to_date(sal,'j'), 'Jsp'))|| ' only.'))"Sal in Words" from emp/Salary Sal in Words------- -----------------------------------------------------800 Rs. Eight Hundred only.1600 Rs. One Thousand Six Hundred only.1250 Rs. One Thousand Two Hundred Fifty only. Display Odd/ Even number of records Odd number of records:select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);135Even number of records:select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)246 Which date function returns number value? months_between Any three PL/SQL Exceptions? Too_many_rows, No_Data_Found, Value_Error, Zero_Error, Others What are PL/SQL Cursor Exceptions? Cursor_Already_Open, Invalid_Cursor Other way to replace query result null value with a text

SQL> Set NULL N/Ato reset SQL> Set NULL What are the more common pseudo-columns? SYSDATE, USER , UID, CURVAL, NEXTVAL, ROWID, ROWNUM What is the output of SIGN function? 1 for positive value,0 for Zero,-1 for Negative value. What is the maximum number of triggers, can apply to a single table? 12 triggers. How would you determine the time zone under which a database was operating? select DBTIMEZONE from dual; 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 toTRUE it enforces database links to have the same name as the remote database to which they are linking. What command would you use to encrypt a PL/SQL application? WRAP 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 aprocedure 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 functions and procedures that are grouped together based on their commonality to a business function or application. Explain the use of table functions. Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in aSQL statement. They are also used to pipeline information in an ETL process. Name three advisory statistics you can collect. Buffer Cache Advice, Segment Level Statistics, & Timed Statistics Where in the Oracle directory tree structure are audit traces placed? In unix $ORACLE_HOME/rdbms/audit, in Windows the event viewer Explain materialized views and how they are used. Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from basetables. They are typically used in data warehouse or decision support systems. When a user process fails, what background process cleans up after it? PMON What background process refreshes materialized views? The Job Queue Processes. How would you determine what sessions are connected and what resources they are waiting for? Use of V$SESSION and V$SESSION_WAIT Describe what redo logs are.

Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aidin the recovery of a database. How would you force a log switch? ALTER SYSTEM SWITCH LOGFILE; Give two methods you could use to determine what DDL changes have been made. You could use Logminer or Streams What does coalescing a tablespace do? Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents intolarge single extents. What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace? A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store thoseobjects meant to be used as the true objects of the database. Name a tablespace automatically created when you create a database. The SYSTEM tablespace. When creating a user, what permissions must you grant to allow them to connect to the database? Grant the CONNECT to the user. How do you add a data file to a tablespace? ALTER TABLESPACE <tablespace_name> ADD DATAFILE <datafile_name> SIZE <size> How do you resize a data file? ALTER DATABASE DATAFILE <datafile_name> RESIZE <new_size>; What view would you use to look at the size of a data file? DBA_DATA_FILES What view would you use to determine free space in a tablespace? DBA_FREE_SPACE How would you determine who has added a row to a table? Turn on fine grain auditing for the table. How can you rebuild an index? ALTER INDEX <index_name> REBUILD; Explain what partitioning is and what its benefit is. Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces. You have just compiled a PL/SQL package but got errors, how would you view the errors? SHOW ERRORS How can you gather statistics on a table? The ANALYZE command. How can you enable a trace for a session?

Use the DBMS_SESSION.SET_SQL_TRACE or Use ALTER SESSION SET SQL_TRACE = TRUE; 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 beingproduced 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. Name two files used for network connection to a database. TNSNAMES.ORA and SQLNET.ORA Technical - UNIX Every DBA should know something about the operating system that the database will be running on. The questions here are relatedto UNIX but you should equally be able to answer questions related to common Windows environments. How do you list the files in an UNIX directory while also showing hidden files? ls -ltra How do you execute a UNIX command in the background? Use the "&" What UNIX command will control the default file permissions when files are created? Umask Explain the read, write, and execute permissions on a UNIX directory. Read allows you to see and list the directory contents.Write allows you to create, edit and delete files and subdirectories in the directory.Execute gives you the previous read/write permissions plus allows you to change into the directory and execute programs or shellsfrom the directory. The difference between a soft link and a hard link? A symbolic (soft) linked file and the targeted file can be located on the same or different file system while for a hard link they must belocated on the same file system. Give the command to display space usage on the UNIX file system. df -lk Explain iostat, vmstat and netstat. Iostat reports on terminal, disk and tape I/O activity. Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity.Netstat reports on the contents of network data structures. How would you change all occurrences of a value using VI? Use : %s/<old>/<new>/g Give two UNIX kernel parameters that effect an Oracle install SHMMAX & SHMMNI Briefly, how do you install Oracle software on UNIX.

Basically, set up disks, kernel parameters, and run orainst.I hope that these interview questions were not too hard. Remember these are "core" DBA questions and not necessarily related tothe Oracle options that you may encounter in some interviews. Take a close look at the requirements for any job and try to extractquestions that interviewers may ask from manuals and real life experiences. For instance, if they are looking for a DBA to run their databases in RAC environments, you should try to determine what hardware and software they are using BEFORE you get to theinterview. This would allow you to brush up on particular environments and not be caught off-guard. How to remove records from table? delete From <table>; why use cursors? Cursor is used to process multiple rows using pl/sql. Can We Create a Synonym On Trigger? Yes, We can create Public and Private Synonyms on Triggers. How to display 1 to 10 numbers using one select statement. Select level from dual connect by level<=10 what is the difference between RDBMS and DBMS In RDBMS main objects to establish the relationshipbetween the objects. there is no relation ship concept inDBMS.In RDBMS every data stored in the form of tables. in DBMSevery data stored in the form of files.RDBMS requires hugesoftware and hardware.DBMS requires less software andhardware. what is sanity test sanity testing is a 0 level testing or initial testing or smoke testing. It is done to test that whether the build isstable for further testing or not. what will be happen if invoice match with po? Before matching the status of the po is unbilled or accrued.When the po matched to the po status is changed to billedin addition, the balance in the accrued payable a/c transferred toaccounts payable account.after matching with po u can validate the invoice and paythem. then u can finally close the po so that it will notappear in the list of value again what is jumbi process? It is a dead process. Its parent process has been killed abruptly. My machine is running half duplex mode how to change half duplex to full duplex? [root@ns2 ~] mii-tool -Vmii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)eth0: negotiated 100baseTx-FD flow-control, link ok[root@ns2 ~] ethtool -s eth0 duplex half autoneg off [root@ns2 ~] mii-tool -Vmii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)eth0: 100 Mbit, half duplex, no link[root@ns2 ~] mii-tool -Vmii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds) eth0: 100 Mbit, half duplex, link ok some one is asking my machine is slow what are your steps? The increase in the size of SWAP partition may show you thelittle effect in increasing the system speed and better runin Single user mode rather than GUI mode. What is memmove? "memmove" can safely handle the situation where the sourcestring overlaps the destination stringan exampleptr = memmove( s1, s2, N );"memmove" copies exactly N characters from the string "s2"into the area of memory pointed to

by "s1". Unlike thefunction "strncpy", "memmove" does not check for theterminating '\0' of string "s2"; it simply copies Ncharacters. It does not put a terminating '\0' on the end of string "s1". what is bytecode? What is the difference between machine code and bytecode? JAVAC compiles the java file and converts the program inbytecode(machine independent). Later JVM refers this andconverts the bytecodes in machine code.For any component like Report, Interface etc we have to first get the requirementsas to what is the source , destinations, what data shouldvalidations would be required etc. All this would go into the MD050. Generally written bynon-technical people like Business Analysts or Functional Consultants.MD070 is the technical document that is written to fulfill the functional requirementspecified in MD050. It includes the approaches you take, pseudocode, Validations,Data Sources, SQL Statements etc. what is a flexfield qualifier ? Oracle Applications products use flexfield qualifiers toidentify certain segments used for specific purposes. e.g.:segment named 'Account' is qualified as 'Natural Account sothat it identifies Accounts, similarly a segmentnamed 'Company' can be qualified as 'Balancing Segment',i.e., for these segment values B/S can be brought out in Accounting Flexfield in GL. what are the functions you are used in utl_file at the time of transferring the data? We will use following three functions to generate the file.1)Utl_File.fopen = To open (or) Create the file2)Utl_File.Put_line = To Transfer the data into the File.3)Utl_File.fclose = To close the File after Data transfer. which statement is to run fast i.e. insert or delete? insert What is difference b/w Credit memo and Adjustment in AR. Credit Memo is raised to give a credit to the customer &does not require an approvals in Oracle while an adjustmentis done either to increase the invoice amount or decreasethe invoice amount & will require an approval. How do you connect to your servers? Local Area Network what difference between extra information type and special information type? Extra Information are normally all descriptive fields andSpecial Information is Key flexfield.Extra Information , which stores additional informationwhereas Special Info Identifies the entities. what is diff., between bug and defect. Bug: Deviation from requirement is a bug.Defect: Defect is the one, which will cause the softwarefailure.Therefore, Bug is Cause for defect. Defect is effect of the bug.One more thing in real time people use these both terms asSynonymic words. Majority of people say both are same.still any one of have doubts regarding this concept feelfree to call or mail me what is the defect status for bugs. Defect status is decided by QA & Dev. It is not mandatoryto same in all over the industry. It depends on Project sizeIn addition, type and size of the team as well. what is defect life cycle in test director desc,status,severity Difference between validation and regression testing. Both are interrelated.1) Regression Testing is a Testing Technique that we use tovalidate/ensure that the earlier tested module doesn't leadto any defects after the integration with other modules. Means it works properly after integration.2)Validation is the major thing in the whole process, Basedon that we decide whether the product meet the SRS, andready for deployment...

What is validation and verification Verification is a set of activities carried out to seewhether we are we building the system right.Validation is a set of activities carried out to checkwhether we are we building the right system. what are the main benefits of web-logic(application server). An application server is a software engine that deliversapplications to client computers or devices, typicallythrough the Internet and using the Hypertext Transfer Protocol. Application servers are distinguished from webservers by the extensive use of server-side dynamic content andfrequent integration with database engines. An application server handles most, if not all, of thebusiness logic and data access of the application (a.k.a.centralization). The main benefit of an application server is the ease of application development, since applicationsneed not be programmed; instead, they are assembled frombuilding blocks provided by the application server what is the difference bet., MYSQL and ORACLE. 1.Some syntactic differences between Mysql and Oracle.2.Oracle is not open source mysql is open source database.3.Mysql does not have a language such as PL/SQL, butinstead allows.4.Mysql support auto increment function. Oracle does notsupport auto increment function.5.Oracle support sub queries. Mysql does not support subqueries.6.Mysql does not support views, trigger, indexing,sequence. Store procedure oracle support.7.Oracle is generally use for much larger applications thenmysql.8.Oracle requires much more setup and tuning then mysql. What is the difference between 2-Tier architecture and 3-Tier architecture. 2-tier - also called client/server applications whichconsist of two separate applications, one server application (typically a database server like Oracle, MSSQLalternatively, any other standalone database) and a client application.suppose you want to have many different clients for front-end would be unwise to copy all the business logic (all therules of your application) to each client app.,. so itsbetter to create a middle layer containing the businesslogic, and then let the clients talk with this middlelayer. Thus the clients can relatively changedfor other types of clients, without need for rememberinghow was the business logic put together.3-tier architecture where one tier is the backend databaseengine, one is the front end client and one is just inbetween them, also named the application server or businesslogic node.its uses mainly Load balancing and Fault tolerance. What is the difference between a Application Server and a Database. Application Server contains all the databases that holdthe business data.Database resides in the application server. What are Mandatory triggers to write in the block, which is created on view? pre_from ,when_new_item_instance, Give full details of this ORA-12988: cannot drop column from table owned by SYS. If this is the only error message, you should stop trying tomodify a system table (table owned by sys), as this is notallowed. How will you assign all the variables of an dataset into a macro variableseparated by a space? For example if a dataset has variables A,B,C.Assign them to a macro variable X as X=A B C. Use PROC SQL; Select * into: macro_variables separatedby ' ' from table; No. of clients in Siebel applications? Siebel WebClient(using browser we connect to server)Mobile Webclient(local)Hand HeldWireless Webclient(which uses WAP protocol to connect toserver)Dedicated client(which connects directly server Database) what is work structure? work structure is termed as mother route of all modules.Work structure is the core area where all the setups aredone. how many types of extra information are there? Following Extra Information (EIT) Types are available inHRMS :1. Location2. Job3. Position4. People5. Assignment6. Element7. Contact

TNS-12564: TNS:connection refused. Cause: The connect request was denied by the remote user (or TNS software). Action: Not normally visible to the user. For further details, turn on tracing and reexecute the operation. ORA-31514: change set string disabled due to capture error. Cause: This change set has encountered a capture error andwas disabled. Action: Contact the change set's publisher to request thatthe capture error is resolved. Subscriptions using thischange set cannot be activated or have their subscriptionwindows extended or purged until the capture error is resolved. Write the test cases for triangle. Assume that the prg takes inputs as 3 sides of triangle :1. Enter 0 0 0 : Error : no triangle can be made2. Enter -1 -1 1 Error : no triangle can be made -ve values3. Enter 1 0 x : Error : no triangle can be made . onlynumbers and no alphabets4. Do not enter any values : Prompt to enter valid values5. Enter 0.000000000000001 , 1000000000000,1000000000000 :Triangle should be made (Boundary value)6. And the most trickyEnter 1 2 4 : Triangle can not be made . Summation of 2sides should always greater than third value . 1+2<4 . Sotriangle can not be made7. 2 2 2 : Equilateral triangle8. 1 2 2 : Isosceles triangle9. Test with very small values , very large values andcombinations of both . Could you please explain me about QTP framework. frameworks are set of defined rules for automating a testprocess. it could be said as automation test approachLINEAR FRAMEWORK recording, enhancement, playback. here ucreate scenarios, do recording based onscenarios, enhancement is done for verifications, andplayback for executionDATA DRIVEN here an external database is maintained for passing values to the actions in qtp. values are completelypassed only through this data sets.KEYWORD DRIVEN using the manually entered table thatdefines test object, operation, data and description , VBscripts are automatically generated by QTP.DESCRIPTIVE PROGRAMMING it is the concept of execution of scripts without the reference of object DIALOG(CLASS = DIALOG,CAPTION = Login). Winbutton(class= Button,Text = OK).ClickFUNCTIONAL/MODULAR here the actions are declared as user defined functions. these functions are called wherever needed.HYBRID FRAMEWORK mix of any of the above framework areclassified as hybrid. depending on complexity of theapplication, mixes are chosen. Consider a scenario where there are two action sheets say action 1 andaction 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how? By Parameters.In Reusable Action1-Declare -name=Parameter ("name")In Calling Action2-Call RunAction ["Action1"],nameHere, the Action2 will take value of the variable -namefrom Action1. The conditions are:Parameter("name")- Should be declared in Reusable Action1. Tell me the test cases for a search and replace functionality in a Microsoftdocument (.doc)? Open a already existing document with some content in it.Case is replacing the word "testcase" with "TC"1. Click on Edit menu tab and then click on Find.2. A editable window pops up with various tabs on itfind, replace and go to(default Find tab will be selected)3. Corresponding to "Find what?" there exists a edit boxenter "testcase" in that and click "find next" button.4. A pop-up message appears with message "Window finishedsearching the document". Click OK button on this.5. Click Replace tab on this and in replace with edit boxtype "TC" and click "replace or replace all" buttons basedon your case.6. A pop-up message appears with appropriate message.combination of 2 or more points should be considered astest cases and tested. How can we do security testing while testing a project. security means the application has provide the security or not for the customer side data.for ex:-login screen1)authentication2)access control3)encryption4)copy and paste the pwd not valid5)copy and cut the pwd not valid IN V-Model, from where a tester involves and from where a developer will involve??? Both developer and tester will involve rite from thebeginning requirement analysis.

What are the methods you followed, while doing black box testing??? During black box testingthey r two types of technique levels1)low level2)high levelunder low level1)boundary value analysis2)equivalence class partitioning3)error based4)special valueunder high level1)flow chart2)decision table3)state machine What are the types of testing we cannot do, by using automation tools? Testing that cannot be sensibly carried out via automationare those tests relating to subjective measures of quality. As an example when is an image clear enough, does somethinglook good, is the workflow ergonomic. In response to theprevious answer, of course the GUI can be tested byautomation this type of testing is carried out daily bythousands of organizations. What is the purpose of using the N=PS option? The N=PS option creates a buffer in memory which is largeenough to store PAGESIZE (PS) lines and enables a page tobe formatted randomly prior to it being printed. how can one connect two fact tables ? is it possible ? how? This confirms dimension methodology. If a dimension table isconnected to more then one Fact table is called confirmdimension. WHAT IS THE NAME OF THAT PORT IN DYNAMIC CACHE, WHICHIS USED FOR INSERT , UPDATE OPRATION ? Associate portdata from different locations means every one have oneprimary key, while transforming the data into target thattime more than two key not in use so if you use surrogatekey it will identified the duplicate fields in dimensionaltable. what is Enterprise Guide? what is the use of it? Sas enterprise guide is a separate licensed tool for Performing analysis on the data with out writing any code.It is just point and click to perform all the tasks likePrint, gchart, stats etc.Current version for enterprise guide is 4.1 In VSS, How the documents send to local folder? copy pasteor any other? please explain about VSS TOOL kit? we need to login to VSS and set to the path where you wouldlike to copy the files from VSS. Then, Do either check outalternatively, copy the latest versions or open read-only modes. How can we serialize a jsp page. We can write a java program and can use in jsp usinguse:bean what is the function to get the ascii value of the character? ascii(char) what are scrubing procedures in SAS? proc sort with nodupkey option.coz it will eliminate the duplicate values.on a LAN but need remote access to it. The remote accessserver allows users to gain access to files and printservices on the LAN from a remote location. For example, auser who dials into a network from home using an analogmodem or an ISDN connection will dial into a remote accessserver. Once the user is authenticated he can access shareddrives and printers as if he were physically connected tothe office LAN.See the Server Types page in the Quick Reference section of Webopedia for a comparison of server types. what is place holder column? Place holder column is a column for which you set thedatatype and value in pl/sql that you defineyou can set the value of a placeholder column in thefollowing places1. the before report trigger, if the placeholder is areport_level column.2. A report level formula column, if the placeholder is areport_level column.3. A formula in the placeholders group or a group belowit(the value is set once for each record of the group)

Surrogate keys usage in Oracle and Informatica? surrogate key is one type of key, which is used to maintainhistory . It is used in slowly changing dimension (scd) What templates used to design the test cases? To design test cases there are templates for writing testcases. In the Templates there is serial number, action tobe performed, test data, expected result, actual result anddefect id has to be given. What are the triggers associated with image items ? WHEN-IMAGE-PRESSEDWHEN-IMAGE-ACTIVATED What is trigger associated with the timer ? when_timer_expired Can a property clause itself be based on a property clause ? Yes a property Clause itself can be based on another property Clause. The join defined by the default data link is an outer join yes or no ? No its not outer join but it is an equi/natural join Can a field be used in a report without it appearing in any data group? Yes, a field can exist in report without it appearing in anydata group.For ex: page number can exist in report. How do you optimize SQL queries ? Most often, Databases have bad designs and are notnormalized. This can greatly affect the speed of your Database. As a general case, learn the 3 Normal Forms andapply them at all times. The normal forms above 3rd NormalForm are often called de-normalization forms but what thisreally means is that they break some rules to make theDatabase faster.What I suggest is to stick to the 3rd normal form except if you are a DBA (which means you know subsequent forms andknow what you're doing). Normalization after the 3rd NF isoften done at a later time, not during design.for more information go Through below linkhttp://www.serverwatch.com/tutorials/article.php/2175621 How can we take a backup of a mysql table and how can we restore it. ? MySQL provide an UI based tool called 'MySQL Administrator'.This tool helps to take backup and restore backup. How do you write a test plan? Before writing "Test plan" you have to look intoon "Functional specifications" . functional specificationsinturn depends on "Requirements". so one should have clear understanding of requirements and functional specificationsto write a test plan. How experienced are you with customized reporting and use of Data _Null_ features? _Null_ is usefully only When u want to use Datastep withoutactually creating a SAS dataset. A set statement specifiesthe SAS dataset that you want to read from.Data _null;Set Clinic.stress; What do you feel about hardcoding? Its better to avoid hardcoding as--it overrides the database controls in clinical datamanagement.----data often change in a trial over time, and thehardcode that is written today may not be valid in thefuture. Do you prefer Proc Report or Proc Tabulate? Why? Proc report is very flexible to create tables than proctabulate as itIt supports built-in formatsIn addition, it has both the features of displaying output onreport template and creating datasets. What techniques and/or PROCs do you use for tables?

Proc contestproc freq by tablesproc tabulate by var proc summary Describe the types of SAS programming tasks that you performedlike Tables? Listings? Graphics? Ad hoc reports? Other? Tables, why because Non-technical peoples understand easily. You have a sheet cake. There is a rectangular piece missing from theinside of the sheet cake. The location of the missing piece is arbitrary. I was toldI could assume I had the means to make the cuts. How do you divide the sheetcake into 2 even proportions with 2 cuts? It can be done in only one cut. Cut the cake half way alongthe thickness of the cake. No matter where ever therectangular cut is two equal proportions are assured. Can you write Java code for declaration of multiple inheritance in Java Class C extends A implements B What are the disadvantages of using threads? Because of threading deadlock, Race condition may arrived andstarvation may happen. Given two tables Student(SID, Name, Course) and Level(SID, level) writethe SQL statement to get the name and SID of the student who are takingcourse = 3 and at freshman level. SELECT Student.name, Student.SIDFROM Student, LevelWHERE Student.SID = Level.SID AND Level.Level = "freshman" AND Student.Course = 3; what about "char *(*(*a[])())();" Simply it is a string. Because in C the contents within "" willtreat as strings. Will Macros support multiple arguments ? Yes they will support multiple arguments Why the use of alloca() is discouraged? If you use alloca inside a function when it returns fromfunction it will be resulting in memory leak. Thats whyits discouraged to use. what are brk, sbrk? These are the system calles used to allocate the memory.brk will call internally when u calls malloc function. What is the main diff between Subquery and a Join. Majorly subquries run independently and result of thesubquery used in the outer query(other than correlated subquery). And in case of join a query only give the result when the joining condition gets satisfied. How to test URl of a website manually? Manual Testing-Start Browser (Anyone..IE,Netscape,Opera...etc...)..Makesure Internet is Connected...Type URL in to addressBar...Then Press ENTER. What is the security level used in BO? They r four 1.hidden2.disable3.inhernt4.enable Give two UNIX kernel parameters that affect an Oracle install. SHMMNI=Max no of shared segments,SHMMAX=Max size of each shared segmentsSHMSEG=specifies the semaphores Can we take report on Excel in Business Objects?

yes. The business objects separately provided the option of get the report data from universe or others(personal dataoption)in the business objects entered wizard. Click or Select the others option and it will let u different filesalternatively, extension files. here select .xls file and follow normalreport style. What Does SRM Stand For? Supplier Relationship Management. how you test broken link using the automated tool QTP ? Go for Insert->Standard check point->select one object->then select its parent page->therefore, it displays check point propertiesthen select "Broken link" option from that wizardThis the way we can check the broken links.. what is the difference between union and union all. Union is used to select distinct values from two tableswhere as union all is used to select all values includingduplicates from the tables how to retrieve the top 3 salaries of the table using rownum select salary_column from salary_tablewhere rownum<4order by salary_column desc. what are the advantages of primary key over unique+notnull. Primary key will avoid duplicate and null values in a tablewhich the combination of unique+not null will do. But theadvantage is, if a table has primary key we can createrelation to child tables. What is the difference between in-proc and out-of-proc? An in-proc is one, which runs in the same process area as that of the client giving the advantage of speed but thedisadvantage of stability because if it crashes it takes theclient application also with it. Out-of-proc server is onethis works outside the clients memory thus giving stabilityto the client, but we have to compromise a bit on speed.DLL's are In-proc and EXE's are Out-of-Proc servers. What is the Symbol use for Inner Join. The inner join is same as equi join, in which '=' sign isused. What is meant by the bug state "Reproduce"? Reproduce is nothing but we need to open again the bugwhich we found in testing with steps what we followed toopen the bug in previous time. What is the test case, test scenario, test suit and explain differences between the above ones. Test Case: It is a condition to test ScenarioTest Scenario: It Is a Sequence of steps To test aparticular transactionTest suit contains Set of test cases, Which are both relatedalternatively, unrelated. There are two sand clocks(timers) one complete totally in 7 minutes and other in 9-minutes we have to calculate with this timers and bang the bell after completion of 11- minutes! please give me the solution. 1. Start both clocks2. When 7 min clock complete, turn it so that it restarts.3. when 9 min clock finish, turn 7 min clocks (It has 2mint only)4. when 7 min clock finishes, 11 min complete. what is internalization? Testing related to handling foreign text and data withinthe program. This would include sorting, importing andexporting test and data, correct handling of currency anddate and time formats, string parsing, upper and lower casehandling and so forth. What is the use of "swing time" in Load Runner? swing time is nothing but a elapsed time this means requesttransmission time, processing server, and request respond timescomposition.

What are various joins used while writing SUBQUERIES Outer JoinIts a join condition used where One can query all the rows of one of the tables in the join condition even though they dont satisfy the joincondition. Equi-joinIts a join condition that retrieves rows from one or more tablesin which one or more columns in one table are equal to one or more columns inthe second table.- They are not actual columns. They are like Functions without arguments.- They typically give a different value for each row.- Examples: ROWNUM, NEXTVAL, ROWID, VERSION_STARTTIME Why use Truncate over Delete while deletingall rows ? - Truncate is efficient. Triggers are not fired.- It deallocates space (Unless REUSE STORAGE is given). What is a ROWID composed of ? - It's a hexadecimal string representing the address of a row. Prior toOracle 8, it's a restricted rowid comprising block.row.file. Extended rowid (the default on higher releases) comprises data object number as well (comprising the segment number ). What is the use of a ROWID ? - Retrieve data faster with ROWID.- Shows you the physical arrangement of rows in the table.- Also unique identifier for each row. Can rows from two different tables have thesame ROWID? - Possible, if they are in a Cluster What are ROWNUM and ROW_NUMBER ? - ROWNUM is a pseudocolumn which is the number assigned to each rowretrieved.- ROW_NUMBER is an analytic function, which does, something similar, but hasall the capabilities of PARTITION BY and ORDER BY clauses.. What is an inline view? - It's not a schema object- It's a subquery in the FROM clause with an alias that can be used as aview within the SQL statement. What are Nested and Correlated subquries ? - The subquery used in WHERE clause is a nested subquery.- If this subquery refers to any column in the parent statement, it becomesa correlated subquery. How do you retrieve a dropped table in 10g? - FLASHBACK table <tabname> to BEFORE DROP What are PSPs? - PL/SQL Server Pages. Web pages developed in PL/SQL What is an index-organized table? - The physical arrangement of rows of this table changes with the indexedcolumn.- It's. in-short, a table stored like an index itself. What is an implicit cursor? - Oracle opens an implicit cursor to process each SQL statement notassociated with an explicit cursor. Name a few implicit cursor attributes. - %FOUND, %ROWCOUNT, %NOTFOUND, %ISOPEN, %BULK_ROWCOUNT, %BULK_EXCEPTIONS

Potrebbero piacerti anche