• Microsoft SQL Server

    Which logs do I have to collect when I am victim of an unexpected failover?

    • 0 Comments



    Cluster failover SQL : Which Service log do I have to collect when I am victim of an unexpected failover?

    Several of my customers uses to ask me : "what kind of information they have collect to make a root cause analysis of the unexpected failover on their SQL Server 2005/2008 failover cluster instance on their Windows 2008? "

    You could find below 2 methods:


    Method 1: This method is the best one to be ensured to get all information that we need for an RCA. Just run the MPS Report tool. it will take a snapshot of all your logs.

    http://www.microsoft.com/downloads/details.aspx?FamilyId=CEBF3C7C-7CA5-408F-88B7-F9C79B7306C0&displaylang=en 
    Use administrator account
    Please, when you run MPS Report, be ensure that the checkbox below are checked:
    -              General
    -              Internet and Networking
    -              Server component
    -              SQL and other Data Stores (MDAC)


    Method 2: You can collect the 5 most important logs by using the command below:

    Cluster info:

    @ECHO OFF
    ECHO %DATE% > C:\temp\clusterinfo.output.txt
    ECHO %TIME% >> C:\temp\clusterinfo.output.txt
    CLUSTER /QUORUM >> C:\temp\clusterinfo.output.txt
    CLUSTER RES >> C:\temp\clusterinfo.output.txt
    CLUSTER RES /PROP >> C:\temp\clusterinfo.output.txt

    Cluster log:

    CLUSTER /CLUSTER:cluster_name LOG /GENERATE /COPY:”c:\temp”

    Event windows:

    Step 1: Start >> Administration tools >> Event viewer

    Step 2: On Application et System save as in .CVS

    Step 3: Also observe the cluster Operational log – Microsoft >> Windows >>FailoverClustering Operational.


     

    Michel Degremont| Microsoft EMEA
    Product Support Services Developer -SQL Server Core Engineer |
  • Microsoft SQL Server

    How to install SQL Server 2008 32Bit on Windows 2008 X64

    • 5 Comments


    How install SQL Server 2008 32Bit on Windows 2008 X64

    In a specific case, you have to install SQL Server 2008 32Bit (X86) on Windows 2008 X64. It can be due to the provider of your end application who supports only on a SQL 32Bit his application.

    If you want to install SQL server 2008 from the command prompt, you can specify that Setup should install into WOW64 by adding the parameter X86="True". This command line argument is not supported on an IA64 or a 32-bit system.

    How to: Install SQL Server 2008 from the Command Prompt
    http://msdn.microsoft.com/en-us/library/ms144259.aspx

    If you want to run the setup by using the wizard, you can also specify the architecture of SQL Server 2008 to install. You can choose between X86(32bit) and X64 in the tab "Options".


    How to install SQL server 2008 32Bit on Windows 2008 X64

    Michel Degremont| Microsoft EMEA
    Product Support Services Developer -SQL Server Core Engineer |
  • Microsoft SQL Server

    Determining SQL Server Table Size

    • 0 Comments



    Determining SQL Server Table Size

    There a few days, I had to identify areas of my database that were taking up the most physical storage space.

    The process that the stored procedure goes through is very simple. I create a temporary table to store the individual data elements for each table.

    The Script has been tested and used on a SQL Server 2005 and 2008 instance to display the sizes of SQL Server's Database's Tables.


    CREATE PROCEDURE getAllTablesSize

    AS

    BEGIN

          DBCC UPDATEUSAGE (0) WITH NO_INFOMSGS;

          CREATE TABLE

                #temp (

                      [name] varchar(250),

                      [rows] varchar(50),

                      [reserved] varchar(50),

                      [data] varchar(50),

                      [index_size] varchar(50),

                      [unused] varchar(50)

                      );

          INSERT #temp EXEC ('sp_msforeachtable ''sp_spaceused ''''?''''''');

          UPDATE

                #temp

          SET

                [rows] = LTRIM(RTRIM(REPLACE(t.rows,'KB',''))),

                [reserved] = LTRIM(RTRIM(REPLACE(t.reserved,'KB',''))),

                [data] = LTRIM(RTRIM(REPLACE(t.data,'KB',''))),

                [index_size] = LTRIM(RTRIM(REPLACE(t.index_size,'KB',''))),

                [unused] = LTRIM(RTRIM(REPLACE(t.unused,'KB','')))

          FROM #temp AS t

          SELECT

                SUM(CAST([reserved] as decimal))/1024 AS 'Total reserved MB',

                SUM(CAST([data] as decimal))/1024 AS 'Total data MB',

                SUM(CAST([index_size] as decimal))/1024 AS 'Total index_size MB',

                SUM(CAST([unused] as decimal))/1024 AS 'Total unused MB'

          FROM

                #temp

          SELECT

                [name] ,

                CAST([rows] as INT)'rows' ,CAST([reserved] as INT)/1024 'reserved MB',

                CAST([data] as INT)/1024 'data MB' ,

                CAST([index_size]/1024 as INT)'index_size MB',

                CAST([unused] as INT)/1024 'unused MB'

          FROM

                #temp

          ORDER BY

                CAST(reserved as INT) DESC

          DROP  TABLE #temp;

          -- rows : Number of rows existing in the table. If the object specified is a Service Broker queue, this column indicates the number of messages in the queue.

          -- reserved : Total amount of reserved space for objname.

          -- data : Total amount of space used by data in objname.

          -- index_size : Total amount of space used by indexes in objname.

          -- unused : Total amount of space reserved for objname but not yet used.

          -- unused : Total amount of space reserved for objname but not yet used.

          -- More detail here : http://msdn.microsoft.com/en-us/library/ms188776.aspx

     

    END

    GO

    EXECUTE getAllTablesSize

     



    Michel Degremont | Microsoft EMEA
    Product Support Services Developer - SQL Server Core Engineer |
  • Microsoft SQL Server

    SQL Server Management Studio spends over 10 seconds to load

    • 0 Comments



    Problem description
    SQL Server Management Studio spends over 10 seconds to load.


    Cause
    In general, this behavior is due to 2 things:

    1. The host computer not has access. By default "SQL Server Management Studio" is configured to use online help resources.

    2. The host computer not has access. SSMS tries to go on internet to check for server certificate revocation until "SQL Server Management Studio" got a timeout, is like hanging.


    Resolution
    To fix the issue, you can follow the 3 steps below :

    Step 1 : Following the article : When running "SQL Server Management Studio" the application may load slowly.
    http://support.microsoft.com/kb/555686/

    Step 2 : Disable "Check for publishers certificate revocation" and "check for server certificate revocation" option under the Internet Explorer -> "Internet Options" -> Advanced".

    Step 3 : Add a switch to the Management Studio shortcut by using /nosplash :
    Start > Programs > SQL Server 2005 program group > 'SQL Server Management Studio' program.
    Then, right-clicking and open the General tab, then select shortcut tab to add 'nosplash' switch.
    Sample : "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" /nosplash


    These tree steps combined should improve the load time of SQL Server Management Studio.

    Enjoy SQL Server :-)





    Michel Degremont | Microsoft EMEA
    Product Support Services Developer - SQL Server Core Engineer |
Page 1 of 1 (4 items)