Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 7,613 total)

  • Reply To: How to improve the performance of insert?delete?update sql statement

    One thing to look out for is UPDATEs that significantly expand the size of varchar columns because that can cause page splits which can be a real performance issue, both...

    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".

  • Reply To: Comparing consecutive datetime rows for schedules

    Jeff Moden wrote:

    I do the same thing with transaction log backups... if the "log_reuse_wait_desc" in the sys.databases view contains "NOTHING" for a database, then nothing in the database has changed and...

    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".

  • Reply To: Queries

    In addition to Jonathan's excellent advice, be sure to also pre-allocate enough log space to handle the full INSERT, especially if the log growth is a small amount.  Log space...

    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".

  • Reply To: Code to auto-update tables on set date

    It's terribly scary to me that this is a "class".  They're teaching people exactly the wrong things to do.

    In my head, I envisioned having the database set up in such...

    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".

  • Reply To: Need help to form query to get missing month data

    david.edwards 76768 wrote:

    ScottPletcher wrote:

    david.edwards 76768 wrote:

    ScottPletcher wrote:

    8<

    >8

    An is_active flag (someone can be inactive and still not "terminated", e.g. "suspended"), specifically, makes perfect sense to me because the specific inactive date / conditions...

    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".

  • Reply To: Need help to form query to get missing month data

    david.edwards 76768 wrote:

    ScottPletcher wrote:

    8<

    >8

    An is_active flag (someone can be inactive and still not "terminated", e.g. "suspended"), specifically, makes perfect sense to me because the specific inactive date / conditions may be...

    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".

  • Reply To: Need help to form query to get missing month data

    Jeff Moden wrote:

    jcelko212 32090 wrote:

    >>But you display only vague dates not associated with any year. I'm going to make a suggestion that you use the MySQL convention four months. It is based...

    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".

  • Reply To: Code to auto-update tables on set date

    thetubageek wrote:

    No and no, to answer your two questions.  I saw how the OP was basically ignoring design suggestions and came to the same conclusion as Scott's last statement and...

    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".

  • Reply To: Moving DB file

    You wouldn't want to detach the db just to move a file.  Just ALTER the file location in SQL Server, take the db offline, copy the file, then bring the...

    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".

  • Reply To: Code to auto-update tables on set date

    Jeff Moden wrote:

    ScottPletcher wrote:

    Nothing to do with data modeling, only development.  Data modeling must precede coding.

    Just don't offer terrible modeling advice and I won't have to point it out.

    I believe you...

    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".

  • Reply To: Code to auto-update tables on set date

    Nothing to do with data modeling, only development.  Data modeling must precede coding.

    Just don't offer terrible modeling advice and I won't have to point it out.

    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".

  • Reply To: Migration step-by-step from SQL Server 2014 to 2019

    The big tasks are the SSIS packages and SSRS reports.  Often they require quite a bit of rework.  I'd start checking those out as soon as you can.

    The other stuff...

    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".

  • Reply To: Code to auto-update tables on set date

     

    The current (pseudo)design is horrifically bad.  You have non-dependent columns in tables, repeating columns (address1, address2 / phone1, phone2), update/delete anomalies all over the place, and so on.

    Stop rushing 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".

  • Reply To: Unique value constraint among active records

    Make sure the [Reference_Table_Obsolete_Date] is getting populated correctly on all obsoleted rows.

    If that date is NULL for both rows (old and new), that will not be allowed for a unique...

    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".

  • Reply To: Other methods of getting the true length of UTF8 String?

    I admit I'm confused.

    LEN() has always not counted trailing spaces.

    When I need to count trailing spaces, I usually just add a non-space and then subtract 1:

    SELECT LEN('ABC' + SPACE(3)), LEN('ABC'...

    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 - 2,191 through 2,205 (of 7,613 total)