• •

SQL & FUNDAMENTAL 1
How will you copy the structure of a table without copying the data?

Ans: CREATE TABLE <NEWTABLE >AS SELECT * FROM <EXISTINGTABLE >WHERE 1=2;

• How to find out the database name from SQL*PLUS command prompt? • Tadeoffs with having indexes • Talk about "Exception Handling" in PL/SQL? • What is the diference between "NULL in C" and "NULL in Oracle?" • What is Pro*C? What is OCI? • Give some examples of Analytical functions. • What is the difference between "translate" and "replace"? • What is DYNAMIC SQL method 4? • How to remove duplicate records from a table? • What is the use of ANALYZing the tables? • How to run SQL script from a Unix Shell? • What is a "transaction"? Why are they necessary? • Explain Normalizationa dn Denormalization with examples. • When do you get contraint violtaion? What are the types of constraints? • How to convert RAW datatype into TEXT? • Difference - Primary Key and Aggregate Key • How functional dependency is related to database table design? • What is a "trigger"? • Why can a "group by" or "order by" clause be expensive to process?

• What are "HINTS"? What is "index covering" of a query? • What is a VIEW? How to get script for a view • What are the Large object types suported by Oracle? • What is SQL*Loader? • Difference between "VARCHAR" and "VARCHAR2" datatypes. • What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table. • Difference between "ORACLE" and "MICROSOFT ACCESS" databases. • How to create a database link • Normalize many to many relationships • Difference - Equijoin and union • What is TEMP table space in Oracle, what is rollback segment • How do we find row chaining? • Pattern matching operators • Features in oracle 9i and 10g • Why truncating table is faster than delete • copy commit syntax • Convert Zulu time zone to US Eastern time zone • Difference - union and union all • Difference - Group by, Order by clause • Which Ranking functions are available? • Difference - Decode, NVL, NVL2 • Tradeoffs of using partitioned tables • How can we call stored procedure in SQL query • What are the restrictions on calling PL/SQL from SQL

