Você está na página 1de 40

1.

What new functionality does failover clustering provide in Windows Server


2008?

New validation feature. With this feature, you can check that your system, storage,
and network configuration is suitable for a cluster.

Support for GUID partition table (GPT) disks in cluster storage. GPT disks can have
partitions larger than two terabytes and have built-in redundancy in the way partition
information is stored, unlike master boot record (MBR) disks.

2. What happens to a running Cluster if the quorum disk fails in Windows


Server 2008 Cluster?

Cluster continues to work but failover will not happen in case of any other failure in
the active node.

3. What happens to a running Cluster if the quorum disk fails in Windows


Server 2003 Cluster?

In Windows Server 2003, the Quorum disk resource is required for the Cluster to
function. In your example, 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.

4. What are Virtual Servers?

Groups that contain an IP address resource and a network name resource (along with
other resources) are published to clients on the network under a unique server name.
Because these groups appear as individual servers to clients, they are called virtual
servers. Users access applications or services on a virtual server the same way they
access applications or services on a physical server. They do not need to know that
they are connecting to a cluster and have no knowledge of which node they are
connected to.

5. How do you bring the SQL Server down?

In the Cluster Administrator, rick click on the SQL Server Group and from the popup
menu item choose Take Offline.

6. How will you add a disk to the SQL Group cluster?

After adding the shared disk in the storage, we can add disk to the respective SQL
Server Group.

7. What is the maximum number of nodes in an MNS cluster in Windows Server


2008, Enterprise x64 Edition?

Maximum 16.

8. What does a failover cluster do in Windows Server 2008?

A failover cluster is a group of independent computers that work together to increase


the availability of applications and services. The clustered servers (called nodes) are
connected by physical cables and by software. If one of the cluster nodes fails, another
node begins to provide service (a process known as failover). Users experience a
minimum of disruptions in service.

9. What are Services and Application folder represent?

Services and applications are managed as single units for configuration and recovery
purposes. If a resource depends on another resource, both resources must be a member
of the same service or application. For example, in a file share resource, the service or
application containing the file share must also contain the disk resource and network
resources (such as the IP address and NetBIOS name) to which clients connect to
access the share. All resources within a service or application must be online on the
same node in the cluster.

10. What kinds of permissions are required in the active directory to setup the
SQL Server cluster objects?

Service account needs create object permissions in the Active Directory.

11. Why do we keep SQL Services in manual mode on each of the instance?

SQL Services should always be in manual mode in case of cluster because these are
managed by the Cluster service and its taken online on its respective owner node
based on the failover.

12. What is Distributed lock management?

Distributed lock management (DLM): Distributed lock management (DLM) enables


two servers to access the same physical disk at the same time without corrupting the
data. If a device is updating a particular file or piece of data, the device gets locked so
that another controller cant seize ownership and overwrite the data. NT does not
currently support DLM, so disks are dedicated to one node or the other.

13. What is Look Alive?

LooksAlive: Verifies that the SQL Server service runs on the online node every 5
seconds by default.

14. What is IS Alive?


IsAlive: Verifies that SQL Server accepts connections by executing
sp_server_diagnostics. This health detection logic determines if a node is down and
the passive node then takes over the production workload.

15. What are SQL Server Cluster aware services?

SQL Server Service


SQL Server Agent Service
SQL Server Analysis Service

16. What are SQL Server Cluster unaware services?

SQL Server Reporting Service


SQL Server Integration Service

17. What are Validation tests in Windows Cluster?

Validation test is a mechanism of verifying that all the components which are
participating in the Windows cluster are fine and failover is happening between the
nodes.

18. What are the basics tests done by the validation tests in Windows Cluster?

Cluster Configuration tests: Validate important cluster configuration settings.


Inventory tests: Provide an inventory of the hardware, software, and settings (such as
network settings) on the servers, and information about the storage.
Network tests: Validate that networks are set up correctly for clustering.
Storage tests: Validate that the storage on which the failover cluster depends is
behaving correctly and supports the required functions of the cluster.
System Configuration tests: Validate that the system software and configuration
settings are compatible across servers.

19. Where the results of validation tests are stored?


These reports are automatically stored for you in C:\Windows\Cluster\Reports as
MHTML files.

20. Is SQL Server a Load balancing solution or not?

No, its not a Load balancing solution.

21. Will there be any downtime in Active\Active cluster in case of any failover?

Yes, definitely there will be downtime when SQL Server failover from one node to
another.

22 Can we use other SQL Server cluster Nodes for reporting purpose as we can
do in Logshipping and Database mirroring?

No its not possible in SQL Server Cluster feature.

23. Can we place out Non Critical SQL Server User Databases on a Clustered
Instance on Disks that are not clustered to Save Money?

No, its not possible. SQL Server 2012 and all previous versions of SQL Server
require databases be created on clustered resources. Internal drives or drives which are
not part of the cluster group cannot hold user databases.

24. Can we configure Tempdb database on a local drive?

With the introduction of SQL Server 2012 Microsoft officially supports local disk
TempDB in SQL Server cluster configurations.

25. Can we configure Windows cluster between two servers which are having
different hardware and software configurations?
No it is not possible.

26. What is SMB share?

SMB stands for Server Message Block file server which can be used as a storage
option starting SQL Server 2012 to store system databases (Master, Model, MSDB,
and TempDB), and Database Engine user databases .

27. How can we check the current node/host name where SQL Server is running?

Select serverproperty(ComputerNamePhysicalNetBIOS)

28. How to view the Cluster Nodes using command line?

C:\Windows\System32>cluster node

--or

C:\Windows\System32>cluster node /status


29. How to view the status for all cluster resource groups.

C:\Windows\System32>cluster group

--or

C:\Windows\System32>cluster group /status


30. How to get a listing of all available cluster resources?

C:\Windows\System32>cluster resource

--or

C:\Windows\System32>cluster resource /status


31. How to failover a service from one node to another?
C:\Windows\System32>cluster group "groupname"
/move:nodeName

CLUSTERING

1) What is Windows Cluster?


Clustering can be best described as a technology that automatically allows one physical server to
take over the tasks and responsibilities of another physical server that has failed. The obvious
goal behind this, given that all computer hardware and software will eventually fail, is to ensure
that users running mission-critical applications will have very less downtime when such a failure
occurs.
2) What is a Cluster Node?
A cluster node is a server within the cluster, and it has Windows Server and the Cluster service
installed.
3) What is Cluster Service?
The cluster service manages all the activity that is specific to the cluster. One instance of the
cluster service runs on each node in the cluster. The cluster service does the following
Manages Cluster Objects and Configurations
Manages the local restart policy
Coordinates with other instances of the cluster service in the cluster
Handles event notification
Facilitates communication among other software components
Performs failover operations
4) What is called a Resource in Windows cluster?
A resource is a physical or logical entity, which has below properties:
Can be brought online and taken offline
Can be managed in the failover cluster
Can be owned by only one node at a time
To manage resources, Cluster service communicates with a resource DLL through Resource
Monitor.
5) What are the different states of a Resource in Windows cluster?
All resources can have following states
Offline
Offline_Pending
Online
Online_Pending
Failed
6) What is a Cluster Group?
Conceptually, a cluster group is a collection of logically grouped cluster resources. It may contain
cluster-aware application services, such as SQL Server Group, File Server.
7) What is Public Network?
A public network (also called as External network) provides client systems with access to cluster
application services and IP address resources are created on networks that provide clients
access to cluster services.
8) What is Private Network?
A private network (sometimes called as interconnect or heartbeat connect) is a network that is
setup between the nodes of the cluster and it carries only internal cluster communications.
9) What is Heartbeat in Windows cluster?
Heartbeats are messages that Cluster Service regularly sends between the instances of Cluster
Service that are on each node to manage the cluster.
10) What Failover and Failback terms mean in Windows Cluster?
Failover: Failover is the process of moving a group of resources from one node to another in the
case of a failure. For example, in a cluster where Microsoft SQL Server is running on node A and
node A fails, SQL Server automatically fails over to node B of the cluster.
Failback: Failback is the process of returning a resource or group of resources to the node on
which it was running before it failed over. For example, when node A comes back online, SQL
Server can fail back from node B to node A.
11) What is Quorum Drive?
This is a logical drive assigned on the shared disk array specifically for Windows Clustering.
Clustering services write constantly on this drive about the state of the cluster. Corruption or
failure of this drive can fail the entire cluster setup. It also acts as a voter in the fail over process
in case of odd number of nodes.
12) Different types of Quorum Models supported in windows Server 2008?
Node Majority Used when Odd number of nodes are in cluster.
Node and Disk Majority Even number of nodes (but not a multi-site cluster)
Node and File Share Majority Even number of nodes, multi-site cluster
No Majority: Disk Only This is the traditional MSCS quorum model, where a shared quorum
disk must be online and nodes must be able to communicate with that disk
13) What is Node Majority model?
This type of quorum is optimal for clusters having an odd number of nodes. In this configuration,
only the nodes have votes. The shared storage does not have a vote. A majority of votes are
needed to operate the cluster.
14) What is Node and Disk Majority model?
Nodes and a shared disk get votes. This configuration allows a loss of half the nodes, providing
the disk witness is available, or over half the nodes are available without the disk witness being
available. This is recommended for even number of nodes in the cluster.
15) What is Node and File Share Majority model?
This type of quorum is optimal for clusters having an even number of nodes when a shared
witness disk is not an option. Other characteristics include the following:
each node and the file share witness gets a vote
it does not require a shared disk to reach a quorum
the file share has no special requirements
the file share should be located at a third site, making this type of quorum the best solution for
geographically dispersed clusters
16) What is No Majority: Disk only mode?
The disk witness must be available to have quorum, but the number of available nodes doesnt
matter. If you have a four-node cluster and only one node is available, but the disk witness is
available, you have quorum. If the disk witness isnt available, then even if all four nodes are
available you cant have quorum.
17) What I Split Brain situation in Cluster?
Cluster nodes communicate with each other over the network (port 3343). When nodes are
unable to communicate with each other, they all assume the resources of the other
(unreachable) nodes have to be brought online. Because the same resource will be brought
online on multiple nodes at the same time, data corruption may occur. These results in a
situation called Split Brain.
18) How Spilt Brain situation is resolved?
To prevent Split Brains we need to bring the cluster resource online on a single node (rather than
multiple nodes). Each of the online node cast vote for majority and the resources come online on
that group which has more votes or has majority. In case of Even number of nodes Quorum also
acts as a voter to eliminate split brain situation.
19) What are the Hardware requirements for Windows Server Cluster?
Windows Cluster
Two windows servers (nodes)
At least one shared disk array that supports, either SCSI or fibre channel.
Each server must have a SCSI or fiber channel adapter to talk to the shared disk array. The
shared disk array cannot use the SCSI controller used by the local hard disk or CD-ROM.
Each server must have two PCI network cards (one for the private connection and one for the
public connection)
1 IP Address for Windows virtual cluster name
20) What are the Hardware requirements for SQL Server Cluster?
1 IP Address for MSDTC service
1 IP Address for SQL Server Active\Passive Instance or 2 IP address for SQL Server
Active\Active Instance
1 IP Address for SQL Server Analysis services (if needed)
21) How many IP Addresses we require for setting up Active\Passive SQL Server cluster?
2 Windows nodes Public
2 Private IP Addresses Private
1 Windows Virtual Cluster Name
1 MSDTC
1 SQL Server Virtual Network Name
22) How many IP Addresses we require for setting up Active\Active SQL Server cluster
with Analysis services?
2 Windows nodes Public
2 Private IP Addresses Private
1 Windows Virtual Cluster Name
1 MSDTC

