You are on page 1of 27

Sql objective ques

Ques: 1 What are the difference between DDL, DML and DCL commands? Ans: SQL can be divided into two parts: > The Data Manipulation Language (DML) > The Data Definition Language (DDL). The query and update commands form the DML part of SQL: > SELECT - extracts data from a database > UPDATE - updates data in a database > DELETE - deletes data from a database > INSERT INTO - inserts new data into a database The DDL part of SQL permits database tables to be created or deleted. It also define indexes (keys), specify links between tables, and impose constraints between tables. The most important DDL statements in SQL are: > CREATE DATABASE - creates a new database > ALTER DATABASE - modifies a database > CREATE TABLE - creates a new table > ALTER TABLE - modifies a table > DROP TABLE - deletes a table > CREATE INDEX - creates an index (search key) > DROP INDEX - deletes an index Data Control Language (DCL) statements. Some examples: > GRANT - gives user's access privileges to database > REVOKE - withdraw access privileges given with the GRANT command Ques: 2 Which one is faster DELETE/TRUNCATE? Ans: Truncante is more faster than delete because when we delete the records from the database, database has to perform 2 actions. > Delete from the database > Write the deleted records into "rollback" segments. But incase of "Truncate" the second activity is not required.It is faster than becouse truncate is a ddl command so it does not produce any rollback information and the storage space is released while the delete command is a dml command and it produces rollback information too and space is not deallocated using delete command. Ques: 3 What is RDBMS? Ans: RDBMS stands for Relational Database Management System. RDBMS is the basis for SQL, and for all modern database systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. The data in RDBMS is stored in database objects called tables. A table is a collections of related data entries and it consists of columns and rows.Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be created and maintained a cross and among the data and tables. In a relational database, relationships between data items are expressed by means of tables. Interdependencies among these tables are expressed by data values rather than by pointers. This allows a high degree of data i ndependence. An RDBMS has the capability to recombine the data items from different files, providing powerful tools for data usage. Ques: 4 What are different normalization forms? Ans: normalisation have a se veral forms that a database structure can be subject to, each with rules that constrain the database further and each creating what is called a Normal Form. These are, in order: > First Normal Form (1NF)

> Second Normal Form (2NF) > Third Normal Form (3NF) > Boyce Codd Normal Form (BCNF) > Fourth Norm al Form (4NF) > Fifth Normal Form (5NF) > Optimal Normal Form (ONF) > Domain-Key Normal Form (DKNF) Theses are defined as : > 1NF: Eliminate Repeating Groups : Make a separate table for each set of related attributes, and give each table a primary key. Each field contains at most one value from its attribute domain. > 2NF: Eliminate Redundant Data : If an attribute depends on only part of a multi-valued key, rem ove it to a separate table. > 3NF: Eliminate Columns Not Dependent On Key : If attributes do not contribute to a description of the key, remove them to a separate table. All attributes must be directly dependent on the primary key. > BCNF: Boyce -Codd Normal Form : If there are non -trivial dependencies between candidate key attributes, separate them out into distinct tables. > 4NF: Isolate Independent Multiple Relationships : No table may contain two or more 1:n or n:m relationships that are not direct ly related. > 5NF: Isolate Semantically Related Multiple : Relationships There may be practical constrains on information that justify separating logically related many -to-many relationships. > ONF: Optimal Normal Form : A model limited to only simple (ele mental) facts, as expressed in Object Role Model notation. > DKNF: Domain -Key Normal Form : A model free from all modification anomalies. Ques: 5 What is normalization? Ans: Normalisation is a process whish is the tables in a database are optimised to remove the potential for redundancy. Two main problems may arise if this is not done: > Repeated data makes a database bigger. > Multiple instances of the same values make maintaining the data more difficult and can create anomalies. Ques: 6 What is Stored Procedure Ans: A stored procedure is a named group of SQL statements that have been previously created and stored in the server database. Stored procedures accept input parameters so that a single procedure can be used over the network by severa l clients using different input data. And when the procedure is modified, all clients automatically get the new version. Stored procedures reduce network traffic and improve performance. Stored procedures can be used to help ensure the integrity of the dat abase. e.g. sp_helpdb, sp_renamedb, sp_depends etc Ques: 7 What is Trigger? Ans: A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or UPDATE) occurs. Triggers are stored in and managed by the DBMS.Triggers are used to main tain the referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or executed; the DBMS automatically fires the trigger as a result of a data modification to the associated table. Triggers can be viewed as simi lar to stored procedures in that both consist of procedural logic that is stored at the database level. Stored procedures, however, are not event -drive and are not attached to a specific table as triggers are. Stored procedures are explicitly executed by i nvoking a CALL to the procedure while triggers are implicitly executed. In addition, triggers can also execute stored procedures.

Nested Trigger: A trigger can also contain INSERT, UPDATE and DELETE logic within itself, so when the trigger is fired because of data modification it can also cause another data modification, thereby firing another trigger. A trigger that contains data modification logic within itself is called a nested trigger. Ques: 8 What is View? Ans: A simple view can be thought of as a sub set of a table. It can be used for retrieving data, as well as updating or deleting rows. Rows updated or deleted in the view are updated or deleted in the table the view was created with. It should also be noted that as data in the original table changes, so does data in the view, as views are the way to look at part of the original table. The results of using a view are not permanently stored in the database. The data accessed through a view is actually constructed using standard T -SQL select command and can come from one to many different base tables or even other views. Ques: 9 What is Index? Ans: An index is a physical structure containing pointers to the data. Indices are created in an existing table to locate rows more quickly and efficiently. It is p ossible to create an index on one or more columns of a table, and each index is given a name. The users cannot see the indexes, they are just used to speed up queries. Effective indexes are one of the best ways to improve performance in a database applicat ion . A table scan happens when there is no index available to help a query. In a table scan SQL Server examines every row in the table to satisfy the query results. Table scans are sometimes unavoidable, but on large tables, scans have a terrific impact o n performance. Ques: 10 What is SQL? Ans: SQL is a bassically standard language for accessing and manipulating databases. Its is defines as : > SQL stands for Structured Query Language > SQL lets you access and manipulate databases > SQL is an ANSI (American National Standards Institute) standard. SQL have a many properties, It can do : > SQL can execute queries against a database. > SQL can retrieve data from a database. > SQL can insert records in a database. > SQL can update records in a database. > SQL can delete records from a database. > SQL can create new databases. > SQL can create new tables in a database. > SQL can create stored procedures in a database. > SQL can create views in a database. > SQL can set permissions on tables, procedures, and views. Ques: 11 What are the components of physical database structure of Oracle database? Ans: Physical components of oracle database are: > Control files, > Redo log files and > Datafiles. > Control file : control file is basicaly a type of file . Its read in the mount state of database. control file is a small binary file which records the physical structure of database which includes * Database name * names and locations of datafiles and online

redo log files. * timestamp of database creation * check point information * current log sequence number. Redo log files : Redo log files usually use for the saving to the files. This files saves all the changes that are made to the database as they occur. This plays a great role in the database recovery. Datafiles : Datafiles are the physicalfiles which stores data of all logical structure. Ques: 12 What are the components of logical database structure of Oracle database? Ans: The Logical Database Structure of an Oracle include : > The schema objects, > Data blocks, > Extents, > Segments and > Tablespaces. > schema objects : means table, index, synonyms, sequences etc. > Data blocks : are the smallest part of the oracle database defined by DB_BLOCK_SIZE parameter. > Extent : A group of data blocks forms an extent.

