You are on page 1of 14

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

SQL DBA INTEVIEW QUESTIONS


1. What is the difference between MS SQL Server 2005, 2008,2012?
A.
2. What is the difference between Delete and Truncate?
A. In a table Delete removes only required information row by row, by using WHERE clause(i.e. output is
Rows Effected). And Truncate removes the total data in a single Transaction.(No WHERE clause, output is
Command completed successfully).
3. What is RDBMS? What are the EFCODD rules?
A. RDBMS is a product, it supports you to maintain relations on DBs and that present a view of data as a
collection of rows and columns and it supports some but not all EFCODD rules.
EFCODD rules:
All the Data should be in the form of rows and columns,
All the data must be accessible with no ambiguity,
DBMS must allow each field to remain null,
User must be access the database structure using same Query Language,
DBMS must support DDL, DML, DCL, TCL operations,
All views that are theoretically updatable, must be updatable by the system,
System must support Set-at-a-time insert, update and delete operations,
User is isolated from physical method of storing and retrieving data from DB,
User should be totally unaware of whether or not the DB is housed in one computer or distributed
computersetc
4. What are the prerequisites of MS SQL Server 2008 Installation?
A. Windows Server 2008 (i.e. compatible OS with Latest Service pack)
Windows Installer 4.5,
.NET frame Work 3.5,
What are the Services we want,
Where do we place the Data, Log, Temp DB files,
TCP/IP, IIS, Internet Explorer, MS Data Accessetc.
5. What are the post requisites of MS SQL Server 2008 Installation?
A. Verify the OS folders for Instances,
Verify the protocols are enabled or not in the Configuration Manager,
Allow advanced options for cmdshell,
rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

Change the sa password and DAC,


Check Server name and machine name are same or not (SELECT @@SERVERNAME),
Check NT logs for Error (master..xp_msver),
Check SQL Server logs for error (SP_READERRORLOG),
Verify that all DBAs are local administrative on the server or not.etc.
6. What is the default type collation?
A. Sql_LATIN_General_CP1_CI_AS (Case Sensitive and Accent Sensitive)
7. Have failed at the time of Installing of MSSQL server?(or windows) what do you do?
A. It was the problem for missing msp(Service Pack) or msi (Installation) files. We raised a request to
Microsoft. They sent a VB Script file(i.e exe). This file was checked total .msp & .msi files. And it
evaluated the missing file information. Again that information sent to the Microsoft. That time they
provide missing file.
8. Do you install the Service Pack of Enterprise Edition or Other editions?
A. Service Pack is for all editions.
9. How to move the location of system databases?
A. (Accidentally you choose program as well as data files in same directory at the time of installation)
Moving Master and Resource DB:
Configuration Manager right clicks on the Server Properties Advanced Start Up parameters:
Change the desired path. And stop the instance, move the Data and Log files into new location and Start
the instance.
Moving Model, MSDB and Temp DB:
Using ALTER database modify file command we can change the path of both data and log files. After that
stop the Services, Copy the files into new location and restart the Service.
10. What happened when the system databases are corrupted? And how to fix it?
A.
11. I have the system databases backups of SQL server 2005. Can I restore them in the 2008?
A. Yes, before applying on 2008 you must copy the mdf and ldf of 2005. And delete mdf and ldf of 2008
replace with 2005 files.
12. If I had installed SQL Server with all the features. How many system databases were created?
A. Master, Model, MSDB, TempDB, ResourceDB, DistributionDB, Report server, Report server TempDB.
rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

13. What is a View?