1 SQL Server Virtual Network Name


1 SQL Server Analysis Services
23) How do you open a Cluster Administrator?
Start Menu > Run > Cluadmin.msc
24) What is SQL Server Network Name (Virtual Name)?
This is the SQL Server Instance name that all client applications will use to connect to the SQL
Server.
25) Different types of SQL Server Cluster?
Active\Passive
Active\Active
26) What is the difference between Active\Passive and Active\Active cluster?
An Active Passive cluster is a failover cluster configured in a way that only one cluster node is
active at any given time. The other node, called as Passive node is always online but in an idle
condition, waiting for a failure of the Active Node, upon which the Passive Node takes over the
SQL Server Services and this becomes the Active Node, the previous Active Node now being a
Passive Node.
An Active Active cluster is a failover cluster configured in a way that both the cluster nodes are
active at any given point of time. That is, one Instance of SQL Server is running on each of the
nodes always; when one of the nodes has a failure, both the Instances run on the only one node
until the failed node is brought up (after fixing the issue that caused the node failure). The
instance is then failed over back to its designated node.
27) Difference between SQLSERVER 2005 and SQLSERVER 2008 Cluster Installation?
In sql2005 we have the option of installing SQL in remaining nodes from the primary node, But in
sql2008 we need to go separately (Login to the both nodes) for installing SQL cluster
28) Can we change the Quorum settings after installing the windows cluster?
Yes, we can change the Quorum setting after the Windows Cluster installation.
29) Is it mandatory to configure MSDTC in Windows 2008 cluster before installing SQL
Server cluster?
No its not mandatory to configure MSDTC service to install SQL Server in Windows 2008
cluster. Installation will give you a warning but will not stop the installation.
30) What are the Benefits of SQL Server Cluster?
Reduces downtime to a bare minimum.
Permits an automatic response to a failed server or software. No human intervention is required.
It allows you to perform upgrades without forcing users off the system for extended periods of
time.
It allows you to reduce downtime due to routine server, network, or database maintenance.
Clustering doesnt require any servers to be renamed. So when failover occurs, it is relatively
transparent to end-users.
Failing back is quick, and can be done whenever the primary is fixed and put back on-line.
31) What are the Drawbacks of SQL Server Cluster?
More expensive than other failover alternatives, such as log shipping or stand-by servers.
Requires more set up time than other alternatives.
Requires more on-going maintenance than other alternatives.
Requires more experienced DBAs and network administrators.
32) What new functionality does failover clustering provide in Windows Server 2008?
New validation feature. With this feature, you can check that your system, storage, and network
configuration is suitable for a cluster.
Support for GUID partition table (GPT) disks in cluster storage. GPT disks can have partitions
larger than two terabytes and have built-in redundancy in the way partition information is stored,
unlike master boot record (MBR) disks.
33) What happens to a running Cluster if the quorum disk fails in Windows Server 2008
Cluster?
Cluster continues to work but failover will not happen in case of any other failure in the active
node.
34. What happens to a running Cluster if the quorum disk fails in Windows Server 2003
Cluster?
In Windows Server 2003, the Quorum disk resource is required for the Cluster to function. In your
example, 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.
35) What are Virtual Servers?
Groups that contain an IP address resource and a network name resource (along with other
resources) are published to clients on the network under a unique server name. Because these
groups appear as individual servers to clients, they are called virtual servers. Users access
applications or services on a virtual server the same way they access applications or services on
a physical server. They do not need to know that they are connecting to a cluster and have no
knowledge of which node they are connected to.
36) How do you bring the SQL Server down?
In the Cluster Administrator, rick click on the SQL Server Group and from the popup menu item
choose Take Offline.
37) How will you add a disk to the SQL Group cluster?
After adding the shared disk in the storage, we can add disk to the respective SQL Server Group.
38) What is the maximum number of nodes in an MNS cluster in Windows Server 2008,
Enterprise x64 Edition?
Maximum 16.
39) What does a failover cluster do in Windows Server 2008?
A failover cluster is a group of independent computers that work together to increase the
availability of applications and services. The clustered servers (called nodes) are connected by
physical cables and by software. If one of the cluster nodes fails, another node begins to provide
service (a process known as failover). Users experience a minimum of disruptions in service.
40) What are Services and Application folder represent?
Services and applications are managed as single units for configuration and recovery purposes.
If a resource depends on another resource, both resources must be a member of the same
service or application. For example, in a file share resource, the service or application containing
the file share must also contain the disk resource and network resources (such as the IP address
and NetBIOS name) to which clients connect to access the share. All resources within a service
or application must be online on the same node in the cluster.
41) What kinds of permissions are required in the active directory to setup the SQL Server
cluster objects?
Service account needs create object permissions in the Active Directory.
42) Why do we keep SQL Services in manual mode on each of the instance?
SQL Services should always be in manual mode in case of cluster because these are managed
by the Cluster service and its taken online on its respective owner node based on the failover.
43) What is Distributed lock management?
Distributed lock management (DLM): Distributed lock management (DLM) enables two servers to
access the same physical disk at the same time without corrupting the data. If a device is
updating a particular file or piece of data, the device gets locked so that another controller cant
seize ownership and overwrite the data. NT does not currently support DLM, so disks are
dedicated to one node or the other.
44) What is Look Alive?
LooksAlive: Verifies that the SQL Server service runs on the online node every 5 seconds by
default.
45) What is IS Alive?
IsAlive: Verifies that SQL Server accepts connections by executing sp_server_diagnostics. This
health detection logic determines if a node is down and the passive node then takes over the
production workload.
46 What are SQL Server Cluster aware services?
SQL Server Service
SQL Server Agent Service
SQL Server Analysis Service
47) What are SQL Server Cluster unaware services?
SQL Server Reporting Service
SQL Server Integration Service
48) What are Validation tests in Windows Cluster?
Validation test is a mechanism of verifying that all the components which are participating in the
Windows cluster are fine and failover is happening between the nodes.
49) What are the basics tests done by the validation tests in Windows Cluster?
Cluster Configuration tests: Validate important cluster configuration settings.
Inventory tests: Provide an inventory of the hardware, software, and settings (such as network
settings) on the servers, and information about the storage.
Network tests: Validate that networks are set up correctly for clustering.
Storage tests: Validate that the storage on which the failover cluster depends is behaving
correctly and supports the required functions of the cluster.
System Configuration tests: Validate that the system software and configuration settings are
compatible across servers.
50) Where the results of validation tests are stored?
These reports are automatically stored for you in C:\Windows\Cluster\Reports as MHTML files.
51) Is SQL Server a Load balancing solution or not?
No, its not a Load balancing solution.
52) Will there be any downtime in Active\Active cluster in case of any failover?
Yes, definitely there will be downtime when SQL Server failover from one node to another.
53) Can we use other SQL Server cluster Nodes for reporting purpose as we can do in
Logshipping and Database mirroring?
No its not possible in SQL Server Cluster feature.
54) Can we place out Non Critical SQL Server User Databases on a Clustered Instance on
Disks that are not clustered to Save Money?
No, its not possible. SQL Server 2012 and all previous versions of SQL Server require
databases be created on clustered resources. Internal drives or drives which are not part of the
cluster group cannot hold user databases.
55) Can we configure Tempdb database on a local drive?
With the introduction of SQL Server 2012 Microsoft officially supports local disk TempDB in SQL
Server cluster configurations.
56) Can we configure Windows cluster between two servers which are having different
hardware and software configurations?
No it is not possible.
57) What is SMB share?
SMB stands for Server Message Block file server which can be used as a storage option starting
SQL Server 2012 to store system databases (Master, Model, MSDB, and TempDB), and
Database Engine user databases .
58) How can we check the current node/host name where SQL Server is running?
Select serverproperty(ComputerNamePhysicalNetBIOS)
59) How to view the Cluster Nodes using command line?
C:\Windows\System32>cluster node
--or
C:\Windows\System32>cluster node /status
60) How to view the status for all cluster resource groups.
C:\Windows\System32>cluster group
--or
C:\Windows\System32>cluster group /status
61) How to get a listing of all available cluster resources?
C:\Windows\System32>cluster resource
--or
C:\Windows\System32>cluster resource /status
62) How to failover a service from one node to another?
C:\Windows\System32>cluster group "groupname" /move:nodeName

