Forum Replies Created

Viewing 15 posts - 43,981 through 43,995 (of 49,552 total)

  • RE: Its very urgent : Time Out Error

    IntellectYog (10/7/2008)


    Hi Gail

    Tnx. for very fast reply.

    Can u explain me in brief?

    What do you want explaining?

    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 Engine Tuning Advisor

    Is this for a demo or presentation or similar?

    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: Deleting a row is coming up with error in SQL 2005 using Visual Studio

    It's basically saying that you are asking for a single row to be deleted, but if it does the delete, two will go. To delete only one of duplicate set,...

    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: Concurency of INSERT INTO SELECT statement

    zespri (10/6/2008)


    Also in SQL Server Books Online it is stated :

    •Serializable (the highest level, where transactions are completely isolated from one another

    This is not entirely correct. Two Serializable transactions...

    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: Its very urgent : Time Out Error

    My first suggestion would be to optimise the proc. Replace those cursors with set-based code that should run a lot faster. If you're doing cross tabs, look up the PIVOT...

    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: Isolation level and Index

    Without indexes SQL has to do table scans and hence will take table-level locks. With appropriate indexes, SQL can take more granular locks and hence the two connections don't block...

    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: Using IF statement in Stored Procedure - Need help defining Variable

    What's it doing that it shouldn't be or not doing what it should?

    Basically, can you give us a little more detail on what's wrong?

    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: Please explain code used to identify currently executing SQL statements

    Again because of the varchar/nvarchar

    In fn_get_sql, the text column is of type text, is a non-unicode value, so datalength returns the length of the string and hence dividing that by...

    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: Trigger question

    That should work.

    Just one thing, you don't need the second if exists. Just put the update in the else part of the if.

    As it's currently written, the second if exists...

    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: Securing SQL at my New Job

    homebrew01 (10/6/2008)


    Yes .... I'm a few steps backwards compared to my last position ... !

    Look at it as an opportunity. 😉

    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 Physical Temp Tables

    Try adding the indexes back after inserting the data but before querying it. If you're doing more than 1 or 2 queries, you may well see a large benefit.

    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: a simple (i hope) syntax question

    How about something like this?

    select < column list > from users inner join

    (SELECT User_ID, MAX(Start_Date) as LatestStartDate FROM Users group by User_ID) sub

    on Users.User_ID = sub.User_ID and...

    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: Trigger question

    Two questions.

    Why do you only want to insert/update the first row if there are multiple rows in the insert?

    How do you define 'first row'? SQL doesn't put any meaning on...

    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: Securing SQL at my New Job

    Less on the security and more on the performance, see if you can secure a separate server for dev/test. Letting developers develop on the prod box is asking for an...

    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: Dynamic SQL?

    The temp table will be automatically dropped when the procedure that created it ends or the connection that created it closes. It's exactly the same whether you explicitly create it...

    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 - 43,981 through 43,995 (of 49,552 total)