Forum Replies Created

Viewing 15 posts - 2,026 through 2,040 (of 7,619 total)

  • Reply To: question on Index Rebuilds

    Even if the db is not normally in SIMPLE mode, you would certainly want it to be in SIMPLE for these rebuilds, to drastically reduce logging requirements.

    If the db is...

    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: Magic Tables in the SQL Server

    Btw, I suggest not using the term "magical tables" in your interview.  It sounds rather unknowledgeable about relational dbms's.

    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: Magic Tables in the SQL Server

    Oh, virtual tables.  Yeah, SQL has lots of virtual tables.

    Yes, you could easily be asked about the inserted and deleted tables.  You can treat these as regular (physical) tables in...

    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: Find Average Row Size and Num of Rows per page for a table

    I intended that you would get a specific row's(s') actual physical length(s) based on the input to the function.

    You specify a unique key or key range for any existing 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: question on Index Rebuilds

    With a table that large, say you have a total of 6 indexes, 1 clus and 5 nonclus.

    I'd expect it to be faster to do a REBUILD ALL than 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: Running Job Steps and Duration

    If a job has only 1 step, then that step started when the job itself started, and you already know how to tell that.

    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: Find Average Row Size and Num of Rows per page for a table

    It's long past time that SQL Server should provide a ROWLENGTH function that gives you the physical length of a row(s).  But that's likely just wishful thinking on my part.

    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: question on Index Rebuilds

    Use REBUILD ALL, it will (should) be more efficient.

    But pre-grow the log first to the total size you will need for the REBUILD.  It's a very slow process when 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: Find Average Row Size and Num of Rows per page for a table

    Of course the lazy way to get an accurate avg row size, if you have the time to let it run, is using:

    EXEC sys.dm_db_index_physical_stats

    specifying 'DETAILED'.  SQL will then calc 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: I need help with dates in the where clause I need to get data from 5pm to 5am

    I don't know your data.  In the original q, you stated "each day of the week".  So I guessed one week.

    If you only need two days, then change the ending...

    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: Magic Tables in the SQL Server

    I've been a SQL Server DBA for 20 years, I've never heard of "magic tables" in SQL Server.  You need to be clearer and more specific about what you're trying...

    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: Running Job Steps and Duration

    Not directly.  But sysjobhistory has the time each step started and the duration of the step.  Of course that means that the row for a step cannot be written 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: Find Average Row Size and Num of Rows per page for a table

    > 1024 * Reserved_Page_Count * 8 / Row_Count.  My question  here is, why the 1024? <<

    So that the final calc is in bytes, not kb.  That makes sense, since hopefully...

    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: I need help with dates in the where clause I need to get data from 5pm to 5am

    WHERE  tdate >= '12-28-2020 17:00' and tdate < DATEADD(DAY, 7, '12-28-2020 05:00') and
    (DATEPART(HOUR, tdate) BETWEEN 17 AND 23 or DATEPART(HOUR, tdate)...

    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: question on Index Rebuilds

    It shouldn't take anything remotely close to 12 hours to rebuild indexes on tables that size with that much RAM available.

    Unless maybe the table's incredibly wide.  What is the average...

    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,026 through 2,040 (of 7,619 total)