63) What is the difference between SQL Server clustering methods: - Active/Active -
Active/Passive
Active/Active means that both nodes are active and accessing the shared disk resources, but are
running independent instances. When a node fails, you need to be sure that the remaining node
has the resources available to handle the additional databases that fail over. You can think of it
like this. Node A has 1 database on it, and Node B has 1 database on it. Node A goes down, the
resources fail over to Node B, and now Node B has 2 databases running on it.
In an Active/Passive cluster, you would only have 1 database running on a single node at any
given time. Node A is active with 1 DB, Node B is passive with no DBs. Node A goes down, the
resources fail over to Node B. Node B is now active with 1 database running on it.
I'm sure more experienced cluster admins or SQL admins will savage me for my terminology, but
that's it in a nutshell.

64) What is the alive & Looks alive

LooksAlive check:
LooksAlive is a basic check in which the Cluster service queries the Windows Service Control Manager to
check if the SQL Server service is still running. By default this check happens every 5 seconds.
Cluster service calls looksAlive function every 5 seconds and LookAlive function Queries the service
status by using the Windows NT Service Control Manager. When the LooksAlive test fails ISAlive test is
called immediately.

ISalive Check: A more rigorous IsAlive function is called every 60 second and monitors the health of the
SQL Server by opening up a connection to SQL Server and issuing select @@servername query over
the connection. If the checks fail the online Thread reports this failure to the Cluster Service.
During IsAlive check the Cluster Service connects to the SQL Server instance with the help of
c:\windows\system32\sqsrvres.dll and runs SELECT @@SERVERNAME against the instance.

By default, LooksAlive is fired every 5 seconds and IsAlive is fired every 60 seconds. The LooksAlive and
IsAlive polling intervals can be changed in Cluster Administrator or failover cluster manager from the
advanced tab for the SQL Server resource or using the cluster.execommand prompt utility.

65) What is meant by Active Passive and Active Active clustering setup?

An Active Passive cluster is a failover cluster configured in a way that only one cluster node is
active at any given time. The other node, called as Passive node is always online but in an idle
condition, waiting for a failure of the Active Node, upon which the Passive Node takes over the
SQL Server Services and this becomes the Active Node, the previous Active Node now being a
Passive Node.

An Active Active cluster is a failover cluster configured in a way that both the cluster nodes are
active at any given point of time. That is, one Instance of SQL Server is running on each of the
nodes always; when one of the nodes has a failure, both the Instances run on the only one node
until the failed node is brought up (after fixing the issue that caused the node failure). The
instance is then failed over back to its designated node.

66) List out some of the requirements to setup a SQL Server failover cluster.
Virtual network name for the SQL Server, Virtual IP address for SQL Server, IP addresses for the
Public Network and Private Network(also referred as Hearbeat) for each node in the failover
cluster, shared drives for SQL Server Data and Log files, Quorum Disk and MSDTC Disk.

67) On a Windows Server 2003 Active Passive failover cluster, how do you find the node
which is active?
Using Cluster Administrator, connect to the cluster and select the SQL Server cluster. Once you
have selected the SQL Server group, in the right hand side of the console,
thecolumn Owner gives us the information of the node on which the SQL Server group is
currently active.
68) How do you open a Cluster Administrator?
From Start -> Run and type CluAdmin (case insensitive) and the Cluster Administrator console
is displayed OR you can also go to Start -> All programs -> Administrative Tools -> Cluster
Administrator.

69) How will you restart your sqlserver on cluster without failing over ..?
Choose option ( Take offline and Bring online option by right clicking node)

70) What will you if want to add a disk to the SQL Group cluster ..?

Need to choose Add Dependancy option after doing that in Cluster administrator tool (or) in
Failover Cluster admin tool from 2008 version

71) As a DBA how will you design active/active cluster requirement . (i.e), how will you
manage resource if failed over ..?
Please read article from MSDN on this to have better understanding

72) Steps for failover ..?


Please red MSDN on this with full view

73) Difference between SQLSERVER 2005 and SQLSERVER 2008 Cluster Installation ..?

In sql2005 we have the option of installing sql in remaining nodes from the primary node ., But in
sql2008 we need to go seperately(Login to the bith nodes) for installing sql cluster .

74) What is the status of services on passive node for failover cluster in SQL server?
SQL services will be in manual and stopped. Cluster service will be in automatic and started
mode on both the nodes.

75) Can you move the resources after pausing the node?
Yes resources can be moved after pausing the node. But we can't move them back till the node
is paused.

76) Where is the prevent failback option?


This is the resource group property. It doesn't allow the resources to move back to the preferred
node once the node is ready to take the connections after failover.

77) How does the failover happen? What checks are performed to ensure that another
node is up?
LooksAlive - The node which host the SQL server resources is verifed whether this node
(server) is up
IsAlive - The node which host the SQL server resources is verifed whether the SQL service is up
or not. Basically running SELECT @@SERVERNAME
78) What will happen if you try to start the fultext service on the passive node.
This can be started on both the nodes as this doesn't have any dependecy on SQL service or
any resource which is possessed by active node.

79) What is Clustering. Briefly define & explain it ?


Clustering is a technology, which is used to provide High Availability for mission critical
applications. We can configure cluster by installing MCS (Microsoft cluster service) component
from Add remove programs, which can only available in Enterprise Edition and Data center
edition.

80) Types of Clusters ?


In Windows we can configure two types of clusters
1. NLB (network load balancing) cluster for balancing load between servers. This cluster will not
provide any high availability. Usually preferable at edge servers like web or proxy.
2. Server Cluster: This provides High availability by configuring active-active or active-passive
cluster. In 2 node active-passive cluster one node will be active and one node will be stand by.
When active server fails the application will FAILOVER to stand by server automatically. When
the original server backs we need to FAILBACK the application

81) What is Quorum ?


A shared storage need to provide for all servers which keeps information about clustered
application and session state and is useful in FAILOVER situation. This is very important if
Quorum disk fails entire cluster will fails.

82) Why Quorum is necessary ?


When network problems occur, they can interfere with communication between cluster nodes. A
small set of nodes might be able to communicate together across a functioning part of a network,
but might not be able to communicate with a different set of nodes in another part of the network.
This can cause serious issues. In this split situation, at least one of the sets of nodes must stop
running as a cluster.
To prevent the issues that are caused by a split in the cluster, the cluster software requires that
any set of nodes running as a cluster must use a voting algorithm to determine whether, at a
given time, that set has quorum. Because a given cluster has a specific set of nodes and a
specific quorum configuration, the cluster will know how many votes constitutes a majority (that
is, a quorum). If the number drops below the majority, the cluster stops running. Nodes will still
listen for the presence of other nodes, in case another node appears again on the network, but
the nodes will not begin to function as a cluster until the quorum exists again.
For example, in a five node cluster that is using a node majority, consider what happens if nodes
1, 2, and 3 can communicate with each other but not with nodes 4 and 5. Nodes 1, 2, and 3
constitute a majority, and they continue running as a cluster. Nodes 4 and 5 are a minority and
stop running as a cluster, which prevents the problems of a split situation. If node 3 loses
communication with other nodes, all nodes stop running as a cluster. However, all functioning
nodes will continue to listen for communication, so that when the network begins working again,
the cluster can form and begin to run.

83) Different types of Quorum in Windows server 2008 ?


1.Node Majority - Used when Odd number of nodes are in cluster.
2.Node and Disk Majority - Even number of nodes(but not a multi-site cluster)
3.Node and File Share Majority - Even number of nodes, multi-site cluster
4.Node and File Share Majority - Even number of nodes, no shared storage

84) Different types of Quorum in Windows server 2003 ?


Standard Quorum : As mentioned above, a quorum is simply a configuration database for
MSCS, and is stored in the quorum log file. A standard quorum uses a quorum log file that is
located on a disk hosted on a shared storage interconnect that is accessible by all members of
the cluster.
Standard quorums are available in Windows NT 4.0 Enterprise Edition, Windows 2000 Advanced
Server, Windows 2000 Datacenter Server, Windows Server 2003 Enterprise Edition and
Windows Server 2003 Datacenter Edition.
Majority Node Set Quorums : A majority node set (MNS) quorum is a single quorum resource
from a server cluster perspective. However, the data is actually stored by default on the system
disk of each member of the cluster. The MNS resource takes care to ensure that the cluster
configuration data stored on the MNS is kept consistent across the different disks.
Majority node set quorums are available in Windows Server 2003 Enterprise Edition, and
Windows Server 2003 Datacenter Edition.