> Segments : An extents groups tends to segments, > Table space : lastly a group of segment forms a tablespace. Ques: 13 What is a tablespace? Ans: A Tablespace is bassically a logical storage unit within an Oracle database. It is logical because a tablespace is not visible in the file system of the machine on which the database resides. A tablespace, in turn, consists of at least one data file which are physically located in the file system of the server. b/w datafile belongs to exactly one tablespace. Each table index and so on that is stored in an Oracle database belongs to a tablespace. The tablespace builds the bridge between the Oracle database and the filesystem in which the table's or index' data is stored. There are three types of tablespaces in Oracle: > Permanent tablespaces > Undo tablespaces > temporary tablespaces A tablespace is created with the create tablespace sql command. Ques: 14 What is SYSTEM tablespace and when is it created? Ans: Every ORACLE database have a table space which name is SYSTEM . when the database is created taht a time its also automatically created. The SYSTEM tablespace always contains the data dictionary tables for the entire database. Ques: 15 Explain the relationship among database, tablespace and data file. Ans: Database : Database is the Collection of data is called database. Table Space : The table space ismany use for storing the data in the database. When a database is created t wo table spaces are created. i) System Table Space : This data file stores all the tables related to the system and dba tables.

ii) User Table Space : This data file stores all the user related tables. We should have separate table spaces for storing the t ables and indexes so that the access is fast. Data Files : Every Oracle Data Base has one or more physical data files. They store the data for the database. Every data -file is associated with only one database. Once the Data file is created the size cann ot change. To increase the size of the database to store more data we have to add data file. Ques: 16 What is schema? Ans: Schema bassically Pronounce skee -ma, It is the structure of a database system,It described in a formal language supported by the database management system (DBMS). In the RDBMS (Relational database System) , the schema defines the tables, the fields in each table, and the Schemas are generally stored in a data dictionary . Even a sche ma is defined in text database language , the term is often used to refer to a graphical depiction of the database structure. Ques: 17 What are Schema Objects? Ans: Schema is bassically a Associated with each database user . It is a collection of schema o bjects. Examples of schema objects include tables, views, sequences, synonyms, indexes, clusters, database links, snapshots, procedures, functions, and packages. Schema objects are logical data storage structures. Schema objects don't have a one -to-one correspondence to physical files on disk that store their information. Even Oracle stores a schema object logically within a tablespace of the database. The data of each object is physically contained in one or more of the tablespace's datafiles. Ques: 18 Can objects of the same schema reside in different table spaces? Ans: Yes we can objects of the same schema reside in different table space. Schema objects can stored in different tablespace and a tablespace can contained one or more schema objects data. Ques: 19 Can a tablespace hold objects from different schemes? Ans: Yes we can a template hold objects from different schemes. Ques: 20 What is Oracle table? Ans: The Collection of informations stored in the strutrued format which is in rows and columns forma te that is called a table. Ques: 21 What is an Oracle view? Ans: A view is a bassically logical table which makes a change complex query to easy term .We can even create a complex view by joining two tables. Ques: 22 Do a view contain data? Ans: Ofcourse the View don't contain any data. The basic property of a view is to extract a set of data columns to display from a large number. And this is useful in future by jst stating the view name instead writing the select statement every time. Ques: 23 Why we use Semicolon after SQL Statements? Ans: Some database systems are very curious about the its must be semicolon at the end of each SQL statement . Semicolon is the very good way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server. We are always try to using MS Access and SQL Server 2000 and we don't have to put a semicolon after each SQL statement, but some database programs force us to use it. Ques: 24 Define the Primary key?

Ans: The Primary Key is bassically a key that is frequently used to identify a specific row other keys also may exist and all the other values are dependent on that value to be meaningfully identified. A primary key is usually one attribute or column in a relation or table, But can be a combination of attributes. Ques: 25 What do you mean by Candidate key? Ans: Condidate key is bassically use for when we added a new attribute in the table, We could also use the combination of other attribute with this new attribute to identify the row, as together they form a Composite Key. Thus we have two potential or Candidate Keys. Ques: 26 What is the Foriegn Key? Ans: Play History Catalogue No. - Date - Times Played Supose we have a table whihc name is Play history and its have a three colums Catalogue No and Date anf Times Play.These are three Colums in a 1 row. In this situation the Catalogue No. number is a Primary Key in the CDs table but only part of the Composite Key in the Play History table as the date is req uired to form the whole key. An alternative could have been to create a new unique single -attribute Primary Key for the table. As we still need to know the catalogue number in order to work out how many times a DJ has played Britney, Christina or Pink. The catalogue number would become the Foreign Key in the Play History table,that is Foreign Key is a attribute or column in a table that refers to a Primary Key in another table. Ques: 27 What are the use of Null? Ans: NULLs are bassically for use in databas e for descraibe that no value or attributes are exist, But are not really values themselves. Instead they are just an indictor that a particular field has no value. Some decussions are clarifying that it is better than no value i mean blank value or a def ault value. we are individually can see little value in a blank field, but default values can be useful. The interesting point about NULLs is that no Primary Key can contain a NULL and thus it's useful when comparing Candidate Keys to see if one could pote ntially contain a NULL, thus disqualifying that key. Ques: 28 What are the properties of the Relational tables? Ans: Relational tables have six properties which is there : > In this table Values are atomic. > In this table Column values are of the same kin d. > In this table Each row is unique. > In this table The sequence of columns is insignificant. > In this table The sequence of rows is insignificant. > In this table Each column must have a unique name. Ques: 29 What is De-Normalization? Ans: De-Normalization is bassically the process, Which is attempting to optimize the performance of a database by adding redundant data. It is very important sometimes because current DBMS's implement the relational model poorly. A true relational DBMS would al low for a fully normalized database at the logical level, Even providing physical storage of data that is tuned

for high performance. De -Normalization is a technique to move from higher to lower normal forms of database modeling in order to speed up database access. Ques: 30 What is the mean of Nested Trigger? Ans: A Trigger have a many authorities it can also perform to the INSERT,UPDATE and DELETE oprations or logic within itself, And whenever the trigger is fired the reason is that data modificatio n, It can also the reason is another data modification, may be firing another trigger. A Trigger that contains data modification logic within itself is called a nested trigger. Ques: 31 What is a Linked Server? Ans: Linked Servers is bassically a concept i n SQL Server, Its mainly use we can add the other SQL Server to a Group and query both the SQL Server dbs using T -SQL Statements. With a linked server, We can also create very clean,easy to follow, And SQL statements that allow remote data to be retrieved, joined and combined with local data. Ques: 32 What is Cursor? Ans: Cursor is bassically a database object,which is manily used by applications to manipulate data in a set on a Row by Row basis, Inastead of use the typical SQL commands that operate on all the rows in the set at one time. In order to workwith a cursor we need to perform some steps in theFollowing order : > Declare cursor > Open cursor > Fetch row from the cursor > Process fetched row > Close cursor > Deallocate cursor Ques: 33 What is Collation? Ans: Collation is bassically a collection to a set of rules that determine how to data is sorted and compared. Character data is sorted with using rules that defined the sequence of correct character, with specifying case sensitivity options,and accent marks, and kana character types and character width. Ques: 34 What is Difference between Function and Stored Procedure? Ans: Many didd are there : > UDF can be used WHERE/HAVING/SELECT section anywhere in the SQL statements, But in case of Stored procedures cannot be. > UDF's that return tables can be treated as another rowset. This can be used in JOINs with other tables. Inline UDF's can be thought of as views that take parameters and can be used in JOINs and other Rowset operations. Ques: 35 What is the Sub-Query?And what is the properties of Sub -Query? Ans: Sub-queries are bassically defined as

