Professional Documents
Culture Documents
+91-9985060271
RADHAKRISHNAREDDY
+91-9985060271
RADHAKRISHNAREDDY
rkreddypalla@gmail.com
+91-9985060271
RADHAKRISHNAREDDY
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
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
rkreddypalla@gmail.com
+91-9985060271
RADHAKRISHNAREDDY
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.
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
rkreddypalla@gmail.com
+91-9985060271
RADHAKRISHNAREDDY
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.
rkreddypalla@gmail.com
+91-9985060271
RADHAKRISHNAREDDY
rkreddypalla@gmail.com
10
+91-9985060271
RADHAKRISHNAREDDY
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
A. Yes. I have experience on configuring the cluster and fail over cluster.
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')
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
Or
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
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