Forum Replies Created

Viewing 15 posts - 13,156 through 13,170 (of 49,552 total)

  • RE: SQL Server 2012 IF THEN logic to CASE THEN

    That would be correct as part of a SELECT statement. CASE isn't a statement, it's an expression used within a query.

    So

    SELECT

    CASE WHEN fmwa.GroupNbr<>'' THEN 'NO'

    WHEN dind.DefaultIndicator='Y' THEN 'YES'

    ELSE 'NO'

    END AS...

    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: Disaster recovery

    Depending on the type of disaster, you may be able to take a tail-log backup (google or see BoL).

    If you can, then your restore would be last full backup,...

    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: optimize the schema definition

    You don't really optimise schemas, so not sure what you're asking. The Line Items table needs either normalisation or sensible column names, can't tell which.

    As for the query, you can...

    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: Restart Server to shrink TempDB?

    Draelith (5/15/2013)


    Using this link, http://support.microsoft.com/kb/307487, method 1 looks like it used the alter db to shrink the tempdb.

    Look closer. That has SQL started in minimal config, which means TempDB...

    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: Restart Server to shrink TempDB?

    Don't think you can use alter database to set a lower size than current. Unless someone went and explicitly grew the database ALTER DATABASE TempDB ... to set the files...

    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: TempDB full

    sql-lover (5/14/2013)


    HanShi (5/14/2013)


    No databases will go offline. It wil generate error level 17 messages stating "object xx can't be created in filegroup yy for database TempDB" and the transaction(s) will...

    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: Restart Server to shrink TempDB?

    DO NOT shrink TempDB with DBCC ShrinkFile or DBCC ShrinkDatabase unless the instance (not the database) is running in single user mode, it is documented to be able to cause...

    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: Enabling page compression, and shrinking a DB file...

    jasona.work (5/14/2013)


    (testing shows that enabling compression on the table will also enable it on the clustered index)

    The clustered index IS the table.

    But, my question stands, will the Alter Index...

    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: DB mirroring between SQL 2005 and SQL 2008 R2

    About the only use is as part of a rolling upgrade, so install a second SQL instance (same version), configure mirroring, make sure everything works and the app redirects properly,...

    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: SQLBufferpool AWE Consuming Available Memory

    Yes. If the OS requests SQL to reduce it's memory usage, SQL will do so, down to the value of min server memory.

    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: SQLBufferpool AWE Consuming Available Memory

    Since you have locked pages enabled, SQL is using the physical alloc API to allocate memory for the buffer pool, that shows up as AWE memory (nothing to do with...

    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: Master database 'missing'

    Tools -> Options. Environment -> General

    Your master database is not missing, if it was SQL wouldn't even start.

    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: Master database 'missing'

    It's in the system database folder under databases, along with model, msdb and tempDB

    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: real time backup in sql2000

    Read up on Log Shipping. Not that many other options on SQL 2000.

    p.s. please post SQL 2000 questions in the SQL 2000 forums. Thanks

    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: DB mirroring between SQL 2005 and SQL 2008 R2

    It is possible to have the mirror a higher version, but as I said it's a stupid thing to do and iirc it takes extra work to even set up...

    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 - 13,156 through 13,170 (of 49,552 total)