85) Explain about each Quorum type ?


Node Majority: Each node that is available and in communication can vote. The cluster functions
only with a majority of the votes, that is, more than half.
Node and Disk Majority: Each node plus a designated disk in the cluster storage (the disk
witness) can vote, whenever they are available and in communication. The cluster functions only
with a majority of the votes, that is, more than half.
Node and File Share Majority: Each node plus a designated file share created by the
administrator (the file share witness) can vote, whenever they are available and in
communication. The cluster functions only with a majority of the votes, that is, more than half.
No Majority: Disk Only: The cluster has quorum if one node is available and in communication
with a specific disk in the cluster storage.

86) How is the quorum information located on the system disk of each node kept in
synch?
The server cluster infrastructure ensures that all changes are replicated and updated on all
members in a cluster.

87) Can this method be used to replicate application data as well?


No, that is not possible in this version of clustering. Only Quorum information is replicated and
maintained in a synchronized state by the clustering infrastructure.

88) Can I convert a standard cluster to an MNS cluster?


Yes. You can use Cluster Administrator to create a new Majority Node Set resource and then, on
the cluster properties sheet Quorum tab, change the quorum to that Majority Node Set resource.

89) What is the difference between a geographically dispersed cluster and an MNS
cluster?
A geographic cluster refers to a cluster that has nodes in multiple locations, while an MNS-based
cluster refers to the type of quorum resources in use. A geographic cluster can use either a
shared disk or MNS quorum resource, while an MNS-based cluster can be located in a single
site, or span multiple sites.

90) What is the maximum number of nodes in an MNS cluster?


Windows Server 2003 supports 8-node clusters for both Enterprise Edition and Datacenter
Edition.

91) Do I need special hardware to use an MNS cluster?


There is nothing inherent in the MNS architecture that requires any special hardware, other than
what is required for a standard cluster (for example, there must be on the Microsoft Cluster HCL).
However, some situations that use an MNS cluster may have unique requirements (such as
geographic clusters), where data must be replicated in real time between sites.

92) Does a cluster aware application need to be rewritten to support MNS?


No, using an MNS quorum requires no change to the application. However, some cluster aware
applications expect a shared disk (for example SQL Server 2000), so while you do not need
shared disks for the quorum, you do need shared disks for the application.
93) Does MNS get rid of the need for shared disks?
It depends on the application. For example, clustered SQL Server 2000 requires shared disk for
data. Remember, MNS only removes the need for a shared disk quorum.

94) What does a failover cluster do in Windows Server 2008 ?


A failover cluster is a group of independent computers that work together to increase the
availability of applications and services. The clustered servers (called nodes) are connected by
physical cables and by software. If one of the cluster nodes fails, another node begins to provide
service (a process known as failover). Users experience a minimum of disruptions in service.

95) What new functionality does failover clustering provide in Windows Server 2008
?
New validation feature. With this feature, you can check that your system, storage, and network
configuration is suitable for a cluster.
Support for GUID partition table (GPT) disks in cluster storage. GPT disks can have partitions
larger than two terabytes and have built-in redundancy in the way partition information is stored,
unlike master boot record (MBR) disks.

96) What happens to a running Cluster if the quorum disk fails in Windows Server 2003
Cluster ?
In Windows Server 2003, the Quorum disk resource is required for the Clusterto function. In your
example, if the Quorum disk suddenly became unavailableto the cluster then both nodes would
immediately fail and not be able torestart the clussvc.
In that light, the Quorum disk was a single point of failure in a MicrosoftCluster implementation.
However, it was usually a fairly quick workaround toget the cluster back up and operational.
There are generally two solutionsto that type of problem.
1. Detemrine why the Quorum disk failed and repair.
2. Reprovision a new LUN, present it to the cluster, assign it a driveletter and format. Then start
one node with the /FQ switch and throughcluadmin designate the new disk resource as the
Quorum. Then stop andrestart the clussvc normally and then bring online the second node.

97) What happens to a running Cluster if the quorum disk fails in Windows Server 2008
Cluster ?
Cluster continue to work but failover will not happen in case of any other failure in the active
node.

98) What is Failover clusters in sql server


As all of us need every service should be 24 into 7 and available every time we need that. So every
services provider need to technically strong. TO overcome this problem new concept comes into
picture that is failover cluster. It is group of independent computers that work together to increase the
availability of applications and services. Here each clustered server connected by cables and by
software. And this clustered server called nodes. If one cluste
r nodes fails then another node begins to work. It is good technique which is not dependent on single
server.

99) What is the standard setting of Lookslive, IsAlive and Pending Timeout?
LooksAlive - 5 sec IsAlive - 30 sec Pending Timeout - 180 sec

Note- Do not modify Pending Timeout. The value, represented in seconds, is the amount of time
the resource in either the Offline Pending or Online Pending states has to resolve its status
before the Cluster Service puts the resource in either Offline or Failed status.

100) Can you change failover policy? If Yes then how?


To configure the failover policy, in the Threshold box, enter the number of times the group is
allowed to fail over within a set span of hours. In the Period box, enter the set span of hours. For
example, if Threshold is set to 10 and Period is set to 6, the Cluster Service fails the group over a
maximum of 10 times in a 6-hour period. At the 11th failover in that 6-hour period, the server
cluster leaves the group offline. This affects only resources that were failed over; therefore, if the
SQL Server resource failed 11 times, it would be left offline, but the IP could be left online.

=========================================================

What is the difference between SQL Server clustering methods: - Active/Active


- Active/Passive
Active/Active means that both nodes are active and accessing the shared disk resources,
but are running independent instances. When a node fails, you need to be sure that the
remaining node has the resources available to handle the additional databases that fail
over. You can think of it like this. Node A has 1 database on it, and Node B has 1
database on it. Node A goes down, the resources fail over to Node B, and now Node B
has 2 databases running on it.
In an Active/Passive cluster, you would only have 1 database running on a single node at
any given time. Node A is active with 1 DB, Node B is passive with no DBs. Node A goes
down, the resources fail over to Node B. Node B is now active with 1 database running
on it.
I'm sure more experienced cluster admins or SQL admins will savage me for my
terminology, but that's it in a nutshell.
FAQ:

What is the isalive & Looks alive


LooksAlive check:
LooksAlive is a basic check in which the Cluster service queries the Windows Service Control
Manager to check if the SQL Server service is still running. By default this check happens every
5 seconds.
Cluster service calls looksAlive function every 5 seconds and LookAlive function Queries the
service status by using the Windows NT Service Control Manager. When the LooksAlive test fails
ISAlive test is called immediately.

ISalive Check: A more rigorous IsAlive function is called every 60 second and monitors the
health of the SQL Server by opening up a connection to SQL Server and issuing select
@@servername query over the connection. If the checks fail the online Thread reports this
failure to the Cluster Service.
During IsAlive check the Cluster Service connects to the SQL Server instance with the help of
c:\windows\system32\sqsrvres.dll and runs SELECT @@SERVERNAME against the instance.

By default, LooksAlive is fired every 5 seconds and IsAlive is fired every 60 seconds. The
LooksAlive and IsAlive polling intervals can be changed in Cluster Administrator or failover
cluster manager from the advanced tab for the SQL Server resource or using
the cluster.execommand prompt utility.

Question: What is meant by Active Passive and Active Active clustering


setup?

An Active Passive cluster is a failover cluster configured in a way that only one cluster
node is active at any given time. The other node, called as Passive node is always online
but in an idle condition, waiting for a failure of the Active Node, upon which the Passive
Node takes over the SQL Server Services and this becomes the Active Node, the
previous Active Node now being a Passive Node.

An Active Active cluster is a failover cluster configured in a way that both the cluster
nodes are active at any given point of time. That is, one Instance of SQL Server is
running on each of the nodes always; when one of the nodes has a failure, both the
Instances run on the only one node until the failed node is brought up (after fixing the
issue that caused the node failure). The instance is then failed over back to its
designated node.

Question: List out some of the requirements to setup a SQL Server failover
cluster.
Virtual network name for the SQL Server, Virtual IP address for SQL Server, IP
addresses for the Public Network and Private Network(also referred as Hearbeat) for
each node in the failover cluster, shared drives for SQL Server Data and Log files,
Quorum Disk and MSDTC Disk.

Question: On a Windows Server 2003 Active Passive failover cluster, how do


you find the node which is active?
Using Cluster Administrator, connect to the cluster and select the SQL Server cluster.
Once you have selected the SQL Server group, in the right hand side of the console,
thecolumn Owner gives us the information of the node on which the SQL Server
group is currently active.
Question: How do you open a Cluster Administrator?
From Start -> Run and type CluAdmin (case insensitive) and the Cluster Administrator
console is displayed OR you can also go to Start -> All programs -> Administrative Tools
-> Cluster Administrator.

1. How will you restart your sqlserver on cluster without failing over ..?
Choose option ( Take offline and Bring online option by right clicking node)

