Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2003
    Posts
    26

    Unanswered: Restricting all databases to 25 MB

    Hello -

    How can I restrict all databases on my system to 25 MB.

    Can anyone provide me any script.

    Regards,

    Rubal

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    ALTER DATABASE master
    MODIFY FILE
    (NAME = master,
    SIZE = 25MB)
    GO

    ALTER DATABASE master
    MODIFY FILE
    (NAME = master,
    FILEGROWTH = 0%)
    GO

    And you can also perform the same from Enterprise Manager by selecting the system database properties.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    Jun 2003
    Posts
    26
    How can I do for all databases thru oone script

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    This sounds like a lovely way to hurt yourself! You could fatally wound yourself, but not even realize it for days. It sounds like great fun for someone else (not me) to try, and I might even help code it!

    Do you want to restrict only the data, or the whole database (both data and log)? How do you want to handle databases that are already over 25 Mb? What about the system databases, especially tempdb?

    -PatP

  5. #5
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    sometimes i wonder about the questions we get here...
    I think that some posters have munchausen by proxy and want to destroy their databases so they can be acclaimed when they "solve" the problem.

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Nah. I bet this is yet another poorly designed application that creates new databases on the fly as a substitute for a dimension that was left out of the original schema.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •