Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Wednesday, January 15, 2014

Configure SQL after change computer name

After changing the computer name for a machine that has a SQL installed there is some additional step required:
1- select @@servername 
     > to view the current server name
2- sp_dropserver "Old_Server_Name" 
     > to remove the old server name
3-  sp_addserver "New_Server_Name", local 
      > to add the new server name

Monday, September 26, 2011

Create Script to Copy Database Schema

How to Create Script to Copy Database Schema "SQL Server 2005"

Open Microsoft SQL Server Management Studio
Expand Databases > Highlight the target database thne Right click on it > Task > Generate Scripts
Follow the instruction to generate the script.

Sunday, September 25, 2011

How to install Failover Clustering and prepare it for SQL Server

How to install Failover Clustering and prepare it for SQL Server:

Prerequisites:
Storage:
Storage Area Network (SAN)
RAID Configuration:
Supports RAID 10 (1+0) for data files and RAID 1 (mirror) for log files.
Network Controller:
Two network cards.
Software:
Windows 2003 R2/2008 SP2/2008 R2 Server (Enterprise or datacenter edition).
SQL Server 2005 / 2008 / 2008 R2 (standard or enterprise edition) with the latest service pack.

Note: standard Editions support only Two Nodes.
Connect iSCSI Disks:

Start iSCSI Initiator > Quick Connect > Enter IP Address or DNS name of target then click Quick Connect then Connect.


In this topic you will find "How to configure a virtual SAN with StarWind Software": Click Here.

2. Add Feature (Failover Clustering):

Server Manager > Right click “Feature” > click Add Feature > Choose Failover Clustering > Click Next and Install.



3. Validate and Create Cluster:

Administrative Tools > Failover Cluster Manager.







a. Run validation tests to determine whether this configuration of servers and attached storage is set up correctly to support failover. And add the name or IP of servers that going to be member of this cluster then click Next then Choose “Run all tests”.



b. If the testing has completed successfully Click Finish and then Click “Create a Cluster” and again add the name or IP of servers that going to be member of this cluster, The name of the cluster and IP address that is not automatically supplied by your DHCP settings.




4. Configure the Cluster:

a. Configure Quorum Sittings:







Choose “Node and Disk Majority” to set your quorum sittings with disk witness or choose “Node and File share Majority” to set your quorum sittings with file share witness.






b. Configure Distributed Transaction Coordinator (DTC):





c. Choose Configure Distributed Transaction Coordinator (DTC) then click Next > and on Client Access Point box type Name and IP address that is not automatically supplied by your DHCP settings.



Now the Cluster must be ready to start installing SQL Server Failover Cluster.