Forum Replies Created

Viewing 15 posts - 4,231 through 4,245 (of 49,552 total)

  • RE: DDL Trigger Error

    Can you post the entire code?

    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: Execution plan when there are variables at the query is wrong

    It's lack of parameter sniffing. The optimiser can't sniff the values of variables and hence assumes a default row count estimation.

    Usually fixed by either OPTION(Recompile) or OPTION(Optimize for ...)

    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 Server Memory always showing 98%

    rameelster (11/20/2015)


    Production DB server is showing 98 percent always.How to bring it down

    Why? What good is free memory that's not being used?

    Surely you want all the resources in 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: What happens with uncommitted transactions?

    ScottPletcher (11/20/2015)


    Eventually the timeouts built into SQL to prevent tasks from waiting forever would kick in and SQL would just cancel your request to read the table.

    Not unless the client...

    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: Lock Down Database

    Start by revoking unnecessary sysadmin permissions. If someone's got sysadmin, you can't stop them from doing something to your DB. You can slow them down (eg DDL triggers), nothing more.

    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 Index Issue

    Not asking for the output of CheckDB. I'm asking if you know or checked how many rows were discarded when you ran DBCC CHECKTABLE (PreAudTranHdr, REPAIR_ALLOW_DATA_LOSS), because it will have...

    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: Partitioned Aligned Indexes & Primary Key

    Depends on whether you want the indexes partition-aligned or not. There are valid reasons to do both

    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 restore a database using mdf and ldf files in Sql 2008

    KlaasTimmermans (11/19/2015)


    ( even with mdf you will may be able to attach )

    May, not will. Without the ldf, the database might attach. Or might not. It's not guaranteed.

    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 Index Issue

    How much data did it throw away in the process?

    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 file in sql server

    Phil Parkin (11/19/2015)


    The caveat to this is that if someone created the DB and specified upon creation that the file extensions should be .sql instead of mdf/ndf/ldf

    Shudder.

    I once created...

    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 file in sql server

    It's just the default extension for a text file containing T-SQL code. A .sql file isn't a database.

    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: Is this ever usefull/or ever going to help/why would someone do this inner join A1 on B1 column identity and then use A1.identity = B1.identity in where clause

    No good reason. Probably it started as

    select A1.ID,A1.Quantity,(B1.Value/A1.Quantity) as ValuePerUnit

    from A1, B1

    where A1.identity = B1.identity

    and then changed to use a JOIN and the where clause never removed.

    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: Unique index on varchar(max) column

    You can't create an index on a blob column, that's varchar(max), nvarchar(max), varbinary(max), XML or the old TEXT, NTEXT, IMAGE

    If you want to enforce uniqueness across the two columns, 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: HA Solutions 2014

    Perry Whittle (11/18/2015)


    Grant Fritchey (11/18/2015)


    There are lots of good articles available at Simple-Talk.

    or lots here on Redgates own site 😉

    Simple Talk's also run by Red Gate.

    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 DELETE Thumbs.db File?

    You mean in Explorer? Or programatically?

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