Ian Beckett

RSS feed

    Recent comments

    Authors

    Passed the 70-431 SQL 2005 MCTS certification exam today

    I passed the 70-431 exam today and I now have my MCTS (certified technology specialist) title!  :)

    here's more info on the exam: http://www.microsoft.com/learning/en/us/exams/70-431.aspx


    Posted by ibeckett on Wednesday, October 01, 2008 4:36 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    SQL Server Sample Databases; AdventureWorks, Northwind, etc.

    I keep losing these so here are the links to fresh copies... for safe keeping Wink

    Northwind and pubs Sample Databases for SQL Server 2000

    http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en

     

    SQL Server 2005 Samples and Sample Databases

    http://www.microsoft.com/downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

     

     


    Posted by ibeckett on Wednesday, July 09, 2008 4:54 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What steps are required to prepare a database for initiation of a mirroring session in SQL 2005?

    1.       Identify the Principal, Mirror, and Witness 

    2.       Create a certificate for authentication between the end points on the Principal/Mirror 

    3.       Create the end points on the Principal/Mirror 

    4.       Set the Principal and Mirror recovery models to "Full" or else you will get an error 

    5.       Ensure that the Principal and Mirror are synchronized by backing up the Principal and applying the backup to the mirror using the "no recovery" option


    Posted by ibeckett on Tuesday, May 20, 2008 4:08 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What does the "Network Interface/Output Queue Length" counter in System/Perf Monitor measure?

    It measures the number of packets waiting to be sent back to clients.  A value greater than 2 represents a potential network bottleneck.

    source: these 2 basic sentences are repeated over and over on different sites all over the web, I'm not sure what the original source is Frown


    Posted by ibeckett on Tuesday, April 22, 2008 3:02 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    Using SQL Profiler, which trace event can be used to find the execution duration of each statement executed within a sproc?

    StoredProcedures\SP:StmtCompleted

    source: http://msdn2.microsoft.com/en-us/library/ms175481.aspx


    Posted by ibeckett on Sunday, April 13, 2008 6:31 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    what versions of SQL 2005 allow you to configure a transactional replication publication?

    any version except for Express edition

     source: http://msdn2.microsoft.com/en-us/library/ms143761.aspx


    Posted by ibeckett on Saturday, April 12, 2008 2:33 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What trace events can be used in SQL Server Profiler to detect a missing index?

    1. Scans\Scans Started - this event is triggered whenever a table or index scan begins, if it shows as a table scan then the table is missing an index.
    2. Performance\Autostats - this event is triggered whenever SQL Server has to create statistics in order to improve query performance.  Statistics are only created if there is not an existing index that can be used to boost efficiency.

    books online source: http://msdn2.microsoft.com/en-us/library/ms175481.aspx


    Posted by ibeckett on Saturday, April 12, 2008 1:02 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What permissions are required in order for a user to create a user defined data type?

    1. ALTER permission on the schema
    2. CREATE TYPE permissions on the database
    3. REFERENCES permission on the registered assembly being used for the user defined type.

    books online source: http://msdn2.microsoft.com/en-us/library/ms175007.aspx


    Posted by ibeckett on Saturday, April 12, 2008 12:57 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    How do you setup a logical backup device on a USB hard drive?

    Use the sp_dumpdevice system stored procedure.  For example (after mounting the USB drive as "g"):

     EXEC sp_addumpdevice 'disk', 'mydiskdump', 'g:\dump\dump1.bak';

    source: http://msdn2.microsoft.com/en-us/library/ms188409.aspx


    Posted by ibeckett on Saturday, April 12, 2008 12:41 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What is required for a mirroring session to provide automatic failover in SQL 2005?

    The session must be configured for High Availability operating mode, which provides synchronous data transfer between the primary and secondary (principal/mirror) servers, and which also requires a third server (witness) to handle the failover process.

     books online source: http://msdn2.microsoft.com/en-us/library/ms178104.aspx


    Posted by ibeckett on Saturday, April 12, 2008 9:08 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    how are deadlock victims selected in SQL 2005?

    By default, the Database Engine chooses as the deadlock victim the session running the transaction that is least expensive to roll back. Alternatively, a user can specify the priority of sessions in a deadlock situation using the SET DEADLOCK_PRIORITY statement

    books online source: http://msdn2.microsoft.com/en-us/library/ms178104.aspx


    Posted by ibeckett on Saturday, April 12, 2008 8:49 AM
    Permalink | Comments (0) | Post RSSRSS comment feed

    What's the best way to alert admin when running out of disk space?

    You can use system/performance monitor to define an alert, then set the alert to notify admin.

    url to MS KB source article: http://support.microsoft.com/kb/324796


    Posted by ibeckett on Friday, April 11, 2008 6:35 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    what are some things to keep in mind when using the pivot operator in SQL 2005?

    • you cannot return non aggregate data with pivoted columns
    • you have to specifiy a derived table to pivot on
    • pivot operator does not allow dynamic columns
    • pivot operator does not allow multiple types of aggregation within a single operation

    books online source: http://msdn2.microsoft.com/en-us/library/ms177410.aspx


    Posted by ibeckett on Friday, April 11, 2008 6:28 PM
    Permalink | Comments (0) | Post RSSRSS comment feed

    what methods can be used to perform side by side upgrade without affecting database availability?

    1. you can use SQL Management Objects Copy Database Wizard
    2. you can do an online backup and restore
    3. you can manually copy the database files

    books online for sp_detach_db: http://msdn2.microsoft.com/en-us/library/ms188031.aspx

    books online for how to detach using management studio: http://msdn2.microsoft.com/en-us/library/ms191491.aspx

    books online for copy datanase wizard: http://msdn2.microsoft.com/en-us/library/ms188664.aspx

     


    Posted by ibeckett on Friday, April 11, 2008 5:28 PM
    Permalink | Comments (0) | Post RSSRSS comment feed