A. View is a logical table used to display required information from the table. One or more tables can be
used by creating a View. View will not store any data and will not use memory and be the help of column
names existing in the table. It will display records from the table.
14. What are the types of pages?
A. Data Pages: Contains data rows from the table.
Index Pages: Contain rows from indexes.
Text/Image Pages: Contains Large Object data type columns.
Global Allocation Map and Secondary Global Allocation Map Pages: GAM & SGAM manage the
Extents on a File-by-File basis. 2nd page of every data file is a GAM. 3rd Page of every data file is a
SGAM. GAM & SGAM form a bitmap that indicates whether an extent is a uniform or mixed extent.
Also indicates whether the Extent has full or empty data pages.
Page Free Space Pages: It record the status of each page whether the page has allocated or not and
the amount of free space on each page
Index Allocation Map Pages: Contains information about the extents that a table or index uses.
Bulk Changed Map Pages: This is primarily used for transaction log backup bulk operations when
the database is in BULK-LOGGED recovery mode. Bulk operations include UPDATETEXT,
WRITETEXT, SELECT INTO, BULK INSERT and image operations.
Differential Changed Map Pages: Used when performing Differential backups. It identifies
modified Extents since the last database backup.
15. What is the need of Log file?
A. Need to track the transactions.
16. What is the Transactional Log architecture?
A. Transaction log is string of log records and it maintained on disk as one or more physical files.
Internally one Physical transaction log file is divided into multiple virtual logs files. These virtual log files
have no fixed size, the DB Engine only choose that size dynamically while creating log files. Each virtual
log (log record) is identified by the LSN (Log Sequence Number). New virtual logs will add toward the end
of the Physical log.
17. What is the difference between Checkpoint and Lazy writer?
A. Check point will play a major role during the recovery process, and it will occur in different scenarios,
like whenever we take the backup of database, whenever we do the restoration, whenever we restarts the
server, whenever we put the database offline & online..Etc. It checks the state of log file and scans the
transactions. If there is committed data it moves to mdf or if transaction fails the data pushed out of the log
by checkpoint. We can run checkpoint manually.
Lazy Writer occurs depending upon memory pressure and resource availability. It has no role in recovery
process and Sql server manages by its own. Whenever it occurs, it checks the buffer and log files for
3

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

committed data. And it deletes the least referred pages using Reference Counters LRU (Least Resent Use)
algorithm.
18. What is a dirty (or torn) page and what is a clean page?
A. A page yet to be written on the disk and save it in the data cache is called Dirty Page. A page written
on disk (mdf) is called Clean Page. These dirty pages are flushed by the checkpoint from data cache of
current database to disk (mdf).
19. Can we have different collation settings for a DB and Server?
A. Yes.
E.G: SELECT SERVERPROPERTY ('COLLATION')
-- It will display Server collation.
E.G:SELECT DATABASEPROPERTYEX('<DBName>', 'Collation')
GO
/* Find Collation of SQL Server Database Table Column */
USE <DBName>
GO
SELECT name, collation_name
FROM sys.columns
WHERE OBJECT_ID IN (SELECT OBJECT_ID
FROM sys.objects
WHERE type = 'U'
AND name = 'Address')
AND name = 'City'
--It will display DB collation.
20. Can I change the collation settings for DB and Server?
A. Collation settings can be changed for DB at any time. But Server cannot be changed any point of time.
21. What is logical Name and what is Physical Name?
A. Logical Name is file name; Physical Name is path of the file where it was stored.
22. What is Size, Maximum Size and Auto growth of a file?
A. Size: Initial size of the file, Maximum Size: We have to specify maximum limit, Auto growth: Once it
reaches the initial size automatically increases the given amount of size.
23. What is DAC, Single User mode, Restricted User, Multi-user Mode?
A. DAC stands for Dedicated Administrative Connection. Whenever sql server is not responding to
normal connections, the administrators used this for connect to sql server.
Single User mode: Only a single connection is accepted.

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

Restricted User: Who ever have the DBA permissions only that connections accepted.
Multi-user Mode: General mode, multiple connections accepted.
24. How can you make sure that the backup is valid?
A. By using CHECKSUM, RESTORE VERIFYONLY we can make sure that the backup is valid or not.
CHECKSUM: It returns the error if any column is of non-comparable data type.
RESTORE VERIFYONLY: Verifies the backup but does not restore it, and checks to see that the backup set
is complete and the entire backup is readable or not.
25. What are committed, Uncommitted Transactions?
A. A transaction is a set of SQL statements, if that transaction process has completed known as committed
transaction otherwise that transaction under processing for complete known as uncommitted transaction.
26. I would like to know when my database deleted?
A. Mostly this information available in Error log.
27. How the Tail-Log backup will be worked?
A. Nothing but last transactional log backup, and it backed up your transactional log if your database
crashes for whatever reason, so that you can do Point in time recovery on that database.
28. What is your DR Plan (Backup strategy) in your organization?
A. In our organization we fallow Weekly Once FULL Backup at Saturday 12:00 AM, Daily One
DIFFERENTIAL Backup at 12:00AM, and Every 15 mins one T-Log backup. Other than this we have
implemented the High-Availabilities on Database level and Server level for prevent the Disasters.
29. How to open the Log Backup file in MS SQL Server?
A.