2. What will you if want to add a disk to the SQL Group cluster ..?

Need to choose Add Dependancy option after doing that in Cluster administrator tool (or)
in Failover Cluster admin tool from 2008 version

3. As a DBA how will you design active/active cluster requirement . (i.e), how
will you manage resource if failed over ..?
Please read article from MSDN on this to have better understanding

4. Steps for failover ..?


Please red MSDN on this with full view
5. Difference between SQLSERVER 2005 and SQLSERVER 2008 Cluster
Installation ..?

In sql2005 we have the option of installing sql in remaining nodes from the primary node
., But in sql2008 we need to go seperately(Login to the bith nodes) for installing sql
cluster .

6. What is the status of services on passive node for failover cluster in SQL
server?
SQL services will be in manual and stopped. Cluster service will be in automatic and
started mode on both the nodes.

7. Can you move the resources after pausing the node?


Yes resources can be moved after pausing the node. But we can't move them back till
the node is paused.

8. Where is the prevent failback option?


This is the resource group property. It doesn't allow the resources to move back to the
preferred node once the node is ready to take the connections after failover.

9. How does the failover happen? What checks are performed to ensure that
another node is up?
LooksAlive - The node which host the SQL server resources is verifed whether this node
(server) is up
IsAlive - The node which host the SQL server resources is verifed whether the SQL
service is up or not. Basically running SELECT @@SERVERNAME

10. What will happen if you try to start the fultext service on the passive node.
This can be started on both the nodes as this doesn't have any dependecy on SQL
service or any resource which is possessed by active node.

11. What is Clustering. Briefly define & explain it ?


Clustering is a technology, which is used to provide High Availability for mission critical
applications. We can configure cluster by installing MCS (Microsoft cluster service)
component from Add remove programs, which can only available in Enterprise Edition
and Data center edition.

12. Types of Clusters ?


In Windows we can configure two types of clusters
1. NLB (network load balancing) cluster for balancing load between servers. This cluster
will not provide any high availability. Usually preferable at edge servers like web or
proxy.
2. Server Cluster: This provides High availability by configuring active-active or active-
passive cluster. In 2 node active-passive cluster one node will be active and one node
will be stand by. When active server fails the application will FAILOVER to stand by
server automatically. When the original server backs we need to FAILBACK the
application
13. What is Quorum ? A shared storage need to provide for all servers which keeps
information about clustered application and session state and is useful in FAILOVER
situation. This is very important if Quorum disk fails entire cluster will fails.

14. Why Quorum is necessary ?


When network problems occur, they can interfere with communication between cluster
nodes. A small set of nodes might be able to communicate together across a functioning
part of a network, but might not be able to communicate with a different set of nodes in
another part of the network. This can cause serious issues. In this split situation, at
least one of the sets of nodes must stop running as a cluster.
To prevent the issues that are caused by a split in the cluster, the cluster software
requires that any set of nodes running as a cluster must use a voting algorithm to
determine whether, at a given time, that set has quorum. Because a given cluster has a
specific set of nodes and a specific quorum configuration, the cluster will know how
many votes constitutes a majority (that is, a quorum). If the number drops below the
majority, the cluster stops running. Nodes will still listen for the presence of other nodes,
in case another node appears again on the network, but the nodes will not begin to
function as a cluster until the quorum exists again.
For example, in a five node cluster that is using a node majority, consider what happens
if nodes 1, 2, and 3 can communicate with each other but not with nodes 4 and 5. Nodes
1, 2, and 3 constitute a majority, and they continue running as a cluster. Nodes 4 and 5
are a minority and stop running as a cluster, which prevents the problems of a split
situation. If node 3 loses communication with other nodes, all nodes stop running as a
cluster. However, all functioning nodes will continue to listen for communication, so that
when the network begins working again, the cluster can form and begin to run.

15. Different types of Quorum in Windows server 2008 ?


1.Node Majority - Used when Odd number of nodes are in cluster.
2.Node and Disk Majority - Even number of nodes(but not a multi-site cluster)
3.Node and File Share Majority - Even number of nodes, multi-site cluster
4.Node and File Share Majority - Even number of nodes, no shared storage

16. Different types of Quorum in Windows server 2003 ?


Standard Quorum : As mentioned above, a quorum is simply a configuration database
for MSCS, and is stored in the quorum log file. A standard quorum uses a quorum log file
that is located on a disk hosted on a shared storage interconnect that is accessible by all
members of the cluster.
Standard quorums are available in Windows NT 4.0 Enterprise Edition, Windows 2000
Advanced Server, Windows 2000 Datacenter Server, Windows Server 2003 Enterprise
Edition and Windows Server 2003 Datacenter Edition.
Majority Node Set Quorums : A majority node set (MNS) quorum is a single quorum
resource from a server cluster perspective. However, the data is actually stored by
default on the system disk of each member of the cluster. The MNS resource takes care
to ensure that the cluster configuration data stored on the MNS is kept consistent across
the different disks.
Majority node set quorums are available in Windows Server 2003 Enterprise Edition, and
Windows Server 2003 Datacenter Edition.

17. Explain about each Quorum type ?


Node Majority: Each node that is available and in communication can vote. The cluster
functions only with a majority of the votes, that is, more than half.
Node and Disk Majority: Each node plus a designated disk in the cluster storage (the
disk witness) can vote, whenever they are available and in communication. The cluster
functions only with a majority of the votes, that is, more than half.
Node and File Share Majority: Each node plus a designated file share created by the
administrator (the file share witness) can vote, whenever they are available and in
communication. The cluster functions only with a majority of the votes, that is, more
than half.
No Majority: Disk Only: The cluster has quorum if one node is available and in
communication with a specific disk in the cluster storage.

18. How is the quorum information located on the system disk of each node
kept in synch?
The server cluster infrastructure ensures that all changes are replicated and updated on
all members in a cluster.

19. Can this method be used to replicate application data as well?


No, that is not possible in this version of clustering. Only Quorum information is
replicated and maintained in a synchronized state by the clustering infrastructure.

20. Can I convert a standard cluster to an MNS cluster?


Yes. You can use Cluster Administrator to create a new Majority Node Set resource and
then, on the cluster properties sheet Quorum tab, change the quorum to that Majority
Node Set resource.

21. What is the difference between a geographically dispersed cluster and an


MNS cluster?
A geographic cluster refers to a cluster that has nodes in multiple locations, while an
MNS-based cluster refers to the type of quorum resources in use. A geographic cluster
can use either a shared disk or MNS quorum resource, while an MNS-based cluster can
be located in a single site, or span multiple sites.

22. What is the maximum number of nodes in an MNS cluster?


Windows Server 2003 supports 8-node clusters for both Enterprise Edition and
Datacenter Edition.

23. Do I need special hardware to use an MNS cluster?


There is nothing inherent in the MNS architecture that requires any special hardware,
other than what is required for a standard cluster (for example, there must be on the
Microsoft Cluster HCL). However, some situations that use an MNS cluster may have
unique requirements (such as geographic clusters), where data must be replicated in
real time between sites.

24. Does a cluster aware application need to be rewritten to support MNS?


No, using an MNS quorum requires no change to the application. However, some cluster
aware applications expect a shared disk (for example SQL Server 2000), so while you do
not need shared disks for the quorum, you do need shared disks for the application.

25. Does MNS get rid of the need for shared disks?
It depends on the application. For example, clustered SQL Server 2000 requires shared
disk for data. Remember, MNS only removes the need for a shared disk quorum.

26. What does a failover cluster do in Windows Server 2008 ?


A failover cluster is a group of independent computers that work together to increase the
availability of applications and services. The clustered servers (called nodes) are
connected by physical cables and by software. If one of the cluster nodes fails, another
node begins to provide service (a process known as failover). Users experience a
minimum of disruptions in service.

27. What new functionality does failover clustering provide in Windows Server
2008 ?
New validation feature. With this feature, you can check that your system, storage, and
network configuration is suitable for a cluster.
Support for GUID partition table (GPT) disks in cluster storage. GPT disks can have
partitions larger than two terabytes and have built-in redundancy in the way partition
information is stored, unlike master boot record (MBR) disks.

28. What happens to a running Cluster if the quorum disk fails in Windows
Server 2003 Cluster ?
In Windows Server 2003, the Quorum disk resource is required for the Clusterto
function. In your example, if the Quorum disk suddenly became unavailableto the cluster
then both nodes would immediately fail and not be able torestart the clussvc.
In that light, the Quorum disk was a single point of failure in a MicrosoftCluster
implementation. However, it was usually a fairly quick workaround toget the cluster back
up and operational. There are generally two solutionsto that type of problem.
1. Detemrine why the Quorum disk failed and repair.
2. Reprovision a new LUN, present it to the cluster, assign it a driveletter and format.
Then start one node with the /FQ switch and throughcluadmin designate the new disk
resource as the Quorum. Then stop andrestart the clussvc normally and then bring
online the second node.

29. What happens to a running Cluster if the quorum disk fails in Windows
Server 2008 Cluster ?
Cluster continue to work but failover will not happen in case of any other failure in the
active node.

30. What is Failover clusters in sql server

As all of us need every service should be 24 into 7 and available every time we need
that. So every services provider need to technically strong. TO overcome this problem
new concept comes into picture that is failover cluster. It is group of independent
computers that work together to increase the availability of applications and services.
Here each clustered server connected by cables and by software. And this clustered
server called nodes. If one cluste
r nodes fails then another node begins to work. It is good technique which is not
dependent on single server.

