Forum Replies Created

Viewing 15 posts - 5,221 through 5,235 (of 7,613 total)

  • RE: can i solve lokups of non clusterd using clustering index, or i should use the cols in key of nonclusted or includes

    You need to review the choice of clustering key; the clustering key is critical to performance, so never be lazy enough to allow the clustering key to default to identity....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: spaced used by a col in an index in index page is the total lenght of the col or the data it stores in it.

    Yes, the index row length will be 20 bytes. That is normal. Since bigint is a fixed-size data type, even if the value is NULL, it will still...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Average number of days between orders

    dwain.c (4/8/2015)


    ScottPletcher (4/8/2015)


    I'm not seeing why you can't just use the code below. I'm sure someone can quickly explain the part of the problem that I'm missing :-).

    SELECT cust_id,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Average number of days between orders

    I'm not seeing why you can't just use the code below. I'm sure someone can quickly explain the part of the problem that I'm missing :-).

    SELECT cust_id,

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Integer Compression

    I'd expect value -127 to take 2 bytes, since smallint is the smallest data type that can hold that value. Thus, it would still save 2 bytes vs. an...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Full Text Search - Issue

    You need to tell SQL how to match the multiple values. A couple of quick examples:

    Set @KeywordSearch = 'Platform AND Customer AND Support'

    Set @KeywordSearch = 'Platform NEAR Customer NEAR...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Slow down a transaction

    I would hope combining them into a single transaction with a held lock would prevent that problem:

    begin transaction

    select @result = Result

    from Cache with (rowlock,updlock)

    where [Hash] = @hash

    -- A

    if (@result...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: enabling RCSI.....correctly

    If RCSI is on, you wouldn't have any need to use ALLOW_SNAPSHOT_ISOLATION.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Help with arithmetic formula to "stuff" digits

    This would be my only suggestion for an alternative. Don't think it's any better at all, other than that it can handle an input value this is only 4...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Where IN () Clause

    Just to be sure to get the best lookup, insert the individual values in the IN list into a table uniquely clustered on the value. Then, again just to...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Database restore leaves the database with no dbo

    Sorry, I'm a DBA, so I'm highly technical on those terms ;-).

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Database restore leaves the database with no dbo

    real.forte 18467 (4/3/2015)


    Thank you very much for the information. Here is what I ended up doing:

    1. I fetched the SID of the dbo on the original server

    2. Provided I...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Stored prosedur Set Value Column

    CREATE PROCEDURE DvzkuruCek

    @T1 DATETIME = '20150202' --'YYYYMMDD' is always interpreted correctly

    AS

    SET NOCOUNT ON;

    DECLARE

    @KUR INT;

    SELECT TOP (1) @KUR = RATES1

    FROM dbo.L_DAILYEXCHANGES

    WHERE EDATE= @T1 AND CRTYPE...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Database restore leaves the database with no dbo

    real.forte 18467 (4/2/2015)


    So, what you are saying is that, when I restore a database having an SID that does not match any account in the server I restore it to,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Database restore leaves the database with no dbo

    real.forte 18467 (4/2/2015)


    Well,

    The account I perform my restore from is dbcreator and the restore operation itself works well. It is just that it leaves the database with no dbo,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 5,221 through 5,235 (of 7,613 total)