30. Under Simple Recovery model can you take the T-Log Backup? Why?
A. No, because in the Simple recovery model, the inactive portion (Committed transactions) of the log is
truncated every time when the SQL Server issues a checkpoint. And Checkpoints are issued periodically
by SQL Server.
31. What are the reasons you found for a backup failed in your experience?
A. If the network path is corrupted, Changed the job schedule, There is no database to take the backup,
backup job is not running (i.e. Might be agent not running).
32. What is the retention period of your disk? Or what is your backup retention policy?
A. we should maintain on disks 1 week. After that windows team take care of that. And on tape 5 Years.
rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

33. What is the difference between Maintenance plan and Job?


A. Maintenance plans create a workflow of the tasks required to make sure that your database is
optimized, regularly backed up, and free of inconsistencies. SQL Server Integration Services includes a set
of tasks that perform database maintenance functions. Those tasks are Backing up databases, Checking
database integrity, Shrink the database, Reorganize indexes, Rebuild indexes, Update statistics, Clean up
history, Executing a SQL Server Agent job,
Jobs are operations that perform through a sequence of steps that run Transact-SQL scripts and a variety of
other tasks. Each task is defined as a separate job step.
34. My DB is in Bulk Log Recovery Model. Is the point-in-time recovery possible or not?
A. Yes or No.
When bulk transaction comes it records minimal data so there may be a chance to lose the data. If normal
transaction comes it will be in full recovery only. So that no data loss.
35. How many DBs and How many servers you are supporting?
A. I dont know exactly how many number of databasesmore than 1000 and maximum size we are
handling more than 600 GB. And we have 70 production servers other than these QA servers which might
be approximately 50; we dont look into that much.
36. What is the difference between User and Login?
A. A "Login" grants the principal entry into the SERVER. A "User" grants a login entry into a single
DATABASE.
37. Why you cant disable Guest on Master and Temp DBs?
A. Every public login mapped with guest user. But guest is disabled on every database. Only on master &
temp dbs guest is enabled.

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

38. What is the default status of the guest user account in database?
A: Enabled in master, TempDb, and MSDB. It disabled on model (and User) database.
39. How to enable the Guest user?
A.

GRANT CONNECT TO guest

( It enables the guest on perticuler DB )

REVOKE CONNECT FROM guest

( It disables the guest on perticuler DB )

40. Have you involved in the DB Refresh? What are the steps do you need to take care at DB Refresh?
A. Moving a database from one instance to another known as DB Refresh.
Steps Involved in DB Refresh:
Take the full backup of the source database,
Move it to the destination sever,
Need to identify the mdf and ldf files on the destination server,
Need to list out the logical file names from the backup file,
Restore the database with new logical & physical names,
Set the recovery model,
Change the compatibility level for avoid the conflicts on versions,
Change the db owner as sa or whatever we are using,
Need to fix the orphaned users.
41. What are the Orphaned Users? How to move Orphaned Users from one server to another server?
A. Orphaned User means a database user not associated with any SQL login. This problem is raised in two
cases. In the first case Master database damaged and we dont have recent backup i.e. logins were lost. In
the second case moving the database from one server to another only db users are copied but logins are not
copied.
List out the Orphaned users in destination server, by the command
USE <DBName>
GO
SP_CHANGE_USERS_LOGIN 'REPORT'
Run the REVLOGIN stored procedure on source server, It displays logins configuration information.
Select and copy the required users and those to source server. And establish the mapping between logins
and users on the destination server.
SP_CHANGE _USERS_LOGIN UPDATE-ONE <Login name>,<User name >
42. What is Linked Server?
A. Linked server is configured to enable the Database Engine to execute a Transact-SQL statement that
includes tables in another instance of SQL Server, or another database product such as Oracle.

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

43. What is the Difference between Migration and upgration?