31. What is the standard setting of Lookslive, IsAlive and Pending Timeout?
LooksAlive - 5 sec IsAlive - 30 sec Pending Timeout - 180 sec

Note- Do not modify Pending Timeout. The value, represented in seconds, is the amount
of time the resource in either the Offline Pending or Online Pending states has to resolve
its status before the Cluster Service puts the resource in either Offline or Failed status.

32. Can you change failover policy? If Yes then how?

To configure the failover policy, in the Threshold box, enter the number of times the
group is allowed to fail over within a set span of hours. In the Period box, enter the set
span of hours. For example, if Threshold is set to 10 and Period is set to 6, the Cluster
Service fails the group over a maximum of 10 times in a 6-hour period. At the 11th
failover in that 6-hour period, the server cluster leaves the group offline. This affects
only resources that were failed over; therefore, if the SQL Server resource failed 11
times, it would be left offline, but the IP could be left online.

33. What is the status of the Cluster Service and SQL service on both the
nodes? Would they both were stop on the passive node?
Cluster service is automatic and started mode on all the nodes. But SQL Service will run
only on the active node.
34. Is it possible to put Cluster Group and SQL Group on different nodes?
Yes it is Possible. If you have one group on one node and another group on another
node... that will run.

35. Do you know any kind of limitation for Clustering?


Yes, We cannot do clustering with Windows 2000 Professional or lower server versions.
Clustering is only available on servers running Windows 2000 Advanced Server (which
supports 2-node clusters), Windows 2000 Datacenter Server (which supports up to 4-
node clusters), or Windows 2003 Enterprise Edition and Windows 2003 Datacenter
Server (which support up to 8-node clusters).

36. How does Cluster perform at the time of failover?


Clusters use an algorithm to detect a failure, and use failover policies to determine how
to handle the work from a failed server. These policies also specify how a server is to be
restored to the cluster when it becomes available again.

37. What are all resources controlled by Cluster?


The short list of resources controlled by the cluster will be-
Physical Disks (Q:Quorum disk, E:Shared disks, F:, so on)
Cluster IP Address
Cluster Name (Network Name)
MS DTC
SQL Server Virtual IP Address
SQL Server Virtual Name (Network Name)
SQL Server
SQL Agent
SQL Full Text Service Instance (if installed)

38. How to configure MSDTC as a cluster resource?


Setup DTC using following command
C:\Windows\System32> DTCSetup.exe
OR
From a DOS command prompt, run comclust.exe on node A. This will configure MS DTC
for use with cluster services.
C:\Windows\System32> comclust.exe

39. Whatis isalive and look alive?

A:

Looks Alive check:Looks alive check is a basic resource health check to verify that the service(SQL
service in our context) is running properly.To perform this , cluster service queries the windows
service control manager to check the status of the service.By default looks alive check will happen in
every five seconds.

Is Alive check: An exhaustive check to verify that a resource is running properly. If this check fails,
the resource is moved offline and the failover process is triggered. During the Is alive check the
cluster service connects to the SQL server instance and execute select @@SERVERNAME.It will
check only the SQL server instance availability and does not check the availability of user databases.

You can specify two polling intervals and a timeout value for resources. The polling intervals affect
how often the MSCS Resource Monitor checks that the resource is available and operating. There are
two levels of polling; they are known in Cluster Administrator as "Looks Alive" and "Is Alive." These
values are named for the calls that the Resource Monitor makes to the resource to perform the
polling. In "Looks Alive" polling, MSCS performs a cursory check to determine if the resource is
available and running. In "Is Alive" polling, MSCS performs a more thorough check to determine if the
resource is fully operational. The timeout value specifies how many seconds MSCS waits before it
considers the resource failed.

40. What is Quorum?

A:

Quorum is the cluster's configuration file.This file (quorum.log) resides in the the quorum disk (one
disk from shared disk array).Quorum is the main interpreter between all nodes. It stores latest cluster
configuration and resource data. This helps the other nodes to take ownership when one node goes
down.

Q. What is the maximum limit of SQL Server instances for a standalone


computer? (2008 R2)
Ans:
50 instances on a stand-alone server for all SQL Server editions. SQL Server
supports 25 instances on a failover cluster.

Q. What is the cluster node limitation?


Ans:
The number of allowable nodes in the SQL Server cluster depends on your SQL
Server version and your Windows Server version. For SQL Server 2008 Standard
edition, you can only have two cluster nodes. If you have SQL Server Enterprise,
the limit depends on your Windows Server version, 8 cluster nodes for 2003 and 16
nodes for 2008.

Q. Can we install SQL Server using a configure file?


Ans:
Yes! We can prepare a configuration file. While installing SQL Server the path to
the configuration file is specified in the Ready to Install page in the
configuration file path section. Cancel the setup without actually completing the
installation, to generate the INI file.
File Location and Name:

%programfiles%\Microsoft SQL Server\110\Setup


Bootstrap\Log\<YYYYMMDD_HHMM>\ConfigurationFile.ini.

Q. How to install a SQL Server using configuration file?


Ans:
From Command prompt locate the setup.exe file location and can install using
config file.

Setup.exe /ConfigurationFile=MyConfigurationFile.INI
Instead of specifying passwords inside the config file specify them explicitly as
below.
Setup.exe /SQLSVCPASSWORD=************ /AGTSVCPASSWORD=************
/ASSVCPASSWORD=************ /ISSVCPASSWORD=************
/RSSVCPASSWORD=************ /ConfigurationFile=MyConfigurationFile.INI
Q. What are the top performance counters to be monitor in Performance
Monitor?
Ans:
Processor\%Processor Time: Monitoring CPU consumption allows you to check for
a bottleneck on the server (indicated by high sustained usage).
High percentage of Signal Wait: Signal wait is the time a worker spends waiting
for CPU time after it has finished waiting on something else (such as a lock, a latch
or some other wait). Time spent waiting on the CPU is indicative of a CPU
bottleneck. Signal wait can be found by executing DBCC SQLPERF (waitstats) on
SQL Server 2000 or by querying sys.dm_os_wait_stats on SQL Server 2005.
Physical Disk\Avg. Disk Queue Length: Check for disk bottlenecks: if the value
exceeds 2 then it is likely that a disk bottleneck exists.
MSSQL$Instance: Buffer Manager\Page Life Expectancy: Page Life Expectancy is
the number of seconds a page stays in the buffer cache. A low number indicates
that pages are being evicted without spending much time in the cache, which
reduces the effectiveness of the cache.
MSSQL$Instance: Plan Cache\Cache Hit Ratio: A low Plan Cache hit ratio means
that plans are not being reused.
MSSQL$Instance:General Statistics\Processes Blocked: Long blocks indicate
contention for resources.
Q. Task manager is not showing the correct memory usage by SQL Server. How
to identify the exact memory usage from SQL Server?
Ans:
To know the exact memory usage relay on column physical_memory_in_use_kb
from DMV sys.dm_os_process_memory.

Using performance counters also we can find the usage.

Performance object: Process

Counter: Private Bytes

Instance: sqlservr

Performance object: Process

Counter: Working Set

Instance: sqlservr
The Private Bytes counter measures the memory that is currently committed. The
Working Set counter measures the physical memory that is currently occupied by
the process.

For 64-bit sql servers we can also check the current memory usage using the below
performance counter.

Performance object: SQL Server:Memory Manager

Counter: Total Server Memory (KB)

Q. What is the option Lock Pages in Memory?


Ans:
Lock Pages in Memory is a setting that can be set on 64-bit operating systems that
essentially tell Windows not to swap out SQL Server memory to disk. By default,
this setting is turned off on 64-bit systems, but depends on various conditions this
option needs to be turned on.

We must be very careful in dealing with this option. One can enable this after a
detailed analysis of current environment.

Following issues may rise when Lock Pages in Memory is not turned on:

SQL Server performance suddenly decreases.


Application that connects to SQL Server may encounter timeouts.
The hardware running SQL Server may not respond for a short time periods.

Q. How do you know how much memory has been allocated to sql server using
AWE?
Ans:
We can use DBCC MEMORYSTSTUS command to know the memory allocation
information. But its trick to understand the results.

We can use a DMV called sys.DM_OS_Memory_Clerks. Sample query to calculate


total AWE memory allocated is SELECT SUM(awe_allocated_kb) FROM
sys.dm_os_memory_clerks

From 2008 onwards we can get all memory related information using DMV
sys.dm_os_process_memory.

Q. How to apply service pack on Active / Passive cluster on 2008 and 2012?
Ans:
1. Freeze the service groups on Node A (active node).
2. Confirm all SQL services are stopped on Node B.

3. Upgrade the SQL Server 2008 instance on Node B.

4. Reboot node B.

5. Unfreeze the service group on node A.

6. Fail over the service group to Node B.

7. After the service group comes online, freeze the service group on Node B.

8. Confirm all SQL services are stopped on Node A.

9. Upgrade the SQL Server 2008 instance on Node A.

10. Reboot Node A.

11. Unfreeze the service group on node B.

12. Fail back the service group to Node A.

Q. How to apply a SP on SQL Server 2005 Active / Passive cluster?


Ans:
1. Login to the Console on the target node

a. RDP to the console is ok, but a standard RDP connection is not recommended.