sub-selects, Its allow a SELECT statement to be executed arbitrarily within the body of another SQL statement. A sub -query is mainly executed by enclosing in a set of parenthesis. Sub -queries are generally used to return a single row as an atomic value, They may be used to comparision, Its may be use for compare the values against multiple rows with the IN -keyword. A Subquery is a SELECT statement that is nested within another T-SQL statement. A Subquery SELECT statement if executed independently of the T -SQL statement, In which it is nested, will return a resultset. Meaning a subquery SELECT statement can stand alone and is not depended on the stat ement in which it is nested. A subquery SELECT statement can return any number of values, and can be found in, The column list of a SELECT statement,FROM, GROUP BY,HAVING,and/or ORDER BY clauses of a T-SQL statement. A Subquery can also be used as a parameter to a function call . Basically a subquery can be used anywhere an expression can be used. Ques: 36 Give the list how many type of Joine? Ans: There are diff types of join : > Cross Join > Inner Join > Outer Join * Left Outer Join * Right Outer Join * Full Outer Join > Self Join Ques: 37 Define : What is the Cross Join? Ans: A cross join is he type of join , That does not have a WHERE clause which is produces the Cartesian product of the tables involved in the join. The size of a Cartesian product result set is bassically equal to the number of rows in the first table multiplied by the number of rows in the second table. For the example we can see when company wants to combine each product with a pricing table to analyze each product at each price. Ques: 38 give us a definition of Inner Join? Ans: Inner Join is a bassically use for presention the tables or formate, A join that displays only the rows that have a match in both joined tables is known as inner Join. This is the default type of join in the Query and View Designer.

Ques: 39 What do you mean by Outer Join? and define also how many types of Outer Join? Ans: Outer Join is the bassically use for a rows. That join includes rows even if related rows in the joined table are absent is an Outer Join. We can create three different outer join to specify the unmatched rows to be included : > Left Outer Join : In Left Outer Join all rows in the first& named table i.e. "left" table, which appears leftmost in the JOIN clause are included. Unmatched rows in the right table do not appear.

> Right Outer Join: In Right Outer Join all rows in the se cond;named table i.e. "right" table, which appears rightmost in the JOIN clause are included. Unmatched rows in the left table are not included. > Full Outer Join: In Full Outer Join all rows in all joined tables are included, whether they are matched or n ot. Ques: 40 Defeine : Self Join? Ans: Self Join is bassically use for the editing in the table itself , This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A self join can joined tables which are the same . A self join is rather unique in that it involves a relationship with only one table. For the example is when company has a hierarchal reporting structure whereby one member of staff reports to another. Self Join also use can be Outer Join or Inner Join. Ques: 41 What is User Defined Functions? Ans: User Defined Functions is bassically signifies UDF, Its allow to define only its own T -SQL functions which is accept 0 or more parameters and return a single scalar data value or a table data type. Ques: 42 What kind of User-Defined Functions can be created? Ans: We can a creat User -Defined Functions in a many ways they are defined as : > Scalar User -Defined Function : A Scalar user -defined function is bassically a return value like one of the scalar data types . It is not a type of supported data types like Text,ntext,image and timestamp. These are the type of user -defined functions and most developers are used to in other programming languages. We pass in 0 to many parameters and We get a return value. > Inline Table-Value User -Defined Function : An Inline Table -Value user defined function mainly returns the value like a table data type and It is an exceptional alternative to a view as the user -defined function, It can pass parameters into a T -SQL select command and Its is poivide the essence with a parameterized, non -updateable view of the underlying tables. > Multi-statement Table -Value User -Defined Function : A Multi -Statement Table-Value user -defined function is bassically a returns a table and It is a type of view which we can say like an exceptional alternative view as the function can support multiple T‐SQL statements to build the final result where the view is limited to a single SELECT statement. And Its also the ability to pass parameters into a T -SQL select command or a group of them gives us the capability to in essence create a parameterized, non‐updateable view of the data in the underlying tables. Within the create function command you must define the table structure that is being returned. After creating this type of user‐defined function, It can be used in the FROM clause of a T‐SQL command unlike the behavior found when using a stored procedure which can also return record sets. Ques: 43 What is Identity? Ans: Identity is a bassically called as AutoNumber. It is mainly a column that automatically generates numeric values. When A start and increment value can be set, but most DBA leave these at 1. A identity or GUID column also generates numbers; thease type of values cannot b e controlled. Identity/GUID columns do not need to be indexed. Ques: 44 What is DataWarehousing? Ans: DataWarehousing is the bassically mean that It is Subject -oriented, Its a meaning that the data in the database is organized so that all the data elements relating to the same real -world event or object are linked together.

> It is Time -variant, Its a meaning that the changes to the data in the database are tracked and recorded so that reports can be produced showing changes over time. > It is Non -volatile, Its a meaning that data in the database is never over-written or deleted, Onaly once committed, The data ahould be static, And read-only, But retained for future reporting. > It is Integrated, Its meaning that the database contains dat a from most or all of an organization's operational applications, And that this data is made consistent. Ques: 45 What is the clustered index? Ans: A Clustered index is bassically a special type of index,its is mainly use for reorders the way of records in the table which is in the physically stored. Even table can have only one clustered index. the data pages contained on the leaf nodes of the clustered index . Ques: 46 What do you mean by A non clustered index? Ans: A Non Clustered Index is a special type of index, Which Indexes are in the logical order of the index, Its does not match the physical stored order of the rows on disk. The leaf node does not consist of the data pages Which is from non clustered index. Instead, The leaf nodes contain index row s. Ques: 47 What are the different index configurations a table can have? Ans: A Table can have Diff type of the index configurations, Which are following as : > No Indexes > A clustered index > A clustered index and many nonclustered indexes > A noncluste red index > Many nonclustered indexes Ques: 48 What are different types of Collation Sensitivity? Ans: There are many diff types of Collation Sensitivity, Which are following here : > Case Sensitivity : A and a, B and b, etc . > Accent Sensitivity : a and , o and , etc. > Kana Sensitivity : When the Japanese kana characters Hiragana and Katakana are treated differently, It is called Kana sensitive. > Width Sensitivity : it is Bassically a single -byte character or half width and the same character rep resented as a double -byte character or full-width are treated differently than it is width sensitive. Ques: 49 What is OLTP? Ans: OLTP stands for Online Transaction Processing Systems. It is mainly use for relational database design for use the discipline of data modeling and generally follow the Code rules of data normalization, It is in order to ensure absolute data integrity. It is Using these rules complex information is broken down into its most simple structures or a table, where all of the individua l atomic level elements relate to each other and satisfy the normalization rules. Ques: 50 What do you mean by TRUNCATE? Ans: Truncate is bassically defined as : > It cannot be rolled back. > It is DDL Command. > It Resets identity of the table. > It is faster and uses fewer system and transaction log resources than DELETE.

