Forum Replies Created

Viewing 15 posts - 2,596 through 2,610 (of 7,619 total)

  • Reply To: How to grant CREATE TABLE but deny DROP TABLE?

    What we ultimately ended up doing was creating a separate db to store user tables in.  A view and/or a synonym can be used in other dbs to allow 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: Snapshot Isolation and DMVs

    I would expect that behavior honestly.  I don't see how SQL could realistically maintain a potentially almost unlimited number of intermediate row counts for different snapshot points for every table...

    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: How to grant CREATE TABLE but deny DROP TABLE?

    Lynn Pettis wrote:

    ScottPletcher wrote:

    Expect to have to do lots of tweaking to the code to handle all the things that come up, though.

    NULL / NOT NULL for each column (which should...

    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: How to grant CREATE TABLE but deny DROP TABLE?

    Expect to have to do lots of tweaking to the code to handle all the things that come up, though.

    NULL / NOT NULL for each column (which should always 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: How to grant CREATE TABLE but deny DROP TABLE?

    A proc is possible, but most people don't code an actual CREATE TABLE statement, they use the gui.  They would have to pass in a block of SQL, which means...

    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: How to grant CREATE TABLE but deny DROP TABLE?

    Probably the easiest work-around is likely a DDL trigger that prevents them from issuing any DROP TABLE (and ALTER TABLE on a table they didn't create, if you need 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: Database Model for Feedback Module

    You need to back up and actually do logical data modeling (Google "logical data modeling") not table modeling.  You literally cannot normalize what you posted because there are no usable...

    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: EXECUTE sp_executesql

    Ok, interesting.  Can you give an example of code that is indefinitely executing?  Are you sure it is this sp_executesql code and not some other code in the proc?

    [Yes, 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".

  • Reply To: How to speed up the query speed between different server tables

    2. ... [H]ow to address this problem ?

    That depends on the specific details in this situation.

    2A. How many rows are in the remote table?

    2B. How much data do you need...

    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: EXECUTE sp_executesql

    A basic numeric calculation should not take long to execute.  Look at the @ParmDefinition and make sure that it is not a calling stored procedure or doing something else 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 rows older than 60 days with Epoch time format

    Don't see anything directly wrong the calcs, although you should not do a calc on every LogTime column in every row, you should compare LogTime directly to the 60-days-ago EPOCH...

    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: SELECT FROM CTE TO GET DB GROWTH DATE AND AMOUNT

    A few quick thoughts (numbered to make discussion of them easier):

    (1) You need to normalize this design, you're storing huge amounts of duplicate data.  Specifically, encode the database name with...

    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: Deadlock on Simple Insert in High Transaction Audit Table

    Several things that would/should help.  You can implement / not implement each one as you see fit:

    1. How do you most often query the table?  By Ids or by datetime? ...

    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: how to remove underscore in between date and time stamp

    You're welcome.  Thanks for the confirmation!

    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: how to remove underscore in between date and time stamp

    Change the end of the statement from ," ","_") 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".

Viewing 15 posts - 2,596 through 2,610 (of 7,619 total)