InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 151. |
What Is A Column With Identity? |
|
Answer» The COLUMN with a defined identity in turn means that there is an unique value that the system ASSIGNS to the SPECIFIC column. This is SIMILAR to the AUTONumber property of the ACCESS backend. The column with a defined identity in turn means that there is an unique value that the system assigns to the specific column. This is similar to the AUTONumber property of the Access backend. |
|
| 152. |
What Is The Use Of Check Points In The Transaction Logs? |
|
Answer» The check points are restoration points that indicate the specific state of the DATABASE. When there is some failure in the database that is occurring before the NEXT check point, the database can be REVERTED back to the previous check point and thus the database would STILL be CONSISTENT. The check points are restoration points that indicate the specific state of the database. When there is some failure in the database that is occurring before the next check point, the database can be reverted back to the previous check point and thus the database would still be consistent. |
|
| 153. |
What Is A Write-ahead Log? |
|
Answer» The write-ahead log is the logging system that just UPDATES the buffer CACHE of the database for the transactions and updates the logs and only then the actual changes are incorporated in the actual database. This is the reason why it is called “write ahead”. This helps in maintaining the consistency in the database. This can also be USEFUL in getting the actual database values even in CASE of failures. The write-ahead log is the logging system that just updates the buffer cache of the database for the transactions and updates the logs and only then the actual changes are incorporated in the actual database. This is the reason why it is called “write ahead”. This helps in maintaining the consistency in the database. This can also be useful in getting the actual database values even in case of failures. |
|
| 154. |
What Is A Schema? How Is It Useful In Sql Servers? |
|
Answer» The Schema refers to the overall structure of the database with all related INFORMATION like users, access privileges, interaction information between the different tables etc. The CREATE SCHEMA is the COMMAND that can be USED to create the schema in the SQL Server. This when done can be used to re DEPLOY the same database in another system for demonstrative or test purposes. This holds intact the underlying framework over which the database has been built. The Schema refers to the overall structure of the database with all related information like users, access privileges, interaction information between the different tables etc. The CREATE SCHEMA is the command that can be used to create the schema in the SQL Server. This when done can be used to re deploy the same database in another system for demonstrative or test purposes. This holds intact the underlying framework over which the database has been built. |
|
| 155. |
Can We Initiate A External Com Object From Within Sql? |
|
Answer» Yes we can USE the stored PROCEDURE sp_OACreate to INITIATE the external COM OBJECT from the T-SQL. Yes we can use the stored procedure sp_OACreate to initiate the external COM object from the T-SQL. |
|
| 156. |
What Is Replication In Sql Server? |
|
Answer» Replication refers to the moving or copying of the DATABASE elements from one system to ANOTHER. This can be done in the SQL SERVER in one of the following methods: Replication refers to the moving or copying of the database elements from one system to another. This can be done in the SQL Server in one of the following methods: |
|
| 157. |
How Can You Know That Statistics Should Be Updated? |
|
Answer» STATISTICS represent the uniqueness for the indexes that are being used for selecting the records. This can make the query execution pretty efficient. The tables that we are DEALING with if truncated and repopulated, there is a good chance that the indexes and statistics are out of sync and this is when we have to update the statistics. There are also other situations like when the table has been modified and lot of rows have been added recently or like when a server has been updated with different version of software. These also give us the reason to USE the UPDATE_STATISTICS, DBCC SHOW_STATISTICS etc to update it ACCORDINGLY. Statistics represent the uniqueness for the indexes that are being used for selecting the records. This can make the query execution pretty efficient. The tables that we are dealing with if truncated and repopulated, there is a good chance that the indexes and statistics are out of sync and this is when we have to update the statistics. There are also other situations like when the table has been modified and lot of rows have been added recently or like when a server has been updated with different version of software. These also give us the reason to use the UPDATE_STATISTICS, DBCC SHOW_STATISTICS etc to update it accordingly. |
|
| 158. |
How Can You Start The Sql Server In The Single User Mode And The Minimal Configuration Mode? |
|
Answer» The SQLServer.exe is the executable which can be CALLED in the COMMAND PROMPT with the PARAMETERS -m and -f. These are the options that will start the SQL server in the user MODE and minimal configuration mode respectively. The SQLServer.exe is the executable which can be called in the command prompt with the parameters -m and -f. These are the options that will start the SQL server in the user mode and minimal configuration mode respectively. |
|
| 159. |
What Are The Different Levels Of Isolation? |
|
Answer» The isolation represents the WAY of separating the database from the effects of NETWORK accesses, thereby maintaining the consistency. The different levels of isolation are: The isolation represents the way of separating the database from the effects of network accesses, thereby maintaining the consistency. The different levels of isolation are: |
|
| 160. |
What Are The Different Types Of Backups? |
|
Answer» The SQL server offers 4 TYPES of backups to suit the need of the administrator. ● Complete BACKUP- The complete back up is just zipping the content of the entire DATABASE in terms of the different tables and procedures etc. This back up can server as an independent entity that can be restored in different systems with just the base SQL server installed. The SQL server offers 4 types of backups to suit the need of the administrator. ● Complete backup- The complete back up is just zipping the content of the entire database in terms of the different tables and procedures etc. This back up can server as an independent entity that can be restored in different systems with just the base SQL server installed. |
|
| 161. |
How Would You Use The Sp_ Functions To Identify The Blocking Problems? |
|
Answer» Blocking is the deadlock situation when two SQL connections race to obtain the control over the same set of rows in conflicting terms. This can be tracked by the status of WAIT present in the SP_LOCK PROCEDURE’s OUTPUT. All the active LOCKS and the different rows that are being involved are shown in this output. The identification of the connections involved in the specific row contention lock can be identified with sp_who and sp_who2 procedures. This way the causal agents of the blocking is identifies. KILL command issued against the specific SQL CONNECTION CAUSING the BLOCK can resolve the issue. But the PERMANENT solution lies in the proper design of the application code to execute in concurrence across different connections. Blocking is the deadlock situation when two SQL connections race to obtain the control over the same set of rows in conflicting terms. This can be tracked by the status of WAIT present in the SP_LOCK procedure’s output. All the active LOCKS and the different rows that are being involved are shown in this output. The identification of the connections involved in the specific row contention lock can be identified with sp_who and sp_who2 procedures. This way the causal agents of the blocking is identifies. KILL command issued against the specific SQL connection causing the BLOCK can resolve the issue. But the permanent solution lies in the proper design of the application code to execute in concurrence across different connections. |
|
| 162. |
What Are The Steps To Improve The Performance Of A Query? |
|
Answer» ● Number of joins and use of complex views/cursors have to be reduced. ● Number of joins and use of complex views/cursors have to be reduced. |
|
| 163. |
Describe In Brief Databases And Sql Server Databases Architecture. |
|
Answer» SQL Server consists of a set of various components which fulfill data storage and data analysis needs for enterprise applications. Database architecture: All the data is stored in DATABASES which is ORGANIZED into logical components visible to the end USERS. It’s only the administrator who needs to actually deal with the physical storage aspect of the databases, whereas users only deal with database tables. SQL Server consists of a set of various components which fulfill data storage and data analysis needs for enterprise applications. Database architecture: All the data is stored in databases which is organized into logical components visible to the end users. It’s only the administrator who needs to actually deal with the physical storage aspect of the databases, whereas users only deal with database tables. |
|
| 164. |
What Are Database Files And Filegroups? |
|
Answer» Database files are used for mapping the database over some operating system files. Data and log information are separate. SQL server database has three types of database files: Database files are used for mapping the database over some operating system files. Data and log information are separate. SQL server database has three types of database files: |
|
| 165. |
Explain How To Create A Dynamic Cursor With The Dynamic Option? |
|
Answer» When a cursor is declared as DYNAMIC, the cursor reflects all CHANGES made to the base tables as the cursor is scrolled around. Declare cursor_name cursor [ STATIC | KEYSET | DYNAMIC | FAST_FORWARD ] FOR select_statementThe dynamic option does not SUPPORT ABSOLUTE FETCH. When a cursor is declared as DYNAMIC, the cursor reflects all changes made to the base tables as the cursor is scrolled around. The dynamic option does not support ABSOLUTE FETCH. |
|
| 166. |
Explain How To Create A Scrollable Cursor With The Scroll Option. |
|
Answer» Using the SCROLL keyword while declaring a cursor allows fetching of ROWS in any sequence. Using the SCROLL keyword while declaring a cursor allows fetching of rows in any sequence. |
|
| 167. |
What Is A Schema In Sql Server 2005? Explain How To Create A New Schema In A Database? |
|
Answer» A schema is USED to create database objects. It can be CREATED USING CREATE SCHEMA statement. The objects created can be moved between schemas. Multiple database users can share a SINGLE default schema. A schema is used to create database objects. It can be created using CREATE SCHEMA statement. The objects created can be moved between schemas. Multiple database users can share a single default schema. |
|
| 168. |
What Is Database Isolation In Sql Server? |
|
Answer» Isolation in database DEFINES how and when changes made by ONE transaction can be VISIBLE to other transactions. Different isolation levels are:
Isolation in database defines how and when changes made by one transaction can be visible to other transactions. Different isolation levels are: |
|
| 169. |
Explain The Different Types Of Backups Available In Sql Server. |
|
Answer» Complete database backup: This type of backup will backup all the INFORMATION in the database. Used most commonly for disaster recovery and takes the longest TIME to backup. Complete database backup: This type of backup will backup all the information in the database. Used most commonly for disaster recovery and takes the longest time to backup. |
|
| 170. |
What Is Blocking And How Would You Troubleshoot It? |
|
Answer» Blocking occurs when two or more rows are LOCKED by one SQL CONNECTION and a SECOND connection to the SQL server requires a conflicting on lock on those rows. This results in the second connection to wait until the first lock is released.
Blocking occurs when two or more rows are locked by one SQL connection and a second connection to the SQL server requires a conflicting on lock on those rows. This results in the second connection to wait until the first lock is released. |
|
| 171. |
What Is A Deadlock And What Is A Live Lock? |
|
Answer» DEADLOCK OCCUR in INTERCONNECTION n/w when GROUP of process are unable to act because of waiting each other to release some resource. Deadlock occur in interconnection n/w when group of process are unable to act because of waiting each other to release some resource. |
|
| 172. |
What Are The Steps To Take To Improve Performance Of A Poor Performing Query? |
Answer»
|
|