> It removes the data by deallocating the data pages used to store the tables data, and only the page deallocations are recorded in the transaction log. > It removes all rows from a table, but the table structure, its columns, constraints, indexes and so on, remains. The counter used by an identity for new rows is reset to the seed for the column. > We can't use TRUNCATE TABLE on a table referenced by a FOREIGN KEY constraint. Because TRUNCATE TABLE is not logged, it cannot activate a trigger. Ques: 51 What do you mean by DELETE command? Ans: Delete Command bassically defines as : > It Can be used with or without a WHERE clause. > It Activates Triggers. > It can be rolled back. > It is DML Command. > It does not reset identity of the table. > DELETE removes rows one at a time and records an entry in the transaction log for each deleted row. > If we want to retain the identity counter, Which is use DELETE instead. If we want to r emove table definition and its data, use the DROP TABLE statement. Ques: 52 When is the use of UPDATE_STATISTICS command? Ans: UPDATE_STATISTICS command is mainly used for the solving a problem when a large processing of data has occurred. If a large amoun t of deletions wants any modification or when the Bulk Copy into the tables has occurred, that time it has to update the indexes to take these changes into account. Its updates the indexes on these tables accordingly. Ques: 53 What is the difference betwee n a HAVING CLAUSE and a WHERE CLAUSE? Ans: There are a many differences b/w HAVING CLAUSE and a WHERE CLAUSE : Having Clause is mainly used for the Group By function Its only with the GROUP BY function in a query, But In case of WHERE Claus e is using only for rows, Its applied to each row before they are part of the GROUP BY function in a query. Both of Clouses are mainly specify a search condition for a group or an aggregate. But differences are there in the case of HAVING CLAUSE, it can b e used only with the SELECT statement. And It is typically used in a GROUP BY clause. Even GROUP BY is not used, HAVING behaves something like a WHERE clause. Ques: 54 What are the properties of SUB -QUERY? Ans: There are many Properties of Sub -Query are t here : > Its must be enclosed in the parenthesis. > Its must be put in the right hand of the comparison operator. > Its cannot contain an ORDER -BY clause. > A query can contain more than one sub -query. Ques: 55 What are the type of SUB -QUERy? Ans: There are many types of SUB -QUERY : > Single-row sub-query: where the sub -query returns only one row. > Multiple -row sub-query : where the sub -query returns multiple rows, and > Multiple column sub -query : where the Sub -query returns multiple columns. Ques: 56 What is SQL Profiler? Ans: SQL Profiler is bassically a graphical tool, Which is maily use for alow to system administrators to monitor events in an instance of Microsoft SQL

Server. We can capture and save data about each event to a file or SQL Server ta ble to analyze later. For example, we can monitor a production environment to see which stored procedures are hampering performances by executing too slowly. Its mainly Use SQL Profiler to monitor only the events in which we are interested. We can filter t he events based on the information we want, when It traces are becoming too large, That's why only a subset of the event data is collected.In server many overhead events are added from the Monitor and the monitoring process and becouse the trace file or tr ace table to grow very large, Specially when the monitoring process takes place over a long period of time. Ques: 57 What are the authentication modes in SQL Server? How can it be changed? Ans: Mainly Two modes are the Authentication Modes in SQL Server they are following as : Windows mode and Mixed Mode : SQL And Windows. Process of change the Authentication Mode in SQL Server : To change authentication mode in SQL Server click Start > Program s > Microsoft SQL Server > click SQL Enterprise Manager . When the open the Window of SWL Enterprise Manager it means it start to run from the Microsoft SQL Server program group. Now Select the server then going to Tools menu > select SQL Server Configuration Properties, and choose the Security page. Ques: 58 What is SQL Server Agent? Ans: SQL Server Agent is the very important for the Database administrator. Its a very good role or important role in database administrator (DBA) for work on day to day tasks. It is use overlooked as one of the main tools for SQL Server management. Its mainly use of the implementation of tasks for the DBA, with its full function scheduling engine, which allows us to schedule our own jobs and scripts. Ques: 59 Can a stored procedure call itself or recursive stored procedure? How much level SP nesting is possible? Ans: Yes we can stored procedure call itself or recursive storeed procedure. Because Stored procedures is bassically are nested when one stored procedure cal ls another or executes managed code by referencing a CLR routine, type, or aggregate. we can nest stored procedures and managed code references up to 32 levels. T -SQL supports recursion, we can write the stored procedures becouse of call, Recursion have a techniques or methods of problem solving, Where in the solution is appying o the problems it can be use of subset of problems only. A common application of recursive logic is to perform numeric computations that lend themselves to repetitive evaluation by the same processing steps. Ques: 60 What is Log Shipping? Ans: Log shipping is bassically a process of the datatbase and its maily use for transaction of the lof files on the production SQL Server, And its the process of automating the backup of database. And then restoring them onto a standby server. Enterprise Editions is only supports log shipping. In the case of log shipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same database and can be used this as the Disaster Recovery plan. The key feature of log shipping is that it will automatically backup transaction logs throughout the day and automatically restore them on the standby se rver at defined interval. Ques: 61 What does it mean to have QUOTED_IDENTIFIER ON? What are the implications of having it OFF? Ans: When SET QUOTED_IDENTIFIER is OFF, identifiers must follow all T -SQL rules

for identifiers and It cannot be quoted , But in case of When SET QUOTED_IDENTIFIER is ON, Identifiers can be defied the boundaries by double quotation marks, And literals must be define the boundaries by single quotation marks. Ques: 62 What is the mean of Local temporary table? Ans: Local temporary tables are distinct within modules and embedded SQL programs within SQL sessions.A local temporary table is bassically a like a using for duration of connections. Its exists only for the duration of a connection. If defined inside a compoun d statement, for the duration of the compound statement. Ques: 63 What do u mean by Global temporary table? Ans: Global temporary tables are distinct within SQL sessions. The table definition is the bassically a type of the database for access when database is opened next time. A global temporary table remains in the database permanently, But the rows exist only within a given connection. The data is dissapper in the global temporary table,When connection is closed. Ques: 64 What is the STUFF function and h ow does it differ from the REPLACE function? Ans: REPLACE function is bassically use for replace existing characters of all occurrences. Its mainly syntax REPLACE, It is using string_expression,search_string,replacement_string, where every incidence of search_string found in the string_expression will be replaced with replacement_string.STUFF function is bassically using for the overwrite existing characters. Its Syntax is STUFF , Its Using for string_expression, start,length, replacement_characters, string _expression is the string that will have characters substituted, start is the starting position,length is the number of characters in the string that are substituted,and replacement_characters are the new characters interjected into the string. Ques: 65 What is PRIMARY KEY? Ans: A PRIMARY KEY is the bassically a type of unique identifier which is unique property for any row with in a database table . Primary key is the most important for the unique identityfication in every table and every row becouse each t able is identitify for only with primary key constraints. Ques: 66 What is UNIQUE KEY constraint? Ans: A UNIQUE constraint bassically mean is the unique attributes its means no values are duplicate its defines a uniqueness of the valuesina set of columns, The unique key constraints are used to signifies entity integrity as the primary key constraints. Ques: 67 What is FOREIGN KEY? Ans: A FOREIGN KEY is bassically a type of primary key it is the normal key for he one table but it is can become a primary key for the other table, The foreign key constraints are using a referential integrity, The foreign key constraints are mainly signifies a referential integrity constraint prevents any actions that can be destroy links between tables with the corresponding dat a values. Its prevent actions that would leave rows with foreign key values when there are no primary keys with that value. Ques: 68 What is CHECK Constraint? Ans: A CHECK constraint is bassically a using for limit of the values becouse It can be placed in a columns to tat values. Its used to singnifies a domain integrity. Ques: 69 What is NOT NULL Constraint?