• Why EXISTS is preferable to distinct • Give two examples of avoiding unnecessary parsing • Can a Tablespace hold objects from different Schemes? • Can a View based on another View ? • Can a property clause itself be based on a property clause? • Can a tablespace hold objects from different schemes? • Can a view based on another view? • Can objects of the same Schema reside in different tablespaces.? • Can one export to multiple files?/ Can one beat the Unix 2 Gig limit? (for DBA • Can one import/export between different versions of Oracle? (for DBA • Can one rename a database user (schema)? • Can you have more than one content canvas view attached with a window? • Can you pass data parameters to forms? • Define Transaction ? • Describe two phases of Two-phase commit ? • Differentiate simple and complex, snapshots ? • Do View contain Data ? • Do a view contain data? • Do user parameters appear in the data modal editor in 2.5? • Does Oracle write to data files in begin/hot backup mode? (for DBA • Does a Before form trigger fire when the parameter form is suppressed?

Tablespace and Data file. True b.? • Explain the relationship among database. • From which designation is it preferred to send the output to the printed? • Give the sequence of execution of the various report triggers? • How are extents allocated to a segment? • How are the index updates? • How can I message to passed to the user from reports? • How can a break order be created on a column in an existing group? What are the various sub events a mouse double click event involves? • How can a button be used in a report to give a drill down facility? • How can a group in a cross products be visually distinguished from a group that does not form a cross product? • How can a square be drawn in the layout editor of the report writer? . False • Explain about horizontal.• Does a grouping done for objects in the layout editor affect the grouping done in the data model editor? • Does one need to drop/ truncate objects before importing? (for DBA • EXIT_FORM is a restricted package procedure ?a. Vertical tool bar canvas views? • Explain about stacked canvas views? • Explain the relationship among Database. tablespace and data file.

precompiler exits and Oracle call interface? • How can we reduce the network traffic? • How can we specify the Archived log file name format and destination? • How can you Enforce Referential Integrity in snapshots ? • How can you enable automatic archiving ? • How do I find used/free space in a TEMPORARY tablespace? • How do you control the constraints in forms ? • How do you create a new session while open a new form? • How do you display console on a window ? • How do you reference a Parameter? • How do you reference a parameter indirectly? • How do you trap the error in forms 3.0 ? • How does Space allocation table place within a block ? • How does one add users to a password file? (for DBA • How does one backup a database using RMAN? (for DBA • How does one backup archived log files? (for DBA .• How can a text file be attached to a report while creating in the report writer? • How can one dump internal database structures? (for DBA • How can one improve Import/ Export performance? (for DBA • How can one see who is using a temporary segment? (for DBA • How can values be passed bet.

reports 2 & 2.5? • How many pages you can in a single form ? • How many windows in a form can have console? • How to define Data Block size ? • How to implement the multiple control files for an existing database ? • How will you create multiple rollback segments in a database ? .0 and Ver 7.• How does one coalesce free space? • How does one connect to an administrative user? (for DBA • How does one create a RMAN recovery catalog? (for DBA • How does one create a new database? • How does one create a password file? (for DBA • How does one do off-line database backups? (for DBA • How does one do on-line database backups? (for DBA • How does one get the view definition of fixed views/tables? • How does one prevent tablespace fragmentation? • How does one put a database into ARCHIVELOG mode? (for DBA • How does one see the uptime for a database? (for DBA • How free extents are managed in Ver 6.0 ? • How is it possible to select generate a select set for the query in the query property sheet? • How is link tool operation different bet.

report 2. how can I get my DB back? (for DBA • I've lost some Rollback Segments. exist betw. What is the hierarchy between them? • Is it possible to link two groups inside a cross products after the cross products group has been created? • Is it possible to modify an external query in a report which contains it? • Is the After report trigger fired if the report execution fails? • It is possible to use raw devices as data files and what is the advantages over file. what diff.0 and 2.5 when the query is applied? • If two groups are not linked in the data model editor. how can I get my DB back? (for DBA • If a break order is set on a column would it affect columns which are under the column? • If a parameter is used in a query without being previously defined. system files ? • List the Optional Flexible Architecture (OFA) of Oracle database? or How can we organize the .• How will you enforce security using stored procedures? • How will you estimate the space required by a nonclustered tables? • How will you force database to use particular rollback segment ? • How will you monitor rollback segment status ? • How will you monitor the space allocation ? • How will you swap objects into a different table space for an existing database ? • I've lost my REDOLOG files.

do I need to recover? (for DBA Name of the functions used to get/set canvas properties? State any three mouse events system variables? To display the page no. true or false? What is the use of ANALYZE command ? What are Clusters ? What are Most Common types of Complex masterdetail relationships? What are Roles ? What are Schema Objects? What are built-ins associated with timers? What are built-ins used for Processing rows? What are clusters? What are different types of canvas views? What are different types of images? What are different types of modules available in oracle form? What are disadvantages of having raw devices ? What are modal windows? What are parameters? .• • • • • • • • • • • • • • • • • • • • • tablespaces in Oracle database to have maximum performance ? My database is down and I cannot restore.? To execute row from being displayed that still use column in the row which property can be used? Use the Add_group_row procedure to add a row to a static record group 1. What now? (for DBA My database was terminated while in BACKUP MODE. or & of physical page no. for each page on a report what would be the source & logical page no.

• What are roles? How can we implement roles ? • What are synonyms used for? • What are the Built-ins used for sending Parameters to forms? • What are the Characteristics of Data Files ? • What are the Coordination Properties in a MasterDetail relationship? • What are the Referential actions supported by FOREIGN KEY integrity constraint ? • What are the advantages of views? • What are the basic element of Base configuration of an oracle Database ? • What are the benefits of distributed options in databases? • What are the built -ins used for Modifying a groups structure? • What are the built-in used for getting cell values? • What are the built-ins that are used for setting the LOV properties at runtime? • What are the built-ins that are used to Attach an LOV programmatically to an item? • What are the built-ins used for Creating and deleting groups? • What are the built-ins used for Getting cell values? • What are the built-ins used for finding Object ID function? • What are the built-ins used for finding object ID functions? • What are the built-ins used for processing rows? • What are the common Import/ Export problems? (for DBA .

• • • • • • • • • • • • • • • • • • What are the components of logical database structure of Oracle database? What are the components of physical database structure of Oracle database? What are the database administrators utilities avaliable ? What are the default extensions of the files created by forms modules? What are the default extensions of the files created by library module? What are the default extensions of the files created by menu module? What are the default parameter that appear at run time in the parameter screen? What are the various sub events a mouse double click event involves? What are the dictionary tables used to monitor a database space? What are the dictionary tables used to monitor a database spaces ? Difference between lov & list item? Differences between EBU and RMAN? (for DBA Different Levels of Auditing ? Different Parameter types? Different approaches used by Optimizer in choosing an execution plan ? Different default triggers created when Master Deletes Property is set to Cascade? Different default triggers created when Master Deletes Property is set to Non-isolated? Different default triggers created when Master Deletes Property is set to isolated? Different display styles of list items? .

• Different file extensions that are created by oracle reports? • Different kind of export backups? • Different methods of backing up oracle database ? • Different modals of windows? • Different styles of activation of ole Objects? • Different type of Segments ? • Different types of Delete details we can establish in Master-Details? • Different types of Record Groups? • Different windows events activated at runtimes? • What are the factors causing the reparsing of SQL statements in SGA? • What are the master-detail triggers?\ • What are the options available to refresh snapshots ? • What are the sql clauses supported in the link property sheet? • What are the system resources that can be controlled through Profile ? • What are the three types of user exits available ? • What are the trigger associated with image items? • What are the two panes that Appear in the design time pl/sql interpreter? • What are the two phases of block coordination? • What are the two repeating frame always associated with matrix object? • What are the two types of views available in the object navigator(specific to report 2.5)? • What are the two ways by which data can be generated for a parameters list of values? • What are the type of Synonyms? .

• What are the types of Pop-up window ? • What are the types of calculated columns available? • What are the types of synonyms? • What are the use of Roles ? • What are the various methods of performing a calculation in a report ? • What are the various sub events a mouse double click event involves? What are the various sub events a mouse double click event involves? • What are the various type of snapshots? • What are the vbx controls? • What are the ways to monitor the performance of the report? • What are three panes that appear in the run time pl/sql interpreter? • What are visual attributes? • What database aspects should be monitored? (for DBA • What database block size should I use? • What database events can be set? (for DBA • What does COMMIT do ? • What does ROLLBACK do ? • What does a Control file Contain ? • What dynamic data replication? • What is Auditing ? • What is COST-based approach to optimization ? • What is Database Buffers ? • What is Distributed database ? • What is Full Backup ? • What is Index Cluster ? • What is Mirrored on-line Redo Log ? .

• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • What is Object Auditing ? What is Oracle table? What is Parallel Server ? What is Partial Backup ? What is Privilege Auditing ? What is Read-Only Transaction ? What is Rollback Segment ? What is SGA? What is SYSTEM tablespace and when is it created? What is Statement Auditing ? What is Table ? What is Tablespace Quota ? What is Two-Phase Commit ? What is WHEN-Database-record trigger? What is a Control file ? What is a Database instance ? Explain What is a Redo Log ? What is a Rollback segment entry ? What is a SNAPSHOT ? What is a SNAPSHOT LOG ? What is a SQL * NET? What is a Schema ? What is a Shared SQL pool? What is a Static Record Group? What is a Tablespace? What is a Text_io Package? What is a User_exit? What is a View ? What is a cluster Key ? What is a combo box? What is a data segment? .

• What is a difference between pre-select and prequery? • What is a logical backup? • What is a physical page ? & What is a logical page ? • What is a private synonym? • What is a profile ? • What is a property clause? • What is a public synonym? • What is a record group? • What is a shared pool? • What is a synonym? • What is a tablespace? • What is a text list? • What is a timer? • What is advantage of having disk shadowing/ Mirroring ? • What is an Extent ? • What is an Index ? • What is an Index ? How it is implemented in Oracle Database ? • What is an Index Segment ? • What is an Integrity Constrains ? • What is an LOV? • What is an Oracle index? • What is an Oracle sequence? • What is an Oracle view? • What is an SQL *FORMS ? .• What is a database EVENT and how does one set it? (for DBA • What is a deadlock ? Explain .

• What is an administrative (privileged) user? (for DBA • What is an object group? • What is an user exit used for? • What is bind reference and how can it be created? • What is cluster key? • What is clusters ? • What is cold backup? What are the elements of it? • What is coordination Event? • What is default tablespace ? • What is dictionary cache ? • What is difference between UNIQUE constraint and PRIMARY KEY constraint ? • What is difference between open_form and call_form? • What is forms_DDL? • What is hot backup and how it can be taken? • What is lexical reference? How can it be created? • What is mean by Program Global Area (PGA)? • What is meant by Redo Log file mirroring ? How it can be achieved? • What is meant by free extent ? • What is meant by recursive hints ? • What is meant by redo log buffer ? • What is new_form built-in? • What is pop list? • What is relation between the window and canvas views? • What is schema? • What is snapshot log ? • What is snapshots? • What is strip sources generate options? .

enqueues and semaphores? (for DBA What is the difference between object embedding & linking in Oracle forms? What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ? What are the factors that affect OPTIMIZER in choosing an Optimization approach ? .5? What is the diff. latches. when Flex mode is mode on and when it is off? What is the diff. when confine mode is on and when it is off? What is the difference between OLE Server & Ole Container? What is the difference between ON-VALIDATEFIELD trigger and a POST-CHANGE trigger ? What is the difference between SHOW_EDITOR and EDIT_TEXTITEM? What is the difference between locks. bet.coordination_operation? What is term? What is the "LOV of Validation" Property of an item? What is the use of it? What is the Maximum allowed length of Record group Column? What is the User-Named Editor? What is the advantage of the library? What is the basic data structure that is required for creating an LOV? What is the diff.0 reports2. setting up of parameters in reports 2.• • • • • • • • • • • • • • • • • What is synchronize? What is system.

ON-DELETE and ON-UPDATE TRIGGERS ? • What is the use of ANALYSE ( Ver 7) option in EXP command ? • What is the use of COMPRESS option in EXP command ? • What is the use of CONSISTENT (Ver 7) option in EXP command ? • What is the use of CONSTRAINTS option in EXP command ? • What is the use of Control File ? • What is the use of FILE option in IMP command ? • What is the use of FULL option in EXP command ? • What is the use of GRANT option in EXP command? • What is the use of GRANT option in IMP command ? • What is the use of IGNORE option in IMP command ? • What is the use of INCTYPE option in EXP command ? .• What is the effect of setting the value "CHOOSE" for OPTIMIZER_GOAL. parameter of the ALTER SESSION Command ? • What is the frame & repeating frame? • What is the maximum no of chars the parameter can store? • What is the mechanism provided by ORACLE for table replication ? • What is the purpose of the product order option in the column property sheet? • What is the remove on exit property? • What is the significance of having storage clause ? • What is the usage of an ON-INSERT.

• What is the use of INDEXES option in EXP command ? • What is the use of INDEXES option in IMP command ? • What is the use of PARFILE option in EXP command ? • What is the use of RECORD LENGTH option in EXP command ? • What is the use of RECORD option in EXP command? • What is the use of ROWS option in EXP command ? • What is the use of ROWS option in IMP command ? • What is the use of SHOW option in IMP command ? • What is the use of hidden column? What are the various sub events a mouse double click event involves? • What is the use of image_zoom built-in? • What is the use of place holder column? What are the various sub events a mouse double click event involves? • What is the use of transactional triggers? • What is trigger associated with the timer? • What is use of term? • What is user Account in Oracle database? • What third party tools can be used with Oracle EBU/ RMAN? (for DBA • What use of command line parameter cmd file? • When do you use data parameter type? • When is PRE-QUERY trigger executed ? • When will the data in the snapshot log be used? • Where are my TEMPFILES. I don't see them in V$DATAFILE or DBA_DATA_FILE? (for DBA .

of queries in the data model? • Why query fails sometimes ? • With which function of summary item is the compute at options required? . ? • Why and when should one tune? (for DBA • Why are OPS$ accounts a security risk in a client/server environment? (for DBA • Why is it preferable to create a fewer no. of rows per block? • While specifying master/detail relationship between two blocks specifying the join condition is a must ? True or False.• Where can one find the high water mark for a table? • Where can one get a list of all hidden Oracle parameters? (for DBA • Where is a procedure return in an external pl/sql library executed at the client or at the server? • Where is the external query executed at the client or the server? • Where should the tuning effort be directed? (for DBA • Which of the above methods is the faster method? • Which of the two views should objects according to possession? • Which parameter can be used to set read level consistency across multiple queries? • Which parameter in Storage clause will reduce no.

If yes how. If not why? • How do you pass cursor variables in PL/SQL? • How do you open and close a cursor variable.• what are difference between post database commit and post-form commit? • Differentiate between TRUNCATE and DELETE • What is the maximum buffer size that can be specified using the DBMS_OUTPUT.What are different procedures and functions associated with it? • Difference between database triggers and form triggers? • What is OCI. What are its uses? • What are ORACLE PRECOMPILERS? • What is syntax for dropping a procedure and a function? Are these operations possible? • Can a function take OUT parameters. • Can cursor variables be stored in PL/SQL tables.Why it is required? . If not why? • Can the default values be assigned to actual parameters? • What is difference between a formal and an actual parameter? • What are different modes of parameters used in functions and procedures? • Difference between procedure and function.ENABLE function? • Can you use a commit statement within a database trigger? • What is an UTL_FILE.

IN or EXISTS? • When do you use WHERE clause and when do you use HAVING clause? • There is a % sign in one field of a column. • What is a cursor? • What is the purpose of a cluster? • How do you find the numbert of rows in a Table ? • Display the number value in Words? • What is a pseudo column.Can we use a scalar data type as return type? • What is use of a cursor variable? How it is defined? • What WHERE CURRENT OF clause does in a cursor? • Difference between NO DATA FOUND and %NOTFOUND • What is a cursor for loop? • What are cursor attributes? • Difference between an implicit & an explicit cursor. What will be the query to find it? • What is difference between SUBSTR and INSTR? • Which datatype is used for storing graphics and images? • What is difference between SQL and SQL*PLUS? • What is difference between UNIQUE and PRIMARY KEY constraints? • What is difference between Rename and Alias? .• What should be the return type for a cursor variable. Give some examples? • How you will avoid your query from using indexes? • What is a OUTER JOIN? • Which is more faster .

As an example. so sed ’s/hello/goodbye/’ would substitute the occurrence of the word hello to goodbye. a Unix tool for working with streams of text data. If the string is ‘old old old’ and I run ’s/old/new’.Use ’s/old/new’ command. I wrote a rather complex sed script. See the awful truth about sed. \3 and so on. . How do I save and run it? . I get ‘new old old’ as the result. ’s/old/new/g‘ will work. . which would replace every occurrence of the pattern with the substitution.sed is stream editor. \2.• What are various joins used while writing SUBQUERIES? • • • • • • • What is sed? .& in the substitution string defines the pattern found in the search string.Assuming that your file is named .You forgot the global modifier.Yes. How do you inject text with sed? . How do you substitute strings with sed? . use (pattern) and then refer to your patterns as \1. here’s us trying to find a word ‘hello’ and replacing it with ‘hello and how are you’: echo ‘hello there’ | sed ’s/^hello/& and how are you/’ Can I find several patterns and refer to them in the replacement string? .Just use the numeric modifier saying you want the third occurrence to be replaced. But I want ‘old old new’ from the previous example. I need ‘new new new‘. ’s/old/new/3‘ will work.

So the Process of organizing this data into tables is actually referred to as normalization. you actually run a set of statements.Nest the replacement statement: sed ‘/old/ s/old/new/g’ file. • What is a Stored Procedure? .Triggers are basically used to implement business rules. sp_renamedb are a set of system defined stored procedures.Well a relational database is basically composed of tables that contain related data. We can also have user defined stored procedures which can be called in similar way. • What is a trigger? .sed. • How do I delete trailing whitespaces from each line? .sed ’s/[ \t]*$//’ Here we’re replacing any occurrence of a space or a tab with nothing. • How do you print just a few first lines of the file? sed 1q will give you just the first line. Triggers is also similar to stored procedures. • How do you replace a pattern only if it’s found.txt • What is normalization? .myscript1. so that it’s executed faster? . • Can you give an example of Stored Procedure? sp_helpdb . you can invoke sed -f myscript1. The difference is that it can . Its basically like a Macro so when you invoke the Stored procedure.sed. sp_who2. sed 10q the first 10 lines. Check sed one-liners for more examples.Its nothing but a set of T-SQL statements combined to perform a single task of several tasks.

Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db. What is the basic difference between clustered and a non-clustered index? .There are basically two types of indexes that we use with the SQL Server. What are cursors? . What are the types of indexes available with SQL Server? . an index on that db basically helps in the way the data is sorted to process the query for faster and data retrievals are much faster when we have an index. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index.If we have several tables in a db and we want to view only specific columns from specific tables we can go for views.• • • • • be activated when data is added or edited or deleted from a table in a database. Views also reduce the effort that is required for writing queries to access specific columns every time.The difference is that. Clustered index is unique for any given table and we can have only one clustered index on a table.Well cursors help us to do an operation on a set of data that we retreive by .When queries are run against a db. It would also suffice the needs of security some times allowing specfic users to see only specific columns based on the permission that we can configure on the view. What is a view? . Clustered and the Non-Clustered. What is an Index? .

From where can you change the default port? From the Network Utility TCP/IP properties –> Port number. UPDATE_STATISTICS updates the indexes on these tables accordingly. We use these . For example : If we have duplicate records in a table we can remove it by declaring a cursor which would check the records during retreival one by one and remove rows which have duplicate values. we need to basically update the indexes to take these changes into account.Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Can you tell me the difference between DELETE & TRUNCATE commands? .both on client and the server. When do we use the UPDATE_STATISTICS command? .SQL Server runs on port 1433 but we can also change it for better security.No.• • • • • • commands such as Select columns from table. What is the use of DBCC commands? . Which TCP/IP port does SQL Server run on? . If we do a large amount of deletions any modification or Bulk Copy into the tables. We cannot use Truncate command on a table with Foreign Key because of referential integrity. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command.This command is basically used when we do a large processing of data. Can we use Truncate command on a table which is referenced by FOREIGN KEY? .DBCC stands for database consistency checker.

maintenance. DBCC SQLPERF .It gives report on current usage of transaction log in percentage. What is the difference between a HAVING CLAUSE and a WHERE CLAUSE? . .Collation is basically the sort order.Checks all tables file group for any damage. ‘newname’ Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases? . What command do we use to rename a db? sp_renamedb ‘oldname’ . What do you mean by COLLATION? . There are three types of sort order Dictionary case sensitive. DBCC CHECKFILEGROUP .e. Dictonary case insensitive and Binary.• • • • • commands to check the consistency of the databases. WHERE Clause is applied to each row before they are part of the GROUP BY function in a query..and DBCC CHECKALLOC . Can you give me some DBCC command options? (Database consistency check) . i. validation task and status checks.Having Clause is basically used only with the GROUP BY function in a query.To check that all pages in a db are correctly allocated.In such cases we can first bring to db to single user using sp_dboptions and then we can rename that db and then we can rerun the sp_dboptions command to remove the single user mode.DBCC CHECKDB Ensures that tables in the db and the indexes are correctly linked.

Is for linking and connecting to other SQL Servers . For Oracle we have a OLE-DB provider for oracle that microsoft provides to add it as a linked server to the sql server group. DB Maintanance.• What is a Join in SQL Server? . DTC (Distribution transac coordinator) • Can you explain the role of each service? .MS SQL SERVER SERVICE. • Can you explain the types of Joins that we can have with Sql Server? . SQL AGENT SERVICE.Join actually puts data from two or more tables into a single result set.We can link any server provided we have the OLE-DB provider from Microsoft to allow a link.SQL Profiler utility allows us to basically track connections to the SQL Server and also determine activities such as which SQL Scripts are running. sp_addlinkedsrvlogin • What are the OS services that the SQL Server installation adds? .Linked Servers is a concept in SQL Server by which we can add other SQL Server to a Group and query both the SQL Server dbs using T-SQL Statements.sp_addlinkedserver. • What is a Linked Server? . • Which stored procedure will you be running to add a linked server? .SQL SERVER .is for running the databases SQL AGENT is for automation such as Jobs. Backups DTC .There are three types of joins: Inner Join. Outer Join. Cross Join • When do you use SQL Profiler? . failed jobs etc. • Can you link only other SQL Servers or any database servers such as Oracle? ..

They get stored in master db in the sysxlogins table. use SQL Profiler to check for the users and current SQL activities and jobs running which might be a problem.First I will look to ensure that port settings are proper on server and client Network utility for connections.First check the processor and memory usage to see that processor is not above 80% utilization and memory not above 40-45% utilization then check the disk utilization using Performance Monitor.• How do you troubleshoot SQL Server if its running very slow? .Logshipping is a new feature of SQL Server 2000. • What is log shipping? Can we do logshipping with SQL Server 7. Secondly. ODBC is properly configured at client end for connection ——Makepipe & readpipe are utilities to check for connection. In logshipping the transactional log file from one server is automatically updated into the backup database on . We should have two SQL Server Enterprise Editions. Third would be to run UPDATE_STATISTICS command to update the indexes • Lets say due to N/W or Security issues client is not able to connect to server or vice versa. From Enterprise Manager we can configure the logshipping. How do you troubleshoot? .0 . • What are the authentication modes in SQL Server? . Makepipe is run on Server and readpipe on client to check for any connection issues. • Where do you think the users names and passwords will be stored in sql server? .Windows mode and mixed mode (SQL & Windows).

Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow? .For restoring the master db we have to stop the SQL Server first and then from command line we can type SQLSERVER –m which will basically bring it into the maintenance mode after which we can restore the master db.but I think we have a command to do it). But it won’t copy the structures of the same.(I am not sure. schema and views from one SQL Server to another? . Let us say master db itself has no backup. What should we do to copy the tables.BulkCopy is a tool used to copy huge amount of data from tables and views. What are the different types of joins and what dies each do? What are the four main query statements? What is a sub-query? When would you use one? What is a NOLOCK? What are three SQL keywords used to change or set someone’s permissions? What is the difference between HAVING clause and the WHERE clause? .We have to write some DTS packages for it. What is BCP? When do we use it? . the other server will have the same db and we can use this as the DR (disaster recovery) plan. If one server fails.• • • • • • • • • • the other server. Now you have to rebuild the db so what kind of action do you take? .

• What is referential integrity? What are the advantages of it? • What is database normalization? • Which command using Query Analyzer will give you the version of SQL server and operating system? • Using query analyzer. name 3 ways you can get an accurate count of the number of records in a table? • What is the purpose of using COLLATE in a query? • What is a trigger? • What is one of the first things you would do to increase performance of a query? For example. a boss tells you that “a query that ran yesterday took 30 seconds. but today it takes 6 minutes” • What is an execution plan? When would you use it? How would you view the execution plan? • What is the STUFF function and how does it differ from the REPLACE function? • What does it mean to have quoted_identifier on? What are the implications of having it off? • What are the different types of replication? How are they used? • What is the difference between a local and a global variable? • What is the difference between a Local temporary table and a Global temporary table? How is each one used? • What are cursors? Name four types of cursors and when each one would be applied? • What is the purpose of UPDATE STATISTICS? • How do you use DBCC statements to monitor various aspects of a SQL server installation? .

• How do you load large data to the SQL server database? • How do you check the performance of a query and how do you optimize it? • How do SQL server 2000 and XML linked? Can XML be used to access data? • What is SQL server agent? • What is referential integrity and how is it achieved? • What is indexing? • What is normalization and what are the different forms of normalizations? • Difference between server.? • How do you find the number of rows in a table? • Difference between Cluster and Non-cluster index? .2nd Normal form or 3rd normal form? Why? • Can we rewrite subqueries into simple select statements or with joins? Example? • What is a function? Give some example? • What is a stored procedure? • Difference between Function and Procedure-in general? • Difference between Function and Stored Procedure? • Can a stored procedure call another stored procedure. If yes what level and can it be controlled.transfer and server.execute method? • What id de-normalization and when do you do it? • What is better . If yes what level and can it be controlled? • Can a stored procedure call itself(recursive).

Availability. if it does not have neither Cluster nor Non-cluster Index? • Explain DBMS. how it looks? • How m-m relationships are implemented? • How do you know which index a table is using? . set commands? • Explain what are db_options used for? • What is the basic functions for master. RDBMS? • Explain basic SQL queries with SELECT from where Order By. tempdb databases? • What is a job? • What are tasks? • What are primary keys and foreign keys? • How would you Update the rows which are divisible by 10. etc.0 and 7. given a set of numbers in column? • If a stored procedure is taking a table data type. msdb.5 to 7. Integration with internet.)? • Explain fundamentals of Data ware housing & OLAP? • Explain the new features of SQL server 2000? • How do we upgrade from SQL Server 6.• What is a table called.0 to 2000? • What is data integrity? Explain constraints? • Explain some DBCC commands? • Explain sp_configure commands. Group By-Having? • Explain the basic concepts of SQL server architecture? • Explain couple pf features of SQL server • Scalability.

what will be the state? • 21. This variable is either TRUE or FALSE and if it is set to TRUE it enforces . Setting GLOBAL_NAMES dictates how you might connect to a database. how can you know the number of rows effected by last SQL statement? • How can you get @@error and @@rowcount at the same time? • What are sub-queries? Give example? In which case sub-queries are not feasible? • What are the type of joins? When do we use Outer and Self joins? • Which virtual table does a trigger use? • How do you measure the performance of a stored procedure? • Questions regarding Raiseerror? • Questions on identity? • If there is failure during updation of certain rows. 22. Explain the use of setting GLOBAL_NAMES equal to TRUE. How would you determine the time zone under which a database was operating? select DBTIMEZONE from dual.• How will oyu test the stored procedure taking two parameters namely first name and last name returning full name? • How do you find the error.

A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any values to the calling application. Explain the difference between a FUNCTION. 23. 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 a SQL statement. What command would you use to encrypt a PL/SQL application? WRAP 24. Segment Level Statistics.database links to have the same name as the remote database to which they are linking. PROCEDURE and PACKAGE. Name three advisory statistics you can collect. 26. & . 25. Explain the use of table functions. 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. They are also used to pipeline information in an ETL process. Buffer Cache Advice.

grouped. When a user process fails. Where in the Oracle directory tree structure are audit traces placed? In unix $ORACLE_HOME/rdbms/audit. Explain materialized views and how they are used. 29.Timed Statistics 27. How would you determine what sessions are connected and what resources they are waiting for? Use of V$SESSION and V$SESSION_WAIT . in Windows the event viewer 28. 31. What background process refreshes materialized views? The Job Queue Processes. or aggregated from base tables. Materialized views are objects that are reduced sets of information that have been summarized. what background process cleans up after it? PMON 30. They are typically used in data warehouse or decision support systems.

You could use Logminer or Streams 35. 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 those objects meant to be used as the true objects of the database. Give two methods you could use to determine what DDL changes have been made. Name a tablespace automatically created when . What does coalescing a tablespace do? Coalescing is only valid for dictionary-managed tablespaces and de-fragments space by combining neighboring free extents into large single extents. How would you force a log switch? ALTER SYSTEM SWITCH LOGFILE. 33. 37. Redo logs are logical and physical structures that are designed to hold all the changes made to a database and are intended to aid in the recovery of a database. 34. 36. Describe what redo logs are.32.

. 38. 39. 41. What view would you use to determine free space in a tablespace? DBA_FREE_SPACE 43. When creating a user. The SYSTEM tablespace.you create a database. What view would you use to look at the size of a data file? DBA_DATA_FILES 42. what permissions must you grant to allow them to connect to the database? Grant the CONNECT to the user. How would you determine who has added a row to a table? Turn on fine grain auditing for the table. How do you add a data file to a tablespace? ALTER TABLESPACE ADD DATAFILE SIZE 40. How do you resize a data file? ALTER DATABASE DATAFILE RESIZE .

more manageable pieces.44. 46. how would you view the errors? SHOW ERRORS 47. What is the difference between the SQL*Loader and IMPORT utilities? These two Oracle utilities are used for loading data into the database. Explain what partitioning is and what its benefit is. 48. Partitioning is a method of taking large tables and indexes and splitting them into smaller. How can you gather statistics on a table? The ANALYZE command. You have just compiled a PL/SQL package but got errors. How can you rebuild an index? ALTER INDEX REBUILD. The difference is that the import . 45.SET_SQL_TRACE or Use ALTER SESSION SET SQL_TRACE = TRUE. 49. How can you enable a trace for a session? Use the DBMS_SESSION.

UNIX Every DBA should know something about the operating system that the database will be running on.utility relies on the data being produced by another Oracle utility EXPORT while the SQL*Loader utility allows data to be loaded that has been produced by other utilities from different data sources just so long as it conforms to ASCII formatted or delimited files. The questions here are related to UNIX but you should equally be able to answer questions related to common Windows environments. Name two files used for network connection to a database. How do you execute a UNIX command in the background? Use the "&" 3. TNSNAMES. 1.ORA and SQLNET.ORA Technical . How do you list the files in an UNIX directory while also showing hidden files? ls -ltra 2. What UNIX command will control the default file permissions when files are created? . 50.

Read allows you to see and list the directory contents. 5. Explain iostat. Give the command to display space usage on the UNIX file system. 6. edit and delete files and subdirectories in the directory. df -lk 7. vmstat and netstat. disk and tape I/O . 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 be located on the same file system. Explain the read. and execute permissions on a UNIX directory. Execute gives you the previous read/write permissions plus allows you to change into the directory and execute programs or shells from the directory.Umask 4. Iostat reports on terminal. write. Write allows you to create.

activity. Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity. Netstat reports on the contents of network data structures. 8. How would you change all occurrences of a value using VI? Use :%s///g 9. Give two UNIX kernel parameters that effect an Oracle install SHMMAX & SHMMNI 10. Briefly, how do you install Oracle software on UNIX.

What does Opening a cursor do ? - It executes the query and identifies the Result set • What does Fetching a cursor do ? - It reads the Result Set row by row. • What does Closing a cursor do ? - It clears the private SQL area and de-allocates the memory. • What are Cursor Variables ?

- Also called REF CURSORS. - They are not tied to a single SQL. They point to any SQL area dynamically. - Advantage is : You can declare variables at Client side and open them Server side. You can thus centralize data retrieval. Why use Cursor Variables? - You can pass cursor RESULT SETS between PL/SQL stored programs and clients. What are SQLCODE and SQLERRM ? - Oracle Error code and detailed error message - They are actually functions with no arguments, that can be used only in procedural statements ( not SQL) What are Pseudocolumns ? - 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 deleting all 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 to Oracle 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 the same ROWID? - Possible, if they are in a Cluster What is ROWNUM and ROW_NUMBER ? - ROWNUM is a pseudocolumn which is the number assigned to each row retrieved. - ROW_NUMBER is an analytic function which does something similar, but has all 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 a view within the SQL statement. What are Nested and Correlated subqueries ? - The subquery used in WHERE clause is a nested subquery. - If this subquery refers to any column in the parent statement, it becomes a correlated subquery. How do you retrieve a dropped table in 10g? - FLASHBACK table <tabname> to BEFORE DROP What are PSPs?

What are different procedures and functions associated with it? • Difference between database triggers and form triggers? • What is OCI. %BULK_ROWCOUNT.Oracle opens an implicit cursor to process each SQL statement not associated with an explicit cursor. %NOTFOUND.ENABLE function? Can you use a commit statement within a database trigger? • • What is an UTL_FILE.• • • • • . %ISOPEN. %ROWCOUNT. .PL/SQL Server Pages. What is an implicit cursor? .The physical arrangement of rows of this table changes with the indexed column. What is the maximum buffer size that can be specified using the DBMS_OUTPUT. in-short. What are its uses? • What are ORACLE PRECOMPILERS? • What is syntax for dropping a procedure and a function? Are these operations possible? . a table stored like an index itself. . %BULK_EXCEPTIONS Differentiate between TRUNCATE and DELETE.%FOUND. Web pages developed in PL/SQL What is an index-organized table? . Name a few implicit cursor attributes.It's.

Why it is required? • What should be the return type for a cursor variable.If yes how.• Can a function take OUT parameters. • Can cursor variables be stored in PL/SQL tables. If not why? • How do you pass cursor variables in PL/SQL? • How do you open and close a cursor variable. If not why? • Can the default values be assigned to actual parameters? • What is difference between a formal and an actual parameter? • What are different modes of parameters used in functions and procedures? • Difference between procedure and function.Can we use a scalar data type as return type? • What is use of a cursor variable? How it is defined? • What WHERE CURRENT OF clause does in a cursor? • Difference between NO DATA FOUND and %NOTFOUND • What is a cursor for loop? • What are cursor attributes? .

IN or EXISTS? • When do you use WHERE clause and when do you use HAVING clause? • There is a % sign in one field of a column. Give some examples? • How you will avoid your query from using indexes? • What is a OUTER JOIN? • Which is more faster . What will be the query to find it? • What is difference between SUBSTR and INSTR? • Which datatype is used for storing graphics and images? • What is difference between SQL and SQL*PLUS? • What is difference between UNIQUE and PRIMARY KEY constraints? • What is difference between Rename and Alias? • What are various joins used while writing SUBQUERIES? .• Difference between an implicit & an explicit cursor. • What is a cursor? • What is the purpose of a cluster? • How do you find the numbert of rows in a Table ? • Display the number value in Words? • What is a pseudo column.

• What’s the command to see the current user name? Sql> show user. • What’s the command to change the SQL prompt name? • SQL> set sqlprompt “database-1 > “ database-1 > database-1 > • How do you switch to DOS prompt from SQL prompt? SQL> host • How do I eliminate duplicate rows in an Oracle database? • 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) • .

instead of blank space. like SQL> select rownum. How do you display the records within a given range? select rownum. ename from emp.dv=tb. But here’s the task: if the commission field is null. Explain explicit cursor .dv). empno. How do I display row number with records? Use the rownum pseudocolumn with query. then the text “Not Applicable” should be displayed. The NVL function only allows the same data type.).• • • • • • • from table_name tb where ta. How do you write the query? SQL> select nvl(to_char(comm.’Not Applicable’) from emp. ename from emp where rowid in (select rowid from emp where rownum < =&rangeend minus select rowid from emp where rownum<&rangebegin).

A hot backup is basically taking a . cursor_name%ROWCOUNT. SQL%ISOPEN • • How do you view version information in Oracle? • SQL> select banner from $version.. There are four cursor attributes used in Oracle: cursor_name%Found. or whether it was the Oracle database admin position that someone interviewed for somewhere else. SQL %NOTFOUND. • Explain the difference between a hot backup and a cold backup and the benefits associated with each. SQL %ROWCOUNT. cursor_name%NOTFOUND.attributes. . Same as explicit cursor but prefixed by the word SQL: SQL%Found. • • Oracle DBA interview questions • A reader submitted this via e-mail without explanation whether these questions were used for hiring a DBA at Oracle Corp. cursor_name%ISOPEN • Explain implicit cursor attributes.

The benefit of taking a cold backup is that it is typically easier to administer the backup and recovery process.backup of the database while it is still up and running and it must be in archive log mode. since you are taking cold backups the database does not require being in archive log mode and thus there will be a slight performance gain as the database is not cutting archive logs to disk.ora . • You have just had to restore from backup and do not have any control files. A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode. The benefit of taking a hot backup is that the database is still available for use while the backup is occurring and you can recover the database to any point in time. In addition. • How do you switch from an init. How would you go about bringing up this database? I would create a text based backup control file. stipulating where on disk all the data files where and then issue the recover command with the using backup control file clause.

These groupings of contiguous data blocks are called extents.Both the truncate and delete command have the desired outcome of getting rid of all the rows in a table.Issue the create spfile from pfile command. • Where would you look for errors from the database engine? . • Explain the difference between a data block.Use the describe command or use the dbms_metadata.A data block is the smallest unit of logical storage for a database object.file to a spfile? . All the extents that an object takes when grouped together are considered the segment of the database object. . The difference between the . • Give two examples of how you might determine the structure of the table DEPT. an extent and a segment. • Compare and contrast TRUNCATE and DELETE for a table. As objects grow they take chunks of additional storage that are composed of contiguous data blocks.get_ddl package. .In the alert log. .

The delete command.A primary key and a foreign key. How would you do this without affecting the children tables? . on the other hand. . is a DML operation.two is that the truncate command is a DDL operation and just moves the high water mark and produces a now rollback. which will produce a rollback and thus take longer to complete.Disable the foreign key . • What type of index should you use on a fact table? . . • Give the reasoning behind using an index. . • A table is classified as a parent table and you want to drop and recreate it. • Give two examples of referential integrity constraints.Fact tables and dimension tables. • Give the two types of tables involved in producing a star schema and the type of data they hold.Faster access to data blocks in a table. A fact table contains measurements while dimension tables will contain data that will help describe the fact tables.A Bitmap index.

• Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each. • Give the stages of instance startup to a usable state where .ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. . NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.constraint to the parent. • What command would you use to create a backup control file? Alter database backup control file to trace. NOARCHIVELOG mode is basically the absence of ARCHIVELOG mode and has the disadvantage of not being able to recover to any point in time. re-create the table. enable the foreign key constraint. drop the table.

• How would you go about generating an EXPLAIN plan? Create a plan table with utlxplan. STARTUP NOMOUNT .You get this error when you get a snapshot .The database is mounted.The database is opened • What column differentiates the V$ views to the GV$ views and how? The INST_ID column which indicates the instance in a RAC environment the information came from.Use the buffer cache advisory over a given workload and then query the v$db_cache_advice table. Use the explain plan set statement_id = ‘tst1′ into plan_table for a SQL statement. STARTUP OPEN .normal users may access it.sql How would you go about increasing the buffer cache hit ratio? .sql.sql or utlxpls. • • Explain an ORA-01555 . If a change was necessary then I would use the alter system set db_cache_size command.Instance startup. Look at the explain plan with utlxplp. STARTUP MOUNT .

ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.too old within rollback. You should also look at the logic involved in the application getting the error message.ORACLE_BASE is the root directory for oracle. • What is an OLE? Object Linking & Embedding provides you with the capability to integrate objects from many MsWindows applications into a single compound • . If the maximum record retrieved property of the query is set to 10 then a summary value will be calculated? Only for 10 records. • What are the different objects that you cannot copy or reference in object groups? Objects of different modules Another object groups Individual block dependent items Program units. • Explain the difference between $ORACLE_HOME and $ORACLE_BASE. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. .

Anonymous blocks or nested blocks can be used in PL/SQL . VARCHAR2. What are the datatypes a available in PL/SQL ? Some scalar data types such as NUMBER. What are the two parts of a procedure ? Procedure Specification and Procedure Body. CHAR. SQLERRM returns the relevant error message of the SQLCODE. varying number of parameters is called overloading of procedures. LONG.• • • • • • • document creating integrated applications enables you to use the features form . DATE. Can a repeating frame be created without a data group as a base? No Is it possible to set a filter condition in a cross product group in matrix reports? No What is Overloading of procedures ? The Same procedure name is repeated with parameters of different datatypes and parameters in different positions.g. What is the basic structure of PL/SQL ? PL/SQL uses block structure as its basic structure. Some composite data types such as RECORD & TABLE. DBMS_OUTPUT put_line What are the return values of functions SQLCODE and SQLERRM ? What is Pragma EXECPTION_INIT ? Explain the usage ? SQLCODE returns the latest code of the error that has occurred. e. BOOLEAN.

• What is PL/SQL table ? Objects of type TABLE are called "PL/SQL tables". which are modeled as (but not the same as) database tables. PL/SQL tables use a primary PL/SQL tables can have one column and a primary key. • WHY USE RMAN ? (for DBA) No extra costs …Its available free ?RMAN introduced in Oracle 8 it has become simpler with newer versions and easier than user managed backups ?Proper security ?You are 100% sure your database has been backed up. Cursors • WHAT IS RMAN ? (for DBA) Recovery Manager is a tool that: manages the process of creating backups and also manages the process of restoring and recovering from them. Faster backups and restores compared to backups without RMAN RMAN is the only backup tool which supports incremental backups. ?Its contains detail of the backups taken etc in its central repository Facility for testing validity of backups also commands like crosscheck to check the status of backup. Oracle 10g has got further optimized incremental backup which has resulted in improvement of performance during backup and recovery time Parallel operations are supported Better querying facility for knowing different .

backup sets and pieces Recovery catalog is a must in following scenarios .details of backup No extra redo generated when backup is taken.compared to online backup without RMAN which results in saving of space in hard disk RMAN an intelligent tool Maintains repository of backup metadata Remembers backup set location Knows what need to backed up Knows what is required for recovery Knows what backups are redundant • UNDERSTANDING THE RMAN ARCHITECTURE An oracle RMAN comprises of RMAN EXECUTABLE This could be present and fired even through client side TARGET DATABASE This is the database which needs to be backed up . In order to store scripts . For tablespace point in time recovery Media Management Software .. It is a repository of information queried and updated by Recovery Manager It is a schema or user stored in Oracle database. RECOVERY CATALOG Recovery catalog is optional otherwise backup details are stored in target database controlfile . One schema can support many databases It contains information about physical schema of target database datafile and archive log .

Archivelog backup sets One more important point of data file backup sets is it do not include empty blocks. A backup set would contain many backup pieces. Example of taking backup using RMAN Taking RMAN Backup In non archive mode in dos prompt type RMAN You get the RMAN prompt . Backups in RMAN Oracle backups in RMAN are of the following type RMAN complete backup OR RMAN incremental backup These backups are of RMAN proprietary nature IMAGE COPY The advantage of uing Image copy is its not in RMAN proprietary format.. Backup sets are logical entity In oracle 9i it gets stored in a default location There are two type of backup sets Datafile backup sets. A single backup piece consists of physical files which are in RMAN proprietary format.Media Management software is a must if you are using RMAN for storing backup in tape drive directly. Oracle backup comprises of backup sets and it consists of backup pieces. Backup Format RMAN backup is not in oracle format but in RMAN format.

RMAN > Connect Target Connect to target database : Magic using target database controlfile instead of recovery catalog Lets take a simple backup of database in non archive mode shutdown immediate . We can fire the same command in archive log mode And whole of datafiles will be backed Backup database plus archivelog. Oracle Enhancement for RMAN in 10 G . Restoring database Restoring database has been made very simple in 9i . ..its start backing the database alter database open. It is just Restore database.Shutdowns the database • startup mount backup database . RMAN has become intelligent to identify which datafiles has to be restored and the location of backuped up file...

Flash Recovery Area Right now the price of hard disk is falling. This results in faster recovery. Many dba are taking oracle database backup inside the hard disk itself since it results in lesser mean time between recoverability.This will results in faster backups lesser space consumption and also reduces the time needed for daily backups Incrementally Updated Backups Oracle database 10g Incrementally Updates Backup features merges the image copy of a datafile with RMAN incremental backup.The merging of the image copy and incremental backup is initiated with RMAN recover command. The resulting image copy is now updated with block changes captured by incremental backups. Binary compression technique reduces backup . The new parameter introduced is DB_RECOVERY_FILE_DEST = /oracle/flash_recovery_area By configuring the RMAN RETENTION POLICY the flash recovery area will automatically delete obsolete backups and archive logs that are no longer required based on that configuration Oracle has introduced new features in incremental backup Change Tracking File Oracle 10g has the facility to deliver faster incrementals with the implementation of changed tracking file feature.

Controlfile Auto backups Through this new feature RMAN will automatically perform a controlfile auto backup. With the new DURATION option for the RMAN BACKUP command. DBAs can optionally specify whether backups should minimize time or system load. backup sets and image copy Oracle 9i New features Persistent RMAN Configuration A new configure command has been introduced in Oracle 9i . in addition. .backup options. DBAs can weigh backup performance against system service level requirements. By specifying a duration. parallelism . These automatic allocations and options can be overridden by commands in a RMAN command file. New Features in Oem to identify RMAN related backup like backup pieces. Block Media Recovery If we can restore a few blocks rather than an entire file we only need few blocks. etc. that lets you configure various features including automatic channels. RMAN will automatically calculate the appropriate backup rate. after every backup or copy command.space usage by 50-75%.

We even dont need to bring the data file offline. Configure Backup Optimization Prior to 9i whenever we backed up database using RMAN our backup also used take backup of read only table spaces which had already been backed up and also the same with archive log too. Syntax for it as follows Block Recover datafile 8 block 22. The command for this is as follows Configure backup optimization on Archive Log failover If RMAN cannot read a block in an archived log from a destination. RMAN automatically attempts to read from an alternate location this is called as archive log failover There are additional commands like backup database not backed up since time '31-jan2002 14:00:00' Do not backup previously backed up files (say a previous backup failed and you want to restart from where it left off). Now with 9i backup optimization parameter we can prevent repeat backup of read only tablespace and archive log. Backup of server parameter file . Similar syntax is supported for restores backup device sbt backup set all Copy a disk backup to tape (backing up a backup Additionally it supports .

. Compulsory Media Management only if using tape backup Incremental backups though used to consume less space used to be slower since it used to read the entire database to find the changed blocks and also They have difficult time streaming the tape device. If you changed the location of backup set it is compulsory for you to register it using RMAN or while you are trying to restore backup It resulted in hanging situations There is no method to know whether during recovery database restore is going to fail because of missing archive log file. . . The syntax was a bit complex … RMAN has now become very simple and easy to use.. . Parallel operation supported Extensive reporting available Scripting Duplex backup sets Corrupt block detection Backup archive logs Pitfalls of using RMAN Previous to version Oracle 9i backups were not that easy which means you had to allocate a channel compulsorily to take backup You had to give a run etc . Considerable improvement has been made in 10g to optimize the algorithm to handle changed block. . .. Observation .

The SYSTEM tablespace always contains the data dictionary tables for the entire database. and one or more control files. Explain the relationship among database. which is automatically created when the database is created. A tablespace is used to grouped related logical structures together. So if you really don't want to miss something critical please start using RMAN. tablespace and data file ? Each databases logically divided into one or more . One or more datafiles. What is SYSTEM tablespace and when is it created? Every Oracle database contains a tablespace named SYSTEM.Introduced in Oracle 8 it has become more powerful and simpler with newer version of Oracle 9 and 10 g. two are more redo log files. What are the components of logical database structure of Oracle database? There are tablespaces and database's schema objects. • • • • • What are the components of physical database structure of Oracle database? Oracle database is comprised of three types of files. What is a tablespace? A database is divided into Logical Storage Unit called tablespaces.

Can a tablespace hold objects from different schemes? Yes. database triggers. clusters. procedures. synonyms. (The query is a SELECT statement that identifies the columns and rows of the table(s) the view uses.• • • • • • • tablespaces one or more data files are explicitly created for each tablespace. What are Schema Objects? Schema objects are the logical structures that directly refer to the database's data. indexes. .) What is Partial Backup ? A Partial Backup is any operating system backup short of a full backup. What is Oracle table? A table is the basic unit of data storage in an Oracle database. Table data is stored in rows and columns. What is schema? A schema is collection of database objects of a user. Schema objects include tables. sequences. Can objects of the same schema reside in different tablespaces? Yes. views. What is an Oracle view? A view is a virtual table. functions packages and database links. taken while the database is open or shut down. The tables of a database hold all of the user accessible data. Every view has a query attached to it.

its control file is used to identify the database and redo log files that must be opened for database operation to proceed. It is also used in database recovery.• What is Mirrored on-line Redo Log ? • • A mirrored on-line redo log consists of copies of online redo log files physically located on separate disks. • Can a Tablespace hold objects from different Schemes ? Yes. • Can objects of the same Schema reside in different tablespace ? Yes. on-line redo log files and control file that constitute ORACLE database and the parameter. DELETE Cascade . • Can a View based on another View ? Yes. • What is Full Backup ? A full backup is an operating system backup of all data files. • What is the use of Control File ? When an instance of an ORACLE database is started.When a . • Do View contain Data ? Views do not contain or store data.A referential integrity rule that disallows the update or deletion of referenced data. • What are the Referential actions supported by FOREIGN KEY integrity constraint ? UPDATE and DELETE Restrict . changes made to one member of the group are made to all members.

UID. Tablespace and Data file? Each databases logically divided into one or more tablespaces one or more data files are explicitly created for each tablespace What are the different type of Segments ? Data Segment. What is an Integrity Constrains ? An integrity constraint is a declarative way to define a business rule for a column of a table. What are Clusters ? Clusters are groups of one or more tables physically stores together to share common columns and are often used together.• • • • • • • • referenced row is deleted all associated dependent rows are deleted. What is an Index ? An Index is an optional structure associated with a table to have direct access to rows. What is an Index Segment ? Each Index has an Index segment that stores all of its data. Explain the relationship among Database. Index Segment. which can be created to increase the performance of data . What is a Redo Log ? The set of Redo Log files YSDATE. Rollback Segment and Temporary Segment. What are the type of Synonyms? There are two types of Synonyms Private and Public. or the pseudo columns LEVEL or ROWNUM.USER or USERENV SQL functions.

• What is a View ? A view is a virtual table.Hide data complexity. .Provide an additional level of table security. .Simplify commands for the user. Table data is stored in rows and columns. • What is an Extent ? An Extent is a specific number of contiguous data blocks. Index can be created on one or more columns of a table. • What is an Oracle sequence? A sequence generates a serial list of unique • . Every view has a Query attached to it.Store complex queries.) • What is Table ? A table is the basic unit of data storage in an ORACLE database. obtained in a single allocation. . The tables of a database hold all of the user accessible data.Present the data in a different perspective from that of the base table. and used to store a specific type of information.retrieval. Can a view based on another view? Yes. • What are the advantages of views? . by restricting access to a predetermined set of rows and columns of a table. (The Query is a SELECT statement that identifies the columns and rows of the table(s) the view uses. .

Provide location transparency for tables. What is a synonym? A synonym is an alias for a table.• • • • • • • • numbers for numerical columns of a database's tables. What is a public synonym? Any database user can access a public synonym. . What is an Oracle index? An index is an optional structure associated with a table to have direct access to rows. view. What are synonyms used for? . . views or program units of a remote database. What is a Tablespace? A database is divided into Logical Storage Unit called tablespace.Simplify the SQL statements for database users. What are the types of synonyms? There are two types of synonyms private and public.Provide public access to an object . A tablespace is used to grouped related logical structures together . What is a private synonym? Only its owner can access a private synonym. Index can be created on one or more columns of a table. which can be created to increase the performance of data retrieval. sequence or program unit. How are the index updates? Indexes are automatically maintained and used by Oracle. Changes to table data are automatically incorporated into all relevant indexes.Mask the real name and owner of an object.

What is difference between UNIQUE constraint and PRIMARY KEY constraint ? • • A column defined as UNIQUE can contain Nulls while a column defined as PRIMARY KEY can't contain Nulls. Once created a data file can't change size.ORA file and can’t be changed latter. Time stamp of database creation. • What is Index Cluster ? A Cluster with an index on the Cluster Key • When does a Transaction end ? When it is committed or Rollbacked. What are the Characteristics of Data Files ? A data file can be associated with only one database. What does a Control file Contain ? A Control file records the physical structure of the database.• • • • • What is Rollback Segment ? A Database contains one or more Rollback Segments to temporarily store "undo" information. . One or more data files form a logical unit of database storage called a tablespace. Block size is specified in INIT. A database users and allocated free database space in ORACLE data blocks. Database Name Names and locations of a database's files and redolog files. How to define Data Block size ? A data block size is specified for each ORACLE database when the database is created. It contains the following information.

The dbca utility is located in the $ORACLE_HOME/bin directory. Otherwise the OPTIMIZER chooses RULE_based approach. • What is the effect of setting the value "CHOOSE" for OPTIMIZER_GOAL. is falling out of fashion.What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ? What are the factors that affect OPTIMIZER in choosing an Optimization approach ? Answer The OPTIMIZER_MODE initialization parameter Statistics in the Data Dictionary the OPTIMIZER_GOAL parameter of the ALTER SESSION command hints in the statement. This option. One can also create databases manually using scripts. Look at this example for creating and Oracle 9i database: CONNECT SYS AS SYSDBA • . however. • How does one create a new database? (for DBA) One can create and modify Oracle databases using the Oracle "dbca" (Database Configuration Assistant) utility. parameter of the ALTER SESSION Command ? The Optimizer chooses Cost_based approach and optimizes with the goal of best throughput if statistics for atleast one of the tables accessed by the SQL statement exist in the data dictionary. as it is quite involved and error prone. The Oracle Universal Installer (oui) normally starts it after installing the database server software.

. ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2='/u03/oradata/'. What database block size should I use? (for DBA) Oracle recommends that your database block size match. If you are using a volume manager. Your choice should depend on the type of application you are running. With fewer but larger transactions. as with a DSS application. One can use smaller block sizes. ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_1='/u02/oradata/'. use a larger block size. If you have many small transactions as with OLTP. use a smaller block size.• • • • ALTER SYSTEM SET DB_CREATE_FILE_DEST='/u01/oradata/'. What are the different approaches used by Optimizer in choosing an execution plan ? Rule-based and Cost-based. consider your "operating system block size" to be 8K. How does one coalesce free space ? (for DBA) SMON coalesces free space (extents) into larger. This is because volume manager products use 8K blocks (and this is not configurable). What does ROLLBACK do ? ROLLBACK retracts any of the changes resulting from the SQL statements in the transaction. or be multiples of your operating system block size. contiguous extents every 2 hours and even then. but the performance cost is significant. CREATE DATABASE.

command. • How does one prevent tablespace fragmentation? (for DBA) Always set PCTINCREASE to 0 or 100. etc. NAME FROM SYS. 200K. 100K. 400K. 101K. 100K. Where 'n' is the tablespace number you get from SELECT TS#. SMON will not coalesce free space if a tablespace's default storage parameter "pctincrease" is set to 0. You can get status information about this process by selecting from the SYS.TS$. With Oracle 7. Such extents of bizarre size are rarely re-used in their entirety. Bizarre values for PCTINCREASE will contribute to fragmentation. PCTINCREASE of 0 or 100 gives you nice round extent sizes that can easily be reused.3 one can manually coalesce a tablespace using the ALTER TABLESPACE . 102K.only for a short period of time. Locally Managed tablespaces (available from 8i onwards) with uniform extent sizes virtually eliminates any tablespace . etc... Use the same extent size for all the segments in a given tablespace.g. 100K.. For example if you set PCTINCREASE to 1 you will see that your extents are going to have weird and wacky sizes: 100K. COALESCE.DBA_FREE_SPACE_COALESCED dictionary view. E. until then use: SQL> alter session set events 'immediate trace name coalesce level n'.

• What is COST-based approach to optimization ? Considering available access paths and determining the most efficient execution plan based on statistics in the data dictionary for the .(query result 2) . Thus. the tables' HWM = (query result 1) . unless they run into thousands and thousands where additional I/O may be required to fetch the additional blocks where extent maps of the segment are stored. which contains the high water mark (HWM) for a table.fragmentation.1 NOTE: You can also use the DBMS_SPACE package and calculate the HWM = TOTAL_BLOCKS UNUSED_BLOCKS . ANALYZE TABLE owner. • Where can one find the high water mark for a table? (for DBA) There is no single system table. A table's HWM can be calculated using the results from the following SQL statements: SELECT BLOCKS FROM DBA_SEGMENTS WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table).1.table ESTIMATE STATISTICS. SELECT EMPTY_BLOCKS FROM DBA_TABLES WHERE OWNER=UPPER(owner) AND SEGMENT_NAME = UPPER(table). Note that the number of extents per segment does not cause any performance issue anymore.

it would give it you. The changes made by the SQL statements of a transaction become visible to other user sessions transactions that start only after transaction is committed. but it allocates 2 blocks or 16K as requested. Oracle doesn't round it up to the multiple of 5 when a tablespace is locally managed.tables accessed by the statement and their associated clusters and indexes. If one asks for 8 blocks. • How are extents allocated to a segment? (for DBA) Oracle8 and above rounds off extents to a multiple of 5 blocks when more than 5 blocks are requested. Oracle doesn't round it up to 5 blocks. . If one requests 16K or 2 blocks (assuming a 8K block size). If one asks for 8 blocks and Oracle finds a contiguous free space that is exactly 8 blocks. Space allocation also depends upon the size of contiguous free space available. • What does COMMIT do ? COMMIT makes permanent the changes resulting from all SQL statements in the transaction. The exception to this rule is locally managed tablespaces. Clearly Oracle doesn't always round extents to a multiple of 5 blocks. Oracle will round it up to 10 blocks. Oracle would also give it to you. If a tablespace is created with local extent management and the extent size is 64K. If it were 9 blocks. then Oracle allocates 64K or 8 blocks assuming 8K-block size.

• Can one rename a database user (schema)? (for DBA) No. Workaround: Do a user-level export of user A create new user B Import system/manager fromuser=A touser=B Drop user A . this is listed as Enhancement Request 158508.

Sign up to vote on this title
UsefulNot useful