Forum Replies Created

Viewing 15 posts - 5,851 through 5,865 (of 7,619 total)

  • RE: Trying to Use Substring(charindex) to remove start of a string

    Not sure if you want to get the exact proc name being executed or see it and its parameters. Something like this should help you get started, although 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: Char , Varchar, NVarchar

    er.mayankshukla (8/26/2014)


    er.mayankshukla (8/26/2014)Hello Experts,

    I have defined a Nvarchar column of 30 bytes

    Lets say

    create table demo (name nvarchar(30))

    But when I see the length of this column by selecting table and pressing...

    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: Perfomance tuning and design<!-- 864 -->

    See if it's possible to summarize data and get rid of some of the details. Yes, they always say then need "everything", but then frequently they roll things up...

    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: Scalar UDF versus Inline UDF<!-- 864 -->

    Tracing scalar UDFs adds enormous time to its execution. That is, just trying to compute the time vastly increases the time. Thus, scalar UDFs generally are performing much...

    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: Difference between INFORMATION_SCHEMA.COLUMNS and sys.columns<!-- 864 -->

    This is an easy one:

    ALWAYS use sys.; NEVER use INFORMATION_SCHEMA.

    Not only might I_S be inaccurate, I've found it's also much slower and much more prone to locking/deadlocking. The I_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".

  • RE: Mass removal ofF permissions

    MickyD (8/19/2014)


    Scott

    Thanks for this . Could you confirm if I need to add the select statement part ?

    Ideal situation would be to read this from a table that exists 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".

  • RE: Mass removal ofF permissions

    Something like this should get you going pretty quickly. You can add the "documentation" part by adding a SELECT and/or PRINT to output a message about what is about...

    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: Mass removal ofF permissions

    MickyD (8/19/2014)


    ScottPletcher (8/19/2014)


    You should be able to get the spreadsheet into a table by right-clicking on the database to load it into, selecting "Tasks", then "Import Data...", and go thru...

    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: Mass removal ofF permissions

    You should be able to get the spreadsheet into a table by right-clicking on the database to load it into, selecting "Tasks", then "Import Data...", and go thru the wizard...

    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: More Efficient Way For this T-SQL Query

    My preference would be this (the "extra" parentheses are important to properly match the requirements):

    SELECT *

    FROM YourTable

    WHERE (SnapshotDate > @from AND SnapshotDate < @to)

    OR (SnapshotDate = @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: Merging two large tables (>100m Rows)

    How many rows will be added / changed between uploads / syncs?

    I suggest considering Change Tracking or some other automated method of determining changes rather than trying to do 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: Script Generator in table designer?

    The DBA's quite right, you need "WITH CHECK" explicitly specified (or allowed to default). I don't see an option in scripting to explicitly specify this (at least through 2008...

    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: Decrease query execution time to retrieve records from huge table

    Grant Fritchey (8/16/2014)


    ScottPletcher (8/15/2014)


    What is(are) the clustering column(s) on the table? You need to read each 1/4 of the table at a time using the appropriate clustering key range.

    What...

    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: Prevent RENAME of a database

    Shouldn't the event you want to intercept be "ALTER_DATABASE", not "RENAME"?

    You'll need to interrogate the event data to identity a MODIFY NAME = vs other types of alter database commands.

    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: Decrease query execution time to retrieve records from huge table

    What is(are) the clustering column(s) on the table? You need to read each 1/4 of the table at a time using the appropriate clustering key range.

    What are there nonclustering...

    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,851 through 5,865 (of 7,619 total)