A. Upgration: Which means upgrade database instance on any db server from one version / edition to
other. i.e. installation of new version on earlier db versions.
Migration indicates moving database from one server to other server with same sql edition or later
versions.
43. How many types of High availabilitys are available in MS SQL Server?
A. Three types, i.e. Log Shipping, Mirroring and Clustering.
44. What are the jobs gets created when you configure the Log Shipping?
A. Backup, Copy and Restore, Alert.
45. What are the steps do you fallow to configure log shipping?
A. Take a full and T-log backup of the Primary DB into the shared folder and restore those on
Secondary server with No recovery or Read-Only mode. Start Configure Log shipping from Primary DB by
viewing the Properties sheet of the database or by right-clicking on the database and selecting Tasks
Ship Transaction Logs from Object Explorer.
To begin, you will need to enable this database as the primary server for log shipping.
And click on the Backup Settings button, specify network path also specify a local file system path
where the initial full backup and subsequent Transaction Log backups will be located and Schedule it. A
new job will be created that take backups into the shared folder.
Once youve configured the backup job settings, you can configure one or more secondary servers. Click
on Add button. This also brings up a new window with three option screens. Connect to secondary with
server secondary database and you already initialized the secondary database so that you select last option
as Secondary database is initialized.
In the copy tab, provide the copy folder path and schedule it. A new job will be created that copies the
files created by the backup operation to the destination folder on the secondary server.
The Restore Transaction Log tab allows you to configure the restore operation; you may need to
disconnect users when restoring the database backups. A new job will be created that restores the files into
secondary database.
46. What are the possible Errors you faced in log shipping?
A. LSN mismatch, Shared folder doesnt have permissions, ndf added on primary, Also Fail occurred in
backup, Copy and Restore jobs. (I.e. network issues the backup file should not copy to the copy folder)
47. Can I balance the load on the database by using log shipping?
A. Load balance can be done in log-shipping by putting secondary database into Standby mode.
48. What is the problem you faced when you use Standby mode on secondary database in log shipping?
A. Whenever Secondary database is in standby mode, Restoration failed when the user connected to it. To
avoid this disconnect the users when restoring the backups.

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

49. I would like to have my secondary database latency from the production server should be 12 hours?
A. Schedule the Restore job as 12 hours.
50. What are the advantages and disadvantages of log shipping?
A. Advantages: Easy Setup, Cheap in cost, Low maintenance, Multiple standby servers can be configured,
Standby dbs available in read-only.
Disadvantages: Down time high, Data loss might be high, automatic fail over is not possible.
51. Can I configure the log shipping from 2008 to 2005? Why?
A. No, not possible because every new version coming with new features with existing one. These new
features may not be supported by older version. But configuration of log-shipping from sql server 2005 to
2008 is possible.
52. Can you move the secondary files (.ndf) to another server?
A. No, because it is a Server level activity.
53. Can you take the full and log backups of databases which are configured for log shipping and
mirroring?
A. Yes, but the transactions are not truncated. Which are reserved for secondary or mirror databases.
54. I would like to read my mirrored DB. Is it possible or not?
A. Yes, by using DB-Snapshot we can read the mirrored database.
55. What is SOP?
A. A Standard Operating Procedure (SOP) is a set of written instructions that document a routine or
repetitive activity followed by an organization.
56. I would like to know what my secondary server is.
A.

select * from msdb.dbo.log_shipping_secondary_databases

57. I would like to know complete schedule of job?


A. This information is available in MSDB only.
58. I would like to know what is my Mirror and Principal.
A.

select * from sys.database_mirroring

59. What is the difference between Function and stored procedure?


A. Functions:
1) can be used with Select statement
2) Not returning output parameter but returns Table variables

rkreddypalla@gmail.com

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

3) You can join UDF


