Forum Replies Created

Viewing 15 posts - 46,966 through 46,980 (of 49,552 total)

  • RE: are there "arrays" in sql 2005 ?

    Change CONVERT(VARCHAR(20)... to CONVERT(VARCHAR(25)... Some of the converted date is getting cut off.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: are there "arrays" in sql 2005 ?

    Hmm. If you look at the printed out dynamic string, what does that last part (with the dates) look like?

    Regardng attaching excel, it depends how you're doing the mailing what...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Rule Vs. CHECK

    Might be possible, but you would have to express it as a logical expression

    (Col1 between 0 and 5 and Col2 between 0 and 5 and Col3 between ...)

    Rather don't use...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Database File Size

    DBCC ShrinkDatabase or DBCC ShrinkFile

    You can find all the details for both in Books online.

    Be aware that a DB does need some empty space to function properly, so maybe shrink...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Help with Complex Query

    Does this help? I can't test it, since you haven't given the table schemas or any sample data.

    Select Usr_ID

    from User_roles

    inner join ACCESS_RIGHTS ON

    ((Access_Rights.MEMBERSHIP_OBJECT_ID = User_Roles.Rol_ID AND MEMBERSHIP_OBJECT_TYPE =...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Forcing hints when using sp_executesql

    Try a planguide for adhoc code

    @type = 'SQL', @module_or_batch = NULL

    sp_executesql's just executing a string passed to it. The @type=object is for a query that's within a stored procedure.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Rule Vs. CHECK

    Sure.

    CREATE TABLE TestingDates (

    ID INT IDENTITY PRIMARY KEY,

    Starts DATETIME,

    Ends DATETIME

    )

    ALTER TABLE TestingDates ADD CONSTRAINT ck_DateCheck CHECK (Starts <= Ends)

    INSERT INTO TestingDates (Starts, Ends)

    VALUES (GETDATE(), GETDATE()+1) -- succeeds

    INSERT INTO TestingDates...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: duplicate table name in sysobjects

    In sysobjects, the uid column will be different. You can join to sysusers to get the name of the table owner

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Index on nullable columns

    I wouldn't think so. As far as index selectivity's concerned, 1 million nulls or 1 million 0s selects much the same.

    I'm not sure about nulls, but I think that a...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How torestore database from full backup to certain point of time

    Restore your transaction log backups, starting with the one you took right after the full backup on the 25th. Restore them in order, with the NoRecovery option and with the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How torestore database from full backup to certain point of time

    Lubo Petrov (4/7/2008)


    properties of bak file created March 26 at 12:00:20 AM Modified at 12:01:10 AM

    A full database backup contains the contents of the DB at the point in time...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How torestore database from full backup to certain point of time

    What time did the full backup start and finish?

    What time did the log backup run?

    What time are you trying to stop at?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: QOD suggestion

    Steve Jones - Editor (4/7/2008)


    Most people don't participate 🙁

    Of the 10k-20k people, and 45-50k pages, we get about 300-500 responses quite often to polls and surveys. Probably should add them...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Optimizing SQL Query

    If you're running SQL 2005 (as I assume you are, based on the forum this is posted in), could you please save the exec plan as a .sqlplan file, zip...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: duplicate table name in sysobjects

    Different owners?

    Someone messing with Allow Updates?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 46,966 through 46,980 (of 49,552 total)