Forum Replies Created

Viewing 15 posts - 46,861 through 46,875 (of 49,552 total)

  • RE: HOw to get value from Execute(@str) to Local variable in Sql server 2000

    Use sp_executesql insead of EXECUTE. It allows you to pass variables in and out of dynamic SQL

    books online has plenty examples

    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: clustered index

    chandrachurhghosh (4/17/2008)


    Well, to support my opinion about storage and clustered index, try out the following....

    create a view with schema binding......then try to create a non-clustered index on it......

    Indexed views are...

    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: clustered index

    chandrachurhghosh (4/17/2008)


    well....logically or functionally you can have n number of indexes at place for your database, but physically it depends upon how many copies of data you want to keep....

    Isn't...

    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: clustered index

    That is not true.

    The definition of a heap is a table that does not have a clustered index, not a table with no index at all.

    It is very possible...

    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: clustered index

    Because the index is not covering and the table scan is cheaper

    To do an index seek in this case requires 3 reads. 2 of the index tree and one of...

    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: Substitute NULL value on converted date field?

    Lookup the ISNULL function. Should do what you want.

    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: update query issue.

    Then the interviewer is either wrong (the syntax is valid and works fine in sQL 2005) or he has something else in mind.

    If someone told me that, I would...

    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 RowID in a db page (when clustered index is not present) sorted?

    If there's no cluster on the table, then the Rid (Row identifier) is the file ID, page number and slot index for the row.

    I don't think there's any definitive...

    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: Interpreting Deadlock Info

    I believe that's the partition_id.... Try this query in whatever DB has the ID 9

    SELECT object_id, index_id from sys.partitions where partition_id = 72057594112638976

    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: update query issue.

    Ahmad Osama (4/17/2008)


    Well..I think that we cant use CASE statement in update query..however,

    Why not?

    CREATE TABLE [dbo].[TheTable](

    [ID] [int] identity,

    [TheName] [varchar](50) NULL

    )

    GO

    insert into TheTable (TheName) Values ('Tom')

    insert into TheTable (TheName) Values...

    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: which query is performance wise best?

    The first and the third are equivalent, though the first is using an older form of joins that is not recommended any more.

    The 2nd and 3rd should be equivalent. 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: I need to reinstall the Sql Server 2005 Agent

    Developer edition includes the agent and there's no way to install the db engine without it been installed as well. (I tested that out yesterday)

    Is that the version of your...

    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: update query issue.

    A case statement should do the trick.

    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 injection

    I don't think I want to know what the DB looks like. I do wonder what account the web site was accessing the DB with.

    Drop 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: using database tuning advisor

    Severe overkill. 😉

    Reindex completely rebuilds an index and updates the statistics with a full scan.

    Reorganise shuffles leaf pages of an index into order. If the index has just been rebuilt,...

    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,861 through 46,875 (of 49,552 total)