2. Copy the Service Pack to a local drive on the target node

3. Move all instances to the target node

a. You can only install on the Active Node.

4. Move the Cluster Resource to the target node

5. Move the MSDTC Resource to the target node

6. Verify all users are logged out from all other nodes (RDP and Console sessions)

7. Start the Service Pack install

a. Use a domain account with admin rights to all servers.


b. Ignore locked files

8. Reboot current server

a. You should not need to perform the install on any other nodes, nor reboot them.
The service pack will update the passive nodes first.

Q. You find SP is not applied on all the nodes across the cluster. How to apply
SP only on required nodes?
Ans:
If you find that the product level is not consistent across all the nodes, you will
need to fool the 2005 patch installer into only patching the nodes that need
updating. To do so, you will have to perform the following steps:

1. Fail Instance, Cluster, and MSDTC groups to an unpatched node


2. Remove any successfully patched nodes from failover candidates of the SQL
Server Service of the instance group (do this using Cluster Admin tool)
3. Run the patch
4. After the patch installs successfully, add the Nodes removed in Step 2 back to
the SQL Server Service of the Instance group
Why do you need to do this? Well when the patch installer determines that not all
nodes in the cluster are at the same patch level, a passive node operation will fail
and will prevent you from moving forward with any further patching.

Q. How to change the sql server service account in a cluster environment?


Ans:
Method 1: (No failover required)
1. Freeze the service group on active node from cluster administrator and then
restart the service.

Method2:
1. Offline the SQL resources

2. Update the service account at SSCM and restart the service as needed

3. Add the SQL resources back to online

Note: Dont forget to update service account at the remaining nodes on the
cluster.

Method 3:
1. Node 2 (inactive node) change the SQL startup account in SQL Studio or SCM

2. Fail over the SQL service group from node 1 to node 2.


3. Node 1 (now the inactive node) change the SQL startup account in SQL Studio or
SCM

Q. How to apply service pack on Active / Active cluster Nodes?


Ans:
1. Make a note of all node names (and/or IP addresses), SQL Server virtual names
along with preferred nodes. If there are more than three nodes you may need to
also take note of possible owners for each SQL resource group. For my example
assume that I have a cluster with node1 and node2, SQL1 normally lives on node1
and SQL2 normally lives on node2.

2. To start with a clean slate and ensure any previous updates are completed both
nodes should be restarted if possible. Choose the physical node that you you want
to patch second and restart that node (in my example node2).

3. Restart the node you want to patch first (node1). This will mean that both
active SQL instances are now running on node2. Some restarts will be essential,
but you could avoid the first two restarts if you need to keep downtime to a
minimum and just fail SQL1 over to node2. The main point here is to always patch
a passive node.

4. In cluster administrator remove node1 from the possible owners lists of SQL1
and SQL2. This means that neither SQL instance can fail over to node1 while it is
being patched.

5. Run the service pack executable on node1.

6. Restart node1.

7. Add node1 back into the possible owners lists of SQL1 and SQL2 and fail both
instances over to node1.

8. Repeat steps 4 6 on node2.

9. Add node2 back into the possible owners lists of SQL1 and SQL2 and fail both
instances over to node2. Check that the build level is correct and review the SQL
Server error logs.

10. Fail SQL1 over to node1. Check build levels and SQL Server error logs

Q. What are the main events and columns helpful in troubleshooting


performance issues using profiler?
Ans:
Events:
Event Group: Performance
Event: ShowPlan_ALL (BinaryData column must be selected)
Event: ShowPlan_XML
Event Group: T-SQL
Event: SQL:BatchStarted
Event: SQL:BatchCompleted
Event Group: Stored Procedures
Event: RPC:Completed
Event Group: Locks
Event: Lock: Deadlock Graph
Event: Lock: Lock Deadlock Chain (Series of events that leaads to a deadlock)
Event Group: Sessions
Event: Existing Connection
Event Group: Security Audit
Event: Audit Login
Event: Audit Log Out
Columns:
Below are the most common columns that help us in understanding the trace file
to troubleshoot the problems.

TextData

ApplicationName

NTUserName

LoginName

CPU

Reads

Writes

Duration

SPID

StartTime

EndTime

Database Name

Error

HostName
LinkedServerName

NTDomainName

ServerName

SQLHandle

All these columns need not be available for all of the events, but depends on the
event select we have to choose the appropriate columns.

Filters:
ApplicationName

DatabaseName

DBUserName

Error

HostName

NTUserName

NTDomainName

Q. What are the agents in replication?


Ans:
Snapshot Agent: Copy Schema+Data to snapshot folder on distributer. Used in all
types of replication.
Log reader Agent: Sends transactions from Publisher to Distributor. Used in
transactional replication
Distribution Agent: Applies Snapshots / Transactions to all subscribers runs at
distributer in PUSH and Runs at Subscriber in PULL. Used in transactional and
transactional with updatable subscriptions.
Queue reader Agent: Runs at distributer send back transactions from subscriber to
publisher. Used in Transactional With updatable subscriptions.
Merge Agent: Applies initial snapshot to subscribers, from the next time
synchronize by resolving
the conflicts.

Q. Can we configure log shipping in replicated database?


Ans: Yes
Replication does not continue after a log shipping failover. If a failover occurs,
replication agents do not connect to the secondary, so transactions are not
replicated to Subscribers. If a failback to the primary occurs, replication resumes.
All transactions that log shipping copies from the secondary back to the primary
are replicated to Subscribers.

For transactional replication, the behavior of log shipping depends on the sync
with backup option. This option can be set on the publication database and
distribution database; in log shipping for the Publisher, only the setting on the
publication database is relevant.
Setting this option on the publication database ensures that transactions are not
delivered to the distribution database until they are backed up at the publication
database. The last publication database backup can then be restored at the
secondary server without any possibility of the distribution database having
transactions that the restored publication database does not have. This option
guarantees that if the Publisher fails over to a secondary server, consistency is
maintained between the Publisher, Distributor, and Subscribers. Latency and
throughput are affected because transactions cannot be delivered to the
distribution database until they have been backed up at the Publisher.

Q. What are the best RAID levels to use with SQL Server?
Ans:
Before choosing the RAID (Redundant Array of Independent Disks) we should have a
look into usage of SQL Server files.

As a basic thumb rule Data Files need random access, Log files need
sequential access and TempDB must be on a fastest drive and must be separated
from data and log files.

We have to consider the below factors while choosing the RAID level:

Reliability

Storage Efficiency

Random Read

Random Write

Sequential Write

Sequential Write

Cost.

As an Admin we have to consider all of these parameters in choosing the proper


RAID level. Obviously the choice is always between RAID-5 and RAID-10

Q. How to monitor latency in replication?


Ans:
There are three methods.

1. Replication monitor
2. Replication commands
3. Tracer Tokens
1. Replication Monitor: In replication monitor from the list of all subscriptions just
double click on the desired subscription. There we find three tabs.
Publisher to Distributor History
Distributor to Subscriber History
Undistributed commands
2. Replication Commands:
Publisher.SP_ReplTran: Checks the pending transactions at p
Distributor.MSReplCommands and MSReplTransactions: Gives the transactions
and commands details. Actual T_SQL data is in binary format. From the entry time
we can estimate the latency.
Distributor.SP_BrowseReplCmds: It shows the eaxct_seqno along with the
corresponding T-SQL command
sp_replmonitorsubscriptionpendingcmds: It shows the total number of pending
commands to be applied at subscriber along with the estimated time.
3. Tracer Tokens:
Available from Replication Monitor or via TSQL statements, Tracer Tokens are
special timestamp transactions written to the Publishers Transaction Log and
picked up by the Log Reader. They are then read by the Distribution Agent and
written to the Subscriber. Timestamps for each step are recorded in tracking
tables in the Distribution Database and can be displayed in Replication Monitor or
via TSQL statements.

When Log Reader picks up Token it records time in MStracer_tokens table in the
Distribution database. The Distribution Agent then picks up the Token and records
Subscriber(s) write time in the MStracer_history tables also in the Distribution
database.

Below is the T-SQL code to use Tracer tokens to troubleshoot the latency issues.

A SQL Agent JOB to insert a new Tracer Token in the publication database.

USE [AdventureWorks]

Go

EXEC sys.sp_posttracertoken @publication = <PublicationName>

Go

Token Tracking Tables


USE Distribution

Go

publisher_commit

SELECT Top 20 * FROM MStracer_tokens Order by tracer_id desc

subscriber_commit

SELECT Top 20 * FROM MStracer_history Order by parent_tracer_id desc

Q. Can we perform a tail log backup if .mdf file is corrupted?


Ans:
Yes we can perform a tail log as long as the ldf if not corrupted and no bulk logged
changes.

A typical tail log backup is having two options, 1. WITH NORECOVERY 2.Continue
After Error.

1. WITH NORECOVERY: To make sure no transactions happens after the tal log
backup

2. CONTINUE AFTER ERROR: Just to make sure log backup happens even though
some meta data pages corrupted.

Q. Lets say we have a situation. We are restoring a database from a full