4) Cannot be used to change server configuration
5) Cannot be used with XML FOR clause
6) Cannot have transaction within function
Stored Procedure:
1) have to use EXEC or EXECUTE
2) return output parameter
3) can create table but wont return Table Variables
4) you cannot join SP
5) can be used to change server configuration
6) can be used with XML FOR Clause
7) can have transaction within SP
60. If you dont configure the Primary key on the table, can you configure the replication?
A. Yes, we can in Snapshot and Transactional Replications. Primary key required in Transactional
Replication with upgradable and Merge Replication.
61. I would like to know exactly what happened when we press F5?
A. First it will check the properties of the server, and will be update with most recent values.
62. I found that Disk is running out of the space. What could you do?
A. First you figure out which files become full i.e. ldf or mdf, and Check which files are there in drive.
If the log files are running out of the disk:
DBCC SQLPERF(LOGSPACE)
It displays the log space used information for each and every database. Point out which database
crossing the limit. On that database if space is availabe Shrink it, If space is not availabe take
Transactional log backups. Then committed transactions will be truncated, so that you get the free space.
Shrink it.
Even you take the T-log backup also if you not get the space, you deside that there is a active
transaction.
You need to identify that transaction, and need to identify how much percentage the transaction is
completed.
If the transaction been compleating(i.e. reaches 90%) add a new log file on different disk , disable the
autogrowth on current log file. After that take a T-Log backup then free space available, Shrink it with
selecting the option Empty file by migrating the data to other files in the same file group and delete the
space in added drive.
If I found that less than 40% completed, bychecking with application team or user kill the transaction for
avoid the further issues on server.
(i). When I took the backup am not getting the free space, even active transactions are no there?

rkreddypalla@gmail.com

10

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

A. Just you put the database in simple recovery mode, what are the committed transactions is there, that
are truncated, and then you get the free space. Now put the database in Full Recovery and take fresh full
backup.
If the data files are running out of the disk:
Identify mdf files,
Find out how much free space available in disk,
Take a full backup, before going to shrink the data file we have take care, it is very problematic thing.
Shrink the data file just 1GB or half GB only, but dont do directly on entire free space.
63. I want to know free space in MDF?
A. There is no stored procedure for mdf free space information. We have to write manually.
64. What is your IM (Internet Messenger)?
A. WEB-EX, LYNC, Office outlook manager.
65. Have you worked on the performance tuning?
Or
I receive a request from the user saying that my query is running slow?
A.
First we need to check there are any blockings on server, if there any transactions blocked by other
transactions kill it based on completion percentage.
Next work on Indexes, If Index is not there, Check the Fragmentation level. If the fragmentation is in
between 5 to 30 percent we need to Re-organize the index. If the fragmentation is more than 30% Re-build
the Index. If fragmentation is less than 5% still no performance the issue could be Statistics.
Next work on Statistics, we need to update the statics.
Still performance is low we need to work on Execution plans. Next work on Joins and tell to the
developers rewrite the query.
Still performance is low, its not problem with the Query. Problem with Hardware, intimate network
team to improve I-O rate, RAM utilization, Load etc.
66. What is Index? How can you know a table has the Index or not?
A. Index is a system which provides faster access to rows and for enforcing constraints. In simple words it
like index of any book e.g. While searching a word in Book we use index back of book to find the
occurrence of that word and its relevant page numbers.
sp_helpindex '<Table Name>'
67. What is the default port number of sql server?
A. The default SQL Server port is 1433, and client ports are assigned a random value between 1024 and
5000. (1434 is browsers services port)
68. Did you have experience on clustering?

rkreddypalla@gmail.com

11

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

A. Yes. I have experience on configuring the cluster and fail over cluster.

69. If Quorum is down in the cluster, what happens?


A. The quorum is responsible for storing the shared data that will be accessed by the cluster nodes, as well
as identifying which node is the primary node for the application, if the Quorum disk suddenly became
unavailable to the cluster then both nodes would immediately fail and not be able to restart the cluster
service.
In that light, the Quorum disk was a single point of failure in a Microsoft Cluster implementation.
However, it was usually a fairly quick workaround to get the cluster back up and operational. There are
generally two solutions to that type of problem.
1. Determine why the Quorum disk failed and repair.
2. Reprovision a new LUN, present it to the cluster, assign it a drive letter and format. Then start one node
with the /FQ switch and through cluster admin designate the new disk resource as the Quorum. Then stop
and restart the cluster service, normally and then bring online the second node.
70. What steps can take whenever start the sql server?
A.

71. Other than Database Engine Service what are the services are cluster aware?
A. No, only the database engine is cluster aware. If we want we make other services also cluster aware.
72. Whenever the quorum is failed you raised a request to windows team, if they did not any changes what
would you do?
A. I have knowledge about windows level cluster. So I will create and configure another disk for Quorum.
73. I would like to know where my services are running in cluster machine.
A.

select SERVERPROPERTY('IsCluster')

74. What is preferred owner in clustering?