Ans: A NOT NULL constraint is stands for basically as a name not null it means that the colums are not accpted the null values. Its is used to signi fies a domain intigrity as the check constraints. Ques: 70 What is a Scheduled Jobs or What is a Scheduled Tasks? Ans: Scheduled tasks is the bassically use of the completing task which is schededule by any user who use the system administrator, let user automate processes that run on regular or predictable cycles. user can decide his task for the perticule schedule time such as cube prossessing, for running the during times of slow business activity . User can also determine the order in which tasks run by creating job steps within a SQL Server Agent job. E.g. back up database, Update Stats of Tables. Job steps give user control over flow of execution. If one job fails, user can configure SQL Server Agent to continue to run the remaining tasks or to stop execution. Ques: 71 What are the advantages of using Stored Procedures? Ans: There are many different advantages of using Stored Procedures which is following here : > Its help promote code reuse. > It can encapsulate logic. We can change stored procedure code without affecting clients. > It provide better security to our data. > It can be reduced network traffic and latency, boosting application performance. > Stored procedure execution plans can be reused, staying cached in SQL Server's memory, reducing server overhead. Ques: 72 What is BCP? When does it used? Ans: BulkCopy is bassically a using for copy, It is a tool used to copy huge amount of data from tables and views. BULK INSERT command helps t o import a data file into a database table or view in a user‐specified format.It does not copy the structures same as source to destination. Ques: 73 How to implement one -to-one,one-to-many and many-to-many relationships while designing tables? Ans: Implementations of relationship is there : > One-to-One relationship : Its relationship bassiccaly use for only single table implementation and rarely for two tables with primary and foreign key relationships. > One-to-Many relationships :Its relations hip is bassically yse for the implemented by splitting the data into two tables with primary key and foreign key relationships. > Many-to-Many relationships : Its relationship is bassically use for implemented using a junction table with the keys from bot h the tables forming the composite primary key of the junction table. Ques: 74 What is an execution plan? When would you use it? How would you view the execution plan? Ans: An Execution plan is basically presentation of the map in graphically or textually shows of the dat retrival methods whihc is choosen by the SQL Server abd it can be query optimiser for the stored procedure or ad‐hoc query and we can also use this as a tool for a developer to understand the performance characteristics of a query o r stored procedure since the plan is the one that SQL Server will place in its cache and use to execute the stored procedure or query. From within Query Analyzer is an option called "Show Execution Plan". If this option is turned on it will display query e xecution plan in separate window when query is ran again.

Ques: 75 What do you mean by The master database? Ans: The Master Database is bassically use for the database information whihc all databases are located on the Sqlserver instances and It is the Cl ue that holds the engine together. Because SQL Server cannot start without a functioning masterdatabase, We must administrator this database with care. Ques: 76 Define The msdb database? Ans: The msdb database is the bassically use for stores information regarding database backups,SQL Agent information,DTS packages,SQL Server jobs , and some replication information such as for log shipping. Ques: 77 What do u mean by The tempdb? Ans: The tempdb is the bassically use for holding the temporary objects such as global and local temporary tables and stored procedures. Ques: 78 What is the mean of The model? Ans: The model is the very important for a template database, Its a mainly used in the creation of any new user database created in the instance. Ques: 79 Define whats the mean by Resoure Database? Ans: The Resoure Database is the bassically use for containing the system objects its stand for the read only database,The Resource database does not contain user data or user metadata. Syatem objects are included with SQL Server.SQL Server system objects,such as sys.objects,are physically persisted in the Resource database, but they logically appear in the sys schema of every database. Ques: 80 What is Service Broker? Ans: Service Broker is t he mainly use for developing to integrated SQL Server which is fully into distributed applications, It is bassically message queuing technology in SQL Server, It is the feature which provides facility to SQL Server to send an asynchronous, transactional m essage. it allows a database to send a message to another database without waiting for the response, so the application will continue to function if the remote database is temporarily unavailable. Ques: 81 What is Policy Management? Ans: Policy Managementi s mainly use for configuring the policies and its also use for the managing the policies its policy is SQL Server across the enterprise.and Policy -Based Management is bassically configured in the SQL Server Management Studio (SSMS). Its only Navigator to the Object Explorer and Its is also expand the Management node and the Policy Management node, We can see the Policies, and Conditions, and Facets nodes. Ques: 82 What is Replication and Database Mirroring? Ans: Database mirroring and Re plication can be work together and they are provide availability for the publication database. Database mirroring bassically work in two copies of a single database that are rarlly use on different computers. If we have to given any time for a only one cop y of the database is currently available to clients which is called as the principal database. Updates made by clients to the principal database are applied on the other copy of the database, known as the mirror database. Mirroring involves applying the tr ansaction log from every insertion, update, or deletion made on the principal database onto the mirror database. Ques: 83 What are Sparse Columns? Ans: A sparse column is bassically a tool of the data base which is use for the decrease physical storage amo unt which is used in a database.Sparse columns

also be use for the redusing work Its reduce the space requirements for null values at the cost of more overhead to retrieve no null values. They are the normal columns that have an optimized storage for null values. Sparse columns reduce the space requirements for null values at the cost of more overhead to retrieve no null values. Ques: 84 What does TOP Operator Do? Ans: The TOP operator is bassically use the new addition of SQL Server 2008 its have a facilit y provides to accepts the literal values and can be used with INSERT,UPDATE. And DELETES statements.,Its mainly used to be returned by a query from specified no of rows . Ques: 85 What is CTE? Ans: CTE is stands for Common Table Expression. It is like to a derived table in that it is not stored as an object and lasts only for the duration of the query. A Common Table Expression CTE) is a type of expression that can be seem like as a temporary result set which is explain within the execution of a single SQL statement. Ques: 86 What is MERGE Statement? Ans: MERGE is a bassically use for the data modification and also check for the data then helps on the updation.It is a new feature of the SQl server, That provides an efficient way to perform multiple DML ope rations. some time before in Sql server when merge statement is not available in the server, We had to write separate statements to INSERT, UPDATE, or DELETE data based on certain conditions, but now a days using MERGE statement we can include the logic of such data modifications in one statement that even checks when the data is matched then just update it and when unmatched then insert it. One of the most important advantages of MERGE statement is all the data is read and processed only once. Ques: 87 What is Filtered Index? Ans: Filtered Index is bassically use for indexing, Its mainly used to improves query performance, It can be reduced mentinence costs and it cn be also reduce index storage costs compared with full -table indexes. Its usually use for In dex a portion of rows in a table that means it applies filter on INDEX . When we see an Index created with some where clause then that is actually a FILTERED INDEX. Ques: 88 What are the Advantages of using CTE? Ans: CTE advantages are there : > It can be defined, it is used as a Table or a View and can SELECT, INSERT, UPDATE or DELETE Data. > Its Using CTE for improve the readability and makes maintenance of complex queries easy. > It can be signifies as a functions,stored procedures, triggers or even views. > The query can be divided into separate, simple, logical building blocks which can be then used to build more complex CTEs until final result set is generated. Ques: 89 What is CLR? Ans: In the new version of Sql Server 2008, SQL Server mainly use as u serdefined functions can be created using such CLR languages. Common Language Runtime is a bassically runtime environment that manages the execution of program code and provides services such as memory and exception management, debugging and profiling an d security. This CLR language support extends not only to user -defined functions,but also to stored procedures and triggers. We can develop such CLR add -ons to SQL Server using Visual Studio 2008. Ques: 90 What are synonyms?

Ans: Synonyms basscially use for the given a alternate name of the database objeats its a mainly use of synonyms, we can alias object names, for the example using the Employee table as Emp. We can also shorten names. Its mainy use for the dealing a two or frour name parts ; for e xample, shortening server.database.owner.object to object. Ques: 91 What is LINQ? Ans: LINQ is an abriviation as Language Integrated Query,Its using .NET languages. Its have a ability for adds query objects,Its have a some basic feacture which is defined a s : > Its have a Tools which is create classes That usually called entities, mapped to database tables. > Its Compatibility with LINQs standard query operations.

