Forum Replies Created

Viewing 15 posts - 5,566 through 5,580 (of 7,613 total)

  • RE: Find All Compressed tables in database - script

    FYI:

    WHERE sp.data_compression > 0

    is more sargable then "<> 0"; avoid <> unless you have to use 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: Fragmented Index - Zero Usage - Zero Updates

    Maybe you could DISABLE the indexes if they are truly never used?

    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: A significant part of sql server process memory has been paged out

    If the server has only 2GB, then you'll have to limit SQL to 1.5GB. Otherwise it will use it all, causing serious memory problems. Yes, you almost certainly...

    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: Year summary report

    If you want to load variables, then as below. If you just want to list each month, remove the "@Jan = " and put " AS Jan" after 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".

  • RE: Database connection permissions

    You can give them separate permissions in msdb to deal with jobs.

    I can't imagine why you would want people arbitrarily creating maintenance plans, but you should be able to add...

    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: Database connection permissions

    Brandie Tarvin (12/12/2014)


    ramana3327 (12/11/2014)


    SA account is already disabled. so I need to give public server role and map as dbowner for remaining databases right?

    Yes. That will prevent them from accessing...

    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: Drive Spaces - Database size

    Jeff Moden (12/12/2014)


    ramana3327 (12/11/2014)


    I need for existing database.

    If database current size is about 350GB and growth is about 70GB/month. How do you calcaulate the D:/Drive free space and L:/Drive free...

    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 creating records if certain other records already exist

    Evil Kraig F (12/11/2014)


    RETURN (

    SELECT CASE

    WHEN @optional_letter = ' ' AND EXISTS(SELECT 1 FROM dbo.Test WHERE letter...

    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 creating records if certain other records already exist

    Emil Bialobrzeski (12/12/2014)


    ScottPletcher (12/11/2014)


    SELECT CASE

    WHEN @optional_letter = ' ' AND EXISTS(SELECT 1 FROM dbo.Test WHERE letter =...

    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: space is allocated to the database in SQL Server?

    EXEC sp_helpdb '<your_db_name>'

    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 creating records if certain other records already exist

    Evil Kraig F (12/11/2014)

    @scott: You missed a space in the first condition, near the end. Otherwise, that's a form of how I've done this in the past. However,...

    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 creating records if certain other records already exist

    Here's a simplified function with sample testing data and results:

    IF OBJECT_ID('dbo.Test') IS NOT NULL

    DROP TABLE dbo.Test

    CREATE TABLE dbo.Test (letter char(1), number int, optional_letter char(1))

    GO

    IF OBJECT_ID('dbo.Test__FN_optional_letter') 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".

  • RE: Database Performance Improves After Database Restore

    Your initial query was impossible:

    WHERE (table.FID IN (359890) OR

    (table.FID IN (N'19508e3b-0595-41cf-88f2-c13141e0bc40')

    but the query plan cleared it up: the second column is a different column from the first one.

    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: Drive Spaces - Database size

    Don't forget the other side of the issue.

    Have you compressed large indexes when useful?

    Have you reviewed that you have the best clustered index on each table? After that, have...

    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: Database connection permissions

    ramana3327 (12/11/2014)


    I am re-framing my requirement.

    We have a team working as DBA (Offshore). We have 5 user databases. One database has the secure data and doesn't to reveal the data...

    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,566 through 5,580 (of 7,613 total)