Forum Replies Created

Viewing 15 posts - 4,561 through 4,575 (of 7,619 total)

  • RE: Partitioned index on partitioned table

    If you (almost) always look up by PartitionID and Name, then the table should be clustered first on those columns. If you really want/need to, add other columns 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: How to reduce Huge Log File size

    Once the db is changed to Simple model, it's easy enough to shrink the log, you just have to keep an eye on where the current end-of-file marker is, as...

    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 Procedure execution

    It depends. It won't happen automatically. But if you can add code to SP_CHILD_1 and SP_CHILD_2 to end after that period of time, you could have the child...

    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: How to select 200k data faster in sql

    Jeff Moden (12/15/2015)


    ScottPletcher (12/14/2015)


    Jeff Moden (12/12/2015)


    ScottPletcher (12/10/2015)


    Do you have a unique index on Word? You don't want SQL to have to sort the words every time -- that will...

    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: How to catch actual parameter value passed into a stored procedure?

    Sergiy (12/14/2015)


    ScottPletcher (12/14/2015)


    They should have the same level of permission in a test environment that they do in production, otherwise you haven't tested security, right?

    Do developers really have the same...

    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: How to catch actual parameter value passed into a stored procedure?

    Sergiy (12/14/2015)


    ScottPletcher (12/14/2015)


    hopefully your normal app logins don't have that high a level.

    On a test host?

    They should have the same level of permission in a test environment that they do...

    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: How to catch actual parameter value passed into a stored procedure?

    Sergiy (12/14/2015)


    ScottPletcher (12/14/2015)


    1) I wouldn't advise writing that type of info into error logs.

    Why?

    What do you think Application Event Log is for?

    For Application Events. Stored proc parameters are not...

    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: How to solve for orders where the status on every item is greater than status of 3

    Select order_number,

    min(serial_number) AS serial_number_min,

    max(serial_number) AS serial_number_max,

    min(status) AS status_min,

    max(status) AS status_max

    from...

    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: How to catch actual parameter value passed into a stored procedure?

    Sergiy (12/14/2015)


    You may add something like this into your procedure:

    DECLARE @ProcName sysname, @Param INT

    SELECT @ProcName = OBJECT_NAME(@@PROCID), @Param = 1000

    IF HOST_NAME() = 'My Test Host'

    RAISERROR ('Started procedure %s, Parameter supplied:...

    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: Using count(*) performance

    If you have indexes keyed on tbl2.col1 and on tbl3.col1, then it almost has to be some type of blocking. You could try the query below, might work better,...

    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: Using count(*) performance

    Do you have a nonclustered, nonfiltered index containing tbl2.col1?

    A nonclustered, nonfiltered index containing tbl3.col1?

    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: Best Practice - how to exclude records?

    If you need to know if all the lines have only product_type = 'A' on any kind of regular basis, I'd denormalize and add a flag to the invoice header,...

    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: How to select 200k data faster in sql

    Jeff Moden (12/12/2015)


    ScottPletcher (12/10/2015)


    Do you have a unique index on Word? You don't want SQL to have to sort the words every time -- that will be extremely slow....

    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: what is the best way to rewite a oracle sql query to sql server 2012

    Here's a few notes on the conversion process, and a sample of the first table converted.

    The double quotes are fine, as long as "SET QUOTED_IDENTIFIER ON" is active, which it...

    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: TempDB Log growing

    Is the log size growing, or just the % used? You don't want the log size to grow dynamically, as that will slow down the database. But tempdb...

    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 - 4,561 through 4,575 (of 7,619 total)