Ques: 92 What is Isolation Levels? Ans: Isolaion level is bassically comes under the transaction Its signifies the degree, which is transaction should be isolated from resource or data modifications made by other transactions. that tyime Isolation levels are explain that type concurrency side -effects, such as dirty reads o r phantom reads, are allowed. Ques: 93 What is the EXCEPT clause? Ans: EXCEPT clause is a bassically use on the oracle, It is similar to MINUS Operation which is also use in Oracle. Both are queries are returns all rows in the first query that are not retu rned in the second query. Each SQL statement within the EXCEPT query and MINUS query must have the same number of fields should have the same no and also have a same result sets and same data types. Ques: 94 What is the NOLOCK? Ans: NOLOCk is the bassicall y a technique which is useful something for the busy system . Its help on the system which is generally consider good practice to improve the concurrency, When in SELECT statement use whith the NOLOCK hints,when NOLOCK hint is taken then Data is read The r esult is a Dirty Read, which means that another process could be updating the data at the exact time we are reading it. its not a garunteed for the most of data to be read.in the hints give us a advantages of the performance is that our reading of data wil l not block updates from taking place, and updates will not block our reading of data. SELECT statements take Shared Read lock, This means that multiple SELECT statements are allowed simultaneous access, But other processes are blocked from modifying the d ata. The updates will queue until all the readshave completed, and reads requested after the update will wait for the updates to complete. The result to our system is delay blocking. Ques: 95 What is the RaiseError? Ans: RaiseError bassically use for the E rror messege.Its generate and initiate error processing in the session. RAISERROR can bassically defined a user defined message stored in the sys.messages catalog view or build a message dynamically. The message is returned and displays as a server error message to the calling application or to an associated CATCH block of a TRYCATCH construct. Ques: 96 What is Xml Datatype? Ans: Xml is the bassically that type of Datatype which is use for SQL Server Datatype, Its a Xml documents and fragments in a Sql server. Xml bassically a instances that is missing a single top -level element. we can create

columns and variables of the xml type and store XML instances in them. The xml data type and associated methods help integrate XML into the relational framework of Server. Ques: 97 What is Data Compression? Ans: in the new version of SQl Server 2008 are diff type of Data Compressions : > Row Compression > Page Compression > Dictionary Compression Ques: 98 What is the mean of Row Compression? Ans: Row compression ch anges the format of physical storage of data. It minimize the metadata In SQL SERVE 2008 Data Com column information, length, offsets etc .associated with each record. Numeric data types and fixed length strings are stored in variable -length storage format , just like Varchar. Ques: 99 What is the Page Compression? Ans: Its is bassically use for the sharing of the two common data b/w rows of the given page. Its have a many tecniques for the compression of the data : > Row Compression > Prefix Compression Ques: 100 What is the mean of Dictionary Compression? Ans: Dictionary Compression is bassically use for the searching . Seaching bassically the duolicat This Dictionary mainly work is the differentiate between prefix and dictionary compression is that prefix is only restricted to one column while dictionary is applicable to the complete page. value thoroughout the page,and stores them to CI Ques: 101 What do you mean by DBCC Command? Ans: DBCC is bassically stands for Database conso;e commands for SQlServer . And it is working with T -SQL Programming Language. DBCC commands have a many uses for the performing new tasks which is following here : > It is use as a Tasks that gather and display various types of information. > Validation operations on a database, table, index, catalog, file group or allocation of database pages. > Miscellaneous tasks such as enabling trace flags or removing a DLL form memory . > Maintinence Task on Database , Index or file group. Ques: 102 What is Catalouge Views? Ans: Catalouge Views is basssically use for the returing the information, it is used by the SQL Server Database Engine.It is the very importnt general interface catalouge to the matadata and Its provide the most efficient way to obtain ,transform, and present costomised forms of this information .all user available catalouge matadata is exposed through catalouge views. Ques: 103 What is Pivot and Unpivote? Ans: A pivot table is bassically use for the sorting the table, and also doing the work in table like a counting and totalling the data which is stored in one table or spread sheet and its also creat the second table for the display the sumrized data,It can be turns the value of a specified column into column names, effectively rotating a table. but in case of Unpivote Its a exactly opposit to the pivote. Ques: 104 What is the Filestream? Ans: ile stream is the bassically use for the store the large amount of data or objects in the file system which is integrated with the database.It is the

SQL Server based applications , Its con be enable for server based applications to store unstructured data such as documents, images, audios, videos etc. In the file system. FILESTREAM basically integrates the SQL Srver Database Engine with New Technology File System (NTFS); it basicall y stores the data in varbinary (max) data type. Using this data type, the unstructured data is stored in the NTFS file system and the SQL Server Database Engine manages the link between the Filestream column and the actual file located in the NTFS. Using T ransact SQL statements users can insert, update, delete and select the data stored in FILESTREAM enabled tables. Ques: 105 What is the Dirty Read? Ans: Dirty Read is bassically a type of error its generate when two operations access in the same time for th e example Two oprations says,read and write occurs togethergiving the incurrect or Ans: Dirty Read is bassically a type of error its generate when two operations access in the same time for the example Two oprations says,read and write occurs togethergiv ing the incurrect or unedited data, Suppose, A has changed a row, but has not committed the changes. B reads the uncommitted data but his view of the data may be wrong so that is Dirty Read. Ques: 106 What is SQLCMD? Ans: SqlCmd is bassically a very import ant for that SQL Server It can be work with two modes : > BATCH and > Intractive Mode It is the Enhaceversion of isql which is depricated Eventuallyand osql which is not include in SQL Server 2005 RTM, It is the Better replacement of OSQL and I SQL. It provides way more functionality that other two options. Ques: 107 What do you mean by Table Sample? Ans: TABLESAMPLE is basscially use for the sampling of the rows in the table which is mainly use for the extracting in the Form Clause. The rows are retrived in the radomlly and its not in a simple order. Its bassically can be based on a percentage of no of rows. its use only that time when sampling of rows is necessary for the application instead of a full result set. Ques: 108 What is an Aggrega te Function? Ans: Aggregation Function is basically a type of function, which is use for the calculation on the set of values and It is also return the single value , Its also have a HAVING CLAUSE, Which is used along with GROUP BY.for filtering query usin g aggregate values, Its ignore NULL Values excpt COUNT Function, Its have a many functions which is there : > AVG > MIN > CHECKSUM_AGG > SUM > COUNT > STDEV > COUNT_BIG > STDEVP > GROUPING > VAR > MAX > VARP Ques: 109 What is the ROW_NUMBER()?

Ans: Row Function is bassically use for the retuning a coulumns which is type of expressions. which is contain the rows no with in the result set.This is only a number used in the context of the result set, if the result changes, the ROW_NUMBER() will chan ge. Ques: 110 What is the Ranking functions? Ans: Ranking Function is the bassically use for the return value which is the ranking of the each row in the partion. These ranking functins are non Deterministic. there are many diff type of ranking functions : > ROW_NUMBER() OVER([<Partion_By_Clause>]<Order_By_Clause>) > RANK() OVER([<Partion_By_Clause>]<Order_By_Clause>) > DENSE_RANK() OVER([<Partion_By_Clause>]<Order_By_Clause>) Ques: 111 What is the mean of ROW_NUMBER() OVER? Ans: It s the sequential no of t he row with in the partition pf the resultset,starting at 1 for the First row in each partition. Ques: 112 What is the RANK() OVER? Ans: It is bassically Return the value as a rank of each row within the partition of a result set. Ques: 113 What is the DESK_RANK() OVER? Ans: Its retun the value as a rank of rows ith in the partition of the result set, without any gap in the ranking . Ques: 114 What is the UNION? Ans: UNION is the bassically a type of a command which is used for the selection procedure, It is select the related information from the two tables, similarily JOIN command. when using the UNION command all selected columns need to be of the same data type. With UNION, only distinct values are selected. Ques: 115 What is the mean of UNIONALL? Ans: UNIONALL is bassically a command, It is much like a UNION COMMAND, But it is some diff'es like : THis command is select all values. Ques: 116 What is the mean of Root Node? Ans: A Root Node is bassically use for containing the node Pointers to branch node which can be only one. Ques: 117 What do you mean by Branch Node? Ans: A Branch Node is bassically contain the Pointers for leaf nodes or the other Branch nodes , Which can be two or more. Ques: 118 What do you mean by Leaf Nodes? Ans: A Leaf Node is bassically type of Container which is contain the Index terms and horizontal pointer also for other leaf nodes .Which can be many . Ques: 119 Explain Active/Active and Active/Passive cluster configurations? Ans: Many Diff are there : > Active/Active : It is the bassically use for the default nodes, Here first node will be default and second node will be named instance. Both node will be active. > Its Move group from cluster administration is possible for both side. > System performance will go down, if bo th resources are in one node. > Active/Passive : Its also basically use for nodes But in this case Only one Active node with default instance. No system performance degradation

