Tuesday, 31 January 2012

"Microsoft Cluster Service (MSCS) cluster verification errors" failed.

One of my friend received the below shown error during the add node installation of SQL Server 2008 on a Windows Server 2008 machine.

Solution: If we are sure that the cluster verification doesn't have any issue, we can complete the installation using the below commands.


For an integrated failover Add-Note setup, run the following command on each node that is being added:
Setup /SkipRules=Cluster_VerifyForErrors /Action=InstallFailoverCluster
For an advanced or enterprise installation, run the following command:
Setup /SkipRules=Cluster_VerifyForErrors /Action=CompleteFailoverCluster
If you receive this validation failure when you add a node to an existing failover installation, run the following command on each node that is being added: 
Setup /SkipRules=Cluster_VerifyForErrors /Action=AddNode




    Friday, 27 January 2012

    Table Diff to identify data mismatch.


    1) Run the below query in Publisher.
    2) Paste the output in Command Prompt.
    3) See the output file for the mismatch.


    Declare @sourceserver nvarchar(100) = '<Publisher Server>'
    Declare @destinationserver nvarchar(100) = '<Subscriber Server>'

    select '"C:\Program Files\Microsoft SQL Server\100\COM\tablediff.exe" -sourceserver [' + @sourceserver +
    '] -sourcedatabase [BCP_Tran] -sourcetable [' + name +'] -sourceschema [' + SCHEMA_NAME(schema_id ) +
    '] -sourcelocked [TABLOCK] -destinationserver [' + @destinationserver + '] -destinationdatabase [BCP_Tran] -destinationtable [' + name +
    '] -destinationschema ['+ SCHEMA_NAME(schema_id )  +'] -destinationlocked [TABLOCK] -f c:\TableDiff_' + name+ '.sql'
          from  sys.tables 
          where type_desc = 'USER_TABLE' and is_published=1
          

    Tuesday, 24 January 2012

    SQL Server 2008 Cluster Collation Change


    1. First make sure you have all the database backups including system            database.
    2. Generate scripts for all the logins, Linked Servers, Server Triggers etc.
    3. Generate scripts for all the Jobs exist on server.
    4. Reset the SA password if you don’t know. And save it to safe place.
    5. To change the collation for SQL Server 2008, If we are changing from same node, First we need to take resources offline (SQL Server, SQL Agent, Fulltextsearch) and run the below syntax on command prompt from SQL Server Setup directory.




    C:\SQL>Setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENA
    ME=INST1 /SQLSYSADMINACCOUNTS="Domain\Account" /SAPWD=<SA Password> /SQLCOLLATION=<New Collation>

    Cross Domain Transactional Replication

    We had the below error in my environment during cross domain pull transactional replication. To resolve this we have the below two options.

    First Method
    1) Generate the snapshot and manually copy the same to subscriber.
    2) Change the Snapshot Location in the subscriber properties. Since the snapshot location is local, it will apply the same very fast.
    Second Method
    1) Keep the replication as it is.
    2) Generate the BCP out of the articles.
         bcp BCP_Tran.dbo.Test out c:\Test.dat -c -U sa -P <Pword>-S <Srvr Name>
    3) Apply the BCP file to the subscriber.
         bcp BCP_Tran.dbo.TestNew in c:\Test.dat -T -c -S <Server Name>


    Saturday, 12 November 2011

    The SQL Server failover cluster instance name 'INST3' already exists as a clustered resource. Specify a different failover cluster instance name.

    I got the below mentioned error while installing sql server 2008 failover cluster.


    The SQL Server failover cluster instance name 'INST3' already exists as a clustered resource. Specify a different failover cluster instance name.


    Resolution


    1) Run Cluster Res in the command prompt. Get the orphaned resource from  
        the  list.
    2) Delete the orphaned user using the below command.
            cluster RES "<Resource Name>" /Delete
    3) Continue the installation after this.


             

    Friday, 4 November 2011

    SQL Server 2008 Cluster Add Node Installation Error - SKU is Invalid


    I got the below error while adding node to the Second Instance of my SQL Server 2008 Cluster.


    Solution

    1) Open DefaultSetup file inside corresponding folder ( X64 for 64 bit processor, X86 for 32 bit).
    2) Remove or Comment the PID line.
    3) During the Installation give the product key manually.

    Tuesday, 1 November 2011

    SQL Server 2005 Cluster Error - Error: 422


    One of my friend got the below error in our SQL Server 2005 environment.


    000016bc.000009f4::2011/03/02-00:46:48.840 ERR  SQL Server <SQL Server (DWHCI01)>: [sqsrvres] StartResourceService: StartService (MSSQL$DB1) failed.  Error: 422
    000016bc.000009f4::2011/03/02-00:46:48.840 ERR  SQL Server <SQL Server (DWHCI01)>: [sqsrvres] OnlineThread: ResUtilsStartResourceService failed (status 422)
    000016bc.000009f4::2011/03/02-00:46:48.840 ERR  SQL Server <SQL Server (DWHCI01)>: [sqsrvres] OnlineThread: Error 422 bringing resource online
    Application logs is showing similar errors.


    Resolution
    Found that SQL Server service is in Disabled status. Made the same to Manual and bring the resource online.