A. Generally the preferred owner is the first server in the cluster (the one you setup Failover Clustering
with), others are added as you build your cluster. If you have an Active-Active cluster and each node is
going to host a Sql instance, then if you want db1 on Node 1, then make Node 1 the preferred owner.
Then if you have db2 on Node 2, then make node 2 the preferred owner. If you have multiple instances,
you may want to have different owners for different instances for performance reasons.
75. How to know which machine services are running, whenever we are in clustering?
A. SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
AS [CurrentNodeName]

rkreddypalla@gmail.com

12

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

Find SQL Server Cluster Nodes


SELECT * FROM fn_virtualservernodes() Or

SELECT * FROM sys.dm_os_cluster_nodes

Find SQL Server Cluster Shared Drives


SELECT * FROM fn_servershareddrives()

Or

SELECT * FROM sys.dm_io_cluster_shared_drives

76. How much time taken by Fail Over cluster?


A. It depends on the pending transactions. If we have 1000s of committed transactions also it takes less.
But one huge pending transaction, it takes long time.
77. Can you make the analysis service under the cluster aware?
A. Default only Database Engine, if anyone want we make it as cluster aware.
78. What are the End points?
A. SQL Server endpoint is the point of entry into SQL Server. It is implemented as a database object
that defines the ways and means in which SQL Server may communicate over the network.
79. How to rename the instance name of named instance...?
A. We have to know about present server name by using the command:
SELECT @@VERSION (or)
SP_HELPSERVER
(First rename the system name)
Type the command for renames the server as:
USE MASTER
GO
EXEC SP_DROPSERVER Machine Name\Instance name ;
GO
EXEC SP_ADDPSERVER Machine Name\NEW Instance name ,local;
GO
Verify:
SP_HELPSERVER

80. What is the difference between Active/Passive and Active/Active Failover Cluster?
A: In reality, there is only one difference between Single-instance (Active/Passive Failover Cluster) and
Multi-instance (Active/Active Failover Cluster). As its name suggests, in a Multi-instance cluster, there
will be two or more SQL Server active instances running in a cluster, compared to one instance running
in Single-instance. Also, to configure a multi-instance Cluster, we may need to procure additional disks,
IP addresses, and network names for the SQL Server.
81. Where are SQL server Usernames and Passwords Stored in the SQL server?

rkreddypalla@gmail.com

13

+91-9985060271

RADHAKRISHNAREDDY

Interview Qs by Hareesh Gannavarapu

A. They get stored in System Catalog Views, sys.server_principals and sys.sql_logins. However, you
will not find password stored in plain text.
82. What is Filtered Index?
A. Filtered Index is used to index a portion of rows in a table that means it applies filter on INDEX
which improves query performance, reduces index maintenance costs, and reduces index storage costs
when compared with full-table indexes. When we see an Index created with a WHERE clause, then that
is actually a FILTERED INDEX
83. What is a deadlock and what is a live lock? How will you go about resolving deadlocks?
A. Deadlock occurs when two user processes/transactions have locks on 2 separate objects and each
process is trying to acquire a lock on the object that has been acquired by the other process. In such a
scenario each process is waiting for the other process to release the lock to acquire a lock on the object
itself. When a request for exclusive lock is denied again and again because a series of overlapping shared
locks are interfering with each other and to adapt from each other they keep on changing the status, it is
known as live lock.
84. What is RAID (Redundant Array of Inexpensive disks)?
A. RAID is a mechanism of storing the same data in different locations. Since the same data is stored, it is
termed as redundant. The data is stored on multiple disks which improves performance. The drives
storage is divided into units ranging from a sector (512 bytes) up to several megabytes. This is termed as
disk stripping. There are NINE types of RAID plus an additional non-redundant array (RAID-0).
However, RAID levels 0, 1, and 5 are the most commonly found.
85. What is use of DBCC Commands?
Database Consistency Checker Commands give details in form of statistics about the SQL Server. They
can be used for Maintenance of database, index, or filegroup. DBCC Commands can be used to perform
validation operations on a database, table, index, catalog, filegroup, or allocation of database pages. They
can perform miscellaneous tasks such as enabling trace flags or removing a DLL from memory. DBCC
INDEXDEFRAG, DBCC ERRORLOG, DBCC CACHESTATS are one of the few DBCC commands.

rkreddypalla@gmail.com

14

+91-9985060271

You might also like