will be there for this case even if we switchover to the other node. Both have same configuration. Ques: 120 What are slowly changing dimensions (SCD)? Ans: SCD is the bassically stands for Slowly Changing Dimensions. Its mainly use for the changing dimesions very slowly becouse its applies to cases where the attribute for a reco rd varies over time. There are three types of SCD. > SCD1 > SCD2 > SCD3 Ques: 121 What is the SCD1 ? Ans: In The SCD1 mainly use for the create a new record and its also can be replaces the original record. Only one record exist in database - current data. Ques: 122 What do you mean by SCD2? Ans: SCD2 is mainly use for the add a new record into the customer dimension table. Two records exist in database -current data and previous history data. Ques: 123 What do you mean by SCD3 ? Ans: SCD3 is bassically use for only the modifcation and create a new data from The original data . One record exist in database -new information are attached with old information in same row. Ques: 124 What do you mean by Star schema? Ans: Star Schema is bassically use for got a fas ter results becouse it is a single fact table with N number of Dimension, which will be linked directly with a fact table. This schema is De -normalized and results in simple join and less complex query as well as faster results. Ques: 125 What do you mean by Snow schema? Ans: Snow Schema is the bassically known as snow flake schema, Its mainly interlinked or may have one to many relationship with other tables. This schema is normalized and results in complex join and very complex query as well as slower res ults. Ques: 126 What is surrogate key? Ans: Surrogated keys are always integer or numeric. It is useful because the natural primary key can change and this makes updates more difficult .Surrogate key is the bassically a type of sunsitution key for the pri mary key . It is just a unique identifier or number for each row that can be used for the primary key to the table. The only requirement for a surrogate primary key is that it is unique for each row in the table.. Ques: 127 What is ER Diagram? Ans: ER Diagrame is stands for tEntity Relationship Diagrams , It is the bassically a major data modelling tool . A type of diagram used in data modeling for relational data bases. These diagrams show the structure of each table and the links between tables. and It w ill also help organize the data in our project into entities and define the relationships between the entities. This process has proved to enable the analyst to produce a good database structure so that the data can be stored and retrieved in a most efficient manner. An entity -relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. Ques: 128 What are the Different methods of loading Dimension tables?

Ans: There are many diffenrt of ways are there which is two different ways to load data in dimension tables. > Direct (Fast) : It is the bassically use for the loading purpose in this way All the constraints and keys are can be disabled before the data is loaded. Once a tym data is loaded, it is validated against all the constraints and keys. If data is found invalid or dirty it is not included in index and all future processes are skipped on this data. > Conventional (Slow) : It is bassically for the All the constraints and keys are validated against the data before, it is loaded, this way data integrity is maintained. Ques: 129 What is denormalization and when would you go for it? Ans: denormalization is the reverse process of normalization it is also indate the name of denenormali saiotn . It's maily use for the controlled introduction of redundancy in to the database design. It helps improve the query performance as the number of joins could be reduced. Ques: 130 What is lock escalation? Ans: Lock escalation is the bassically use f or the converting a lot of low level locks like a row lock or the level locks into higher level locks which is like table locks. Every lock is a memory structure too many locks would mean, more memory being occupied by locks. To prevent this from happening , SQL Server escalates the many fine -grain locks to fewer coarse -grain locks. Ques: 131 What's the maximum size of a row? Ans: 8060 bytes. Ques: 132 What is RAID? Ans: RAID is the bassically stands for Redundant Array of Inexpensive Disks, It is mainly used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. Ques: 133 What do you mean by Deadlock? Ans: Deadlock is a bassically a name of setuation, when two processes are reqest to the one lock of the one piece of data, attempt to acquire a lock on the other's piece. so ofcouse Each process would wait dor the realease the lock, unless one of the user p rocesses is terminated. SQL Server detects deadlocks and terminates one user's process. Ques: 134 What do you mean by Live Lock? Ans: A livelock is a single lock which is bassically work on the request for an exclusive lock is repeatedly denied because a s eries of overlapping shared locks keeps interfering. A livelock also occurs when read transactions monopolize a table or page, forcing a write transaction to wait indefinitely. When four denials are cmplete then SQL Server detects the situation and refuses further shared locks. Ques: 135 What is the Referential Integrity? Ans: Referential integrity is the bassically explain to the consistency that must be maintained between primary and foreign keys. Ques: 136 What is the purpose of UPDATE STATISTICS? Ans: As like as UPDATE STATISTICS have a many puposes but right now we have a main purpose which is xplain here : > It is main;y use for the Updates information about the distribution of key values for one or more statistics groups or collections in the specified table or indexed view. Ques: 137 What is the use of SCOPE_IDENTITY() function?

Ans: SCOPE_IDENTITY() function is bassically use for the Returns that values which is the most recently created identity value for the tables in the current execution scope. Ques: 138 How do you transfer data from text file to database (other than DTS)? Ans: We can Tranfer the Data from text file to database Using the BCP utility, Where BCP stands for Bulk Copy Program . Ques: 139 What is DTC? Ans: DTC is a stands for The Micr osoft Distributed Transaction Coordinator (MS DTC), It is bassically a type of transaction manager that allows client applications to include several different sources of data in one transaction. MS DTC coordinates committing the distributed transaction across all the servers enlisted in the transaction. Ques: 140 What is DTS? Ans: DTS bassically stands for Data Transformation Services, It is the mainly use for set of graphical tools and programmable objects That we can extract,transform , and consolidate data from disparate sources into single or multiple destinations. Ques: 141 What are defaults? Is there a column to which a default can't be bound? Ans: A default is a bassically a type of value whihc is used by the columns, if no value i s supplied to that column while inserting data. IDENTITY columns and timestamp columns can't have defaults bound to them. Ques: 142 What do you mean by COLLATION? Ans: Collation is basically use for the ordering It is the sort order. There are three types of sort order Whihc is following here : > Dictionary case sensitive, > Dictonary case insensitive and > Binary. Ques: 143 When do you use SQL Profiler? Ans: SQL Profi ler is bassically a utility which is allows us to basically track connections to the SQL Server and also determine activities such as which SQL Scripts are running, failed jobs etc.... Ques: 144 What is a Join in SQL Server? Ans: Join in SQL Server is bass ically puts data from two or more tables into a single result set. Ques: 145 What is database replication? What are the different types of replication you can set up in SQL Server? Ans: Replication is he bassically using for the copy of the data and move t he data between databases on the same or different servers. SQL Server supports the following types of replication scenarios: > Snapshot replication > Transactional replication (with immediate updating subscribers, with queued updating subscribers) > Merge replication Ques: 146 What do you mean by Distributed partitioned views.? Ans: Distributed partitioned views bassically dor providing the facility to the partition tables horizontally across multiple servers.That's why we can scale out one database server to a group of database servers that cooperate to provide the same performance levels as a cluster of database servers.