backup. The restore operation ran for 2 hours and failed with an error 9002
(Insufficient logspace). And the database went to suspect mode. How do you
troubleshoot this issue?
Ans:
In that case we can actually add a new log file on other drive and rerun the restore
operation using the system stored procedure
sp_add_log_file_recover_suspect_db. Parameters are the same as while
creating a new log file.
Q. Lets say we have a situation. We are restoring a database from a full
backup. The restores operation runs for 2 hours and failed with an error 1105
(Insufficient space on the file group). And the database went to suspect mode.
How do you troubleshoot this issue?
Ans:
In that case we can actually add a new data file on another drive and rerun the
restore operation using the system stored procedure
sp_add_data_file_recover_suspect_db. Parameters are the same as while
creating a new data file.
Q. Can you describe factors that causes the logfile grow?
Ans:
CHECKPOINT has not occurred since last log truncation
No log backup happens since last full backup when database is in full recovery
An active BACKUP or RESTORE operation is running from long back
Long running active transactions
Database mirroring is paused or mode is in high performance
In replication publisher transactions are not yet delivered to distributer
Huge number of database snapshots is being created
Q. How do you troubleshoot a Full transaction log issue?
Ans:
Columns log_reuse_wait and log_reuse_wait_desc of the sys.databases catalog
view describes what is the actual problem that causes log full / delay truncation.
Backing up the log.
Freeing disk space so that the log can automatically grow.
Moving the log file to a disk drive with sufficient space.
Increasing the size of a log file.
Adding a log file on a different disk.
Completing or killing a long-running transaction.
http://msdn.microsoft.com/en-us/library/ms345414.aspx
Q. Does Truncate works in transactional replication?
Ans:
No! As per MSDN blogs information we cant use TRUNCATE on published database
against the published article instead we have to use DELETE without where
clause.

Q. Consider a situation where publisher database log file has been increasing
and there there is just few MB available on disk. As an experienced professional
how do you react to this situation? Remember no disk space available and also
we cant create a new log file on other drive
Ans:
Essentially we have to identify the bottleneck which is filling the log file.

As a quick resolution check all possible solutions as below:

Resolve if there are any errors in log reader agent / distribution agent
Fix if there are any connectivity issues either between publisher distributor or
distributor
Fix if there are any issues with I/O at any level
Check if there is any huge number of transactions pending from publisher
Check if there are any large number of VLFs (USE DBCC Loginfo)which slows
the logreader agent work.
Check all database statistics are up-to-date at distributer. Usually we do siwtch
off this Auto Update Stats by default.
To find and resolve these issues we can use Replication Monitor, DBCC
Commands, SQL Profiler, System Tables / SP / Function.
If incase we cant resolve just by providing a simple solution we have to shrink the
transaction log file. Below are two methods.
To shrink the transaction log file:
1. Backup the log So transactions in vlfs are marked as inactive

2. Shrink the logfile using DBCC SHRINKFILE Inactive VLFs would be removed

3. If you find no difference in size repeat the above steps 1 and 2

To truncate the transaction log file:


In any case we are not able to provide the solution against the increasing logfile
the final solution is disable the replication, truncate the log and reinitialize the
subscribers.

1. Disable replication jobs

2. Execute SP_ReplDone procedure. It disable the replication and mark as


Replicate done for all pending transactions at publisher.

3. Backup the transaction log WITH TRUNCATE option.

4. Shrink the log file using DBCC SHRINKFILE

5. Flues the article cache using sp_replflush.

6. Go to distributor database and truncate the table MSRepl_Commands

7. Connect to replication monitor and reinitialize all subscriptions by generating a


new snapshot.

8. Enable all replication related jobs.

Q. Can we add an article to the existing publication without generating a


snapshot with all articles?
Ans:
Yes! We can do that. Follow the below steps to publish a new article to the
existing publication.

There are two parameters that we need to change to False. 1. Immediate Sync
and 2. Allow_Ananymous.

Both the fields were set to ON by default. If the Immediate_sync is enabled every
time you add a new article it will cause the entire snapshot to be applied and not
the one for the particular article alone.

Steps:
1. Change the values to True for publication properties Immediate_Sync and
Allow_Anonymous using SP_CHANGEPUBLICATION

2. Add a new article to the publication using SP_AddArticle. While executing this
procedure along with the required parameters also specify the parameter
@force_invalidate_snapshot=1.

3. Add the subscriptions to the publication for the single table/article uisng
SP_ADDSUBSCRIPTION. While executing this proc specify the parameter
@Reserved = Internal. Generate a new snapshot which only includes newly added
article.

Q. How MAXDOP impacts SQL Server?


Ans:
The Microsoft SQL Server max degree of parallelism (MAXDOP) configuration option
controls the number of processors that are used for the execution of a query in a
parallel plan. This option determines the computing and threads resources that are
used for the query plan operators that perform the work in parallel.

For servers that use more than eight processors, use the following configuration:

MAXDOP=8

For servers that use eight or fewer processors, use the following configuration:

MAXDOP=0 to N
Q. How distributed transactions works in SQL Server?
Ans:
Distributed transactions are the transactions that worked across the databases,
instances in the given session. Snapshot isolation level does not support distributed
transactions.

We can explicitly start a distributed transaction using BEGIN DISTRIBUTED


TRANSACTION <TranName>

For example, if BEGIN DISTRIBUTED TRANSACTION is issued on ServerA, the session


calls a stored procedure on ServerB and another stored procedure on ServerC. The
stored procedure on ServerC executes a distributed query against ServerD, and
then all four computers are involved in the distributed transaction. The instance of
the Database Engine on ServerA is the originating controlling instance for the
transaction.

When a distributed query is executed in a local transaction, the transaction is


automatically promoted to a distributed transaction if the target OLE DB data
source supports ITransactionLocal. If the target OLE DB data source does not
support ITransactionLocal, only read-only operations are allowed in the
distributed query.
In order to work with these transactions, make sure below settings are done.

1. MSDTC must be running on all supported instances

2. Choose the option No authentigation required from MSDTC properties

3. Turn on random options at linked server properties like RPC, RPC Out,
Data Access etc.

Q. Can you give some examples for One to One, One to Many and Many to Many
relationships?
Ans:
One to One: Citizen UID
A citizen can have only one UID A UID can represent only one citizen

One to Many: Customer Products


A customer can sale number of products A product can be brought by only one
customer

Many to Many: Book Author


A book can be written by more than one author An author can write more than
one book

Q. What are the phases of sql server database restore process?


Ans:
1. Copy Data: Copies all data,log and index pages from backup file to database
mdf, ndf and ldf files

2. REDO: Rollfoward all committed transactions to database and if it finds any


uncommitted transactions it goes to the final phase UNDO.

3. UNDO: Rollback any uncommitted transactions and make database available to


users.

Q. I wanted to know what are the maximum worker threads setting and active
worker thread count on sql server. Can you tell me how to capture this info?
Whats the default value for max thread count?
Ans:
We can check the current settings and thread allocation using the below queries.

Thread setting

select max_workers_count from sys.dm_os_sys_info


Active threads

select count(*) from sys.dm_os_threads

Default value is 255.

Increasing the number of worker threads may actually decrease the performance
because too many threads causes context switching which could take so much of
the resources that the OS starts to degrade in overall performance.

Q. Can you explain sql server transaction log architecture?


Ans:
We need to spend some time on this as every SQL DBA must aware of this concept.
http://www.sqlservercentral.com/articles/Stairway+Series/73775/
Q. See I have an environment, Sunday night full backup, everyday night diff
backup and every 45 min a transactional backup. Disaster happened at 2:30 PM
on Saturday. You suddenly found that the last Sunday backup has been
corrupted. Whats your recovery plan?
Ans:
When you find that the last full backup is corrupted or otherwise unrestorable,
making all differentials after that point useless. You then need to go back a
further week to the previous full backup (taken 13 days ago), and restore that,
plus the differential from 8 days ago, and the subsequent 8 days of transaction logs
(assuming none of those ended up corrupted!).
If youre taking daily full backups, a corrupted full backup only introduce an
additional 24 hours of logs to restore.

Alternatively, a log shipped copy of the database could save your bacon (you have
a warm standby, and you know the log backups are definitely good).

Q. Full backup size is 300 GB, usually my diff backup size varies between 300
MB and 5 GB, one day unfortunately diff backup size was increased to 250 GB?
What might be the reason any idea?
Ans:
Are you the kind of DBA who rebuilds all indexes nightly? Your differential backups
can easily be nearly as large as your full backup. That means youre taking up
nearly twice the space just to store the backups, and even worse, youre talking
about twice the time to restore the database.

To avoid these issues with diff backups , ideally schedule the index maintenance to
happen right before the full backup.
Q. What is .TUF file? What is the significance of the same? Any implications if
the file is deleted?
Ans:
.TUF file is the Transaction Undo File, which is created when performing log
shipping to a server in Standby mode.

When the database is in Standby mode the database recovery is done when the log
is restored; and this mode also creates a file on destination server with .TUF
extension which is the transaction undo file.

This file contains information on all the modifications performed at the time
backup is taken.

The file plays a important role in Standby mode the reason being very obvious
while restoring the log backup all uncommited transactions are recorded to the
undo file with only commited transactions written to disk which enables the users
to read the database. So when we restore next transaction log backup; SQL server
will fetch all the uncommited transactions from undo file and check with the new
transaction log backup whether commited or not.

If found to be commited the transactions will be written to disk else it will be


stored in undo file until it gets commited or rolledback.

If .tuf file is got deleted there is no way to repair logshipping except reconfiguring
it from scratch.

Você também pode gostar