Forum Replies Created

Viewing 15 posts - 241 through 255 (of 821 total)

  • RE: Mount Points

    To get it for each db and files:

    declare @sql nvarchar(max) = 'select 0 as dbid,0 as fileid WHERE 0=1'

    SELECT @sql = @sql + '

    UNION ALL SELECT '''+RIGHT(database_id,10)+''',fileid FROM '+name+'.sys.sysfiles'

    FROM...

  • RE: Best design for OLTP tables

    Very interesting!

    Thanks!

    😀

    But in the real world, if Id is uniqueidentifier, how many splits of page will occur?

  • RE: CURSOR LOOP

    Boh!

  • RE: Logical File Names

    BWFC (8/3/2015)


    Not only do none of the answers appear to be correct but the the explanation does not match the options.

    The correct answer is Query 2, with the MODIFY FILE...

  • RE: Global temporary table visibility

    I tested it. The qotd is right and also the answers are correct.

    I learned something new.

    I also tested placing a WITH(NOLOCK) on query 2 and 3, same results.

    Query 1:

    create table...

  • RE: Detecting Differences in Files on Servers

    Eirikur Eiriksson (7/30/2015)


    Thanks Ed for this fine piece, certain that it will be a very handy reference.

    😎

    +1

    Here, another dos command to list files, each column is separated by "*":

    @for /R...

  • RE: Database Mirroring Restrictions

    Hugo Kornelis (7/16/2015)


    Koen Verbeeck (7/15/2015)


    Meh, who cares about mirroring

    Perhaps, everyone who does not have the budget for Enterprise Edition?

    From BOL:

    If you are running an edition of SQL Server that does...

  • RE: Drop a temporal table

    I read about TEMPORAL TABLE just two weeks ago.

    Good qotd!

    🙂

  • RE: SET vs. SELECT

    Easy, thanks!

    😀

  • RE: integer lengths (II)

    Correct answer:

    When J is between -999,999,999 and -100,000,000 or between 1,000,000,000 and 2,147,483,647

    Correct explanation:

    ...

    If the expression is between -999,999,999 and -1(,0)00,000,000 or between 1,000,000,000 and 2,147,483,647 it's decial representation...

  • RE: Dependency between tables

    I'm surprised, how an "answers bad worded" qotd gets more than 60% of right answers.

    :crazy:

  • RE: database-scoped credential (SQL2016 CTP2)

    -- Using credentials on database requires enabling traceflag

    DBCC TRACEON(4631,-1)

    Instead of

    -- Using credentials on database requires enabling traceflag

    DBCC TRACEOFF(4631,-1)

  • RE: A Syntax Mystery in a Previously Working Procedure

    deroby (6/18/2015)


    I'm going to chime in on the 'Yay for sp_helptext' team.

    The stored procedure might be old (and indeed in need for some TLC, thumbs up for the...

  • RE: A Syntax Mystery in a Previously Working Procedure

    I fixed this bug in the sp_helptext in 2002 in SQL2000 in the same way. I changed the length from 255 to 4000, but the problem is not solved completely....

  • RE: Insert without a PK

    I thought that this statement was missing:

    alter INDEX SalesArchive_CI_SalesPersonID ON dbo.SalesArchive disable

    ... and got it right!

    😀

Viewing 15 posts - 241 through 255 (of 821 total)