Forum Replies Created

Viewing 15 posts - 4,666 through 4,680 (of 49,552 total)

  • RE: t-sql 2012 orrder by

    It's not part of the ORDER BY.

    What you have there is a subquery.

    CASE WHEN ( <subquery> ) > cw.Inv THEN ...

    Comparing the result of the subquery to the column cw.Inv

    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 to resolve SQL Client Timeouts?

    A timeout is the client saying it's waited too long. Your DBA is right, there will be nothing in the SQL error logs because as far as SQL's concerned, 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: Oversized Log File

    Don't shrink it to zero. Shrink it to around half of the size of the msf, and monitor the file growth and usage.

    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: Cluster Index Key value

    If the clustered index key is Col1, and you insert 10 into column 1, then the clustered index key value for that row is 10.

    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: Trying to restore a database with STANDBY/READ ONLY

    https://msdn.microsoft.com/en-us/library/ms186858.aspx

    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 to Write Insert Into with Select and Where in Stored Procedure

    Kinda hard to understand what's wrong, but maybe start with this

    ALTER PROCEDURE [dbo].[sp_insert_test]

    @mid INT OUTPUT,

    @CID INT OUTPUT,

    @Member NVARCHAR OUTPUT

    AS

    BEGIN

    SET NOCOUNT ON;

    INSERT INTO ServiceLine_Committee.dbo.tblVotings (Meeting_ID, Committee_ID, Member_Name)

    SELECT M.ID, C.ID, CM.FULL_NAME

    FROM ServiceLine_Committee.DBO.tblCommitteeName...

    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: Oversized Log File

    mike 57299 (9/25/2015)


    Also, I don't understand something about logging... doesn't a checkpoint command clear all dirty log issues?

    No. A checkpoint writes all dirty database pages to disk and, in simple...

    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: SQL Server Error Log

    It's not possible to stop SQL from logging to the error log.

    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: Actual Memory Usage in SQL 2008 R2

    Sessions don't use the majority of SQL's memory. The main components will be the data cache (caching data so SQL doesn't have to go to disk) and the plan cache...

    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: Preference of LEFT JOIN <table> WHERE ... IS NULL vs. NOT EXISTS ( ... )

    http://sqlinthewild.co.za/index.php/2010/04/27/in-exists-and-join-a-roundup/

    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 Backups Failing

    If you don't come right, log a call with MS support. They have the tools to read and interpret stack dumps.

    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 Backups Failing

    Access violations are memory-related (reading or writing memory that belongs to another process or similar). Can you do a memory test of the server? Bios or other tool?

    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: Can a hacker obtain database information from an unencrypted differential backup?

    sql-lover (9/24/2015)


    Not sure if HxD can open a DIFF backup.

    Why would it not be able to? Hex editors don't care about the file type, they display the files they open...

    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: Order of predicates

    Alan.B (9/24/2015)


    Just as a side note, this won't fail:

    WITH X AS

    (

    SELECT fld

    FROM #t

    WHERE cast(fld as int) > 0

    )

    SELECT fld

    FROM X

    WHERE ISNUMERIC(fld) =1

    Since the optimiser pushes predicates down 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: Simple UPDATE Trigger

    You just need an update trigger. If DateModified is set DEFAULT GETDATE() that'll handle the assignment for the insert, and then Sean's code is all that's needed for the update...

    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 - 4,666 through 4,680 (of 49,552 total)