Ques: 147 How many New Data types are in the SQL Server 2000? Ans: there are many types of new data types , Which are signifies here : > Sql_variant data type : This type is a type that allows the storage of data values of different data types. table data type : This type lets an application store temporary results as a table that we can manipulate by using a select statement or even action queries, just as we can manipulate any standard user table. > Bigint data type : This type is an 8 -byte integer type. Ques: 148 What do you mean by INSTEAD OF and AFTER Triggers.? Ans: There are many diff are in INSTEAD OF and AFTER Triggers in SQL Server 2000. Which is following here : > INSTEAD OF triggers are bassically work on instead of the INSERT, UPDATE or DELETE triggering action. But in case of AFTER triggers are work on after the triggering actions. Ques: 149 What do you mean by Cascading Referential Integrity Constraints? Ans: Right now only two new clouses are there, Which is : ON DELETE and ON UPDATE clauses in the REFERENCES clause of the CREATE TABLE and ALTER TABLE statements. The ON DELETE and ON UPDATE clauses have two options: NO ACTION : NO ACTION specifies that the deletion/updation fail with an error. CASCADE : CASCADE specifies that all the rows with foreign keys pointing to the deleted/updated row are al so deleted / updated. > ON DELETE : Its bassically controls what actions are taken if we attempt to delete a row to which existing foreign keys point. > ON UPDTE : It is bassically defines the actions that are taken if we attempt to update a candidate key value to which existing foreign keys point. Ques: 150 Whay do you mean by XML Support in Sql Server 2000? Ans: Database engine bassically use for the returnind the data as Extensible Markup Language (XML) documents. In The SQL Server 2000, XML Bassically use for the : > insert The value , > update The value , and > delete values , In the database. Ques: 151 What do you mean by Indexed Views> Ans: Indexed views is bassically are persistent, It can be significantly improve application performance by eli minating the work that the query processor must perform to resolve the views. It is bassically a views but in some cases Its Unlike standard views,Which views like SQL Server resolves the data-access path dynamically at execution time, The new indexed view s feature are there which is following here : > we can store views in the database as like as we can store tables. Ques: 152 Why we use Stored Procedure? Ans: Stored procedure is bassically have more utilising content Its uses in a every fei ld of SQL Server, There are four major reasons why we use this procedure which can be beneficial: > It can dramatically increase security . > They can assist you in centralizing your code. > They are executed on the Server's machine. > They are precompiled .

Ques: 153 What is the use of union in Indexing? Ans: UNION bassically use combine the results , Which results have a two or more queries in to a single result set, Which is consisting of all the rows belonging to all queries in the union. Ques: 154 What is the basic difference between a join and a union? Ans: The Basic diff are there : > Joine is bassically use for the colums but in case of union is does't. > Union is bassically us efor the rows but in case of the Join is does't. > A join selects columns from Two or more tables. A union selects rows. Ques: 155 What is a Cartesian product? Ans: A Cartesian product is bassically use for the results from a faulty query. It is a row in the results for every combination in the join tables. Ques: 156 What do you mean by Read Uncommitted? Ans: First of all I Would like to tell every one its a Type of Isolation Level , It is the mainly use for the transaction, which transaction can read any data, even if it is being modified by another transaction. This is t he least safe isolation level but allows the highest concurrency. Ques: 157 What do you mean by Read Committed? Ans: t is the bassically defined as a Isolation properties , It is using for the tracsaction, which is A transaction cannot read data that is be ing modified by another transaction that has not committed. This is the default isolation level in Microsoft SQL Server. Ques: 158 What do you mean by Repeatable Read? Ans: It is the defined bassically a isolation properties and its works on the Isolation level as a Data read by a current transaction cannot be changed by another transaction until the current transaction finishes. Any type of new data can be inserted during a transaction. Ques: 159 What do you mean by Serialized? Ans: It is the part of the i solation level , Its bassically use for the Data read by the current transaction cannot be changed by another transaction until the current transaction finishes. No new data can be inserted that would affect the current transaction. Ques: 160 What is RAID and what are different types of RAID configurations? Ans: Redundant Array of Inexpensive Disks is abriviation of RAID, It is maily use for providing the facility of fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. Ans: Redundant Array of Inexpensive Disks is abriviassion of RAID, Its mainly use for providing the facility for fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance. Ques: 161 Discuss about Disadvantages of cursors? Ans: Many disadvantages are in Cursor whic h is defined here : > Occurs network roundtrip becouse Each time we fetch a row from the cursor,; where as a normal SELECT query makes only one roundtrip, however large the resultset is. > It is very costly because they require more resources and temporary storage. Further, there are restrictions on the SELECT statements that can be used with some types of cursors.

> Another situation in which developers tend to use cursors: we need to call a stored procedure when a column in a particular row meets certain condition. We don't have to use cursors for this. This can be achieved using WHILE loop, as long as there is a unique key to identify each row. Ques: 162 What does COMMIT do? Ans: Its manly work is Saving all changes made by DML statements. Ques: 163 What is Oracle locking? Ans: Oracle is the bassically a database Its have a many facility, taht facilities is onne of the name is locking which uses locking mechanisms to protect data from being destroyed by concurrent transactions. Ques: 164 What Oracle lock modes do you know? Ans: Oracle has two lock modes : > shared or > exclusive. Shared locks are set on database resources so that many transactions can access the resource. Exclusive locks are set on resources that ensure one transaction has exclusive access to the database resource Ques: 165 What is query optimization? Ans: In the database many queries generate and executed or Query optimization is the part of the query process in which the database system compares different query strategies and chooses the one with the least expected cost. Ques: 166 What are the main components of Database management systems software. Ans: The database management system software includes many components are there, l ike : > for storage management, > concurrency control, > transaction processing, > database manipulation interface, > database definition interface, and > database control interface. Ques: 167 What are the main attributes of database management system? Ans: A database management system have a many attributes but here we are mentioned that DBMS is composed of five elements, Which is there : > Computer hardware, > Software, > Data, > People (users), and > Operations procedures Ques: 168 What databases do you know? Ans: Yes we know lots of Databases, we are mentioned there : > Informix > DB2 > SQL > Oracle Ques: 169 In what sequence SQL statement are processed?

Ans: The sequence of SQL statement are processed in the following sequence (DB2): > FROM clause > WHERE clause > GROUP BY clause > HAVING clause > SELECT clause > ORDER BY clause > FETCH FIRST clause Ques: 170 Describe TO_DATE function? Ans: The TO_DATE function using the values when we want to be show thw timestamp from a character string that has been interpreted using a character template. Ques: 171 What is the Sql Wild card? Ans: SQL Wild Card is the bassically use for the searchign opration similarily LIKE function.SQL wildcards can substitute for one or more characters when searching for data in a database. the following wildcards can be used: > % - A substitute for zero or more characters > _ - A substitute for exactly one character > [charlist] - Any single character in charlist > [^charlist] or [!charlist] - Any single character not in charlist Ans: % Ques: 172 Class members Ques: 173 What is use of 'in' command? Ans: in command use suppose u want to choose department then you use in command ex=select ename,sal from emp where deptno in(10,20); Ques: 174 I Have a table in which there is a chance of duplicate rows. Can you please tell me how to eliminate the dup;licate records? Ans: Use primary key If column is like Id or no..Alternate way is you can apply unique constraint on column.. hope u hv cleared ur doubts Ans: Deletion of duplicate records: delete from emp a where a.rowid > (select min(b.rowid) from emp b where a.rowid=b.rowid) or delete from table t1 where t1.rowid < (select max(t2.rowid) from table t2 where t2.<common column_name> = t1.<common column_name>)